Altera_Forum
Honored Contributor
21 years agolibs for NIOSII
Hi all,
do anyone have found information about building a library for the niosII and how I can use this library in IDE projects? Thank you for help. SiegmarHi all,
do anyone have found information about building a library for the niosII and how I can use this library in IDE projects? Thank you for help. SiegmarHi Dave,
To clarify further, it would be possible for you to write code which resides in a library external to Nios II IDE which writes directly to hardware registers through hard-coded address values, but that would really defeat the purpose of having an external generic common source code library. This is not clean or portable. Another option would be to make a copy of the register header file to put with your common code library, since your device will make such limited use of the Hardware Abstraction Layer; but again, the drawback is that this is not clean, and could cause you trouble later if one copy of the header file changes but not the other, which could create problems which are even more difficult to find than just using hard-coded register values in your common library code. So I would strongly recommend against the above tactics. For the current release of Nios II IDE, the safest thing to do is to keep your code which uses system devices within a Nios II IDE project, and only use external common libraries for truly system independent functions.Hello Siegmar,
I am glad that you can now debug sources which reside in an external library by checking the application project properties - project references checkbox for the Common_Library. Have a great weekend.