mirror of
git://projects.qi-hardware.com/xburst-tools.git
synced 2024-11-01 08:06:16 +02:00
the led_on does not random abort
This commit is contained in:
parent
39d58838d9
commit
98fb0b6654
@ -0,0 +1,6 @@
|
||||
use follow command to run this program
|
||||
start OpenOCD,then do this
|
||||
|
||||
> reset halt
|
||||
> load_image /path/to/led_on 0
|
||||
> resume
|
@ -1,9 +1,17 @@
|
||||
.global _start
|
||||
_start:
|
||||
.globl _start
|
||||
_start: b start_code
|
||||
|
||||
start_code:
|
||||
ldr sp,=1024*4
|
||||
|
||||
.extern main
|
||||
bl main
|
||||
|
||||
/* turn off the watchdog */
|
||||
# define pWTCON 0x53000000
|
||||
ldr r0, =pWTCON
|
||||
mov r1, #0x0
|
||||
str r1, [r0]
|
||||
|
||||
.extern blink_led
|
||||
bl blink_led
|
||||
.global delay
|
||||
delay:
|
||||
subs r0,r0,#0x1
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
extern void delay(int time);
|
||||
|
||||
int main()
|
||||
int blink_led()
|
||||
{
|
||||
GPBCON = 0x5;
|
||||
GPBDW = 0xffff;
|
||||
|
Loading…
Reference in New Issue
Block a user