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.

TM4C123GH6PM: bootloader Problem

Part Number: TM4C123GH6PM

I am currently using the TM4C123GH6PM microcontroller to develop a bootloader. During the bootloader development process, I need to modify the flash location in the 'tm4c123gh6pm.cmd' file so that when jumping from the bootloader to the application, the interrupt vector table can be correctly accessed. I referred to the method provided on the forum and made the following changes to the addresses in the 'tm4c123gh6pm.cmd' file:

--------------------------------------------------------------------------------------------------------------------------------------------------------

--retain=g_pfnVectors

#define APP_BASE 0x00008000
#define RAM_BASE 0x20000000

MEMORY
{
FLASH (RX) : origin = APP_BASE, length = 0x00040000 - APP_BASE
SRAM (RWX) : origin = 0x20000000, length = 0x00008000
}

/* The following command line options are set as part of the CCS project. */
/* If you are building using the command line, or for some reason want to */
/* define them here, you can uncomment and modify these lines as needed. */
/* If you are using CCS for building, it is probably better to make any such */
/* modifications in your CCS project and leave this file alone. */
/* */
/* --heap_size=0 */
/* --stack_size=256 */
/* --library=rtsv7M4_T_le_eabi.lib */

/* Section allocation in memory */

SECTIONS
{
.intvecs: > APP_BASE
.text : > FLASH
.const : > FLASH
.cinit : > FLASH
.pinit : > FLASH
.init_array : > FLASH

.vtable : > 0x20000000
.data : > SRAM
.bss : > SRAM
.sysmem : > SRAM
.stack : > SRAM
}

__STACK_TOP = __stack + 512;

-------------------------------------------------------------------------------------------------------------------------------------------------

After I changed the flash address in 'tm4c123gh6pm.cmd', I encountered an issue. When using ROM-based API functions like 'ROM_GPIOPinRead', 'ROM_TimerDisable', etc., and running the program in debug mode, the program jumps to an address filled with 'F's when it reaches the ROM-based API functions. However, if I don't use ROM-based API functions, the program can run normally in debug mode. When I revert the flash address in 'tm4c123gh6pm.cmd' to the original address and use ROM-based API functions, the program can still run normally in debug mode. Why does this happen? If using ROM-based API functions causes issues, then converting the .c file into a .bin file for the bootloader to burn may result in the program not being executable. Is this because the interrupt vector table offset doesn't include ROM-based API functions when I change the interrupt vector table position in tm4c123gh6pm.cmd?