Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12590 Discussions

eCos Configuration Settings

Altera_Forum
Honored Contributor II
1,084 Views

I'm using an EPC16 as my flash device (read-only interface). The way I get application data into the flash is by converting the application code elf files into .hex format and then using the Quartus "Convert Programming Files" utility to combine the application code hex file, system sof file, and the bootloader hex file into one pof file. 

 

At startup bootloader should load the appication code into my SDRAM.  

 

My question is: how do I set up the memory in the ecos Configuration Tool. I currently have startup type set at ROMRAM and text, rodata, and rwdata set to SDRAM. Will this approach work?  

 

In general has anybody successfully booted ecos code from an EPC device? It works fine on non-ecos applications but I can't get it running on those that use ecos. I have a felling that I'm setting something wrong in the eCos Configuration Tool.  

 

Please help.
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
322 Views

Having built your application using the configuration you have described, you should be able to simply program it into the EPCS device using the auto-generated program_flash script (as described in the getting started guide).  

 

You don't need to manually construct hex files etc. yourself. 

 

There have been problems with this flow in earlier versions of the eCos port, so you should either ensure that you are running version 5.0, or use the work around described in the "eCos from epcs" thread in this forum.
0 Kudos
Altera_Forum
Honored Contributor II
322 Views

 

--- Quote Start ---  

originally posted by monkeyboy@Jul 22 2005, 03:18 AM 

having built your application using the configuration you have described, you should be able to simply program it into the epcs device using the auto-generated program_flash script (as described in the getting started guide).  

 

you don't need to manually construct hex files etc. yourself. 

 

there have been problems with this flow in earlier versions of the ecos port, so you should either ensure that you are running version 5.0, or use the work around described in the  "ecos from epcs" thread in this forum. 

--- Quote End ---  

 

The program_flash script is useless because it uses the Nios II Flash Programmer, which is only compatible with either EPCS active-serial configuration devices or Common Flash Interface chips. The EPC16 (not EPCS16) is neither of these. 

 

The correct settings are ROMRAM boot type, everything mapped to RAM, and you have to convert the object code from ELF to Intel Hex or S-Records and remap the object sections to flash addresses (the generated ELF file has .entry in flash and everything else in SDRAM). The resulting .hex file can then be fed to Convert Programming Files. Also, a boot loader that resides in the initial 64K "boot section" must be written and put in that section. 

 

Just for the record. (narab is a coworker of mine.)
0 Kudos
Reply