- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 AlexLink Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What it's doing is that the program_flash script is generating a .flash file, which is in effect a bootloader followed by a collection of address/data pairs for the elf file. This then gets programmed into flash, on reset the bootloader copies the code into ram.
One thing which may be tripping you up is that the flashprogrammer programs it's own SOF (FPGA config file) once you've run this, you need to reprogram your hardware- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've done it!
The fact is that it wasn't the SOF file, because I am not able to write using the flash-prgrammer (I don't know exactly why, but I've heard it's something about a reset pin used to anything "usual" in my board). So now I'm writing the flash using the germs program, with to different Nios, Nios1 and Nios2, in the same chip. Depending on a strap, it boots with Nios1 and germs, or it boots with Nios2. I think the problem with my previous generations was that the size was incorrect, and somehow, in the generated file, there was only the bootloader. Today I've done all the steps again, with the correct size, and it works. Thank you. Alex
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page