Problems with hosted FPGA image using Quartus 12.1sp1

Having issues with the site, hardware, source code, or any other issues?
Post Reply
piranha32
Posts: 26
Joined: Fri Mar 01, 2013 6:25 am

Problems with hosted FPGA image using Quartus 12.1sp1

Post by piranha32 »

Hello,

After having no luck with build FPGA image using Quartus 13.0sp1 web edition I've installed Quartus 12.1sp1 web. The compilation of HDL works fine, however it crashes on building image for NIOS:

Code: Select all

Info: Building ../lms_spi_controller_bsp/
make --no-print-directory -C ../lms_spi_controller_bsp/
[BSP build complete]
[lms_spi_controller build complete]
Info: Building ../lms_spi_controller_bsp/
make --no-print-directory -C ../lms_spi_controller_bsp/
[BSP build complete]
Post-processing to create mem_init/nios_system_onchip_memory2_0.hex...
bash -c 'elf2hex lms_spi_controller.elf 0x00004000 0x00007fff --width=32 \
        --little-endian-mem --create-lanes=0  mem_init/nios_system_onchip_memory2_0.hex'
make: *** [mem_init/nios_system_onchip_memory2_0.hex] Error 255
[jacek@dragon32 quartus]$
Quartus was invoked using build_bladerf.sh script:

Code: Select all

sh ./build_bladerf.sh -r hosted -s 115
I'm not sure if it matters, but I tried to build the image in the same directory using Quartus 13.0sp1, but it never got that far.

elf2hex is from NIOS bsp:

Code: Select all

[jacek@dragon32 quartus]$ which elf2hex
/opt/altera/12.1sp1/nios2eds/bin/elf2hex
Running the last command from command line produces no error messages, but the error code returned by elf2hex is indeed 255:

Code: Select all

[jacek@dragon32 quartus]$ elf2hex lms_spi_controller.elf 0x00004000 0x00007fff --width=32 --little-endian-mem --create-lanes=0  mem_init/nios_system_onchip_memory2_0.hex
[jacek@dragon32 quartus]$ echo $?
255
[jacek@dragon32 quartus]$ 
Since I have no experience with Altera's software, I would like to ask for an advice how to combat this failure.
opratic
Posts: 1
Joined: Fri Aug 16, 2013 9:01 am

Re: Problems with hosted FPGA image using Quartus 12.1sp1

Post by opratic »

Hi piranha

I encountered the same problem as yours. After some googling and tickling, I found this, https://github.com/Nuand/bladeRF/issues ... t-20947962, very helpful, and turns out "./build_bladerf.sh" has to be run under the shell environment that Nios provided.

1. Run "nios2_command_shell.sh", you can find it under Quartus installation directory, in my case, it's "/home/<User>/altera/13.0sp1/nios2eds".
2. Go to "<Your BladeRF repository>/hdl/quartus"
3. Run "build_bladerf.sh -r <rev> -s <size>"
4. Done!!

Or you can follow the instruction described in the link instead to use Quartus GUI.

My host machine is Ubuntu 12.04 32bit, Quartus 13.0sp1.
piranha32
Posts: 26
Joined: Fri Mar 01, 2013 6:25 am

Re: Problems with hosted FPGA image using Quartus 12.1sp1

Post by piranha32 »

opratic wrote:Hi piranha

I encountered the same problem as yours. After some googling and tickling, I found this, https://github.com/Nuand/bladeRF/issues ... t-20947962, very helpful, and turns out "./build_bladerf.sh" has to be run under the shell environment that Nios provided.

1. Run "nios2_command_shell.sh", you can find it under Quartus installation directory, in my case, it's "/home/<User>/altera/13.0sp1/nios2eds".
2. Go to "<Your BladeRF repository>/hdl/quartus"
3. Run "build_bladerf.sh -r <rev> -s <size>"
4. Done!!

Or you can follow the instruction described in the link instead to use Quartus GUI.

My host machine is Ubuntu 12.04 32bit, Quartus 13.0sp1.
Thanks. nios2_command_shell.sh fixed the problem.

j.
Post Reply