Forum Discussion
Altera_Forum
Honored Contributor
20 years agoflash programming problem
Hi,
I have trouble with programming flash on my custom board. I received following reports: 22.11.2005 15:47:20 - (INFO) nios2-flash-programmer: Success. Verified 448Kbytes written to U7. 22.11.2005 15:47:20 - (INFO) nios2-flash-programmer: Flash programming complete # Creating .flash file for the project $SOPC_KIT_NIOS2/bin/elf2flash --flash=U7 --base=0x00000000 --end=0x7fffff --rese t=0x900000 --input=ab001_diag_09_flash.elf --output=cfi_flash.flash --boot=$SOPC _KIT_NIOS2/components/altera_nios2/boot_loader_cfi.srec # Programming flash with the project $SOPC_KIT_NIOS2/bin/nios2-flash-programmer --input=cfi_flash.flash --sof=__NO_SO F_PLEASE__ --cable='USB-Blaster [USB-0]' --device=1 --base=0x00800000 22.11.2005 15:47:22 - (INFO) nios2-flash-programmer: Input file empty--no data t o program into flash. Exiting. cfi_flash.flash file is created, but contain only this line S01A000055373A30313A30303030303030303A3030374646464646D5 all paths are correct. Do you have any idea? Thanks a lot. Jan2 Replies
- Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by pleskacj@Nov 22 2005, 10:05 AM cfi_flash.flash file is created, but contain only this lines01a000055373a30313a30303030303030303a3030374646464646d5
all paths are correct.
do you have any idea?
thanks a lot.
jan
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=11086)
--- quote end ---
--- Quote End --- Hi Jan, The elf2flash tool places only segments of your .elf file that fall within the flash device memory span into the output .flash file. This includes data that you specifically link into flash memory via linker assignment, or, your application code if your CPU *reset* address points to flash memory. The most likely cause of the problem you have is that the CPU reset address is not pointing to flash; to change this, open SOPC Builder, go to the 'more cpu settings' tab, change the reset address, re-generate, and re-compile your code (quartus recompile is also necessary because the hardware changes). When you compile your software with the reset address pointing to flash, the .reset section (I *think* its this section, if memory serves me correctly) poitnts to external flash. The elf2flash tool will detect this as it parses the elf and then generate a flash file that the boot copier reads, copying data to ram, during the boot process.
- Altera_Forum
Honored Contributor
Hi Jesse,
thaks a lot, I've changed reset vector and it's work! best regards Jan