Forum Discussion
Altera_Forum
Honored Contributor
15 years agoHi dsl, i tried that and it made no difference.
Do you how i can find alt_main() from my project/workspace - i think its worth adding a few break points and attempting to debug from there. Incidentally i just tried some example code from the tutorial but with the printf statement commented out.
# include <stdio.h>
# include "system.h"
# include "altera_avalon_pio_regs.h"
int main()
{
//printf("Hello from Nios II!\n");
int count = 0;
int delay;
while(1)
{
IOWR_ALTERA_AVALON_PIO_DATA(LED_PIO_BASE, count & 0x01);
delay = 0;
while(delay < 2000000)
{
delay++;
}
count++;
}
return 0;
}
This is meant to make the LED's on the board blink. This didnt work either - so the problem is not neccessarily specific to printf Many thanks.