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.

How to modify the sfh_OMAP-L138.exe source code

Other Parts Discussed in Thread: OMAP-L138

Hi,

I want to use sfh_OMAP-L138.exe for flashing custom board.

My board includes SRAM instead of DDR momory.

SRAM connected to the external memory interface (EMIFA) peripheral on EMA_CS[4].

So I change EXTERNAL_RAM_START from 0xC0000000 to 0x64000000 in ARM_sft.lds

Add  below code in ARM_sft.cmd

AEMIF_CS4   org=0x64000000 len=0x02000000 /* AEMIF CS3 region */

.extram
  {
    . += 0x02000000;
  } load = AEMIF_CS4, FILL=0x00000000, type=DSECT, START(_EXTERNAL_RAM_START), END(_EXTERNAL_RAM_END), SIZE(_EXTERNAL_RAM_SIZE)

Change

And externalRAMStart = 0xC0000000 -> externalRAMStart = 0x64000000 in device_name.cs

And then I compiled source and run.

But it couldn't write image file to NOR flash and don't load image file to SRAM.

Let me know changing point.

  • Remony,

    Sorry if I'm playing captain obvious here. Did you happen to run a make clean first? The only time new target images get linked into the .exe is after a 'make clean'. This has been my experience with the L137 tools anyway.  

    Also, you may want to examine the /sft source as well. If any of your hardware specific changes impact what actually runs on the target, you will need to update that source as well. Changing the map as you've shown above may not be enough to support your external memory. I would suggest referencing the EMIFA documentation for your target. This will instruct you on how to configure the EMIFA when using an SDRAM. Your timing requirements may not be compliant with what the EVM used. 

    While you are at it, I would verify your NOR configuration. The /sft application that gets loaded to your target should be configuring the proper timing, CS region, page mode, page size, etc... before copying the image(s). 

    If you are still stuck, please include the AISGEN register configuration that you are using and the output from OMAP-L138.exe. You may also used the supplied .gel files and CCS to get additional information about the state of the target.

    Hope this helps,

    Andrew

  • Remony,

    Andrew is correct that the SFT source needs to be modified.  In particular, the device.c file under Common/src will need to have the DEVICE_ExternalMemInit function and it's use will need to be completely reworked to replace initializing mDDR/DDR with initializing SDRAM.

    Regards, Daniel