store program in external sdram

Hi,

How do you store an entire program in external sdram, is it possible to declare all sections in the linker script to sdram (eventually the boot section to bram) ? Or is there another way to get all data in the sdram ?

thanks

Tom

Reply to
Tom
Loading thread data ...

Which MCU, DSP, or CPU are you using? Is it part of some other system, for example a Basic Stamp?

Most MCU's use external SDRAM for data storage not progam storage. A lot of DSP's use external RAM for both data and program storage. CPU's are pretty much all external RAM for both data and program space.

Reply to
Earl Bollinger

I am using a memec development board (2vp4) with a virtex II pro fpga with powerpc. On the board 32 Mb sdram is available. At this point we use the bram to store our programs that's 64k. But what if we want to implement an rtos ?

Tom

Reply to
Tom

Atmels Linux port does just that, so I assume that this is pretty standard for Embedded (ARM) Linux.

At boot, the internal BootROM looks for the second level boot. This is linked to internal SRAM; and is loaded by the RomBoot from the SPI Dataflash. After loading the CPU jumps to the SRAM address 0.

The third level boot (U-Boot) is linked to SRAM and loaded from SPI dataflash by the second level boot. U-Boot is compressed, so the image is decompressed in the process.

U-Boot will run the "bootcmd" script which loads Linux from SPI Dataflash to SDRAM and decompresses the kernel and the RAMDrive. Both the Kernel and the RAMdrive are linked to SDRAM.

So in order to do what you want, you need to have one or more levels of boot which are executed to load your SDRAM image.

--
Best Regards
Ulf at atmel dot com
 Click to see the full signature
Reply to
Ulf Samuelsson

Sorry I don't know anything about that board. The

formatting link
website wasn't working at this time either. But usually, you have a ROM or flash ROM on board. The RTOS and your programs are all stored in the ROM, during powerup, the monitor program or loader program executes the RTOS which in turn can auto run your first or primary program. In some cases, the CPU runs everything out of RAM. So in that case, you need some sort of loader program that can read the RTOS and other programs from some other source into RAM and then execute it. I see this in some DSP's, but they have a bootloader program in ROM on the chip. The DSP then can be loaded with the RTOS or programs to run from the main system storing the programs. Some of the boards I deal with have a bootloader program in the MCU/CPU, it then reads in it's RTOS or OS from a flash card into RAM and executes it. Some other boards have on board flash and they run the RTOS directly out of the flash, using the RAM for variable and data storage.

Reply to
Earl Bollinger

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.