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.

Data in code section warning assembly startup code

Other Parts Discussed in Thread: CCSTUDIO

Hi,

I have a piece of bootloading code that is written in assembler and runs from flash.  Its an adaptation of the provided code in the application note "SPRA999A1 - Creating a Second-Level Bootloader for FLASH Bootloading on TMS320C6000 Platform With Code Composer Studio".

We've added in CRC checking functionality into the assembler, using a lookup table for the crc table.  The lookup table just contains data which is declared as follows in the middle of regular assembly code,  

(....assembly code...)

(jump over "data" space")

crc_table:

.ushort   0x1234, 0x1223, 0x2334

.ushort   0x8765, 0x9876, 0xABCD 

.ushort   0x1231...etc etc etc

(assembly code)

The problem is that it gives the following warning on compilation:

  WARNING! at line 1038: [W9999] Placing data in a code section

                                                 (.bootload) is discouraged.

                                                 The data may be interpreted as

                                                 code. This section will not be

                                                 compressed.

The code works but the solution to just jump over the data table is not very elegant and we have a policy not to have any warnings in our projects.  Does anyone have any ideas of how to place this crc table in flash memory, but not in the code section?  

We also use the linker cmd file generated for us by the Configuration Tool., then the Hex Conversion Util (hex6x) to create the intel hex file with the –boot option to create a boot table. 

I have tried making a new section purely for the table called .crctable in the assembly file and the relocating that into flash, but I can't get it to work, it always places the section into the Boot Table for relocation.  How can I exclude it from the boot table without containing it in .bootload section?

CONTENTS: 42000000..42000cbf   .bootload

             42000cc0..4203ffff   FILL = 00000000

             42040000..420a9d37   BOOT TABLE                         

                         .text : btad=42046368  dest=86000000 size=00053a60

......etc....

                         .const : btad=420a6800  dest=86092140 size=0000302e                          

......etc....

                        .crctable : btad=420a9b2c  dest=42001500 size=00000200

             420a9d38..420bffff   FILL = 00000000

All I want is the constant data to be in the .bootload section, but the compiler mustn't complain about it.  Or even better just after the .bootload section.

Any help or ideas would be really appreciated!

 

  • Hi  Marek,

    This is just a suggestion, but maybe you can have a particular memory location explicitly defined  in your linker file which is other than the .botload section

    Then you can use pragma directive to define your CRC table in  that memory location and access the data at those addresses in your code.

    Not sure about the compiler behaviour here, but since pragma overrides compiler behavior , it might be possible that you may not face any warnings.

    Hope this helps.

    Regards,

    Sid

  • I'm not sure exactly what you mean when you say ...

    Marek said:
    I have tried making a new section purely for the table called .crctable in the assembly file and the relocating that into flash, but I can't get it to work, it always places the section into the Boot Table for relocation.  How can I exclude it from the boot table without containing it in .bootload section?

    so I'm not sure my answer will solve your problem.  Here is what I recommend.  Create the .bootload and .crctable sections separately at assembly time, which will avoid the warning.  In the SECTIONS directive of the link command file, write something similar to this ...

    .bootload {
        *(.bootload)
        *(.crctable)
    } > MR

    That tells the linker to create an output section named .bootload.  It is composed of all input sections with the name .bootload, followed by all the input sections with the name .crctable.  Replace MR with the name of whatever memory range you presently use for .bootload.  These lines replace whatever you have now for .bootload and .crctable.

    Hope this helps ...

    -George

     

  • Hi guys,

    George, you nailed this problem.  Your suggestion worked perfectly, thats exactly what I was looking for.    

    Thanks a lot, much appreciated!!!

    -Mark

  • Hai,

                     I have allmost try all the possiblities my problem is all the example program in the cd dvsdk does not wors properly, when i try t build it does not show any error and i have load the program also but when i run the program is running but i didnt get the output , and also i am not getting the STDOUT console window in the CCS.....

    is the problem is with the GEL file or DSP/ BIOS and let me know which BIOS i have to use

     when i install it is having

    C:/CCStudio_v3.3/bios_5_31_02

    C:/CCStudio_v3.3/bios_5_31_07

     

    Please help me i am sitting with this board for the past 7days

  • Shan,

    I'm not sure how your question is related to this thread in the Compiler forum. It might be better suited as a new post in the Code Composer Studio forum. However, here are some general suggestions.

    For STDIO programs and printing output in CCS console, please refer to this wiki article for useful tips: http://processors.wiki.ti.com/index.php/Tips_for_using_printf

    Regarding the BIOS version, 5..31.07 will have some bug fixes compared to 5.31.02. I would not expect the versions to be much different but it is preferable to use a newer version to avail of the bug fixes included in them.

    If you require further assistance on this, please post to the CCS forum and specify the board you are using as well as the specific examples you are trying to run.

  • Hai Aarti,

          Thank u very much for your nice support , I found the answer atlast i have to load the new .gel file , Thje gel file is loading by default by CCS is not working properly so

    download the new gel file and i load it

    It is in the link

    http://c6000.spectrumdigital.com/evmdm6437/reve/files/evmdm6437.gel