Forum Discussion

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

EPCS and boot-loader, boot_loader_epcs.srec problem

Hi!

I have made a simple custom system with a Cyclon EP1C12, EPCS4 and a 30Mhz system clock. (Using Altera 7.1 tools)

A NIOS2 core is generated with 20kbyte of on chip RAM.

What I want is to load FW and SW from my EPCS4 FLASH memory, to on_chip_SRAM on power_on, however I cant get any program larger than a couple of 100 bytes to work with the flash. That is, I can program the flash without problems, but only small softwareprogams wil work, once the pogram gets bigger, like 1kb, it seems like the EPCS boot_loader dont tranfer all the code to RAM.

My flash script are:


# !/bin/sh
# 
cd C:/altera/71/nios2eds/bin/eclipse/nios2-ide-workspace-7.1/hello_world_small_1/Release
echo creating flash file for the FPGA configuration
"$SOPC_KIT_NIOS2/bin/sof2flash"  --epcs –-verbose –-offset=0x0 --input="D:/Prosjekter/RDDC/NIOS2_fpga/fpga_05/small.sof" --output="small.flash"
echo Programming flash with the FPGA configuration
"$SOPC_KIT_NIOS2/bin/nios2-flash-programmer" --debug --epcs --base=0x00008800 --cable='USB-Blaster ' --instance=0 "small.flash"
echo Creating .flash file for the SWproject
"$SOPC_KIT_NIOS2/bin/elf2flash" --epcs --boot="C:\altera\71\nios2eds\components\altera_nios2\boot_loader_epcs.srec" --after="small.flash" --input="hello_world_small_1.elf" --output="epcs_controller.flash"
echo programming firmware
"$SOPC_KIT_NIOS2/bin/nios2-flash-programmer" --debug --epcs --base=0x00008800 --cable='USB-Blaster ' --instance=0 "epcs_controller.flash"

Any ideas will be greatly appreciated.

Frendly regards

Tor Aleksader

2 Replies

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

    File an SR with Altera as they should be able to help you out easily on this one.

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

    Found the problem. Seems like Altera tools 6.1 and 7.1 uses differnt approchment to using a bootloader. And my project was uppgraded from 6.1 to 7.1. If i did all from scratch in 7.2 everthing works as it should.

    In 6.1 you have to add bootlaoder in NIOS IDE, and in 7.1 it get's added in the QUARTUS tool.

    Tor Aleksander