nios data cash
now, i just found some problem . below is the disassambled results
LED = 1; <-- this line is not work ( line 1)
0x04000224 <main+20>: movhi r3,2048
0x04000228 <main+24>: addi r3,r3,6144
0x0400022c <main+28>: movi r2,1
0x04000230 <main+32>: stw r2,0(r3) *******
IOWR=32DIRECT(GPIO_LED_BASE, 0, 1); <-- this line is work ( line 2)
0x04000234 <main+36>: movhi r3,2048
0x04000238 <main+40>: addi r3,r3,6144
0x0400023c <main+44>: movi r2,1
0x04000240 <main+48>: stwio r2,0(r3) *******
i found that if we build nios with include Cash data memory(can config by SOPC bluider) the complier will compile line1 by using "stw" but line2 is "stwio".
i read in nios processor reference. they said
"Data transfers for I/O peripherals should use ldwio and stwio."
so, do anyone have some idea to set complier to compile line1 to use "stwio" ?