• Resolved

Compiler/AM1808: user-defined sector is not compiled in CCS V6

Part Number: AM1808

Tool/software: TI C/C++ Compiler

Hello everyone,

    I used to use legacy COFF as my program's output format. But after  the program being upgraded to CCSV6, the output format has to be elf, because the new compiler doesn't support COFF anylonger. 

    I used to put the vector table at AM1808's local ram(0xFFFF0000),  this was implemented by the ".sect" command in assembly code, just like below:

.sect ".intvecs"
INT_VECS:                    ;  EXCEPTION                          ADDRESS
     LDR PC, __c_int00          ;Reset Interrupt                    (0xFFFF0000)
     .word 0                    ;Undefined Instructions Interrupt    (0xFFFF0004)
     LDR PC, __SWI_handler    ;Software Interrupt                    (0xFFFF0008)
     .word 0                    ;Prefetch Abort Interrupt            (0xFFFF000C)
     .word 0                     ;Data Abort Interrupt                (0xFFFF0010)
     .word 0                    ;Reserved For Future Expansion        (0xFFFF0014)
     LDR PC, __IRQ_handler    ;IRQ Interrupt                        (0xFFFF0018)
     ;LDR  pc, [pc, #-0xA1C]      ; HPIVR2 IRQs
     LDR PC, __FIQ_handler    ;FIQ Interrupt                        (0xFFFF001C)

And the .intvecs sector was allocated to ARM's local ram in the .cmd file:


    ARMRAM:      o = 0xFFFF0000  l = 0x00002000



    .intvecs    >    ARMRAM



Then the sector .intvects can be found in map file after compilation:

.intvecs   0    ffff0000    00000030     
                  ffff0000    00000030     ARM9_intvecs.obj (.intvecs)

However, the .intvects sector can not be found in map file if the output format be changed to elf, and the whole vector table missed in the final binary file.

How can i put a sector of assembly code to a predefiend address in the elf format?


  • Under EABI, sections which are not explicitly referenced from the rest of the program are removed.  You can defeat this behavior by using the  .retain directive.  For the details please see the sub-section of a larger wiki article titled Conditional Linking Feature.  This article was written for C6000 compiler tools.  With regard to the feature, it is all the same in the TI ARM tools as well.

    Thanks and regards,


    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
    Compiler Wiki answers most common questions
    Track an issue with SDOWP. Enter your bug id in the Search box.