Forum Discussion

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

IHEX file and Convert Programiing

I am using Cyclone III Quartus II 9.0 SP 2, windows XP.

I have am trying to generate and download .pof file to a flash but it didn’t seem to work.

Here is what I did:

1. I created a intel hex format file (for application fw) in the script below:

…# define project name, path name, and file name

PRJNAME=Next

NIOSDIR=$PRJNAME"_NiosII"

BSPDIR=$PRJNAME"_Bsp"

APPDIR=$PRJNAME"_App"

SOPCFILE=$PRJNAME"_NiosII_System.sopc"

SOFFILE=$PRJNAME"_NiosII.sof"

ELFFILE=$PRJNAME".elf"

# enter app directory

if [ -f ./$APPDIR/Makefile ]

then

cd $APPDIR

else

exit

fi

# clean old object files (currently disabled)# make clean

# compile per Makefile

make

# Relocate the firmware version section

nios2-elf-objcopy --change-section-address .fw_version=0x290000 next.elf next.elf

# Create the S-record from the the .elf file

nios2-elf-objcopy -O srec next.elf next.srec

# Create the ihex from the the .elf file

nios2-elf-objcopy -O ihex next.elf next.hex

# clear USB Blaster

jtagconfig

jtagconfig

I need to generate both srec file and ihex file, so I am doing it consequentially.

Ihex file seems to be successfully generated

I am using .hex file generated above and .sof file to generate POF file.

POF file seems to be generated successfully

Program was downloaded successfully.

All the step above shows that all set up was successful

However, the firmware doesn’t work so we did several testing.

Our findings:

1. .pof file is downloaded properly

2. configuration (.sof) seems failed to load properly.

3. Confdone signal is always low.

We need your help to solve this problem. We believe this is a set up issue

The reason is:

1. We are able to download firmware to flash via JTAG,

using the same .sof file

and .srec file

So maybe the ihex file is generated wrongly or convert programming files is not set up properly.

Let me know your comment
No RepliesBe the first to reply