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.

  • TI Thinks Resolved

CCS/CC1310: About the generated bin file is 512M

Prodigy 30 points

Replies: 5

Views: 139

Part Number: CC1310

Tool/software: Code Composer Studio

hi,

   The problem as follows:

#pragma PERSISTENT(firststartflg)

#pragma location = 0x20002144   

char firststartflg = 0 ;At this point, Why is the generated bin file 512M ?

However,

#pragma PERSISTENT(firststartflg)

#pragma location = 0x2005

char firststartflg = 0 ;

or

#pragma PERSISTENT(firststartflg)

#pragma location = 0x20002144   

char firststartflg ;At this point,the generated bin file 512M;

My requirement is to define a variable in memory that will not change at every startup, and the generated bin file should be 128K;

Thank you very much!

  • Please see this forum thread for some background on binary files.  When the variable firststartflg is placed at a high address, and initialized, it amounts to creating an initialized section far away from all the other initialized sections.  This means a large hole in the binary file, which must be filled.  In your case, I suspect the best solution it to put firststartflg at an address right next to all the other initialized sections.

    Thanks and regards,

    -George


    TI C/C++ Compiler Forum Moderator
    Please click This Resolved My Issue on the best reply to your question
    The CCS Youtube Channel
     has short how-to videos
    The 
    Compiler Wiki answers most common questions
    Track an issue with SDOWP. Enter your bug id in the Search box.

  • In reply to George Mock:

    Thank you very much for your reply!
    now,The starting memory address of cc1310 is 0x20000000,I want to keep the variable firststartflg is placed at memory. Any good solutions?
  • In reply to user5292984:

    I still don't understand why you cannot put all the initialized sections, including the one for firststartflg, close together in memory.

    Thanks and regards,

    -George


    TI C/C++ Compiler Forum Moderator
    Please click This Resolved My Issue on the best reply to your question
    The CCS Youtube Channel
     has short how-to videos
    The 
    Compiler Wiki answers most common questions
    Track an issue with SDOWP. Enter your bug id in the Search box.

  • In reply to George Mock:

    #pragma PERSISTENT(firststartflg)
    #pragma location = 0x20002144
    char firststartflg = 0 ;

    I use it this way;How to make the generated bin file is 128K?
  • In reply to user5292984:

    If the variable firststartflg must be persistent, and at an address far away from all the other initialized sections, then I do not see a way to solve your problem.

    Thanks and regards,

    -George


    TI C/C++ Compiler Forum Moderator
    Please click This Resolved My Issue on the best reply to your question
    The CCS Youtube Channel
     has short how-to videos
    The 
    Compiler Wiki answers most common questions
    Track an issue with SDOWP. Enter your bug id in the Search box.

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.