User Tools

Site Tools


manual:ports:tricore_tc3

This is an old revision of the document!


Infineon TriCore AURIX TC3

Remap user program base address

When using the OpenBLT bootloader, both the bootloader and the user program (your firmware) resides in the same flash memory. Furthermore, the bootloader needs to always run first after each microcontroller reset event. As such, the first part of flash memory is reserved for the bootloader. This is the part where the CPU expects the vector table with the reset handler. Consequently, the base address of where the user program is located in flash, needs to be moved forward to make room for the bootloader.

To determine and control how much space the bootloader reserves for itself, take a closer look at the flash driver. Specifically the flashLayout[] array. You'll notice that the first few entries in this table are commented out. The commented out entries defined the space reserved for the bootloader. Refer to the following example:

This flashLayout[] array reserves the first 32kb (0x8000) bytes of flash for the bootloader. In this case, you need to move the base address of your user program forward by 32kb. With other words, you need to edit your firmware's linker script to change the base address of non-cached flash from 0xA0000000 to 0xA0008000 and of cached flash from 0x80000000 to 0x80008000

Refer to the demo user program for an example on how you can achieve this. There a macro named OPENBLT_RESERVED_SIZE was added to the linker script. With the help of this macro, everything that is normally located at the start of program flash 0 is moved forward by 32kb. Brief overview of the affected linker script sections:

Checksum location

manual/ports/tricore_tc3.1667811799.txt.gz · Last modified: 2022/11/07 10:03 by voorburg