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.

SPRAAU8 Copying Compiler Sections From Flash to RAM...

Errors in SPRAUU8

In DSP28xxx_SectionCopy_nonBIOS.asm:

* The code for copying the section is copying one word too much. The code will of course work if you are unlucky. Fix: copy should subtract one from ACC.

In DSP28xxx_SectionCopy_BIOS.asm

* In copy_sections function the initialization of ACC (MOVL and SUBL commands) are wrong. Fix: Do as in DSP28xxx_SectionCopy_nonBIOS.asm

* In copy_sections function, command "BF copy, NEQ" is not compatible with the "LRETL" in copy function. Fix: Do as in nonBios version.

 

 

 

 

  • Also, When I used "SPRAAU8 Copying Compiler Sections From Flash to RAM...  F2833x_nonBIOS_flash.cmd" integration with my application the Flash programmer return following warning and my application not run from flash.

    Warning: "Initialized RAM varning: Because this program contain initialized RAM data it may run succefully under code composer studio but not as a standalone system. If your flash program reguires initialized data in RAM. you will need to write flash code to initialize RAM memory"

     Can any body help me ,  what can I do about this problem

  • You are correct regarding the DSP28xxx_SectionCopy_nonBIOS.asm file. Because of the RPT instruction the ACC should have one subtracted from it. I will correct this and post to the web. The way I am going to modify it is by subtracting 1 from the XAR5 register before loading it to the ACC:

    SUBB XAR5,#1

    Regarding the DSP28xxx_SectionCopy_BIOS.asm file you can disregard this file. I started with this file when I was going to support BIOS with the app note but I moved away from this. It will be removed in the updated zip file.

    Thanks for pointing out this information to us.

    Regards,

    Tim Love

  • I checked the supplied .cmd file and there are no initialized sections left in the RAM memory. You need to check your .cmd file and map file to see if you have any initialized sections that are allocated to RAM. If so, they will need to be allocated to the flash memory.

    Regards,

    Tim Love

  • :) You're welcome Tim.

     

    Speaking of BIOS and the app note, we moved .sysinit and .bios to internal ram as an exercise - to see how it affects latency and cpu load. Given that there is "plenty" of RAM on F28335 this could be worth doing for some people. And the SPRA958 document does not cover this so imho SPRAAU8 should show how to do this. :-)

  • I am using "SPRAAU8 Copying Compiler Sections From Flash to RAM"

    when I programm my application the Flash programmer return following warning and my application not run from flash.But It can run after CCS waring.

    Warning: This program contains initialized RAM data.
     It may run successfully under Code Composer Studio
     but not as a standalone system because of this. If
     your Flash program requires initialized data in RAM,
     you will need to write Flash code to initialize RAM memory.
     Erase/Program/Verify Operation succeeded

     

     

  • The flash programmer "knows" that there are initialized sections placed in RAM but cannot "know" if your code is making sure that these sections are initialized - hence a warning.

     

    Does you application run from flash, after you reset the CPU?

  • Yes. The DSP/BIOS application run from flash, after reset the CPU. I want to copy the dsp/bios application to ram and run all of them in ram. So I use SPRAAU8 DSP28xxx_SectionCopy_BIOS.asm copy  the all dsp/bios sections to ram. The copy sections as below:

     .global _bios_loadstart, _bios_runstart, _bios_size
     .global _data_loadstart, _data_runstart, _data_size
     .global _gblinit_loadstart, _gblinit_runstart, _gblinit_size
        .global _sysinit_loadstart, _sysinit_runstart, _sysinit_size
        .global _rtdx_text_loadstart, _rtdx_text_runstart, _rtdx_text_size


     .global _cinit_loadstart, _cinit_runstart, _cinit_size
     .global _const_loadstart, _const_runstart, _const_size
     .global _econst_loadstart, _econst_runstart, _econst_size
     .global _pinit_loadstart, _pinit_runstart, _pinit_size
     .global _switch_loadstart, _switch_runstart, _switch_size

     .global _text_loadstart, _text_runstart, _text_size

    But it can't run

  • You cannot use DSp28xxx_SectionCopy_Bios.asm. It will not work. See the beginning of this thread.

     

    Use the non bios version + make the corrections that are discussed in this thread.


    Then start with bios + sysinit sections and modify the asm to copy these two sections as well as the ones already in the file.

    You will need to create _bios_loadstart etc, by using a custom .cmd file; explained in spra958g.

  • Hi Davor,

    I am new to dsp/bios.I don't know how to do .I want to copy the dsp/bios and application text sections to ram and run all of them in ram.

    I write a bootloader. The bootloader run from the flash after dsp reset ,and than the bootloader copy itself to DSP ram and run. After bootloader run ,it copy the dsp/bios  and application text econst const to ram. But after do this .The dsp/bios and application can work.But I found some task Not working! 

    Strangely enough ! The  dsp/bios and application may run successfully under Code Composer Studio.When I burn it to flash without bootloder.It works well too!

    I don't know why.

    Could you give me example to do this? I want to copy dsp/bios and text sections to ram in the bootloder.

    My email:  ljdmcu@sohu.com

    Thanks

  • Tim,

    Did you post the corrected code? I cannot find it?

    Regards   ---- Roger

  • Hello! I was wondering if this issue finally got solved, as I'm having problems getting to work SPRAAU8 with my nonBIOS project. I would be very thankful for any help regarding to this.

  • Martin,

    It looks like I never attached the updated file. I have attached it now.

    Regards,

    Tim Love

    4532.DSP28xxx_SectionCopy_nonBIOS.asm

  • Hi Tim,

    thanks a lot for uploading the modified file!

    I see you added

    1. ".bss    VarA,1" at the beginning
    2. ";SUBB XAR5,#1" in each section copy
    3. "SUBB ACC,#1" at the end

    I assume that the point 2 must be uncommented by deleting  ";" ?

    Yet, I'm confused about the criticality of this correction, as in the thread were I posted my concrete problem (not working when generating code from Simulink) Gautman Iyer (>18K points) posted that "SPRAAU8 worked like a gem since day one". I will reply on that thread linking this thread again, in case any further comment on this issue should arise. Is it possible for the program to work without this modification?

    In any case: my application remains not working. I included your modified .asm both removing the comment ";" in the lines ("SUBB XAR5,#1") and keeping them commented. I will upload my latest .out and .mk and would be very grateful if you could have a look at my issue.

    Best regards!

    Martin

  • For the sake of folks that may refer this thread:  Attached is the fixed DSP28xxx_SectionCopy_nonBIOS.asm file.

    We are working on updating the software package that is referred by SPRAAU8 document as well.

    Thanks and regards,
    Vamsi
    DSP28xxx_SectionCopy_nonBIOS.asm