Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Including other .s files

Including other .s files

Including other .s files

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:


.globl GetGpioAddress
ldr r0,=0x20200000
mov pc,lr


The main file that is supposed to call gpio.s:

.section .init
.globl _start
.INCLUDE "gpio.s"

b main

.section .text


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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close