mirror of
git://projects.qi-hardware.com/nn-usb-fpga.git
synced 2025-04-21 12:27:27 +03:00
Adding lm32 demo to SAKC project
This commit is contained in:
@@ -9,7 +9,7 @@ LD = $(CROSS)-ld
|
||||
DUMP = $(CROSS)-objdump
|
||||
OBJCOPY = $(CROSS)-objcopy
|
||||
INC_PATH = ../include
|
||||
CFLAGS = -O2 -I$(INC_PATH) -Wall -c -s
|
||||
CFLAGS = -O -I$(INC_PATH) -Wall -c -s
|
||||
ILDFLAGS = -Ttext 0 -eentry -Map $@.map -s -N
|
||||
LDFLAGS = -Ttext 0x10000000 -eentry -Map $@.map -s -N
|
||||
|
||||
|
||||
@@ -13,13 +13,13 @@ int main(void)
|
||||
volatile unsigned short *data16;
|
||||
volatile unsigned int *data32;
|
||||
|
||||
unsigned char test8;
|
||||
unsigned short test16;
|
||||
unsigned int test32, tmp;
|
||||
volatile unsigned char test8;
|
||||
volatile unsigned short test16;
|
||||
volatile unsigned int test32, tmp;
|
||||
|
||||
data8 = (unsigned char *)(0x20001000);
|
||||
data16 = (unsigned short *)(0x20002000);
|
||||
data32 = (unsigned int *)(0x20003000);
|
||||
data8 = (unsigned char *)(0x20000410);
|
||||
data16 = (unsigned short *)(0x20000210);
|
||||
data32 = (unsigned int *)(0x20000330);
|
||||
|
||||
*data8 = 0x10;
|
||||
data8++;
|
||||
@@ -54,11 +54,15 @@ int main(void)
|
||||
test32 = *data32;
|
||||
|
||||
|
||||
data32 = (unsigned int *)(0x20000000);
|
||||
*data32 = 0x55555555;
|
||||
test32 = *data32;
|
||||
data32 = (unsigned int *)(0x20000020);
|
||||
test32 = *data32;
|
||||
|
||||
tmp = test8 + test16 + test32;
|
||||
|
||||
*data32 = 0xAAAAAAAA;
|
||||
|
||||
while(1){
|
||||
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user