Part Number:TMS320F28069F
Tool/software: TI C/C++ Compiler
I am trying to get the code loaded on the TMS320F28069F so that I can copy an image off of a USB stick into the internal flash. I have verified I can get all the code to run, as long as the fat_usbmsc.obj file is compiled into the flash. When, I add that fat_usbmsc.obj(.text) to the ramfuncs in the cmd file, the code will run upto a certain point.
The code is written to do the following:
1) detect a USB stick; attempt to mountUSBDrive() and spin until STATE_DEVICE_READY is set by mountUSBDrive() routine
2) f_open a path declared in a global string
3) f_read the contents of a file (specified in a second global string) into a RAM buffer
4) delete the internal flash, and copy the contents of the RAM buffer into the internal flash
5) reset and run the new code
As I step through the code, I take an exception and the ISR is stuck on the memcpy when the f_mount() routine calls the f_read() routine.
My theory is that the memcpy routine needs to be moved to ramfuncs as well. Any idea on how I can get the memcpy to compile into the RAM space instead of it being compiled to flash? I tried specifying the string.obj (and tried the string.lib), but the compiler is failing when I add that extra line to the ramfuncs section of the cmd file.
What am I doing wrong?
My cmd file looks like this:
ramfuncs : {
fat_usbmsc.obj(.text)
*(ramfuncs)
}
LOAD = FLASHD,
RUN = RAML0 | RAML1,
LOAD_START(_RamfuncsLoadStart),
LOAD_END(_RamfuncsLoadEnd),
RUN_START(_RamfuncsRunStart),
LOAD_SIZE(_RamfuncsLoadSize),
PAGE = 0