We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi Experts,I have just started with ARM assembly, I have written a program in assembly for toggling GPIO. The issue that I am facing is that the code works when I use several "nop" in place of "bl delay". The code goes below:
.equ IODIR0, 0xE0028008 .equ IOCLR0, 0xE002800C .equ IOSET0, 0xE0028004 delay: mov r0, #10 dowaitloop: subs r0,#1 bne dowaitloop bx lr MOV r3, #0xFFFFFFFF LDR r4, =IODIR0 LDR r1, =IOCLR0 LDR r2, =IOSET0 str r3, [r4] loop: str r3, [r1] bl delay str r3, [r2] bl delay b loop
Commands that I execute to compile:arm-none-eabi-as -gcoff -o blinky.o blinky.sarm-none-eabi-ld -e0x00000000 -Ttext=0x00000000 -o blinky.elf blinky.o
arm-none-eabi-objcopy -Oihex blinky.elf blinky.hex