Assembler error while compiling At91bootstrap

This forum is for users of Microchip MPUs and who are interested in using Android.

Moderator: nferre

venkatesh.tl
Posts: 4
Joined: Wed Dec 17, 2014 6:25 am

Assembler error while compiling At91bootstrap

Thu Dec 18, 2014 5:22 am

Hi everyone,
I am trying to build the At91bootstrap for SAMA5D3xek. I have followed the steps as per "android4sam/bin/view/Android4SAM/Sama5d3xek", after giving make command, the assembler throws "unrecognized instruction" error for each instruction in file crt0_gnu.S.
Is there a way to fix it?

Error Messages displayed:
at91bootstrap/crt0_gnu.S: Assembler messages:
at91bootstrap/crt0_gnu.S:50: Error: unrecognized instruction `b reset_vector'
at91bootstrap/crt0_gnu.S:51: Error: unrecognized instruction `b undef_vector'
at91bootstrap/crt0_gnu.S:52: Error: unrecognized instruction `b swi_vector'
at91bootstrap/crt0_gnu.S:53: Error: unrecognized instruction `b pabt_vector'
at91bootstrap/crt0_gnu.S:54: Error: unrecognized instruction `b dabt_vector'
at91bootstrap/crt0_gnu.S:56: Error: unrecognized instruction `b irq_vector'
at91bootstrap/crt0_gnu.S:57: Error: unrecognized instruction `b fiq_vector'
at91bootstrap/crt0_gnu.S:60: Error: unrecognized instruction `b undef_vector'
at91bootstrap/crt0_gnu.S:62: Error: unrecognized instruction `b swi_vector'
....
make: *** [/home/venkatesh/Android/wayguide/at91bootstrap/crt0_gnu.o] Error 1


Make Command used:
$ make ARCH=arm CROSS_COMPILE="~/avr32-gnu-toolchain-linux_x86_64/bin/avr32-"

Tool Chain version:
Atmel AVR 32-bit Toolchain 3.4.2 - Linux 64-bit

Alternatives tried:
On inspecting Makefile I have found that the compiler gcc has been used for assembly files. Thinking that this would be the culprit I changed gcc to as:
AS=$(CROSS_COMPILE)gcc
to
AS=$(CROSS_COMPILE)as

But I have received the following error:
avr32-gnu-toolchain-linux_x86_64/bin/avr32-as: unrecognized option '-Os'

Again I removed the option -Os from ASFLAGS. I have ended up with the following error:
avr32-gnu-toolchain-linux_x86_64/bin/avr32-as: unrecognized option '-UMP_ADDR=0x26F00000'
Ravi0803
Posts: 6
Joined: Mon Oct 20, 2014 3:55 pm

Re: Assembler error while compiling At91bootstrap

Thu Dec 18, 2014 6:33 am

hi venkat,
i think you are using wrong cross compiler toolchain,avr toolchain is only for avr microcontrollers,for Atmel Sam you have to use atmel's arm processor toolchain ,try to install gcc-arm-linux-gnueabi(use sudo apt-get install gcc-arm-linux-gnueabi in terminal),and compile using arm-linux-gnueabi- cross compiler prefix (i.e CROSS_COMPILE=arm-linux-gnueabi-)
venkatesh.tl
Posts: 4
Joined: Wed Dec 17, 2014 6:25 am

Re: Assembler error while compiling At91bootstrap

Thu Dec 18, 2014 6:52 am

Hi Ravi,

It worked. Thank you

Return to “ANDROID”

Who is online

Users browsing this forum: No registered users and 1 guest