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.
Dear all:
在做一个新项目使用F280021 LQFP48 芯片,先画了一个测试板,在调试中发现,程序可以在RAM中运行,切换到Flash运行后,断电重启,程序就运行不起来了,不知道是什么原因原来图如下:
程序工程是自己搭建的,原来在F280049的Flash中可以正常运行。程序也是做了一个简单的IO高低电平控制。添加了F280021_FLASH_Lnk.CMD ,安装目录自带的CMD文件,程序用Debug方式烧录进去,能正常运行,但是断电后,就不运行。
程序里面的memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize); 也使能了,现在不知道是我板子硬件的IO的问题(原来在使用F28069时,GPIO34接下拉电阻,程序断电就运行不起来),F280021第一次使用,还不清楚。
附件工程上传F280021_test.rar
希望等到解答,是我工程设置的问题?还是CMD文件的配置问题?还是硬件IO有特殊功能被我使用了?还是程序的问题?
硬件的话,您可以参考280025C 开发板的参考设计来查看boot引脚的设置
C2000Ware_3_04_00_00\boards\LaunchPads\LAUNCHXL-F280025C\RevA
软件的话,您可以参考该对比文档,搜索flash
https://www.ti.com/lit/an/sprack2a/sprack2a.pdf
另外您也可以参考例程在flash运行时的设置
若还是没有发现问题,我会在明天拿类似型号的开发板来测试一下
我也发现 memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize); 这个函数在使用时,找不到函数文件,原来在使用28069时,F2806x_MemCopy程序里有memcpy有这个函数,并且都添加到工程文件中,在查看280049时,添加这个工程, C:\ti\c2000\C2000Ware_3_01_00_00\device_support\f28004x\examples\adc 选用Flash编译,里面的memcpy函数,也是找不到函数文件memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize); 但是程序能在Flash中运行,不知道是什么原因
在查看280049时,添加这个工程, C:\ti\c2000\C2000Ware_3_01_00_00\device_support\f28004x\examples\adc 选用Flash编译,里面的memcpy函数,也是找不到函数文件
在编译器用户指南中给出了相关说明
In addition to those listed, abs and memcpy are implemented as intrinsics.
memcpy被实现为内在函数。所以会出现上面的情况。
您是否有测试TI例程? C2000Ware_3_04_00_00\device_support\f28002x\examples
例程中使用方式如下(预定义了_FLASH)
#ifdef _FLASH
//
// Copy time critical code and Flash setup code to RAM. This includes the
// following functions: InitFlash()
//
// The RamfuncsLoadStart, RamfuncsLoadSize, and RamfuncsRunStart
// symbols are created by the linker. Refer to the device .cmd file.
//
memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);
//
// Call Flash Initialization to setup flash waitstates. This function must
// reside in RAM.
//
InitFlash();
#endif
Dear Sunsan Yang !
我添加了例程中 C2000Ware_3_04_00_00\device_support\f28002x\examples\adc里面有RAM和Flash 测试,FALSE编译仿真烧录后,程序断电,还是不能运行。从这个确认应该是我硬件的问题,查看了规格书,要用Flash 要把GPIO24 和CPIO32 设置位上拉高电平,板子通过更改,测试成功,断电重启,程序能正常运行