Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
1,315 Views

NIOS II generating system.h

I am developing software for the NIOS II. 

Before when I developed sw for NIOS I the "excalibur.h" was created when I generated the NIOS core. With Nios II I know "system.h" replaces the excalibur header file however when generating NIOS II core the system.h file is not generated. The only way I seem to be able to generate this file is when I complie my C code. This is no good because I need to know the information contained in the system.h file to write my software. 

 

Is there any way of generating system.h without having to compile C code first? Or am I missing something? 

 

Thank you 

 

---------- 

David
0 Kudos
3 Replies
Altera_Forum
Honored Contributor I
194 Views

When you write code you do this as two seperate projects (one is your application, and the other is the system code). 

 

So you can create the system project and compile it to get at the file (without starting the application project). 

 

As for having to have the system file first I'm wondering..... why? (if you did a hello world program or something wouldn't that 

have been fine?)
Altera_Forum
Honored Contributor I
194 Views

The reason I would like the system.h is because it provides a complete software description of the Nios II 

system hardware,  

* The hardware configuration of the peripheral 

* The base address 

* The IRQ priority (if any) 

* A symbolic name for the peripheral 

When I used the excalibur.h file in previous Nios designs I used alot of the# defines in my code so when I migrated to Nios II I was expecting system.h to be the same. I have since heard from ALTERA that the only way system. h is generated is when the project is built. For the time being I have generated the excalibur.h file from the SOPC builder so I can do things the way I have done before. But I will need to make time to work out how I should be doing things properly...I suspect with the HAL. 

 

Any way thanks you for your help.
Altera_Forum
Honored Contributor I
194 Views

You do not have to build you're application to get a system.h file. It's tied to the system_lib itself. If you create the library for your NIOS build it and you're system.h will appear under here: hello_world_0_syslib\Debug\system_description (if you used the hello_world demo). 

 

It's still requires a build but you do not need you're software to be even started to do that (when you develop software it requires at least 2 projects, one is the application itself, and the other is the system library project (so just build that)) 

 

G-luck
Reply