Other Parts Discussed in Thread: C2000WARE
Tool/software:
What is the meaning of use a 128-bit aligned length?
How to implemented in the ROMS directive?


This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software:
What is the meaning of use a 128-bit aligned length?
How to implemented in the ROMS directive?


Hi.
Please refer to section 12.4 - "ROMS Directive" and related sections of this document: https://www.ti.com/lit/ug/spru513w/spru513w.pdf
The CMAC key needs to be stored in a flash location and needs to be 128-bit aligned.
-Kedar
Please take a look at this : https://software-dl.ti.com/ccs/esd/documents/sdto_cgt_Linker-Command-File-Primer.html
The section "Allocate an Input Section from a Library to Different Load and Run Addresses" has details of how the "ALIGN" keyword works.
-Kedar
I tried before,but it resulted with build error.

"C:/ti/ccs1271/ccs/tools/compiler/ti-cgt-c2000_22.6.1.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --idiv_support=idiv0 --tmu_support=tmu0 --vcu_support=vcrc -Ooff --define=_FLASH --define=DEBUG --define=CPU1 --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi -z -m"boot_ex1_cpu1_cpu2_cm_secure_flash_cpu1.map" --heap_size=0x200 --stack_size=0x100 --warn_sections -i"C:/ti/ccs1271/ccs/tools/compiler/ti-cgt-c2000_22.6.1.LTS/lib" -i"C:/ti/ccs1271/ccs/tools/compiler/ti-cgt-c2000_22.6.1.LTS/include" --reread_libs --diag_wrap=off --display_error_number --xml_link_info="boot_ex1_cpu1_cpu2_cm_secure_flash_cpu1_linkInfo.xml" --entry_point=code_start --rom_model -o "boot_ex1_cpu1_cpu2_cm_secure_flash_cpu1.out" "./boot_ex1_cpu1_cpu2_cm_secure_flash_cpu1.obj" "./device/device.obj" "./device/f2838x_codestartbranch.obj" "../2838x_FLASH_lnk_cpu1.cmd" "C:/ti/c2000/C2000Ware_5_02_00_00/libraries/boot_rom/f2838x/revA/rom_symbol_libs/cpu1/secureZoneCode/F2838xCPU1_SecureZoneCode_Symbols_fpu32.lib" "C:/ti/c2000/C2000Ware_5_02_00_00/driverlib/f2838x/driverlib/ccs/Debug/driverlib.lib" -llibc.a
<Linking>
Finished building target: "boot_ex1_cpu1_cpu2_cm_secure_flash_cpu1.out"
Building secondary target: "boot_ex1_cpu1_cpu2_cm_secure_flash_cpu1.hex"
Invoking: C2000 Hex Utility
"C:/ti/ccs1271/ccs/tools/compiler/ti-cgt-c2000_22.6.1.LTS/bin/hex2000" --cmac="C:/WorkspaceCyberSecurity/boot_ex1_cpu1_cpu2_cm_secure_flash_cpu1/boot_ex1_user_cmac_key.txt" --image --memwidth=16 --romwidth=16 "C:/WorkspaceCyberSecurity/boot_ex1_cpu1_cpu2_cm_secure_flash_cpu1\boot_ex1_flash_hex_lnk_cpu1.cmd" --zero --diag_wrap=off --boot --sci8 --ascii -o "boot_ex1_cpu1_cpu2_cm_secure_flash_cpu1.hex" "boot_ex1_cpu1_cpu2_cm_secure_flash_cpu1.out"
FLASH_SECTOR0_13: o=0x00080000 l=0x00040000, fill = 0xFFFF, ALIGN
^
makefile:154: recipe for target 'boot_ex1_cpu1_cpu2_cm_secure_flash_cpu1.hex' failed
error: syntax error
gmake[1]: *** [boot_ex1_cpu1_cpu2_cm_secure_flash_cpu1.hex] Error 1
gmake[1]: Target 'secondary-outputs' not remade because of errors.
makefile:143: recipe for target 'all' failed
gmake: *** [all] Error 2
**** Build Finished ****
Is the command placed in the CMD file? Can you please share your command file?
The "ALIGN" keyword is typically used in the SECTIONS part of the CMD file.
I also tried this way before, it aslo resulted with build error

Building target: "boot_ex1_cpu1_cpu2_cm_secure_flash_cpu1.out"
Invoking: C2000 Linker
"C:/ti/ccs1271/ccs/tools/compiler/ti-cgt-c2000_22.6.1.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --idiv_support=idiv0 --tmu_support=tmu0 --vcu_support=vcrc -Ooff --define=_FLASH --define=DEBUG --define=CPU1 --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi -z -m"boot_ex1_cpu1_cpu2_cm_secure_flash_cpu1.map" --heap_size=0x200 --stack_size=0x100 --warn_sections -i"C:/ti/ccs1271/ccs/tools/compiler/ti-cgt-c2000_22.6.1.LTS/lib" -i"C:/ti/ccs1271/ccs/tools/compiler/ti-cgt-c2000_22.6.1.LTS/include" --reread_libs --diag_wrap=off --display_error_number --xml_link_info="boot_ex1_cpu1_cpu2_cm_secure_flash_cpu1_linkInfo.xml" --entry_point=code_start --rom_model -o "boot_ex1_cpu1_cpu2_cm_secure_flash_cpu1.out" "./boot_ex1_cpu1_cpu2_cm_secure_flash_cpu1.obj" "./device/device.obj" "./device/f2838x_codestartbranch.obj" "../2838x_FLASH_lnk_cpu1.cmd" "C:/ti/c2000/C2000Ware_5_02_00_00/libraries/boot_rom/f2838x/revA/rom_symbol_libs/cpu1/secureZoneCode/F2838xCPU1_SecureZoneCode_Symbols_fpu32.lib" "C:/ti/c2000/C2000Ware_5_02_00_00/driverlib/f2838x/driverlib/ccs/Debug/driverlib.lib" -llibc.a
<Linking>
Finished building target: "boot_ex1_cpu1_cpu2_cm_secure_flash_cpu1.out"
Building secondary target: "boot_ex1_cpu1_cpu2_cm_secure_flash_cpu1.hex"
Invoking: C2000 Hex Utility
"C:/ti/ccs1271/ccs/tools/compiler/ti-cgt-c2000_22.6.1.LTS/bin/hex2000" --cmac="C:/WorkspaceCyberSecurity/boot_ex1_cpu1_cpu2_cm_secure_flash_cpu1/boot_ex1_user_cmac_key.txt" --image --memwidth=16 --romwidth=16 "C:/WorkspaceCyberSecurity/boot_ex1_cpu1_cpu2_cm_secure_flash_cpu1\boot_ex1_flash_hex_lnk_cpu1.cmd" --zero --diag_wrap=off --boot --sci8 --ascii -o "boot_ex1_cpu1_cpu2_cm_secure_flash_cpu1.hex" "boot_ex1_cpu1_cpu2_cm_secure_flash_cpu1.out"
flash_sector0_13 :> FLASH_SECTOR0_13 , ALIGN(8
^
makefile:154: recipe for target 'boot_ex1_cpu1_cpu2_cm_secure_flash_cpu1.hex' failed
error: illegal input character: 0x3E
error: syntax error
gmake[1]: *** [boot_ex1_cpu1_cpu2_cm_secure_flash_cpu1.hex] Error 1
gmake[1]: Target 'secondary-outputs' not remade because of errors.
makefile:143: recipe for target 'all' failed
gmake: *** [all] Error 2
**** Build Finished ****