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++
12612 Discussions

Why can not set Program memory to FLASH

Altera_Forum
Honored Contributor II
1,040 Views

I make a simple SOPC Builder system with only EPCS+onchip ram and without other offchip Flash and sram/sdram. I test it under Nios II IDE that it does work when program memory(.text) and read-only data memory(.rodata) are set to onchip ram. 

But when I try to set .text and .rodata to EPCS under system library properties, the program can not be downloaded to the board, displaying the following message: Leaving target processor paused. 

 

Why can not set these read-only program or data to FLASH?
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
322 Views

I don't think you'd want to run your code from a serial flash, like an EPCS, and, even if you did, the controller that ships with Nios II does not support it. The contoller contains a small onchip memory to hold a bootloader. 

 

There is an alternate EPCS component, which you can find on this forum, which will allow you to do what you want. 

 

- slacker
0 Kudos
Altera_Forum
Honored Contributor II
322 Views

 

--- Quote Start ---  

originally posted by seu_xugh@Sep 1 2005, 09:53 PM 

i make a simple sopc builder system with only epcs+onchip ram and without other offchip flash and sram/sdram. i test it under nios ii ide that it does work when program memory(.text) and read-only data memory(.rodata) are set to onchip ram. 

but when i try to set .text and .rodata to epcs under system library properties, the program can not be downloaded to the board, displaying the following message: leaving target processor paused. 

 

why can not set these read-only program or data to flash? 

--- Quote End ---  

 

Oh you certainly can 

But Download to Board does not work with Flash 

 

If you want to download the code into flash, use the flash programmer. 

 

 

regards 

Pavan
0 Kudos
Altera_Forum
Honored Contributor II
322 Views

Hi seu_xugh, 

 

The memory associated with the epcs_controller is read only. So just downloading code to this 

memory via the IDE will not work. And the flash programmer is used to program the eeprom on 

the epcs device, not the on-chip rom. 

 

> But when I try to set .text and .rodata to EPCS under system library properties, 

 

When you do this, you're telling the the IDE that you want your code to run out of the epcs controller 

boot rom. 

 

If this is what you really want, the flash programmer will not work either ... you'll need to modify the 

contents of your epcs_controller_boot_rom.hex file -- and you will no longer have the benefit of the 

boot code. In this case you may find it easier to simply use the asmi component and an onchip rom/ram. 

 

If you want to store your program in the epcs and have it automatically executed when the system 

boots, then you need to set your reset address to the epcs_controller, and leave your application 

.text, .data and other sections mapped to some ram. 

 

Regards, 

--Scott
0 Kudos
Reply