Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
19 years ago

Booting from EPCS4

I have a custom board with an EP1C12 connected to an EPCS4 through AS pins. I use a ByteBlaster II download cable, but I don't have the JTAG pins connected. I want to store both configuration data and software data to boot from the EPCS4 device. In SOPC builder, I set my reset address to the base of the epcs_controller. In the Nios II IDE, I tried to set my program memory and read-only data memory to the epcs_controller (with read/write, heap, and stack memory set to sram), but when I try to compile my modified "Hello World" program, it says that there is not enough room in the epcs_controller (which makes sense since there is only 1Kbyte of rom in the epcs_controller). Is it sufficient to set the reset address to the epcs_controller in SOPC builder and set all of the memory contents (program, read-only, read/write, heap and stack) to sram in the Nios II IDE? Will this set up boot from EPCS4 and copy software to sram?

Thanks.

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    jman,

    That's what should happen. The epcs_controller has a small onchip memory where a bootloader resides. This bootloader is responsible for detecting the end of the SOF in the EPCS device and loading code from that point on. If you set the reset address, in SOPC Builder, to point at the epcs_controller, and point the linker towards SRAM, you should be OK. You'd then want to use the Nios II Flash Programmer to program your EPCS with both your hardware and software images. It will create .flash files, for each, and write them into the EPCS device. As as aside, it's probably worth your time to review the Nios II Flash Programmer's guide as there are some really useful commands for debugging flash issues.

    Depending on the size of your software, you might want to enable SOF compression for your hardware image.

    If you want to use the EPCS device for something more, you could look at installing uCLinux, and the appropriate driver....or you could use the EPCS virtual memory component (http://forum.niosforum.com/forum/index.php?showtopic=25).

    Cheers,

    - slacker