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.

Error when trying to run Flash code on F28335

Other Parts Discussed in Thread: TMS320F28335, CONTROLSUITE

I've been requested to repost this under its own topic, so I apologize for the duplication.

I’m having the same issue as this thread (https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/288523), which is #20 identifier “RamfuncsLoadSize” is underfined. I’m trying to program a TMS320F28335 that is part of a Semikron SKAI2-LV device.  The program is supposed to be a simple LED-blink program using SYS/BIOS.  I loaded Lab4 from the TI-RTOS training (https://training.ti.com/ti-rtos-workshop-series) site, but the hardware device requires that I load this from FLASH due to its hardwire selection.  I modified the main.c code to the best of my abilities utilizing some non-BIOS code that I have from a motor controller that does load on the SKAI2-LV device (so I know the device functions).  I’ve put in the following code and put in FLASH as a Pre-defined Name for the Predefined Symbols of the project properties.

#ifdef FLASH
#pragma CODE_SECTION(Initflash,”ramfuncs”);
#pragma CODE_SECTION(main,”ramfuncs”);
#endif

I’m going to attach my project code in the hope that someone can help steer me straight. I’ve read SPRA958L and downloaded the code, only to realize that it was set for DSP/BIOS v5 (per this thread: https://e2e.ti.com/support/embedded/tirtos/f/355/t/431154#pi317008=2).  As I’m trying to use SYS/BIOS, I’m a bit bummed and wishing that there was a similar SPRA958L with examples for SYS/BIOS for loading out of FLASH or RAM and with or without SYS/BIOS.

Any help is appreciated to get this simple “hello world” type of program to run. If I can understand what I did wrong and where I missed something, I’d like to apply that to the other labs from this training and to eventually get SYS/BIOS functional with my PMSM motor controller code.

-Tim

blink_tms320f28335_BIOS.zip

  • Hi Tim,

    Normally RamfuncsLoadStart, RamfuncsLoadEnd, RamfuncsRunStart and RamfuncsLoadSize are externed in the GlobalPrototypes.h file, but for some reason RamfuncsLoadSize is missing from the DSP2833x_GlobalPrototypes.h. I'll file a bug report to investigate why it's not there.

    In the meantime, you can add "extern Uint16 RamfuncsLoadSize;" yourself and that should get rid of that error.

    Whitney
  • Tim,

    The RamfuncsLoadSize et al symbols are generated by the linker. Therefore you need to extern them in your source file. Note that they are Uint16 types. Add this to the top of main.c however you want (e.g. directly, in an include file that is included, etc.):

    extern Uint16 RamfuncsLoadStart;
    extern Uint16 RamfuncsLoadSize;
    extern Uint16 RamfuncsRunStart;

    This will fix the undefined symbol error, allowing the compiler to get past that point. You then will get a bunch of linker problems that you'll need to fix. Good luck!

    Regards,
    David
  • Whitney,
    That did the trick. I added RamfuncsLoadSize to DSP2833x_GlobalPrototypes.h and that corrected my first issue. Thanks!
    -Tim
  • David,
    Thanks for the tip. I went Whitney's route, but you're correct, the fix that I did got me past my original issue's point, and I got a bunch of linker problems.  In the end, I ended up changing to the F2833x_Headers_nonBIOS.cmd file, because I read a post that stated the F2833x_Headers_BIOS.cmd file was for DSP/BIOS.  As I'm using SYS/BIOS, the post stated that I should use the first "nonBIOS" version I mentioned.  I added xdc__strict as a Predefined Name, which took care of some warnings.  I also skimmed down my included source files from ControlSuite to help with the errors.  In the end, the program compiles with only a single warning at the moment: "#10247-D creating output section ".cio" without a SECTIONS specification".  I'm going to try to load this and see if it works from Flash.  Thanks for your feedback!
    -Tim