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.

Flash to RAM copy (SPRAAU8) not working

Hello everyone. I’m developing an application in Matlab-Simulink (2013a) with Embedded-Coder to run on a TMS32028335. The workflow is working fine with the makefile method which generates an .out file I can directly load into CCSv5.

I’m quite tight on processng time and therefore need to enhance the performance by executing from RAM (I have measured about 40% longer cycle times on Flash). Therefore I tried to implement the method described in SPRAAU8. Memory consumption of both Flash and RAM is reasonably low (and could be further optimized) so this should be no problem.

My problem is that I can’t get it to run, although everything seems to be in its place. Following I describe the steps I take (following SPRAAU8) to implement the copy to RAM method:

  • Modify the following original files:
    • DSP2833x_usDelay.asm: change .sect “ramfuncs” in DSP280x_usDelay.asm to .text
    • DSP2833x_SysCtrl.c: remove #pragma CODE_SECTION(InitFlash, “ramfuncs”);
  • In Simulink’s Coder Target Settings, REMOVE from the Source Files to be included list:
    • $(MATLAB_ROOT)\toolbox\idelink\extensions\ticcs\src\DSP2833x_CodeStartBranch.asm
    • $(MATLAB_ROOT)\toolbox\idelink\extensions\ticcs\src\DSP2833x_usDelay.asm
    • $(MATLAB_ROOT)\toolbox\idelink\extensions\ticcs\src\DSP2833x_SysCtrl.c
  • And ADD to the same list:
    • spraau8\Flash_to_RAM\src\DSP28xxx_CodeStartBranch.asm
    • spraau8\Flash_to_RAM\src\DSP28xxx_SectionCopy_nonBIOS.asm
    • DSP2833x_SysCtrl.c (modified)
    • DSP2833x_usDelay.asm (modified)
    • spraau8\Flash_to_RAM\cmd\F2833x F2833x_nonBIOS_flash.cmd renamed as projectname.cmd

According to Mathworks, I don’t need to suppress the generated .cmd file, as the generated file will be replaced by a supplied custom file if the name coincides. When looking at the generated .mk, searching for “.cmd” I can see tha in fact the provided file is used:

LIBRARY_FILES := $(call FORMAT_PATH,C:\spraau8\Flash_to_RAM\cmd\F2833x\test3.cmd)

Am I missing something?

I attach the resulting out and .mk files. Loading the .out into CCSv5 will allow you to see the source code, but if any further files could be useful to identify the problem please let me know and I'll upload them as well. 0045.test3.zip

Best regards and thanks in advance!

Martin

  • P.S.: I've seen that there seemed to be an error in SPRAAU8. I'm not sure if this has been solved or could be affecting me. I couldn't find the suggested fix (SUBB XAR5,#1) in the code as the release date of the downloaded version is March 2008, but I'm not sure where I should insert it in order to test the fix.

    Also, should this be helpful, here are the steps from SPRAAU8 summarized by me to be more overviewable:

  • Hi Martin,

    The doc SPRAAU8 worked like gem since day one. So I don't think there's any issue with the doc.

    Regards,

    Gautam

  • Hello,

    I saw that you have come to this thread: http://e2e.ti.com/support/microcontrollers/c2000/f/171/t/21164.aspx

    I hope you can solve your problem soon.

    Best regards,

    Maria

  • Hello Gautman,

    thanks for your reply. Yet, as I have been commenting in this thread where Tim Love himself uploaded the modified version of the .asm routine, I'm a bit confused about the implications of these modifications.

    In any case, as I commented there but should be discussed here, my application remains not working even with Tim's modifications, so unfortunately there must be something else wrong. I would be very grateful if someone could have a look and maybe identify what is broken 6170.test3mod.zip . Do my steps descibed above seem wrong or could smething else be failing?

    Thanks!

    Martin

    Maria: thanks, I also hope to solve it soon :)