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++

Using NIOS II with SDK I/O

Altera_Forum
Honored Contributor II
1,604 Views

Folks, 

I noticed that there is a SDK directory under the folder C:\altera\kits\nios2\components\altera_avalon_uart\. It contains the old uart functions from NIOS1. When I compile these into my program, the assembler does not recognize the syntax. What are these doing here if they dont work on the NIOS II? Can I get these to run on the NIOS II. I have a 1C6 and dont have room for the HAL so I'm going the alt_main() approach. 

Thanks.
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
902 Views

Hi Edward, 

 

You're looking at how we support the two software development flows for Nios II: sources under the 'sdk' of a peripheral operate like they did in Nios I, and require you to use the 'legacy SDK' in Nios II. These sources are not intended to work with the new flow (although they can be ported with some effort). Sources in the HAL and inc subfolders are intended to be used with the new flow using HAL & the IDE. 

 

If you want to use the HAL/IDE, but are concerned about code size, I suggest that you take a look at the hello_world application and read the comments in hello_world.c -- they describe how to make a hosted (non alt_main) application using the HAL and UART for STDIO fit in just over 3K of space... in fact the size comes out about the same as taking the alt_main() approach to reduce code size; not too bad. Going the alt_main() route is useful if you wish to have tight control over program initialization.
0 Kudos
Altera_Forum
Honored Contributor II
903 Views

Hello Edward, 

 

It is possible to use the Nios II with old SDK known from the old Nios. But with the old SDK there is no way to use the new IDE. For further information take a look at the application note 350 (Upgrading Nios Processor Systems to the Nios II Processor, http://www.altera.com/literature/an/an350.pdf) (http://www.altera.com/literature/an/an350.pdf)). The document describes the advantage and disadvantages when using the old SDK with the Nios II in detail. 

 

Bye, 

niosIIuser
0 Kudos
Altera_Forum
Honored Contributor II
903 Views

Update: 

I got a NIOS II core running with a uart and a few PIOs for 792 LEs. Also, using the alt_main approach gives me a bare-bones system for a little over 1500 bytes. I added a basic uart and monitor for 500 bytes. All of this while using the great IDE!!
0 Kudos
Reply