- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi!
I'm learning Nios II with DE2 Development Board, and I made a very simple MCU in the SOPC Builder which contains a Nios II processor(standard) with reset vector = epcs_controller and exception vector = sram, a jtag_uart, three bidirectional I/O, an interval timer, a sram controller and a epcs_controller. The SOPC was generated successfully. Then I write C code in Nios II IDE. After building project, I found program size(code + initialized data) is high up to 58KBytes.I used to develop Atmel AVR MCU, I wrote thousands of lines of codes in a project but program size is less than 32KBytes. However, I just set timer registers, interruption registers and set IO output as high or low and so on in the Nios II, and the code is less than 200 lines. Why so little codes take up so big size in Nios II?Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A few things to remember.
1 - Your Atmel AVR was most likely an 8-bit MCU. NIOS is 32-bit. 2 - There is a lot you can do to reduce the code footprint on NIOS. For example; rather than running your little application, try starting with the "Hello World Small" example application and go from there. I frequently write very rich little applications in around 16K of code. In addition, read the section entitled "Reducing Code Footprint" beginning on page 6-30 of the NIOS II Software Developers Handbook: http://www.altera.com/literature/hb/nios2/n2sw_nii52004.pdf Jake- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thnaks a lot!
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page