救助:我用Kinetis Bootloader V2.0的freedom_bootloader工程生成的boot程序,想通过串品升级MK22FN512的应用程序,pc端用KinetisFlashTool.exe. 使用中可以正确连接并正确写入应用程序,也提示写入成功了(通过仿真器的读回与写入文件比较,确实是一样的,说明写入已没的问题),但就是跳不进应用程序!我的相关配置如下:应用程序的入口地址设置(ProcessorExpert.ld):
- /* Entry Point */
- ENTRY(__thumb_startup)
- /* Highest address of the user mode stack */
- _estack = 0x20010000; /* end of m_data */
- __SP_INIT = _estack;
- __stack = _estack;
- /* Generate a link error if heap and stack don't fit into RAM */
- __heap_size = 0x00; /* required amount of heap */
- __stack_size = 0x0400; /* required amount of stack */
- MEMORY {
- m_interrupts (RX) : ORIGIN = 0x0000A000, LENGTH = 0x00000198
- m_text (RX) : ORIGIN = 0x0000A410, LENGTH = 0x00075BF0
- m_data (RW) : ORIGIN = 0x1FFF0000, LENGTH = 0x00020000
- m_cfmprotrom (RX) : ORIGIN = 0x0000A400, LENGTH = 0x00000010
- }
- .interrupts 0x0000a000 0x198
- 0x0000a000 __vector_table = .
- 0x0000a000 . = ALIGN (0x4)
- *(.vectortable)
- .vectortable 0x0000a000 0x198 ./Static_Code/System/Vectors.o
- 0x0000a000 __vect_table
- 0x0000a198 . = ALIGN (0x4)
- .cfmprotect 0x0000a400 0x10
- 0x0000a400 . = ALIGN (0x4)
- *(.cfmconfig)
- .cfmconfig 0x0000a400 0x10 ./Static_Code/System/CPU_Init.o
- 0x0000a400 _cfm
- 0x0000a410 . = ALIGN (0x4)
- .text 0x0000a410 0x128c
- 0x0000a410 . = ALIGN (0x4)
上面是生成的.map文件部分
通过对boot 的仿真,也确实执行到了跳转到应用程序位置:
- // In the case of the typical peripheral timeout, jump to the user application.
- jump_to_application(applicationAddress, stackPointer);
applicationAddress=0xa004;
stackPointer=0xa000;
执行到这里后,就不停在跳转,但就是没能进应用程序
求大侠指点下!
|