AnsweredAssumed Answered

Loading Code to 21371 External SRAM

Question asked by apope on Jan 28, 2011
Latest reply on Feb 1, 2011 by vishwanath

Please forgive my ignorance, I have been using the 21xx's for years and I am just now starting to mess with the 213xx's.

 

I am attempting to place code and execute out of an external SRAM, but when VDSP loads the .dxe file, it loads 0's into the external space.  After it loads before executing any instructions, I can open a memory window and edit the values and these values are written and retained.  I have verified this with a scope, watching ms0, wr, and data0 lines and see all 0's during the load and when I manually change the data, data0 reflects the change.

 

I have used the 21371 EZKit to develop some code and placed some of this code in the 0x200000 address space (which I believe is hooked to the SDRAM on the EZkit) and everything runs just fine using VDSP++ 5.0 debugging.  I now have my target board and the SDRAM has been replaced with a 16bit wide SRAM connected to ms0 chip select and address space 0x200000.  I have changed the following registers reset values to disable the SDRAM and use 16bit SRAM, these are from the initialization xml VDSP uses:

<register core="Common" name="SDCTL" reset-value="0x2304437B"/>
    <register core="Common" name="SDRRC" reset-value="0x000307FC"/>
    <register core="Common" name="AMICTL0" reset-value="0x0001c983"/>
    <register core="Common" name="AMICTL1" reset-value="0xDDFC9"/>
    <register core="Common" name="EPCTL" reset-value="0xF0"/>
    <register core="Common" name="SYSCTL" reset-value="0x100004"/>

 

I have changed the LDF file several different ways and placed the code in section("seg_ext_code"):

 

The standard LDF file used with the EZKit

 

seg_ext_code { TYPE(PM RAM) START(0x00200000) END(0x003FFFFF) WIDTH(32) }
seg_ext_dmda { TYPE(DM RAM) START(0x00400000) END(0x005FFFFF) WIDTH(32) }

 

seg_ext_code
        {
          INPUT_SECTIONS( $OBJECTS(seg_ext_code) $LIBRARIES(seg_ext_code))
            INPUT_SECTIONS( $OBJECTS(seg_pmco) $LIBRARIES(seg_pmco))
            INPUT_SECTIONS( $OBJECTS(seg_pmda) $LIBRARIES(seg_pmda))
        } > seg_ext_code

 

seg_ext_data
        {
            INPUT_SECTIONS( $OBJECTS(seg_dmda) $LIBRARIES(seg_dmda))
          INPUT_SECTIONS( $OBJECTS(seg_ext_data) $LIBRARIES(seg_ext_data))
          INPUT_SECTIONS( $OBJECTS(seg_sdram) $LIBRARIES(seg_sdram))
        } > seg_ext_dmda

 

 

Another modified attempt at packing the LDF:

 

seg_ext_code { TYPE(PM RAM) START(0x00200000) END(0x003FFFFF) WIDTH(32) }
seg_ext_dmda { TYPE(DM RAM) START(0x00400000) END(0x005FFFFF) WIDTH(32) }

 

seg_ext_code
        {
          INPUT_SECTIONS( $OBJECTS(seg_ext_code) $LIBRARIES(seg_ext_code))
        PACKING(6   B0 B0 B1 B2 B0 \
                B0 B0 B3 B4 B0 \
                B0 B0 B5 B6 B0 )
            INPUT_SECTIONS( $OBJECTS(seg_pmda) $LIBRARIES(seg_pmda))
        PACKING(6   B0 B0 B1 B2 B0 \
                B0 B0 B3 B4 B0 \
                B0 B0 B5 B6 B0 )
        } > seg_ext_code

 

        seg_ext_data
        {
            INPUT_SECTIONS( $OBJECTS(seg_dmda) $LIBRARIES(seg_dmda))
        PACKING(6   B0 B0 B1 B2 B0 \
                B0 B0 B3 B4 B0 \
                B0 B0 B5 B6 B0 )
          INPUT_SECTIONS( $OBJECTS(seg_ext_data) $LIBRARIES(seg_ext_data))
        PACKING(6   B0 B0 B1 B2 B0 \
                B0 B0 B3 B4 B0 \
                B0 B0 B5 B6 B0 )
        } > seg_ext_dmda

 

 

I think you have to be a brain surgeon to understand the packing instruction.

 

The results are the same, 0's in the external SRAM.

 

Any ideas would be most welcomed.

 

Thank you.

Outcomes