Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
12453 Discussions

Software files for my custom component

Altera_Forum
Honored Contributor II
741 Views

Hello, 

i am developing my first app with NIOS II and i have made a custom component in SOPC builder. 

 

I can't find any useful example or tutorial on how add the informations of my component to the SDK environment (e.g. system.h).  

I would like to know also how to make the .h files (e.g. my_component_regs.h) like every others altera components already in the ip catalog 

 

Thanks
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
74 Views

The system.h file is generated automatically by the IDE when you build the bsp. It obtains the info from the *.sopcinfo file generated by sopc builder. 

You create the my_component_regs.h file by hand and include it in the include path of the compiler. The my_component_regs.h file will reference the *BASE define in the system.h file. See the section "Accessing Hardware" in the NIOS II Software Developers Handbook for more info.
Altera_Forum
Honored Contributor II
74 Views

Chapter 13 of the Nios II software developers handbook has the info you are looking for. So for example if you made a UART and had the baud rate as a parameter you can use the stuff discussed in chapter 13 to inject that baud rate into system.h

Reply