- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
My code simply does not run if in the BSP settings I leave the default O0 compiler optimization. With O1 and Os it works I have tried. The code starts like this: *leds = 0xFF;
printf("\n hello world1");
fp = fopen("/dev/uart", "rb+");
printf("\n after fopen");
fprintf(fp, "hello world2");
printf("\n after fprintf");
When I debug the the debug view in eclipse shows that the program is running immediately i.e. it is not waiting at the first line of the code as usual. This also is resolved by using O1 or Os optimization. What is wrong?!? I use Quartus Prime lite 15.1. Mitko
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have you checked whether your memory is sufficient for your code? Can you try to increase your onchip-memory? I assume you are running from onchip-memory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes there is more than enough memory. I resolved this by starting a new project from scratch and copy-pasting the vhdl and the c code.
It is a configuration problem that messes up the project either when you copy it from somewhere (because of absolute paths) or when you upgrade the project from a previous version of Quartus. I am not sure which one - i don't plan to spend more time analyzing this. What I can confirm is: 1. Problem dissapears when: starting a new project from scratch - new Quartus project, rebuilding the system in qsys, new project in SBT. VHDL code was copy pasted and so were the c code files. 2. Problem dissapears even if I use the nios system as it was in the project that had the problem (hence the problem is not in Qsys system) 3. Problem remains if I recreate the SBT from scratch in the Quartus project with the problem. (of course copy the c-code files) I really don't like this kind of behaviour of the software - unfortunately altera is not the only having such problems, in fact I would expect any complicated toolchain to have this kind of issues.
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