Altera_Forum
Honored Contributor
9 years agoNIOS II gen 2 not starting when code compiled with O0 optimization
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