- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi everyone,
I have some trouble with my DE2 basic board. I can't do a printf using Nios II processor, Eclipse always return that the on-chip memory is overflow but with the DE2 basic the maximum space of the Cyclone II EP2C35F672C6N on-chip memory is 64KB (the size I'm using). I haven't find any tutorial for a simple hello world (with the printf function) for the DE2 Basic board. So someone can help me please ? I'm using Quartus II 13.0sp1, I have created the qsys component (Nios 2 processor, Jtag_uart and 64KB on-chip memory). Regards, J.Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The DE2 board has external memory on it. You can use the 512 kbyte SRAM and the 8 Mbyte SDRAM. There are several examples for using each of these chips on the CD. You may need to download the latest CD from Terasic because it has QSYS examples as well as the obsolete SOPC builder. Make sure your program is compiled to load into SRAM/SDRAM.
Alternately, I think that the software runtime library can be compiled so that is uses less memory. I don't know how that works but I remember seeing it somewhere.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Galfonz,
Thank you for your reply and your help. I will try it. I have another question, do you know the size of the printf function ? Just to know and compare with others program. Thanks, J.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can find out how big an executable file is by creating a simple hello world program and then using the nios2-elf-size program on it from the Nios II EDS command shell. That will give you the approximate size of the runtime needed to support printf.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've tried with the SDRAM (8MBytes), I had no error until I start the Nios II program which said "Downloading ELF Process failed". So I've decided to see how much size the .elf file takes (right click on the .elf then properties) and I have "Size : 432 148 bytes". I do a simple printf("Hello Wolrd !");
So now I don't know why the .elf file can't be downloaded. If you have another suggestion. Thanks a lot ! J.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Start with an example that uses SDRAM. Make sure the configuration file built by terasic works. This tells you your hardware is OK.
After that, build that example and make sure it runs. Then make small incremental changes and test them every time. Keep copies of each stage and make notes so you can understand things if you go back to them later.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Okay I'll try this. The Terasic SDRAM program works so I do something wrong. I've found another solution using only the on-chip memory. In Nios II right click on the bsp folder then properties and under Nios II BSP Properties check the reduced device drivers box and the small C library box then apply and run and in my case that works.
I have one solution but I really want to make SDRAM works for my projet so I'll continue. Thank you for your replies. J.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page