NIOS II Compilation Instructions

#1

Hi,

I was wondering if somebody would be able to clarify how to modify the software running on the NIOS II. My current procedure is as follows:

  1. Inside Quartus open the ‘NIOS II Software Build Tools for Eclipse’
  2. Inside Eclipse File -> Import -> Import Nios II Software Build Tools Project
  3. Navigate to LimeSDR-Mini_GW/LimeSDR-Mini_lms7_trx/software/lms_ctr_app
  4. Open main.c and modify, then save and close
  5. Project -> Build All

The .elf and .map are then generated inside lms_ctr_app.

  1. Inside Quartus - Processing -> Start Compilation
  2. Flash LimeSDR-Mini_GW/LimeSDR-Mini_lms7_bitstreams/LimeSDR-Mini_lms7_trx_HW_1.2_auto.rpd onto the FPGA using LimeUtil --fpga

When I then use the SDR it appears as if my changes to the NIOS code have had no effect leading me to believe it has not been compiled/flashed correctly. I’ve never used the NIOS before so I’d appreciate it if someone could clarify how to modify the code and recompile/flash.

Thanks,
Matt

#2

Importing project:

  1. Inside Quartus open the ‘NIOS II Software Build Tools for Eclipse’
  2. Inside Eclipse File -> Import -> General -> Existing projects into Workspace
  3. Navigate to LimeSDR-Mini_GW/LimeSDR-Mini_lms7_trx/software
  4. After selecting directory make sure that both projects lms_ctr_app and lms_ctr_bsp are selected
  5. Right click on lms_ctr_bsp -> NIOS II -> Generate BSP
  6. Right click on lms_ctr_bsp -> Build Project
  7. Right click on lms_ctr_app -> Build Project

Making changes:

  1. Make modifications to main.c
  2. Right click on lms_ctr_app -> Build project
  3. Right click on lms_ctr_app -> Make Targets -> Build… -> mem_init_generate -> Build
  4. Inside Quartus -> Processing -> Start Compilation
  5. Flash LimeSDR-Mini_GW/LimeSDR-Mini_lms7_bitstreams/LimeSDR-Mini_lms7_trx_HW_1.2_auto.rpd
2 Likes
Programming the LimeSDR Refresher