vcrewchief
Programmer
Hello all,
I'm having trouble getting my hand-typed arm assembly to actually work. my code compiles, but the .global functions don't actually work.
Here's the .s that I included:
/*gpio.s*/
.globl GetGpioAddress
GetGpioAddress:
ldr r0,=0x20200000
mov pc,lr
-------------------------------------------
The main file that is supposed to call gpio.s:
.section .init
.globl _start
_start:
.INCLUDE "gpio.s"
b main
.section .text
main:
mov sp,#0x8000
bl GetGpioAddress
/*the function never gets the address
----------------------------------------
I'm using yagarto inside the windows cmd to assemble, and here are the commands I used:
C:\yagarto-20121222\bin\arm-none-eabi-as -I source\ source\main.s -o build\main.o
C:\yagarto-20121222\bin\arm-none-eabi-ld --no-undefined build/main.o -Map kernel.map -o build/output.elf -T kernel.ld
C:\yagarto-20121222\bin\arm-none-eabi-objcopy build/output.elf -O binary kernel.img
C:\yagarto-20121222\bin\arm-none-eabi-objdump -d build/output.elf > kernel.list
let me know if you need anything else, and thank you ahead of time.
I'm having trouble getting my hand-typed arm assembly to actually work. my code compiles, but the .global functions don't actually work.
Here's the .s that I included:
/*gpio.s*/
.globl GetGpioAddress
GetGpioAddress:
ldr r0,=0x20200000
mov pc,lr
-------------------------------------------
The main file that is supposed to call gpio.s:
.section .init
.globl _start
_start:
.INCLUDE "gpio.s"
b main
.section .text
main:
mov sp,#0x8000
bl GetGpioAddress
/*the function never gets the address
----------------------------------------
I'm using yagarto inside the windows cmd to assemble, and here are the commands I used:
C:\yagarto-20121222\bin\arm-none-eabi-as -I source\ source\main.s -o build\main.o
C:\yagarto-20121222\bin\arm-none-eabi-ld --no-undefined build/main.o -Map kernel.map -o build/output.elf -T kernel.ld
C:\yagarto-20121222\bin\arm-none-eabi-objcopy build/output.elf -O binary kernel.img
C:\yagarto-20121222\bin\arm-none-eabi-objdump -d build/output.elf > kernel.list
let me know if you need anything else, and thank you ahead of time.