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.

TMS320F280025C: BIn file too big when add f28002x_dcsm_z1otp.asm file for build

Part Number: TMS320F280025C
Other Parts Discussed in Thread: C2000WARE

Hi Expert,

I use the example code from C2000ware, if exclude the file  f28002x_dcsm_z1otp.asm for build, then the bin file generated is 23KB,

if include the file  f28002x_dcsm_z1otp.asm for build, then  the bin file generated is 88KB, that means f28002x_dcsm_z1otp.asm file increase almost 65KB.

any reason for this and how to reduce the bin file when add  f28002x_dcsm_z1otp.asm file?

I post the code here for reproduce. led_ex1_blinky.rar

  • Hi Zhang,

    Are you using C2000Ware example or your own application ? If using C2000Ware example, please let me know the name of example.

    I am assuming you are using EABI format. Do you see same issue if switch to COFF ?

    Regards,

    Vivek Singh

  • Hi Vivek,

    You can use the example code from below or use the code that I attached.

    C:\ti\c2000\C2000Ware_3_03_00_00\driverlib\f28002x\examples\led

    If you use the example from C2000ware, you need to do a little modification as below in f28002x_dcsm_z1otp.asm file, then build the file again then you will see there will have more 60KB generated in bin file.

    ;; | Key (31-24) | RSVD (23-8) | RSVD (7-6) | ESP (5-4) | RSVD (3-0) |

    ;;

    .long 0xFFFFFFF5 ;Z1OTP_BOOTPIN_CONFIG

    .long 0xFFFFFFFF ;Z1OTP_GPREG2

    .sect "b0_dcsm_otp_z1_pswdlock"

    .retain

    ;; .long 0xFB7FFFFF ;Z1-PSWDLOCK

    ;; .long 0x7FFFFFFF ;Reserved

  • Thank you. I'll look into this and get back to you by early next week.

    Regards,

    Vivek Singh

  • Vivek,

    Any update for this issue?

  • Hi Zhang, 

    Sorry, I thought I replied you on this earlier. I used your code and I don't see that issue. I see the .out size in both case 60KB +.   You are changing the size of .out file only. Right ? I compiled using RAM build.

    Regards,

    Vivek Singh

  • Strong ZHANG said:
    any reason for this and how to reduce the bin file when add  f28002x_dcsm_z1otp.asm file?

    The .bin file can't handle gaps in addresses, it has to contain the contents of the lowest programmed address to the highest programmed address.

    When f28002x_dcsm_z1otp.asm is use the linker map file shows only a total of 6 words are used for the OTP zones:

    b0_dcsm_otp_z1_gpreg 
    *          0    0007800c    00000002     
                      0007800c    00000002     f28002x_dcsm_z1otp.obj (b0_dcsm_otp_z1_gpreg)
    b0_dcsm_otp_z1_bootctrl 
    *          0    0007801c    00000004     
                      0007801c    00000004     f28002x_dcsm_z1otp.obj (b0_dcsm_otp_z1_bootctrl)

    However, the bin file then has to fill the gap between the address of the B0_DCSM_OTP_Z1_GPREG region at 0x0007800c to the codestart at 0x00080000. That is 32756 words or about 65KB.

    Do you have to use the bin file for programming, or can you use other formats such as a the hex file which contain address information and therefore don't increase in size to gaps in the programmed addresses?

    There is a hex file in your led_ex1_blinky.rar.