mirror of
git://projects.qi-hardware.com/xburst-tools.git
synced 2024-11-01 10:22:48 +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
|
.globl _start
|
||||||
_start:
|
_start: b start_code
|
||||||
|
|
||||||
|
start_code:
|
||||||
ldr sp,=1024*4
|
ldr sp,=1024*4
|
||||||
|
|
||||||
.extern main
|
/* turn off the watchdog */
|
||||||
bl main
|
# define pWTCON 0x53000000
|
||||||
|
ldr r0, =pWTCON
|
||||||
|
mov r1, #0x0
|
||||||
|
str r1, [r0]
|
||||||
|
|
||||||
|
.extern blink_led
|
||||||
|
bl blink_led
|
||||||
.global delay
|
.global delay
|
||||||
delay:
|
delay:
|
||||||
subs r0,r0,#0x1
|
subs r0,r0,#0x1
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
extern void delay(int time);
|
extern void delay(int time);
|
||||||
|
|
||||||
int main()
|
int blink_led()
|
||||||
{
|
{
|
||||||
GPBCON = 0x5;
|
GPBCON = 0x5;
|
||||||
GPBDW = 0xffff;
|
GPBDW = 0xffff;
|
||||||
|
Loading…
Reference in New Issue
Block a user