[FAQ] TDA4VM-Q1: SR2.0 update Keywriter process

Part Number: TDA4VM-Q1
Other Parts Discussed in Thread: TDA4VM

Tool/software:

Hi Customer,

This FAQ is about TDA4VM SR2.0 HS Keywriter, there is some change need apply to Default keywriter:

1. Download and Install ti-processor-sdk-rtos-j721e-evm-09_02_00_05 and OTP_KEYWRITER_ADD_ON_j721e_sr2_09_02_00_05. Addon need apply via mysecure SW or contact with your support window.

2. Follow the readme.txt in addon package as below to replace two binaries.

 Copy the OTP keywriter firmware `ti-fs-keywriter.bin` file to

<Your SDK path>/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/tifs_bin/j721e/ti-fs-keywriter.bin

 Copy the TIFEK Public key `ti_fek_public.pem` file to

<Your SDK path>/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/scripts/ti_fek_public.pem

3. Generate or replace your customer key to specify path.

# This will randomly generate 5 keys files locate in ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/scripts/keys

cd ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/scripts

./gen_keywr_cert.sh -g

if you want using the dummy key from TI

# Copy the customer dummy private key (SMPK private key, PEM format)

cp build/makerules/k3_dev_mpk.pem boot/keywriter/scripts/keys/smpk.pem

# Copy the customer dummy encryption key (SMEK, converted to binary file)

xxd -p -r build/makerules/k3_dev_mek.txt > boot/keywriter/scripts/keys/smek.key

# using your own keys need replace accordingly.

4. Generate the final_certificate.bin, below command will not burn the backup key.

cd ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/scripts

./gen_keywr_cert.sh -s keys/smpk.pem --smek keys/smek.key -t ti_fek_public.pem -a keys/aes256.key --msv 0xC0FFE --keycnt 1 --keyrev 1

log for reference 

# Using MSV[19:0]: 0x000C0FFE

# Using Key Count: 0x00000001

# Using Key Rev: 0x00000001

Generating Single signed certificate!!

# encrypt aes256 key with tifek public part

The command rsautl was deprecated in version 3.0. Use 'pkeyutl' instead.

# encrypt SMPK-priv signed aes256 key(hash) with tifek public part

The command rsautl was deprecated in version 3.0. Use 'pkeyutl' instead.

The command rsautl was deprecated in version 3.0. Use 'pkeyutl' instead.

# encrypt smpk-pub hash using aes256 key

writing RSA key

# encrypt smek (sym key) using aes256 key

4031      primary_cert.bin

4031      ../x509cert/final_certificate.bin

# SHA512 Hashes of keys are stored in verify_hash.csv for reference..

The hash codes of Sme and smpk are stored in CSV files, and the Keywriter compilation will use final_ccertifie.bin.

5. Apply below patch to main.c, this will open the MCU uart pll.

diff --git a/packages/ti/boot/keywriter/main.c b/packages/ti/boot/keywriter/main.c

index 410b32a..0826bdd 100644

--- a/packages/ti/boot/keywriter/main.c

+++ b/packages/ti/boot/keywriter/main.c

 

@@ -197,6 +205,16 @@ int main()

     /* pinmux for M3 logs */

     HW_WR_REG32(WKUP_UART_TXD_MUX_ADDR, PIN_OUTPUT | PIN_MODE(0));

 

+#if 1

+       *((volatile unsigned int *)(0x40d01010)) = 0x68EF3490;

+       *((volatile unsigned int *)(0x40d01014)) = 0xD172BC5A;

+

+       *((volatile unsigned int *)(0x40d0108C)) = 0x00008031;

+

+       *((volatile unsigned int *)(0x40d01010)) = 0x0;

+       *((volatile unsigned int *)(0x40d01014)) = 0x0;

+#endif

+

     UART_socGetInitCfg(KEYWRITER_BOARD_UART_INSTANCE, &uart_cfg);

     uart_cfg.frequency       = SBL_ROM_UART_MODULE_INPUT_CLK;

     uart_cfg.enableInterrupt = UFALSE;

6a.(optional) due to keywriter can only burn one time, we need take this carefully. so that we can comment the OTP function to see other part work normal or not. you can see the log will output on MCU UART and WKUP UART. log for reference see step 7. confirm the debug_response=0x0 and both UART have output, you can open the OTP function and go on the step6 again.

int main()

