Altera_Forum
Honored Contributor
15 years agoRun and Debug Problem
Hi Everyone!
I have a problems. Please help me: I have a SOPC (Nios CPU + SRAM +JTAG UART + SW[7:0] +LEDG[7:0]+Timer) on DE2 board. The C code: // This code display the value of SW on LEDG# include <stdio.h># include <stdlib.h># define SW (volatile char *) 0x00011000 # define LEDG (char *) 0x00011010 void main() { while (1) *LEDG = *SW; } When I run this code, nothing happen (LEDG do not display the value of SW). But when debug this code (step by step), It work correctly. Please tell me why? Thanks.