你好!
我现在想在M4上,做一个可以利用SD卡升级用户应用代码的BOOTLOADER,目前M4的型号是LM4F231,
附件是我的项目工程,项目下有:
1. bootload : ti boot_loader文件(从StellarisWare拷贝过来,去除了一些UART, USB, ENT,CAN等的升级文件)。
2. BSP: 系统的硬件初始化。
3. driver: LCD驱动文件
4. third_party:FATFS0.7的文件
5. includes: 包含的头文件。
我的做法如下:
1. 新建一个工程,把TI的BOOTLOADER移入(从StellarisWare拷贝过来),加入FATFS文件系统和SD卡驱动,以及做一些简单的液晶显示(液晶是一个96*64 的单色LCD).
2. 对于FATFS和SD驱动和液晶的显示已经调试OK,我在bootload文件夹下,新建了一个bl_hooks.c的文件,里面的程序如下:
#include "bl_hooks.h" /* boot_loader的钩子头文件 */
#include "bl_config.h" /* boot_loader的配置文件*/
#include "../BSP/bsp.h" /* 自己写的驱动头函数*/
void MyHwInitFunc(void)
{
BSP_Init(); // 驱动初始化函数(主要做些GPIO的初始化,SPI的初始化等*/
}
现在的问题如下:当我把"BSP_Init(); “屏蔽掉,编译正常,DEBUG也正常,但是单我加了这句话,系统编译就出现错误(BSP_Init()没有问题,已经验证过)。
不是只有”BSP_Init()这个函数有问题,只要我加入我自己定义的函数(BSP文件夹下的函数或是third_party下的函数,都会出现编译错误)。
提示如下:
This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. warning #10278-D: LOAD placement specified for section ".text:decompress:none:rtsv7M4_T_le_v4SPD16_eabi.lib<copy_decompress_none.ob j>". This section contains decompression routines required for linker generated copy tables and C/C++ auto-initialization. Must ensure that this section is copied to run address before the C/C++ boot code is executed or is placed with single allocation specifier (ex. "> MEMORY"). warning #10278-D: LOAD placement specified for section ".text:rtsv7M4_T_le_v4SPD16_eabi.lib<memcpy_t2.obj>". This section contains decompression routines required for linker generated copy tables and C/C++ auto-initialization. Must ensure that this section is copied to run address before the C/C++ boot code is executed or is placed with single allocation specifier (ex. "> MEMORY"). warning #10278-D: LOAD placement specified for section ".text:decompress:ZI:rtsv7M4_T_le_v4SPD16_eabi.lib<copy_zero_init.obj>". This section contains decompression routines required for linker generated copy tables and C/C++ auto-initialization. Must ensure that this section is copied to run address before the C/C++ boot code is executed or is placed with single allocation specifier (ex. "> MEMORY"). warning #10278-D: LOAD placement specified for section ".text:decompress:rle24:rtsv7M4_T_le_v4SPD16_eabi.lib<copy_decompress_rle.ob j>". This section contains decompression routines required for linker generated copy tables and C/C++ auto-initialization. Must ensure that this section is copied to run address before the C/C++ boot code is executed or is placed with single allocation specifier (ex. "> MEMORY"). warning #10278-D: LOAD placement specified for section ".text:rtsv7M4_T_le_v4SPD16_eabi.lib<copy_decompress_rle.obj>". This section contains decompression routines required for linker generated copy tables and C/C++ auto-initialization. Must ensure that this section is copied to run address before the C/C++ boot code is executed or is placed with single allocation specifier (ex. "> MEMORY"). table.c:4070:internal fatal error #10220: (".data:mmc-lm4f231e5qr.obj")
INTERNAL ERROR: D:\ti\ccsv5\tools\compiler\tms470\bin\lnk470.exe aborted
This is a serious problem. Please contact Customer Support with this message and a copy of the input file and help us to continue to make the tools more robust.
>> Compilation failure gmake: *** [sd_bootload.out] Error 1 gmake: Target `all' not remade because of errors.
**** Build Finished ****
在Problems下显示:
#10278-D LOAD placement specified for section
看上面的提示,感觉是加入的文件,链接出了问题,但是我的链接文件时拷贝TI例程内的bl_link_ccs.cmd,这个问题如何解决?
望高人指教,这个问题困扰一个星期了,都没办法调通。
我用的是CCS5.1,MCU用的是LM4F231E5QR(256K FLASH, 32K SRAM),