{

+//int32_t status = CSL_EFAIL;

- int32_t status = CSL_EFAIL;

uint32_t debug_response = 0;
uint32_t *keywriter_cert = &keywr_end + 1;
UART_HwAttrs uart_cfg;

+#if 0

     status = Sciclient_otpProcessKeyCfg((uint32_t *)keywriter_cert,

                                         SCICLIENT_SERVICE_WAIT_FOREVER,

                                         &debug_response);

@@ -219,7 +238,7 @@ int main()

     {

         UART_printf("Sciclient_otpProcessKeyCfg returns: %d\n", status);

     }

-

+#endif

6. using below command to generate keywriter_img.

ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/build$

make keywriter_img_clean

make keywriter_img

7. copy the binary to SD card boot partition and rename to tiboot3.bin. (other bootmode also be supported)

/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/build$ sudo cp ../boot/keywriter/binary/j721e/keywriter_img_j721e_release.tiimage /media/biao/boot/tiboot3.bin

log for reference:

MCU log

 

OTP Keywriter Version: 02.00.00.00 (Aug  2 2024 - 16:53:57)

 

OTP Keywriter ver: 9.1.2--v09.01.02 (Kool Koala)

OTP_VppEn

test_pmic_i2c_lld_intf_setup(): 487: PMIC_MAIN_INST I2C Setup...

test_pmic_i2c_lld_intf_setup(): 529: done...

I2C1: Passed for address 0x4c !!!

I2C1: Passed for address 0x13 !!!

INT STAT[0]: 0x00000000

INT STAT[1]: 0x00002002

INT STAT[2]: 0x00000000

INT STAT[3]: 0x00000000

 

Pmic_gpioSetValue ret: 0 Works!!!

Key programming sequence initialted

Taking OTP certificate from 0x41c7f004

Debug response: 0x0

Key programming sequence completed

 

 

M3 log

 

0x700002

0xB00004

0x4003007

0x4400912

0x70000B

0xB00004

0x4003007

0x4400912

0x70000D

0xB00004

0x20800000

0x20800001

0x700002

0xB00004

0x4003007

0x4400912

0x709031

0xB00004

#

# Decrypting extensions..

#

MPK Options:  0x0

MEK Options:  0x0

MPK Opt P1:  0x0

MPK Opt P2:  0x0

MEK Opt   :  0x0

* SMPKH Part 1 BCH code: e050cadb

* SMPKH Part 2 BCH code: c099dd36

* SMPK Hash (part-1,2):

1f6002b07cd9b0b7c47d9ca8d1aae57b8e8784a12f636b2b760d7d98a18f189700

60dfd0f23e2b0cb10ec7edc7c6edac3d9bdfefe0eddc3fff7fe9ad875195527d00

* SMEK BCH code: a0c6de4e

* SMEK Hash: 92785809a3dfefea57f6bbed642d730ba5d05e601222a72e815bf01ceb3a50f96ab85d282425f684436fabd4c7

da624b791da411615035314103cc64e611f532

EXT OTP extension programming disabled

* BCH code & MSV: fe0fac8b

* KEY CNT: 01010000

* KEY REV: 01010000

SWREV extension programming disabled

FW CFG REV extension programming disabled

* KEYWR VERSION:  0x20000

#

# Programming Keys..

#

* MSV:

[u32] bch + msv:  0x0

Programmed 2/2 rows successfully

[u32] bch + msv:  0x8BAC0FFE

* SWREV:

[u32] SWREV-SBL:  0x0

[u32] SWREV-SYSFW  :  0x0

SWREV extension programming disabled

[u32] SWREV-SBL:  0x0

[u32] SWREV-SYSFW  :  0x0

* FW CFG REV:

[u32] SWREV-FW-CFG-REV:  0x0

SWREV SEC BCFG extension programming disabled

[u32] SWREV-FW-CFG-REV:  0x0

* EXT OTP:

EXT OTP extension programming disabled

* BMPKH, BMEK:

BMPKH extension programming disabled

BMEK extension programming disabled

* SMPKH, SMEK:

Programmed 11/11 rows successfully

Programmed 2/2 rows successfully

Programmed 11/11 rows successfully

Programmed 2/2 rows successfully

Programmed 11/11 rows successfully

Programmed 2/2 rows successfully

* KEYCNT:

[u32] keycnt:  0x0

Programmed 2/2 rows successfully

[u32] keycnt:  0x1

* KEYREV:

[u32] keyrev:  0x0

Programmed 2/2 rows successfully

[u32] keyrev:  0x1

8. Check device status, switch the bootmode to Uart boot, you can see array output as below:

02000000011a00006a376573000000000000000048535345010901000109010002a600000100010078ec546294cdf3fc0bfbbb146bf8621bd4d1c312f1bc76b67811e1c5dcbe820067f4156a94c70d9cbae981aa4cce04b7f83390ed79f92e8448d72881fe37C

The ASCII characters highlighted in red confirm this. 48535345 (ASCII characters for 'H', 'S, 'S', 'E') mean you have completed the Keywriter process. 

A HS-FS device shall have the value 48534653 (ASCII characters for 'H', 'S, 'F', 'S')

BR,

Biao 

  • Hi Biao

     I followed the steps above to compile the keywriter, but failed to load the tifs .

     I tried the following tifs , but they all failed. Which tifs should I use?

    pdk_jacinto_09_02_00_30/packages/ti/drv/sciclient/soc/V1

    tifs.bin tifs_sr1.1-hs-enc.bin tifs_sr2-hs-enc.bin tifs_sr2-hs-fs-enc.bin tifs-hs-enc.bin

    and 

    OTP_KEYWRITER_ADD_ON_j721e_sr2_09_02_00_05/addon/ti-fs-keywriter.bin

    OTP Keywriter Version: 02.00.00.00 (Aug 7 2024 - 14:42:33)
    TIFS load...FAILED

    Regards

    Ling

  • Hi Ling,

    OTP_KEYWRITER_ADD_ON_j721e_sr2_09_02_00_05/addon/ti-fs-keywriter.bin

    you should use this binary, can you check is there any error in the log when you build the keywriter binary?

    BR,

    Biao

  • Hi Biao

    No errors were observed during the build of the keywriter.

    Rename ti-fs-keywriter.bin to tifs.bin.It still failed to load.

    build_keywriter.log
    jianghao@motovis:~/vm_9.2/tda4vm_rtos_linux_9.2/psdkra/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/scripts$ ./gen_keywr_cert.sh -g
    # Generating dummy keys in keys/ folder
    jianghao@motovis:~/vm_9.2/tda4vm_rtos_linux_9.2/psdkra/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/scripts$ ls keys/
    aes256.key  bmek.key  bmpk.pem  smek.key  smpk.pem
    jianghao@motovis:~/vm_9.2/tda4vm_rtos_linux_9.2/psdkra/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/scripts$ ls
    configs                    generate_test_binaries.sh  gen_keywr_cert.sh  keywriter_cfg_test_gen.mk  templates          tmpdir
    construct_ext_otp_data.sh  gen_keywr_cert_helpers.sh  keys               primary_cert.bin           ti_fek_public.pem  verify_hash.csv
    jianghao@motovis:~/vm_9.2/tda4vm_rtos_linux_9.2/psdkra/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/scripts$ ./gen_keywr_cert.sh -s keys/smpk.pem --smek keys/smek.key -t ti_fek_public.pem -a keys/aes256.key --msv 0xC0FFE --keycnt 1 --keyrev 1
    # Using MSV[19:0]: 0x000C0FFE
    # Using Key Count: 0x00000001
    # Using Key Rev: 0x00000001
    Generating Single signed certificate!!
    # encrypt aes256 key with tifek public part
    The command rsautl was deprecated in version 3.0. Use 'pkeyutl' instead.
    # encrypt SMPK-priv signed aes256 key(hash) with tifek public part
    The command rsautl was deprecated in version 3.0. Use 'pkeyutl' instead.
    The command rsautl was deprecated in version 3.0. Use 'pkeyutl' instead.
    # encrypt smpk-pub hash using aes256 key
    writing RSA key
    # encrypt smek (sym key) using aes256 key
    4031    primary_cert.bin
    4031    ../x509cert/final_certificate.bin
    # SHA512 Hashes of keys are stored in verify_hash.csv for reference..
    jianghao@motovis:~/vm_9.2/tda4vm_rtos_linux_9.2/psdkra/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/scripts$ cd ../../../build/
    jianghao@motovis:~/vm_9.2/tda4vm_rtos_linux_9.2/psdkra/pdk_jacinto_09_02_00_30/packages/ti/build$ make keywriter_img_clean
    make -C /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/build -f/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/build/keywriter.mk clean
    make[1]: Entering directory '/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/build'
    /bin/rm -f -rf /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/binary/keywriter_img/obj/j721e_evm/mcu1_0/release/* /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/binary/keywriter_img/obj/j721e_evm/mcu1_0/release/little/.deps/* /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/binary/j721e/*
    make[1]: Leaving directory '/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/build'
    jianghao@motovis:~/vm_9.2/tda4vm_rtos_linux_9.2/psdkra/pdk_jacinto_09_02_00_30/packages/ti/build$ make keywriter_img
    make -C /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/build -f/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/build/keywriter.mk
    make[1]: Entering directory '/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/build'
    /bin/mkdir -p /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/binary/keywriter_img/obj/j721e_evm/mcu1_0/release/little/.deps
    make -f/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/build/keywriter.mk sciclient_direct board uart osal_nonos csl csl_init i2c gpio rm_pm_hal pmic
    make[2]: Entering directory '/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/build'
    make[2]: Nothing to be done for 'sciclient_direct'.
    make[2]: Nothing to be done for 'board'.
    make[2]: Nothing to be done for 'uart'.
    make[2]: Nothing to be done for 'osal_nonos'.
    make[2]: Nothing to be done for 'csl'.
    make[2]: Nothing to be done for 'csl_init'.
    make[2]: Nothing to be done for 'i2c'.
    make[2]: Nothing to be done for 'gpio'.
    make[2]: Nothing to be done for 'rm_pm_hal'.
    make[2]: Nothing to be done for 'pmic'.
    make[2]: Leaving directory '/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/build'
    make -f/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/build/keywriter.mk /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/binary/j721e/keywriter_img_j721e_release.xer5f
    make[2]: Entering directory '/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/build'
    # Compiling j721e_evm:j721e:mcu1_0:release:keywriter_img: /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/init.asm
    /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/ti-cgt-armllvm_3.2.1.LTS/bin/tiarmclang -MMD -g -DMAKEFILE_BUILD -c -Wall -Werror -Wno-extra -Wno-exceptions -ferror-limit=100 -Wno-unused-command-line-argument -Wno-gnu-variable-sized-type-not-at-end -Wno-unused-function -Wno-extern-initializer -Wno-excess-initializers -Wno-bitfield-constant-conversion -Wno-address-of-packed-member -fno-strict-aliasing -EL -eo.oer5f -ea.ser5f -g -mfloat-abi=hard -mfpu=vfpv3-d16 -mcpu=cortex-r5 -mthumb -march=thumbv7r -Werror -Os -s -DBUILD_MCU1_0 -DBUILD_MCU -DJ721E_USE_GPIO_FOR_VPP    -DSOC_J721E -Dj721e_evm=j721e_evm -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/board/src/j721e_evm/include -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/csl -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/boardcfgs/j721e -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/drv/pmic -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/drv/pmic/include -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/drv/pmic/test/common -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/drv/pmic/test/power_test -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/soc/j721e -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/ti-cgt-armllvm_3.2.1.LTS/include/c -c -x ti-asm /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/init.asm -o /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/binary/keywriter_img/obj/j721e_evm/mcu1_0/release/init.oer5f
    /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/ti-cgt-armllvm_3.2.1.LTS/bin/tiarmclang -g -DMAKEFILE_BUILD -c -Wall -Werror -Wno-extra -Wno-exceptions -ferror-limit=100 -Wno-unused-command-line-argument -Wno-gnu-variable-sized-type-not-at-end -Wno-unused-function -Wno-extern-initializer -Wno-excess-initializers -Wno-bitfield-constant-conversion -Wno-address-of-packed-member -fno-strict-aliasing -EL -eo.oer5f -ea.ser5f -g -mfloat-abi=hard -mfpu=vfpv3-d16 -mcpu=cortex-r5 -mthumb -march=thumbv7r -Werror -Os -s -DBUILD_MCU1_0 -DBUILD_MCU -DJ721E_USE_GPIO_FOR_VPP    -DSOC_J721E -Dj721e_evm=j721e_evm -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/board/src/j721e_evm/include -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/csl -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/boardcfgs/j721e -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/drv/pmic -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/drv/pmic/include -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/drv/pmic/test/common -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/drv/pmic/test/power_test -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/soc/j721e -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/ti-cgt-armllvm_3.2.1.LTS/include/c -c -x ti-asm /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/init.asm -o /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/binary/keywriter_img/obj/j721e_evm/mcu1_0/release/init.oer5f
    # Compiling j721e_evm:j721e:mcu1_0:release:keywriter_img:/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/main.c
    /bin/mkdir -p /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/binary/keywriter_img/obj/j721e_evm/mcu1_0/release/
    /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/ti-cgt-armllvm_3.2.1.LTS/bin/tiarmclang -MMD -g -DMAKEFILE_BUILD -c -Wall -Werror -Wno-extra -Wno-exceptions -ferror-limit=100 -Wno-unused-command-line-argument -Wno-gnu-variable-sized-type-not-at-end -Wno-unused-function -Wno-extern-initializer -Wno-excess-initializers -Wno-bitfield-constant-conversion -Wno-address-of-packed-member -fno-strict-aliasing -EL -eo.oer5f -ea.ser5f -g -mfloat-abi=hard -mfpu=vfpv3-d16 -mcpu=cortex-r5 -mthumb -march=thumbv7r -Werror -Os -s -DBUILD_MCU1_0 -DBUILD_MCU -DJ721E_USE_GPIO_FOR_VPP    -DSOC_J721E -Dj721e_evm=j721e_evm -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/board/src/j721e_evm/include -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/csl -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/boardcfgs/j721e -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/drv/pmic -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/drv/pmic/include -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/drv/pmic/test/common -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/drv/pmic/test/power_test -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/soc/j721e -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/ti-cgt-armllvm_3.2.1.LTS/include/c -c -x c /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/main.c -o /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/binary/keywriter_img/obj/j721e_evm/mcu1_0/release/main.oer5f -MF /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/binary/keywriter_img/obj/j721e_evm/mcu1_0/release/little/.deps/main.d
    /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/ti-cgt-armllvm_3.2.1.LTS/bin/tiarmclang -g -DMAKEFILE_BUILD -c -Wall -Werror -Wno-extra -Wno-exceptions -ferror-limit=100 -Wno-unused-command-line-argument -Wno-gnu-variable-sized-type-not-at-end -Wno-unused-function -Wno-extern-initializer -Wno-excess-initializers -Wno-bitfield-constant-conversion -Wno-address-of-packed-member -fno-strict-aliasing -EL -eo.oer5f -ea.ser5f -g -mfloat-abi=hard -mfpu=vfpv3-d16 -mcpu=cortex-r5 -mthumb -march=thumbv7r -Werror -Os -s -DBUILD_MCU1_0 -DBUILD_MCU -DJ721E_USE_GPIO_FOR_VPP    -DSOC_J721E -Dj721e_evm=j721e_evm -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/board/src/j721e_evm/include -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/csl -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/boardcfgs/j721e -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/drv/pmic -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/drv/pmic/include -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/drv/pmic/test/common -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/drv/pmic/test/power_test -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/soc/j721e -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/ti-cgt-armllvm_3.2.1.LTS/include/c -c -x c /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/main.c -o /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/binary/keywriter_img/obj/j721e_evm/mcu1_0/release/main.oer5f
    # Compiling j721e_evm:j721e:mcu1_0:release:keywriter_img:/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/soc/common/pmic_example.c
    /bin/mkdir -p /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/binary/keywriter_img/obj/j721e_evm/mcu1_0/release/soc/common/
    /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/ti-cgt-armllvm_3.2.1.LTS/bin/tiarmclang -MMD -g -DMAKEFILE_BUILD -c -Wall -Werror -Wno-extra -Wno-exceptions -ferror-limit=100 -Wno-unused-command-line-argument -Wno-gnu-variable-sized-type-not-at-end -Wno-unused-function -Wno-extern-initializer -Wno-excess-initializers -Wno-bitfield-constant-conversion -Wno-address-of-packed-member -fno-strict-aliasing -EL -eo.oer5f -ea.ser5f -g -mfloat-abi=hard -mfpu=vfpv3-d16 -mcpu=cortex-r5 -mthumb -march=thumbv7r -Werror -Os -s -DBUILD_MCU1_0 -DBUILD_MCU -DJ721E_USE_GPIO_FOR_VPP    -DSOC_J721E -Dj721e_evm=j721e_evm -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/board/src/j721e_evm/include -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/csl -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/boardcfgs/j721e -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/drv/pmic -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/drv/pmic/include -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/drv/pmic/test/common -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/drv/pmic/test/power_test -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/soc/j721e -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/ti-cgt-armllvm_3.2.1.LTS/include/c -c -x c /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/soc/common/pmic_example.c -o /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/binary/keywriter_img/obj/j721e_evm/mcu1_0/release/soc/common/pmic_example.oer5f -MF /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/binary/keywriter_img/obj/j721e_evm/mcu1_0/release/little/.deps/pmic_example.d
    /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/ti-cgt-armllvm_3.2.1.LTS/bin/tiarmclang -g -DMAKEFILE_BUILD -c -Wall -Werror -Wno-extra -Wno-exceptions -ferror-limit=100 -Wno-unused-command-line-argument -Wno-gnu-variable-sized-type-not-at-end -Wno-unused-function -Wno-extern-initializer -Wno-excess-initializers -Wno-bitfield-constant-conversion -Wno-address-of-packed-member -fno-strict-aliasing -EL -eo.oer5f -ea.ser5f -g -mfloat-abi=hard -mfpu=vfpv3-d16 -mcpu=cortex-r5 -mthumb -march=thumbv7r -Werror -Os -s -DBUILD_MCU1_0 -DBUILD_MCU -DJ721E_USE_GPIO_FOR_VPP    -DSOC_J721E -Dj721e_evm=j721e_evm -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/board/src/j721e_evm/include -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/csl -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/boardcfgs/j721e -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/drv/pmic -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/drv/pmic/include -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/drv/pmic/test/common -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/drv/pmic/test/power_test -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/soc/j721e -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/ti-cgt-armllvm_3.2.1.LTS/include/c -c -x c /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/soc/common/pmic_example.c -o /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/binary/keywriter_img/obj/j721e_evm/mcu1_0/release/soc/common/pmic_example.oer5f
    # Compiling j721e_evm:j721e:mcu1_0:release:keywriter_img:/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/soc/j721e/keywriter_utils.c
    /bin/mkdir -p /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/binary/keywriter_img/obj/j721e_evm/mcu1_0/release/soc/j721e/
    /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/ti-cgt-armllvm_3.2.1.LTS/bin/tiarmclang -MMD -g -DMAKEFILE_BUILD -c -Wall -Werror -Wno-extra -Wno-exceptions -ferror-limit=100 -Wno-unused-command-line-argument -Wno-gnu-variable-sized-type-not-at-end -Wno-unused-function -Wno-extern-initializer -Wno-excess-initializers -Wno-bitfield-constant-conversion -Wno-address-of-packed-member -fno-strict-aliasing -EL -eo.oer5f -ea.ser5f -g -mfloat-abi=hard -mfpu=vfpv3-d16 -mcpu=cortex-r5 -mthumb -march=thumbv7r -Werror -Os -s -DBUILD_MCU1_0 -DBUILD_MCU -DJ721E_USE_GPIO_FOR_VPP    -DSOC_J721E -Dj721e_evm=j721e_evm -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/board/src/j721e_evm/include -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/csl -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/boardcfgs/j721e -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/drv/pmic -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/drv/pmic/include -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/drv/pmic/test/common -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/drv/pmic/test/power_test -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/soc/j721e -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/ti-cgt-armllvm_3.2.1.LTS/include/c -c -x c /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/soc/j721e/keywriter_utils.c -o /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/binary/keywriter_img/obj/j721e_evm/mcu1_0/release/soc/j721e/keywriter_utils.oer5f -MF /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/binary/keywriter_img/obj/j721e_evm/mcu1_0/release/little/.deps/keywriter_utils.d
    /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/ti-cgt-armllvm_3.2.1.LTS/bin/tiarmclang -g -DMAKEFILE_BUILD -c -Wall -Werror -Wno-extra -Wno-exceptions -ferror-limit=100 -Wno-unused-command-line-argument -Wno-gnu-variable-sized-type-not-at-end -Wno-unused-function -Wno-extern-initializer -Wno-excess-initializers -Wno-bitfield-constant-conversion -Wno-address-of-packed-member -fno-strict-aliasing -EL -eo.oer5f -ea.ser5f -g -mfloat-abi=hard -mfpu=vfpv3-d16 -mcpu=cortex-r5 -mthumb -march=thumbv7r -Werror -Os -s -DBUILD_MCU1_0 -DBUILD_MCU -DJ721E_USE_GPIO_FOR_VPP    -DSOC_J721E -Dj721e_evm=j721e_evm -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/board/src/j721e_evm/include -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/csl -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/boardcfgs/j721e -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/drv/pmic -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/drv/pmic/include -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/drv/pmic/test/common -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/drv/pmic/test/power_test -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/soc/j721e -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages -I/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/ti-cgt-armllvm_3.2.1.LTS/include/c -c -x c /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/soc/j721e/keywriter_utils.c -o /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/binary/keywriter_img/obj/j721e_evm/mcu1_0/release/soc/j721e/keywriter_utils.oer5f
    # Linking into /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/binary/j721e/keywriter_img_j721e_release.xer5f...
    #
    /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/ti-cgt-armllvm_3.2.1.LTS/bin/tiarmclang -Werror -Xlinker -q -Xlinker -u -Xlinker _c_int00 -Xlinker --display_error_number -Xlinker --use_memcpy=fast -Xlinker --use_memset=fast -Xlinker --diag_suppress=10063-D -Xlinker --diag_suppress=10068-D -Xlinker --diag_suppress=10083-D -Xlinker -c -mcpu=cortex-r5 -march=armv7-r -Xlinker --diag_suppress=10230-D -Xlinker -x -Xlinker --zero_init=on -Xlinker -x -Xlinker --zero_init=on    /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/binary/keywriter_img/obj/j721e_evm/mcu1_0/release/init.oer5f   /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/binary/keywriter_img/obj/j721e_evm/mcu1_0/release/main.oer5f  /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/binary/keywriter_img/obj/j721e_evm/mcu1_0/release/soc/common/pmic_example.oer5f  /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/binary/keywriter_img/obj/j721e_evm/mcu1_0/release/soc/j721e/keywriter_utils.oer5f  -Xlinker  /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/soc/common/linker.lds  -Xlinker --map_file=/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/binary/j721e/keywriter_img_j721e_release.xer5f.map -Xlinker --output_file=/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/binary/j721e/keywriter_img_j721e_release.xer5f -l/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/drv/sciclient/lib/j721e/mcu1_0/release/sciclient_direct.aer5f -l/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/board/lib/j721e_evm/r5f/release/ti.board.aer5f -l/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/drv/uart/lib/j721e/r5f/release/ti.drv.uart.aer5f -l/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/osal/lib/nonos/j721e/r5f/release/ti.osal.aer5f -l/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/csl/lib/j721e/r5f/release/ti.csl.aer5f -l/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/csl/lib/j721e/r5f/release/ti.csl.init.aer5f -l/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/drv/i2c/lib/j721e/r5f/release/ti.drv.i2c.aer5f -l/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/drv/gpio/lib/j721e/r5f/release/ti.drv.gpio.aer5f -l/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/drv/sciclient/lib/j721e/mcu1_0/release/rm_pm_hal.aer5f -l/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/drv/pmic/lib/j721e_evm/r5f/release/pmic.aer5f  /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/ti-cgt-armllvm_3.2.1.LTS/lib/libc.a
    #
    # /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/binary/j721e/keywriter_img_j721e_release.xer5f created.
    #
    # Generating stripped image into /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/binary/j721e/keywriter_img_j721e_release_strip.xer5f...
    #
    /bin/rm -f  /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/binary/j721e/keywriter_img_j721e_release_strip.xer5f
    /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/ti-cgt-armllvm_3.2.1.LTS/bin/tiarmstrip -p /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/binary/j721e/keywriter_img_j721e_release.xer5f -o /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/binary/j721e/keywriter_img_j721e_release_strip.xer5f
    make[2]: Leaving directory '/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/build'
    make[1]: Leaving directory '/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/build'
    make -C /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/build -f/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/build/keywriter.mk keywr_imagegen
    make[1]: Entering directory '/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/build'
    /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf/bin/aarch64-none-elf-objcopy --gap-fill=0xff -O binary /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/binary/j721e/keywriter_img_j721e_release.xer5f /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/binary/j721e/keywriter_img_j721e_release.bin
    /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf/bin/aarch64-none-elf-objcopy --gap-fill=0xff -O binary /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/binary/j721e/keywriter_img_j721e_release.xer5f /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/binary/j721e/keywriter_img_j721e_release.bin
    # Appending certificate to keywriter binary file.
    /bin/cat /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/x509cert/final_certificate.bin >> /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/binary/j721e/keywriter_img_j721e_release.bin
    /bin/chmod a+x /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/build/makerules/x509CertificateGen.sh
    /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/build/makerules/x509CertificateGen.sh -b /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/binary/j721e/keywriter_img_j721e_release.bin -o /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/binary/j721e/keywriter_img_j721e_release.tiimage -c R5 -l 0x41C00100 -k /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/build/makerules/k3_dev_mpk.pem -d DEBUG -j DBG_FULL_ENABLE -m SPLIT_MODE
    ~/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/build ~/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/build
    
    Debug Extension is Enabled :
    SoC UID not specified for Debug Extension. Using UID 0
            UID = 0000000000000000000000000000000000000000000000000000000000000000
            DBG_TYPE = 4
    R5 Certificate being generated :
            X509_CFG = ./x509-temp.cfg
            KEY = /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/build/makerules/k3_dev_mpk.pem
            BIN = /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/binary/j721e/keywriter_img_j721e_release.bin
            CERT TYPE = R5, 1
            CORE ID = 16
            LOADADDR = 0x41c00100
            IMAGE_SIZE = 523971
            BOOT_OPTIONS = 2
    Certificate being generated :
    SUCCESS: Image /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/binary/j721e/keywriter_img_j721e_release.tiimage generated. Good to boot
    # Signed Keywriter image /home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/binary/j721e/keywriter_img_j721e_release.tiimage created.
    #
    make[1]: Leaving directory '/home/jianghao/vm_9.2/tda4vm_rtos_linux_9.2/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/build'
    jianghao@motovis:~/vm_9.2/tda4vm_rtos_linux_9.2/psdkra/pdk_jacinto_09_02_00_30/packages/ti/build$
    

    keywriter.rar

    Regards

    Ling

  • Hi Ling,

    1.Make sure this step has been done.

     Follow the readme.txt in OTP 9.2 addon package(OTP_KEYWRITER_ADD_ON_j721e_sr2_09_02_00_05. Addon) as below to replace two binaries.

     Copy the OTP keywriter firmware `ti-fs-keywriter.bin` file to

    <Your SDK path>/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/tifs_bin/j721e/ti-fs-keywriter.bin

     Copy the TIFEK Public key `ti_fek_public.pem` file to

    <Your SDK path>/pdk_jacinto_09_02_00_30/packages/ti/boot/keywriter/scripts/ti_fek_public.pem

    2. pls provide the md5sum value for this two binary.

    BR,

    Biao

  • Hi Biao

    1.

    1.Make sure this step has been done.

    This step has been completed.

    2.

    2. pls provide the md5sum value for this two binary.

    jianghao@motovis:~/vm_9.2/tda4vm_rtos_linux_9.2/psdkra/pdk_jacinto_09_02_00_30/packages/ti/build$ md5sum ../boot/keywriter/scripts/ti_fek_public.pem
    322a43fbf056e5746ab50fa266515b36 ../boot/keywriter/scripts/ti_fek_public.pem

    jianghao@motovis:~/vm_9.2/tda4vm_rtos_linux_9.2/psdkra/pdk_jacinto_09_02_00_30/packages/ti/build$ md5sum ../boot/keywriter/tifs_bin/j721e/ti-fs-keywriter.bin
    a43cef7511c1b34a3ee7ddd690169b65 ../boot/keywriter/tifs_bin/j721e/ti-fs-keywriter.bin

    Regards

    Ling

  • Hi Ling,

    1. can you share your keywriter main.c to me?

    2. can you share the primary_cert.bin location in script folder md5sum too?

    BR,

    Biao

  • Hi Biao

    1.

    1. can you share your keywriter main.c to me?

    8877.main.c
    /**
     *  \file   main.c
     *
     *  \brief  This file contains main function, UART init functions & call to
     *  OTP Keywriter API
     *
     */
    
    /*
     * Copyright (C) 2020-2022 Texas Instruments Incorporated - http://www.ti.com/
     *
     * Redistribution and use in source and binary forms, with or without
     * modification, are permitted provided that the following conditions
     * are met:
     *
     * Redistributions of source code must retain the above copyright
     * notice, this list of conditions and the following disclaimer.
     *
     * Redistributions in binary form must reproduce the above copyright
     * notice, this list of conditions and the following disclaimer in the
     * documentation and/or other materials provided with the
     * distribution.
     *
     * Neither the name of Texas Instruments Incorporated nor the names of
     * its contributors may be used to endorse or promote products derived
     * from this software without specific prior written permission.
     *
     * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
     * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
     * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
     * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
     * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     *
     */
    
    #include "main.h"
    
    extern uint32_t keywr_end;
    
    #define KEYWRITER_BIN_WORD_SIZE (TIFS_KEYWRITER_BIN_SIZE_IN_BYTES + 3) / 4
    
    /* These two macros define size, and hex code of system firmware Key writer binary */
    uint32_t __attribute((section(".data:kw_firmware")))
        gSciclient_firmware[KEYWRITER_BIN_WORD_SIZE] = TIFS_KEYWRITER_BIN;
    
    Sciclient_BoardCfgPrms_t sblBoardCfgPrms = {0};
    Sciclient_BoardCfgPrms_t sblBoardCfgPmPrms = {0};
    Sciclient_BoardCfgPrms_t sblBoardCfgSecPrms = {0};
    
    static void OTP_SciClientInit(void)
    {
        int32_t status  = CSL_EFAIL;
        void *sysfw_ptr = gSciclient_firmware;
        UART_HwAttrs uart_cfg;
    
        /* SYSFW board configurations */
        Sciclient_DefaultBoardCfgInfo_t boardCfgInfo;
        Sciclient_ConfigPrms_t        config = {
            SCICLIENT_SERVICE_OPERATION_MODE_POLLED,
            NULL,
            UTRUE,
            0U,
            1U
        };
    
        /* Use snapshot of sciclient boardconfigs */
        boardCfgInfo.boardCfgLow        = &gKeywr_boardCfgLow[0U];
        boardCfgInfo.boardCfgLowRm      = &gKeywr_boardCfgLow_rm[0U];
        boardCfgInfo.boardCfgLowSec     = &gKeywr_boardCfgLow_sec[0U];
        boardCfgInfo.boardCfgLowPm      = &gKeywr_boardCfgLow_pm[0U];
        boardCfgInfo.boardCfgLowSize    = KEYWR_BOARDCFG_SIZE_IN_BYTES;
        boardCfgInfo.boardCfgLowRmSize  = KEYWR_BOARDCFG_RM_SIZE_IN_BYTES;
        boardCfgInfo.boardCfgLowSecSize = KEYWR_BOARDCFG_SECURITY_SIZE_IN_BYTES;
        boardCfgInfo.boardCfgLowPmSize  = KEYWR_BOARDCFG_PM_SIZE_IN_BYTES;
    
        status = Sciclient_loadFirmware((const uint32_t *)sysfw_ptr);
    
        if (CSL_PASS != status)
        {
            UART_printf("TIFS load...FAILED \n");
            KeywrErrLoop(__FILE__, __LINE__);
        }
    
        status = Sciclient_init(&config);
    
        if (CSL_PASS != status)
        {
            UART_printf("Sciclient init ...FAILED \n");
            KeywrErrLoop(__FILE__, __LINE__);
        }
    
        sblBoardCfgPrms.boardConfigLow  = (uint32_t)boardCfgInfo.boardCfgLow;
        sblBoardCfgPrms.boardConfigHigh = 0U;
        sblBoardCfgPrms.boardConfigSize = boardCfgInfo.boardCfgLowSize;
        sblBoardCfgPrms.devGrp = DEVGRP_ALL;
        status = Sciclient_boardCfg(&sblBoardCfgPrms);
    
        if (CSL_PASS != status)
        {
            UART_printf("Sciclient board config ...FAILED \n");
            KeywrErrLoop(__FILE__, __LINE__);
        }
    
        UART_stdioDeInit();
    
        sblBoardCfgPmPrms.boardConfigLow  = (uint32_t)boardCfgInfo.boardCfgLowPm;
        sblBoardCfgPmPrms.boardConfigHigh = 0U;
        sblBoardCfgPmPrms.boardConfigSize = boardCfgInfo.boardCfgLowPmSize;
        sblBoardCfgPmPrms.devGrp = DEVGRP_ALL;
        status = Sciclient_boardCfgPm(&sblBoardCfgPmPrms);
    
        if (CSL_PASS != status)
        {
            /* Sciclient board config pm..FAILS */
            KeywrErrLoop(__FILE__, __LINE__);
        }
    
        /* Re-init UART for logging */
        UART_socGetInitCfg(KEYWRITER_BOARD_UART_INSTANCE, &uart_cfg);
        uart_cfg.frequency = SBL_SYSFW_UART_MODULE_INPUT_CLK;
        UART_socSetInitCfg(KEYWRITER_BOARD_UART_INSTANCE, &uart_cfg);
        UART_stdioInit(KEYWRITER_BOARD_UART_INSTANCE);
    
        sblBoardCfgSecPrms.boardConfigLow  = (uint32_t)boardCfgInfo.boardCfgLowSec;
        sblBoardCfgSecPrms.boardConfigHigh = 0U;
        sblBoardCfgSecPrms.boardConfigSize = boardCfgInfo.boardCfgLowSecSize;
        sblBoardCfgSecPrms.devGrp = DEVGRP_ALL;
        status = Sciclient_boardCfgSec(&sblBoardCfgSecPrms);
    
        if (CSL_PASS != status)
        {
            UART_printf("Sciclient board config sec...FAILED \n");
            KeywrErrLoop(__FILE__, __LINE__);
        }
    
        /* Skipping board cfg RM, since it is not included in keywriter firmware */
    
        /* Print System Firmware Version Information */
        struct tisci_msg_version_req req     = {0};
        const Sciclient_ReqPrm_t      reqPrm = {
            TISCI_MSG_VERSION,
            TISCI_MSG_FLAG_AOP,
            (const uint8_t *)&req,
            sizeof(req),
            SCICLIENT_SERVICE_WAIT_FOREVER
        };
    
        struct tisci_msg_version_resp response;
        Sciclient_RespPrm_t           respPrm = {
            0,
            (uint8_t *)&response,
            (uint32_t)sizeof(response)
        };
    
        status = Sciclient_service(&reqPrm, &respPrm);
    
        if (CSL_PASS == status)
        {
            if ((uint32_t)TISCI_MSG_FLAG_ACK == respPrm.flags)
            {
                UART_printf("\n OTP Keywriter ver: %s\n", (char *)response.str);
            }
            else
            {
                UART_printf(" OTP Keywriter Get Version failed \n");
                KeywrErrLoop(__FILE__, __LINE__);
            }
        }
    }
    
    static void mmr_unlock(uint32_t base, uint32_t partition)
    {
        /*  Translate the base address */
        uint32_t part_base = base + partition * CTRL_MMR0_PARTITION_SIZE;
    
        HW_WR_REG32(part_base + CTRLMMR_LOCK_KICK0, CTRLMMR_LOCK_KICK0_UNLOCK_VAL);
        HW_WR_REG32(part_base + CTRLMMR_LOCK_KICK1, CTRLMMR_LOCK_KICK1_UNLOCK_VAL);
    }
    
    int main()
    {
     //   int32_t status = CSL_EFAIL;
        uint32_t debug_response  = 0U;
        uint32_t *keywriter_cert = &keywr_end + 1U;
        UART_HwAttrs uart_cfg;
    
        /* padconfig unlock */
        mmr_unlock(WKUP_CTRL_BASE, 7);
        /* pinmux for R5 logs */
        HW_WR_REG32(BOARD_MCU_UART_TX_PINMUX_ADDR, PIN_OUTPUT | PIN_MODE(0));
        /* pinmux for M3 logs */
        HW_WR_REG32(WKUP_UART_TXD_MUX_ADDR, PIN_OUTPUT | PIN_MODE(0));
    	
    #if 1
       *((volatile unsigned int *)(0x40d01010)) = 0x68EF3490;
       *((volatile unsigned int *)(0x40d01014)) = 0xD172BC5A;
    
       *((volatile unsigned int *)(0x40d0108C)) = 0x00008031;
    
       *((volatile unsigned int *)(0x40d01010)) = 0x0;
       *((volatile unsigned int *)(0x40d01014)) = 0x0;
    #endif
    
        UART_socGetInitCfg(KEYWRITER_BOARD_UART_INSTANCE, &uart_cfg);
        uart_cfg.frequency       = SBL_ROM_UART_MODULE_INPUT_CLK;
        uart_cfg.enableInterrupt = UFALSE;
        UART_socSetInitCfg(KEYWRITER_BOARD_UART_INSTANCE, &uart_cfg);
        UART_stdioInit(KEYWRITER_BOARD_UART_INSTANCE);
    
        UART_printf("%s (%s - %s)\n", OTP_VERSION_STR, __DATE__, __TIME__);
        OTP_SciClientInit();
    
        OTP_VppEn();
    
        UART_printf("Key programming sequence initialted\n");
        UART_printf("Taking OTP certificate from 0x%x\n",
                    (uint32_t *)keywriter_cert);
    #if 0
        status = Sciclient_otpProcessKeyCfg((uint32_t *)keywriter_cert,
                                            SCICLIENT_SERVICE_WAIT_FOREVER,
                                            &debug_response);
    
        if (CSL_PASS != status)
        {
            UART_printf("Sciclient_otpProcessKeyCfg returns: %d\n", status);
        }
    #endif
    
        UART_printf("Debug response: 0x%x\n", debug_response);
    
        UART_printf("Key programming sequence completed\n");
    
        asm volatile (" wfi");
    
        return 0;
    }
    

    2.

    2. can you share the primary_cert.bin location in script folder md5sum too?

    md5sum primary_cert.bin
    7c21963aa0429dc8105d3f8ebb095258 primary_cert.bin

    Regards

    Ling

  • Hi Ling,

    As discuss offline, you can boot keywriter normal after reinstalling SDK9.2 and follow the step upside. if you can remember what you have changed in default SDK, pls share it to help more engineer. Thanks! 

    BR,

    Biao 

  • Hi All,

    Thanks for Ling debugging: The make keywriter_img_clean will not clean the ~/keywriter/soc/j721e/tifs_keywriter.h, when you using other tifs once, you need delete the .h file manually and rebuild again. 

    BR,

    Biao 

  • Hi Biao

    Can you provide the compilation steps for the hs-fs image?

    Regards

    Ling

  • Hi Ling,

    pls post your question to a new e2e thread. Thanks in advance.

    BR,

    Biao

  • Hi Biao

    I have a few questions to ask , please help to answer them.

    1、In step 3, What is the purpose of this instruction "xxd -p -r build/makerules/k3_dev_mek.txt > boot/keywriter/scripts/keys/smek.key" ?

    Do I need to do this if my project does not require encryption?

    2、In step 4, we need to carry out this order "./gen_keywr_cert.sh -s keys/smpk.pem --smek keys/smek.key -t ti_fek_public.pem -a keys/aes256.key --msv 0xC0FFE --keycnt 1 --keyrev 1"

    What is the purpose of these three parameters "-msv 0xC0FFE --keycnt 1 --keyrev 1" ?


    Regards

    Yang