OpenCores
no use no use 1/1 no use no use
Program DE0-Nano
by lee_stanton on Sep 14, 2016
lee_stanton
Posts: 2
Joined: Apr 28, 2013
Last seen: Sep 15, 2016
What are the steps that I need to take to generate a .jic file for the de0-nano? I am able to load a de0_nano.sof onto the board then load a test.elf program and debug it with OpenOCD and GDB. I now want to use these two files (.sof and .elf) to load onto the de0-nano (the EPCS64) and run the openrisc core and my test software when I power up the board.
Any help is much appreciated.
RE: Program DE0-Nano
by olof on Sep 15, 2016
olof
Posts: 218
Joined: Feb 10, 2010
Last seen: Dec 17, 2018
There are several steps to accomplish this. I'll be assuming you are using FuseSoC with the de0_nano system available there.

1. Create the .jic file. For this, I have added a small helper script https://github.com/openrisc/orpsoc-cores/blob/master/systems/de0_nano/utils/flash_helper.sh to put together a jic from a sof and an elf file. It will also tell you the command for programming the SPI Flash with your jic image

2. Make sure that you use the correct boot loader to get the image from Flash when the FPGA is powered up. By default, the de0_nano system uses the correct one (spi_uimage_loader), so step 1 is really all you should need to do :)

Let me know if this works,
//Olof
RE: Program DE0-Nano
by lee_stanton on Sep 15, 2016
lee_stanton
Posts: 2
Joined: Apr 28, 2013
Last seen: Sep 15, 2016
Hi Olof
Thank you for replying.

I am using Fusesoc. I have been working through this:
https://github.com/embecosm/chiphack/wiki/OpenRISC-SoC-Practical-Session-Instructions

I have successfully been able program the de0_nano.sof file onto my board and then connect to it with OpenOCD/GDB and run the "Hello World" example (I have put this in an infinite loop so that I will always get the uart transmitting).

I have already tried the flash_helper.sh script and have retried it since your suggestion. The script seems to run ok and I can program the de0_nano.jic file onto my board but it doesn't seem to run.

A couple of things I have noticed. Firstly, the script suggests that I should be using a .bin file, but I am using a .elf file. Does this matter? Should I be converting the .elf file to .bin before using the script and if so, what should I be using to convert?
Also, if I use "fusesoc pgm de0_nano", I can connect to the board with openOCD. However, if I program my board using the .jic file that I generate, then I can no longer connect using openOCD. It connects initially and then I get the repeated message "target state: halted".
no use no use 1/1 no use no use
© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.