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.

"set BSP_SDRAM_BANK1_ENABLE=0" with WinCE Unified BSP 1.00 causes EVM3530 to hang

Other Parts Discussed in Thread: OMAP3530

Hi,

For my custom board to work, I always have BSP_SDRAM_BANK1_ENABLE set to 0.  Since I started using Unified BSP 1.00 , I could no longer be able to download the OS image to my custom board through RNDIS USB, so I went back to the EVM for the baseline.

When setting BSP_SDRAM_BANK1_ENABLE = 1, I could download the image through RNDIS USB and the EVM displayed the shell screen.  When setting BSP_SDRAM_BANK1_ENABLE = 0, the OS hang soon after being started.  Below are the only output I got when downloading the debug build from platform builder:

Error Reporting Memory Reserved, dump size = 0004b000
Setting up softlog at 0x847b1000 for 0x800 entries
Booting Windows CE version 6.00 for (ARM)
&pTOC = 82df0c1c, pTOC = 82d88544, pTOC->ulRamFree = 82df5000, MemForPT = 00001000

Old or invalid version stamp in kernel structures - starting clean!
Configuring: Primary pages: 6582, Secondary pages: 42987, Filesystem pages = 24784

 

I appreciate your advice on what changes I need to do to have the EVM works when setting BSP_SDRAM_BANK1_ENABLE = 0.

Thanks,

