Altera_Forum
Honored Contributor
21 years agoHow to write eCos application on flash?
Hi!
I have generated the eCos package, and an application. I've been running it with the IDE environment and the "Run"command, since now. Now I have to write it to flash. The idea is to write te chode to flash, and it should be copied to RAM when it boots, and run in RAM. Th fact is that in eCos, there is an option that defines the startup type (ROM, RAM, ROMRAM). I've been using ROMRAM until now, and it generated a code with a small "jump" program at the 0 address, and all the orther code at the 0x800000 address (my RAM init address). Shouldn't all the code be generated at the 0 address, copying it itself later to the 0x800000? Also I have seen that the "program-flash" script uses elf2flash to generate the flash file to save. When it generates the flash file, it uses a default altera copier, but... this copier is generic, so in which address is it copying the code? In NiosI, the default copier was in assembler, and it was generated with the parameters of your base_adress, code size, etc... but in Nios2 the boot code is always the same! (and I can't see what is it doing). So... anyone has any idea about the right way to do it? Any "HOW TO" I have missed? Thanx Alex