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.

TM4C1294NCPDT: Changing resetVectorAddress value as per build configuration TI RTOS 2.16.1.14

Part Number: TM4C1294NCPDT

Hi,

I have been trying to change my resetVectorAddress in .cfg file as per my build configuration but I can only keep the value as absolute number.

For example I want:

Build Config 1 : resetVectorAddress = 0x00000000

Build Config 2 : resetVectorAddress = 0x00008000

Build Config 3 : resetVectorAddress = 0x00078000

I was able to implement the change in .cmd file using #ifdefine but when I build in config 1 or 2 I get this error:

error #10264: DEFAULT memory range overlaps existing memory range FLASH

I got from a TI support post that I need to make changes for resetVectorAddress in .cgf file but it's taking only absolute value.

Is there any way to achieve this?

Regards,

Deepak

  • Deepak,

    This thread was forwarded to me with a question about if it is possible to have multiple .cfg files in a project.  I believe the person who forwarded was thinking that you could have separate .cfg files for each build configuration that contain different addresses.  The answer to that is that you can.  You could make 2 more copies of your .cfg file, give them unique names and then add them to your project.  When you add an additional .cfg file it will exclude the existing one in the project.  However the exclusion settings are on a per build configuration basis so you could have config 1 use config1.cfg, config2 use config2.cfg and config3 use config3.cfg.  You can exclude/include a file by right clicking on it and selecting "Exclude from build".

    Regards,

    John

  • Hi John,

    Thyank you for your reply. I was able to make that change and have multiple .cfg files and use them according to my build.

    After I made that change I'm having another issue where I get this error

    "configPkg/linker.cmd", line 219: warning #10096-D: specified address lies outside memory map
    error #10264: DEFAULT memory range overlaps existing memory range SRAM

    This is what i have .cmd file

    #define APP_BASE 0x00078000

    #define APP_LENGTH 0x00070000

    MEMORY
    {
    /* Application stored in and executes from internal flash */
    FLASH (RX) : origin = APP_BASE, length = APP_LENGTH
    #ifndef DEBUG
    FILL(0xFFFFFFFF)
    #endif
    /* Application uses internal RAM for data */
    SRAM (RWX) : origin = 0x20000000, length = 0x00040000
    }

    and this is what i have .cfg for this build

    m3Hwi.resetVectorAddress = 0x00078000;

    Any idea why this is happening?
    I'm using TM4C1294NCPDT with 1MB flash and as per my calculation I'm well within my FLASH range and since I'm not changing anything related to SRAM, I should not be getting this error.

    Any ideas?

    Regards,

    Deepak

  • Based on the error message it sounds like the linker.cmd that is being generated or included by the config script has a DEFAULT memory range defined in it.  That DEFAULT memory range is overlapping with what you have in your linker command file.  I am going to send the thread back over to the TM4C team.  They may be able to help change that.

    Regards,

    John

  • Hey John,

    Is there a reason that my resetVectorAddress is not getting saved?

    I was able to make the change in .cfg file and get my code working but if I restart my board then it doesn't execute the application.

    this is what i added in my code

    m3Hwi.resetVectorAddress = 0x00008100;

    I believe after board hard restart the code is again executing from 0x00.

    Code works fine when I use debugger but it doesnt work if i directly flash the bin file.

    Any idea why this is happening? do i need any other setting in .cfg?

    Regards,

    Deepak

  • Deepak,

    Hopefully Charles or someone from the TM4 team can help. I do not have any xdctools expertise (.cfg).

    Regards,
    John

  • I believe after board hard restart the code is again executing from 0x00.

    The ARM How do I boot a Cortex-M3 or Cortex-M4 processor with uninitialized memory at address zero? says:

    At Reset, Cortex-M3 and Cortex-M4 processors always boot from a vector table at address zero.

    Code works fine when I use debugger but it doesnt work if i directly flash the bin file.

    The debugger can read the entry address from the image, and set the initial Program Counter to the entry address rather than getting the processor to read the entry address from the vector table at address zero.

    What is the use case for having configurations with different reset vector addresses?

  • Hey Chester 

    Thanks for replying. 

    This clears my doubt why the code doesn't execute on reset.

    The use case for having multiple config and resetvector is that in my project I'm trying to add a bootloader and 2 partitions of application code.

    Bootloader

    Part A

    Part B

    So to do flash partitions in .cmd file I had to add resetVectorAddress values in .cfg file otherwise I was getting error that it's not in range.

    I added the bootloaderr and I was able to generate PART A and PART B bin files. Now I'm having this issue. I have raised that thread here and explained it in detail.

    https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1024278/tm4c1294ncpdt-rtos-bios-not-working

    Can you help me with this?

    Regards,

    Deepak