Other Parts Discussed in Thread: C2000-GANG, UNIFLASH, C2000WARE
Dear Champs,
I am asking this for our customer.
In the past we saw the example .cmd files usually use ALIGN(4) for codes including C28 and CLA codes, and the user has used ALIGN(4) for more than one year and it works well. They have even make some of them into production.
Now, we notice newer examples are "usually" with ALIGN (8) rather than ALIGN (4).
.cinit : > FLASH_BANK0_SEC1, ALIGN(4) .text : >>FLASH_BANK0_SEC2 | FLASH_BANK0_SEC3 | FLASH_BANK0_SEC4 | FLASH_BANK0_SEC5 | FLASH_BANK0_SEC6 | FLASH_BANK0_SEC7 | FLASH_BANK0_SEC8 | FLASH_BANK0_SEC9 | FLASH_BANK0_SEC10 | FLASH_BANK0_SEC11 | FLASH_BANK0_SEC12 | FLASH_BANK0_SEC13 | FLASH_BANK0_SEC14 | FLASH_BANK0_SEC15, ALIGN(4) codestart : > BEGIN, ALIGN(4) .stack : > RAMM0_1 .switch : > FLASH_BANK0_SEC1, ALIGN(4) .init_array : > FLASH_BANK0_SEC1, ALIGN(4) ... .const : > FLASH_BANK0_SEC4 ALIGN(4) ... .reset : > RESET, TYPE = DSECT /* not used, */ dclfuncs : > FLASH_BANK0_SEC1, ALIGN(4) .TI.ramfunc : LOAD = FLASH_BANK0_SEC1|FLASH_BANK0_SEC2 | FLASH_BANK0_SEC3 | FLASH_BANK0_SEC4 | FLASH_BANK0_SEC5 | FLASH_BANK0_SEC6 | FLASH_BANK0_SEC7 | FLASH_BANK0_SEC8, RUN = RAMGS0_1_2_3 | RAMLS0_1_2_3_4_5, LOAD_START(RamfuncsLoadStart), LOAD_SIZE(RamfuncsLoadSize), LOAD_END(RamfuncsLoadEnd), RUN_START(RamfuncsRunStart), RUN_SIZE(RamfuncsRunSize), RUN_END(RamfuncsRunEnd), ALIGN(4) // CLA specific sections Cla1Prog : LOAD = FLASH_BANK0_SEC2 | FLASH_BANK0_SEC3 | FLASH_BANK0_SEC4, RUN = RAMLS6, LOAD_START(Cla1ProgLoadStart), RUN_START(Cla1ProgRunStart), LOAD_SIZE(Cla1ProgLoadSize), ALIGN(4) ... .const_cla : LOAD = FLASH_BANK0_SEC2 | FLASH_BANK0_SEC3 | FLASH_BANK0_SEC4, RUN = RAMLS7, RUN_START(Cla1ConstRunStart), LOAD_START(Cla1ConstLoadStart), LOAD_SIZE(Cla1ConstLoadSize), ALIGN(4) /* crc/checksum section configured as COPY section to avoid including in executable */ .TI.memcrc : type = COPY
Questions:
1. In theory, ALIGN(4) should mean 4x 16 bit = 64-bit aligned, which is the minimum alignment for flash API usage. In this way, ALIGN(4) should be enough for better code size efficiency than ALIGN(8). Is my understanding correct?
2. In my understanding, ALIGN(8) is only better for some 3rd party flash programming tools, which may use 128-bit alignment as minimum data reading/programming. Do you think so too? Or do you have different comment?
3. Does C2000-GANG support ALIGN(4)? Or any concern here? The use will use only C2000-GANG and XDS110+Uniflash. If so, do they need to change to ALIGN(8)?
4. The user wants better code size efficiency in this case. This is why they want to use ALIGN(4) if there is no concern. Do you have any concern or agree to this?