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.

RTOS/TM4C129ENCZAD: Example uartecho project has memory space error

Part Number: TM4C129ENCZAD
Other Parts Discussed in Thread: EK-TM4C1294XL

Tool/software: TI-RTOS

I'm trying to build the uartecho example that was included with the CCS V7 (C:\TI_CCS\tirtos_tivac_2_16_01_14\packages\examples\source\uartecho), which includes a uartecho.c and corresponding .cfg files. I created a new empty CCS project, and added the two files into the project. I had to also add an include path for the compiler in the Properties-ARM Compiler, and add the board.h file to the project,  to get past compile step (a how-to-build readme would have been helpful). However after compile, there is a linker error:

<Linking>
"configPkg/linker.cmd", line 166: error #10099-D: program will not fit into available memory. placement with alignment fails for section ".resetVecs" size 0x3c , overlaps with ".intvecs", size 0x208 (page 0)

After some poking around the forums, I discovered the linker .map file:

MEMORY CONFIGURATION

         name            origin    length      used     unused   attr    fill
----------------------  --------  ---------  --------  --------  ----  --------
  FLASH                 00000000   00100000  00012392  000edc6e  R  X
  SRAM                  20000000   00040000  00003c4b  0003c3b5  RW X


SEGMENT ALLOCATION MAP

run origin  load origin   length   init length attrs members
----------  ----------- ---------- ----------- ----- -------
00000000    00000000    0000003c   0000003c    r--
  00000000    00000000    0000003c   0000003c    r-- .resetVecs
00000000    00000000    00000208   00000208    r--
  00000000    00000000    00000208   00000208    r-- .intvecs
00000208    00000208    00012190   00012190    r-x
  00000208    00000208    0000f0b2   0000f0b2    r-x .text
  0000f2bc    0000f2bc    00002f20   00002f20    r-- .const
  000121e0    000121e0    000001b8   000001b8    r-- .cinit
20000000    20000000    00000360   00000000    rw-
  20000000    20000000    00000360   00000000    rw- .vecs
20000400    20000400    000038ec   00000000    rw-
  20000400    20000400    00002ecb   00000000    rw- .bss
  200032cc    200032cc    00000720   00000000    rw- .data
  200039ec    200039ec    00000300   00000000    rw- .stack


SECTION ALLOCATION MAP

 output                                  attributes/
section   page    origin      length       input sections
--------  ----  ----------  ----------   ----------------
.intvecs   0    00000000    00000208     
                  00000000    00000208     tm4c129enczad_startup_ccs.obj (.intvecs)

.resetVecs
*          0    00000000    0000003c     FAILED TO ALLOCATE
.text      0    00000208    0000f0b2     
                  00000208    0000065c     EK_TM4C129EXL.obj (.text)
                  00000864    00000004     usblib.lib : usbdma.obj (.text:DMAUSBStatus)

It looks like the .resetVecs has the same start addr as intVecs? Why is this and how should I fix it?

Thank you for your time and help.

  • The above screen capture shows the Program view from the .cfg. I see the .resetVec, and is configured to start at 0x0... I don't see any corresponding field for .intvecs. Is that supposed to be in this "page" of the RTOS config and if so, where (I poked thru everything in the cfg viewer...)

  • I'm sorry to hear you are having problems with the TIRTOS demo. Unfortunately the person with more experience with that software is currently on vacation. I also tried to build and run the demo and had problems creating the correct build environment.

    If you don't need the RTOS at this point, I suggest you download the latest version of TivaWare. You will find a similar demo then at:

    C:\ti\TivaWare_C_Series-2.1.4.178\examples\boards\ek-tm4c1294xl\uart_echo

    (Not sure which board you have, that version is for the EK-TM4C129XL)

    Then open CCSv7, do File->Import, select Code Composer Studio -> CCS Projects -> Next, then browse to

    "C:\ti\TivaWare_C_Series-2.1.4.178\examples\boards\ek-tm4c1294xl\uart_echo"

    Select finish.

    The project should build with no modifications. It is much simpler to understand and does not have all of the extra baggage of the RTOS routine doing the performance measurement.

    If you are already beyond that point, I apologize. Just let me know and I will see what I can do to understand/debug the RTOS example on Monday.

  • HI Bob,

    Thank you for the quick reply. I'm not using one of the TI demo boards. We have our own board with the 129ENCZAD chip. I just want to test the UART interface at this point. The TivaWare you pointed me to, is that strictly for the TI dev boards or is it only dependent on the microcontroller?


    Thanks again.
  • That example assumes you use a 25MHz crystal and that you can connect UART0 to the serial port on a PC. Otherwise it is independent of the TI development board. (The software can be modified for other crystals and other UART ports.) TivaWare itself is just dependent on the micro-controller.
  • Ok, understood, thank you.

    If you could bring the other engineer (the one you mentioned that is on vacation) in on this when back from vaction, would really appreciate. I really want to understand what is wrong here and run it as it is fairly close to what I need to do for testing. Thank you again for your time and help.

  • erik skullerude said:
    It looks like the .resetVecs has the same start addr as intVecs? Why is this and how should I fix it?

    .resetVecs are the interrupt vectors from the TI-RTOS start-up code. .intvecs are the interrupt vectors from the start-up code added by CCS when a new empty project is created. Having these two sets of interrupt vectors causes the linker error.

    Since TI-RTOS has it own start-up code, if you delete the <device_name>_startup_ccs.c source file and <device_name>.cmd linker command file which were added when an empty CCS project was created that should remove the linker errors about trying to place .resetVecs and .intvecs at the same address in flash.

  • HI,

    Thank you for the info and suggestion. I excluded the tm4c129enczad_startup_ccs.c and tm4c129enczad.cmd files from the project, ran Project Clean, then Build. The following resulted:
    <Linking>
    warning #10247-D: creating output section ".text" without a SECTIONS specification
    warning #10247-D: creating output section ".bss" without a SECTIONS specification
    warning #10247-D: creating output section ".data" without a SECTIONS specification
    warning #10247-D: creating output section ".const" without a SECTIONS specification
    warning #10247-D: creating output section ".bss:.common" without a SECTIONS specification
    warning #10247-D: creating output section ".cinit" without a SECTIONS specification
    "configPkg/linker.cmd", line 161: warning #10096-D: specified address lies outside memory map
    error #10264: DEFAULT memory range overlaps existing memory range RAM

    It seems I am really off in the weeds. It was suggested in another forum to start with an example project rather than set up a new project from scratch. Is there just a ton of stuff a person must learn before a project can be created from scratch?