Hi champs,
My customer wants to implement a bootloader in CM4, he cuts flash memory for boot and app code. The address of app code .resetisr is 0x00210000 and the entry point is 0x002103C5.
The boot code fails to branch to app code if software branch to .resetisr, and it works well if branch to entry point directly. When we look into this problem, find that when we branch to .resetisr the content of PC is 0x002103C4(app code will branch to _c_int00_noinit_noargs right away), not 0x002103C5.
We check the .map file and find that there are two different addresses of _c_int00_noinit_noargs, it seems that this problem is due to ARM Thumb mode, am I correct? What should we do so that CM4 branches to app code .resetisr and executes without problems please?
SECTION ALLOCATION MAP
output attributes/
section page origin length input sections
-------- ---- ---------- ---------- ----------------
.resetisr
* 0 00210000 00000006
00210000 00000006 startup_cm.obj (.resetisr:resetISR)
.text.1 0 0021017c 00000284
0021017c 0000009c rtsv7M4_T_le_eabi.lib : memcpy_t2.asm.obj (.text)
00210218 00000094 app_led_blinky_cm.obj (.text:GPIO_writePin)
002102ac 00000076 cm.obj (.text:CM_enableAllPeripherals)
00210322 00000002 startup_cm.obj (.text:defaultISR)
00210324 00000050 app_led_blinky_cm.obj (.text:main)
00210374 00000008 driverlib_cm.lib : sysctl.obj (.tramp.SysCtl_delay.1)
0021037c 00000048 : sysctl.obj (.text:SysCtl_enablePeripheral)
002103c4 00000020 rtsv7M4_T_le_eabi.lib : boot_cortex_m.c.obj (.text:_c_int00_noinit_noargs:_c_int00_noinit_noargs)
002103e4 0000001a app_led_blinky_cm.obj (.text:GPIO_isPinValid)
002103fe 00000002 startup_cm.obj (.text:faultISR)
GLOBAL SYMBOLS: SORTED ALPHABETICALLY BY Name
address name
------- ----
002103c5 _c_int00_noinit_noargs
002105db _system_pre_init
002105df abort
Thanks for your help,
Luke