ogarogar
ogarogar

Reputation: 345

Issue with compling ARM assembly code

I wrote really really simple code in ARM just to test if everything works just fine.This code:

.text
.global main

main:
    mov r1, #3
    mov r2, #4
    add r0,r1,r2    /*;r0<-r1+r2*/
    mov pc,lr

I installed some packages like binutils-arm-none-eabi,gcc-arm-none-eabi,gdb-arm-none-eabi and when compile it with "arm-none-eabi-as p1.s -o p1.o" everything is ok. But when i want to link it with "arm-none-eabi-gcc -specs=rdimon.specs p1.o -o p1" I get an error "arm-none-eabi-gcc: error: rdimon.specs: No such file or directory". I read that rdimon.specs is part of some lib that I should get with gcc. Do you know what should I do to get rid of that error?

Upvotes: 1

Views: 803

Answers (1)

ogarogar
ogarogar

Reputation: 345

I'm posting this only for people who might come across same issue in the future. Installing "libnewlib-arm-none-eabi" package solved my case!

Upvotes: 3

Related Questions