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.

Building boot loader for Tiva using CCSv6

Other Parts Discussed in Thread: EK-TM4C1294XL, TM4C1294NCPDT

Hello,

My application uses the EK-TM4C1294XL board and requires modifications to the boot loader. I cannot find an example project to do this so I am adding/fixing things as I go, such as predefined symbols TARGET_IS_TM4C129_RA1 and PART_TM4C1294NCPDT. I had a compiler error for bl_emac.c for the included third_party/uip-1.0/uip/uip.c:

    line 6: error #41: expected an identifier

where line 6 is: 

    #define DEBUG_PRINTF(...) /* UARTprintf(__VA_ARGS__) */

How do I resolve this error? I commented out this line and all references to make progress, where I eventually got the linker warnings:

#10247-D creating output section ".cinit" without a SECTIONS specification boot_loader C/C++ Problem

#10278-D LOAD placement specified for section ".text:rtsv7M4_T_le_v4SPD16_eabi.lib<memcpy_t2.obj>". This section contains decompression routines required for linker generated copy tables and C/C++ auto-initialization. Must ensure that this section is copied to run address before the C/C++ boot code is executed or is placed with single allocation specifier (ex. "> MEMORY"). boot_loader C/C++ Problem

#10278-D LOAD placement specified for section ".text:decompress:ZI:rtsv7M4_T_le_v4SPD16_eabi.lib<copy_zero_init.obj>". This section contains decompression routines required for linker generated copy tables and C/C++ auto-initialization. Must ensure that this section is copied to run address before the C/C++ boot code is executed or is placed with single allocation specifier (ex. "> MEMORY"). boot_loader C/C++ Problem

plus a few more. What do I need to do to fix these?

Thanks!

  • Hi Shawn,

    Shawn Gardner said:
    I am adding/fixing things as I go, such as predefined symbols TARGET_IS_TM4C129_RA1 and PART_TM4C1294NCPDT

    At my EK-TM4C129 example programs the predefined symbols are :

        PART_TM4C1294NCPDT TARGET_IS_TM4C129_RA0

    Shawn Gardner said:
    #define DEBUG_PRINTF(...) /* UARTprintf(__VA_ARGS__) */

    Add, at your predefined symbols DEBUG_OUTPUT. See, below #ifdef

    #ifdef DEBUG_OUTPUT
    #include <stdint.h>
    #include "uartstdio.h"
    #define DEBUG_PRINTF UARTprintf
    #else
    #define DEBUG_PRINTF(...) /* UARTprintf(__VA_ARGS__) */
    #endif

    - kel

  • Hi,

    What then is the difference between TARGET_IS_TM4C129_RA1 and TARGET_IS_TM4C129_RA0 and how do I find which version I have?

    Also, I do not want debug output, so I do not want to define DEBUG_OUTPUT. Then how come

    #define DEBUG_PRINTF(...)

    will not compile in CCSv6?

    Thanks,

    Shawn

     

  • Hello Shawn,

    You would need to read the register SYSCTL.DID0 (0x400FE000). The data sheet contains the encoding of the register which will help you know whether the device is TM4C129 or TM4C123 and whether it is a revision A0 or A1 device.

    Regards

    Amit

  • Hi Amit,

    I had a compiler error for bl_emac.c for the included third_party/uip-1.0/uip/uip.c:

        line 6: error #41: expected an identifier

    where line 6 is: 

    #define DEBUG_PRINTF(...) /* UARTprintf(__VA_ARGS__) */

    How do I resolve this error? Kel mentioned above to add DEBUG_OUTPUT as a predefined symbol, but that is not what I want to do because I do not want the debug output enabled.

    Thanks

  • Hello Shawn

    Remove the commented code and make sure that UART-0 is initialized for COM Port.

    #define DEBUG_PRINTF(...) UARTprintf(__VA_ARGS__)

    Regards

    Amit

  • Hi Shawn,

    I happened to stumble across the exact same problem you described. Did you manage to solve the linker warnings? If so, how? If not, did they seem to cause problems?

    Thanks.

  • Hi Dennis,

    Sorry for very long delay in response, but I am now back on my Tiva project.

    To remove the warnings, set (for the boot_loader) in Properties: Build->ARM Linker->Advanced Options->Runtime Environment->Initialization mode->--ram_model.

    Hope this helps.

    Shawn