Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12627 Discussions

Synchronize HW and SW in the NIOS II development flow - how to proceed ?

Honored Contributor II



Does exist a straightforward approach on the synchronization of the two parts of a NIOS II project - hw & sw

Here is my case: 

  1. For my de1 soc terasic (cyclon v) board I've developed in qsys a project that features nios ii, some peripherals and sdram memory 

  2. After adding top-level wrapper for qsys system in quartus, I downloaded hw part in my board. 

  3. Then I've created sw part (generated sbp based on .sopcinfo + application) 

  4. After compiling sw application I've tried to run it in the board (right-click application --> "Run As" --> "NIOS II hardware") 

  5. Unfortunately this attempt was unsuccessful (please, see my previous post - "problem with downloading of a nios ii program"

  6. Having no clear idea how to workaround such issue, I've decided to approach this project to an another, working project 

  7. The major difference between 2 projects is the memory type - in "working" project - on-chip memory, in "nonworking"- sdram

  8. So, I replaced in "nonworking" project sdram with onchip memory

  9. After compiling and downloading the hw part, I returned to sw development ... and didn't find any option (!!!), allowing to "refresh" bsp in order to take into account the new .sopcinfo

  10. Attempts to compile the application resulted in error messages, containing allusions on sdram, that is already removed from project ! 

  11. After some exploration I've discovered that in bsp editor window one can remove the link to non-existing sdram and replace it with onchip-memory

  12. Then I've tried to build application with modified bsp (as I believed) 

  13. The result of this building you can see from the screenshot below 

  14. Moreover, I checked the content of the system.h file - there are still the definitions, related to sdram ... 



How to proceed ? Create new SW project ? 


Thanks in advance.
0 Kudos
3 Replies
Honored Contributor II

I was a bit imprecise with the previous post - in point 12 I meant "Generate BSP". 

So, according to my explorations, after modifying the qsys (i.e. updating .socpinfo file), it's impossible to take into account these modifications in bsp (at least until now I didn't find how to do this). 

Well ... probably, creating of a new package (from modified .socpinfo) will settle a case ... 

Not at all !!! 

After creating of a new bsp, the new problem raised - how to attach this new bsp to the existing application ? 

What a curious tool this nios ii sbt for eclipse !
0 Kudos
Honored Contributor II


--- Quote Start ---  

After creating of a new BSP, the new problem raised - how to attach this new BSP to the existing application ? 

--- Quote End ---  



Well ... the another BSP can be attached to application this way:  


  1. right-click on the application 

  2. then select properties, then under "nios ii application properties" 

  3. then go to the "bsp project location" 

  4. then specify a new location for bsp 



Unfortunately with new BSP (in new BSP I replaced sdram with on-board memory) the problem persisted. 

When I try to load application, the following sequence of messages alternates in the console window (please see below the image built with screenshot sequences) 

According to this "console sequence", one might think that .elf is successfully downloaded, but CPU failed to reset. 

But final Eclipse error message titled "problem occurred" says "download elf process failed"

Moreover, the download progress indicator (at right-bottom corner of the Eclipse tool) advances until about 65% ... and then clears at the moment when the "problem occurred" message appears. 

So, there is no any clue, any hint to proceed further ... 

Any ideas ?
0 Kudos
Honored Contributor II

Well ... problem with ... download elf resolved. Please, see the detail in post "problem with downloading of a nios ii program".

0 Kudos