Forum Discussion
Altera_Forum
Honored Contributor
19 years agoHi shmueld,
> What have I missed ? The EPCS "device" is a just a serial EEPROM that stores a _copy_ of your code -- just like a disk drive. So, the code needs to read from the EPCS device into memory that the nios can access (e.g. ram, sdram, on chip ram, etc.). The EPCS device is _not_ a parallel memory in the nios address space -- that's what slacker means when he says, "...the EPCS is not accessed like virtual memory." > However in the NIOS II IDE program as soon as I changed the Linker Script > "Program Memory (.txt): " from the on_chip memory to the epcs_controller, > when I tried to build I got the following error message :- > > region epcs_controller is full (count_binary_6.elf section .text). > Region needs to be 6700 bytes larger Ok, here's what makes up and EPCS component: 1. An ASMI controller. This is basically an SPI controller that lets you read and write to the physical EPCS device. A physical EPCS device is nothing more than serial EEPROM that is accessed using the SPI protocol. From a practical point-of-view, the difference between an ASMI controller and a "plain-old SPI controller" are the pins you use: with an SPI controller, you assign the signals to the User I/O pins of your choosing. With an ASMI controller, the pins are automatically assigned to the Cyclone AS configuration pins. 2. On chip memory. The first 256 bytes (or whatever) is a read-only on chip memory. This memory contains boot code that initializes the caches, then searches the physical EPCS device for application code. First, it determines where the end of your device configuration data is, then it looks for "section records" to read into ram/sdram. After it copies the program in, it jumps to the program's start address. So, setting your .text section to the EPCS controller is _not_ what you want to do. Leave your .text, stack, etc. where you want it to be at run time. Then, set your reset address to the epcs controller, and finally, program your application into the epcs device. > Any other suggestions ? Read the embedded peripherals handbook -- the sections on the EPCS Controller and SPI controller. Then read the flash programmers guide. Regards, --Scott