Luan

  • I have run into this problem also. I think it has to do with the CMEM_BLOCK1 allocation related to the C6ACCEL stuff which looks to be a last minute addition. This memory space should not be given back to OS if SDRAM_BANK1 is not enabled.

     Try commenting out the following two lines in image_config.h

    //#define IMAGE_CMEM_BLOCK1_CA           0x8C000000   // CMEM Block 1
    //#define IMAGE_CMEM_BLOCK1_SIZE         0x04000000   // 64 MB

    and also in init.c in the OAL\OALLIB:

        //// If CMEM Block1 region is not used for the DSP, give it to the OS
        //if ((cSections < cMemSections) && (dwCMemBlock1Enabled != 1))
        //{
        //    pMemSections[cSections].dwFlags = 0;
        //    pMemSections[cSections].dwStart = IMAGE_CMEM_BLOCK1_CA;
        //    pMemSections[cSections].dwLen = IMAGE_CMEM_BLOCK1_SIZE;
        //    cSections++;
        //}

     might be some cleaner ways to do this also.

  • maybe it shoud be:

        if ((cSections < cMemSections) && (dwCMemBlock1Enabled != 1) && (dwBank1Enabled == 1))

    ???

  • DavidVescovi said:

    maybe it shoud be:

        if ((cSections < cMemSections) && (dwCMemBlock1Enabled != 1) && (dwBank1Enabled == 1))

    ???

    David,

    Yes this is correct implementation. We found this bug post release and have planned it for next upcoming release.

    Luan

    Is 128MB working after this fix?

    -Madhvi

     

     

     

  • Hi Madhvi,

    I did "Clean Sysgen" and reflash the XLDR/EBOOT but somehow it is still not working for me in both methods (shown below) and in both debug and release builds when BSP_SDRAM_BANK1_ENABLE=0.

    (1) Method 1: Modify the if statement conditions to

    if ((cSections < cMemSections) && (dwCMemBlock1Enabled != 1) && (dwBank1Enabled == 1))

    (2) Method 2: Comment out both of the #defines and the entire if block

    //#define IMAGE_CMEM_BLOCK1_CA 0x8C000000 // CMEM Block 1

    //#define IMAGE_CMEM_BLOCK1_SIZE 0x04000000 // 64 MB

     

     

    //// If CMEM Block1 region is not used for the DSP, give it to the OS

    //if ((cSections < cMemSections) && (dwCMemBlock1Enabled != 1))

    //{

    // pMemSections[cSections].dwFlags = 0;

    // pMemSections[cSections].dwStart = IMAGE_CMEM_BLOCK1_CA;

    // pMemSections[cSections].dwLen = IMAGE_CMEM_BLOCK1_SIZE;

    // cSections++;

    //}

    Would you please try it on your end to see if it is working for you?

    David,

    Did you anything else in addition to what you already told me?

    Thanks,

    Luan

  • In my case I was testing with an older 128MB EVM and the stall occurred approximately the same place you describe, which made me believe it might be the same problem. You may be seeing a different problem altogether.  In my case the changes described corrected my issue.

  • Luan

    here are the steps that I followed:

    1. Fix init.c to not add CMEM1 region when BANK1 is not enabled

    2. Unset BSP_SDRAM_BANK1_ENABLE in EVM_OMAP3530.bat

    3. Rebuild BSP (You need to re-build and not just build)

    4. Update the XLDR and EBOOT on the device

    5. Download NK.bin and boot-up

    6. Boot-up was successful. Control Panel->BSP Information shows that it has 128MB RAM. Control Panel->System->memory tab shows reduced memory. "do dump sdrc" also shows that SDRC_MCFG_1 is configured correctly.

     

    Questions for you:

    Are you trying these changes on your custom board or TI EVM? Did you rebuild BSP and update the XLDR/EBOOT?

     

    -Madhvi

     

     

  • Hi Madhvi,

    I did exactly what you specified but could not get it to work.  It hangs somewhere between these two debug outputs:

    Configuring: Primary pages: 6582, Secondary pages: 42987, Filesystem pages = 24784

    Booting kernel with clean memory configuration:

    When it hangs, the second line is not output.

    I am trying these changes on TI EVM2.  I rebuild the BSP and update XLDR/EBOOT each time I change BSP_SDRAM_BANK1_ENABLE to 0 or 1.  It works every time I set it to 1 and hangs every time I set it to 0.

    Did you also test on the older 128MB EVM like David's or the newer one with 256MB?

    Thanks,

    Luan

     

  • I tested on newer EVMs with 256MB.

  • Can you try setting pfnEnumExtensionDRAM to NULL in init.c and see if it helps. Can you share your ce.bib from flat release folder?

  • Hi Madhvi,

    After setting pfnEnumExtensionDRAM to NULL in init.c as you recommended, the EVM is able to get all the way to the explorer screen, which it could not do before.

    I also attach the file ce.bib as you requested.  I rename it to cebib.txt since I got an error "File type invalid" with the original file.

    6813.cebib.txt

    Is this an issue needed to be fixed in the future release?

    Thanks for your excellent support,

    Luan

  •    The ce.bib that you sent - is it for 128MB or 256MB? In your ce.bib, the following lines exist, which suggest that BSP_SDRAM_BANK1_ENABLE is defined.

     RAM_BANK_1                  0x88000000 0x04000000  RESERVED

    ; -------------------------------------------------------------
    ; FIXUPVARs (those are global variables whose intial values are overloaded in this BIB file

    nk.exe:dwBank1Enabled 00000000 1 FIXUPVAR



    Just to confirm, how did you undefine BSP_SDRAM_BANK1_ENABLE? If you just set it to 0, then in windows batch file terms, it is still defined but the value is 0. In config.bib we test for "#if defined" which means that you need to do "set BSP_SDRAM_BANK1_ENABLE=" and not "set BSP_SDRAM_BANK1_ENABLE=0" to un-define it. I think this may be your real problem.

    By setting pfnEnumExtensionDRAM to NULL, we were just avoiding expansion of RAM completely.

    In future release, we will fix the bug in init.c (as identified before) but the user needs to make sure that they undefine variables correctly. Sorry for not catching this earlier.

    -Madhvi

  • FYI - I also corrected my initial post that lists the steps to do. Somehow I did "unset" in my build environment but wrote "set to 0" in the forum post.

    -Madhvi