jeffhaddow
Posts: 118
Joined: Thu Jun 14, 2012 1:50 pm

Err: arm-none-eabi-as: Command not found

Sat Aug 10, 2013 4:34 pm

I have tried to follow the instructions for the installation of the last tutorial on a partition in my computer which is running Ubuntu 12.04 LTS and have the following message when I try to "make" the .img file:

make: arm-none-eabi-as: Command not found
make: *** [build/main.o] Error 127

I have had a look at my system and arm-none-eabi-as is a file in ~/arm-non-eabi/bin and the export path contains this path.

Any help gratefully received

All the best
Jeff

jeffhaddow
Posts: 118
Joined: Thu Jun 14, 2012 1:50 pm

Re: Err: arm-none-eabi-as: Command not found

Sat Aug 10, 2013 5:21 pm

I (again) found the error troubleshoot in text that is because I have a 64bit machine and is fixed by installing a lot of files from "sudo apt-get install ia32-libs".

However - here's the real problem: with the make command I get a lot of warning messages as you can see from the output below.

Code: Select all

arm-none-eabi-as -I source/ source/main.s -o build/main.o
arm-none-eabi-ld --no-undefined build/drawing.o build/frameBuffer.o build/gpio.o build/keyboard.o build/mailbox.o build/main.o build/maths.o build/random.o build/systemTimer.o build/tags.o build/terminal.o build/text.o -L. -l csud -Map kernel.map -o build/output.elf -T kernel.ld
arm-none-eabi-ld: Warning: ./libcsud.a(device.keyboard.c.o): Unknown EABI object attribute 44
arm-none-eabi-ld: Warning: ./libcsud.a(platform.c.o): Unknown EABI object attribute 44
arm-none-eabi-ld: Warning: ./libcsud.a(usbd.c.o): Unknown EABI object attribute 44
arm-none-eabi-ld: Warning: ./libcsud.a(device.hid.c.o): Unknown EABI object attribute 44
arm-none-eabi-ld: Warning: ./libcsud.a(device.hub.c.o): Unknown EABI object attribute 44
arm-none-eabi-ld: Warning: ./libcsud.a(hcd.designware20.c.o): Unknown EABI object attribute 44
arm-none-eabi-ld: Warning: ./libcsud.a(hcd.designware20.roothub.c.o): Unknown EABI object attribute 44
arm-none-eabi-ld: Warning: ./libcsud.a(platform.armv6.c.o): Unknown EABI object attribute 44
arm-none-eabi-ld: Warning: ./libcsud.a(platform.broadcom2835.c.o): Unknown EABI object attribute 44
arm-none-eabi-objcopy build/output.elf -O binary kernel.img 
arm-none-eabi-objdump -d build/output.elf > kernel.list
When I use the kernel that this make generates it works the first time (although the Operating System does not recognise the "\n" codes as newlines) but making any changes and running the resultant kernel produces a screen with a multicoloured box over half the screen with blank on eiter side. When I try to fix this by pluging back into my Ubuntu machine the files are corrupted in such a way that the permissions are no longer open for me to edit them and the whole SD is corrupt and the only solution is to reinstall the raspian operating system from scratch.

I have tried to fix this several times. I might add that I have successfully been able to go through the entire Baking Pi course on the Microsoft side of my partitioned computer. This leads me to wonder if there is a problem with my linux system?

All the best
Jeff

ejames
Posts: 15
Joined: Thu Feb 02, 2012 1:19 pm

Re: Err: arm-none-eabi-as: Command not found

Tue Aug 13, 2013 9:25 am

Hi,

Nothing wrong with your linux. It's just that on ubuntu, the arm binutils are called something slightly different to what is assumed in the makefiles provided by baking pi.

All you need to do is edit a line that is near the top of the makefile. I'm doing this from memory so it might be slightly different...
Anyway the line is something like..

ARM..?=arm-none-eabi

Change "arm-none-eabi" to "arm-linux-gnueabi" then the makefile will work. This is because on ubuntu all the arm related executables (i.e. the assembler, the linker etc. etc.) are prefixed by arm-linux-gnueabi.

I am using ubuntu 13.04 and all I did to get the baking pi stuff going was to...

1) install the arm dev packages - do a search in synaptic for arm and install the 4.7 versions of binutils and the c compiler.
2) Modify the single line at the top of the makefile as above

Hope that sorts it.

Emyr

ejames
Posts: 15
Joined: Thu Feb 02, 2012 1:19 pm

Re: Err: arm-none-eabi-as: Command not found

Tue Aug 13, 2013 9:49 am

Forgot to mention....
Use the dos2unix command to get rid of the dos style line endings in the makefile before editing it.
Just do...

dos2unix <file to change>

You may need to sudo apt-get install it first....but ubuntu will probably tell you that if you want to use it.
To do it accross all the files in the zip you could do...

find . -type f | xargs dos2unix

from the root directory of the project (e.g. from the screen02 directory you get after inflating the tar.gz)

I can't remember if there are any binary files in the tar itself - i think it's just text files, but check before applying dos2unix on all of them. Of course if it does mess things up just re-inflate the tar file again and give it another shot.

Emyr

jeffhaddow
Posts: 118
Joined: Thu Jun 14, 2012 1:50 pm

Re: Err: arm-none-eabi-as: Command not found

Tue Aug 13, 2013 9:56 am

Hello Emyr

Tried the fix in your first post and the result was

Code: Select all

[email protected]:~/template$ make
make: Nothing to be done for `all'.
[email protected]:~/template$ make
arm-linux-gnueabi-as -I source/ source/main.s -o build/main.o
make: arm-linux-gnueabi-as: Command not found
make: *** [build/main.o] Error 127
[email protected]:~/template$ make
arm-bcm2708-linux-gnueabi-as -I source/ source/main.s -o build/main.o
make: arm-bcm2708-linux-gnueabi-as: Command not found
make: *** [build/main.o] Error 127
[email protected]:~/template$
I tries with the file pattern mentioned in the make file and no joy either.

I'll have a look at your second post now.

All the best
Jeff

jeffhaddow
Posts: 118
Joined: Thu Jun 14, 2012 1:50 pm

Re: Err: arm-none-eabi-as: Command not found

Tue Aug 13, 2013 10:15 am

Hello Emyr

I installed the package you suggested and it seems to have worked :

Code: Select all

arm-linux-gnueabi-as -I source/ source/main.s -o build/main.o
arm-linux-gnueabi-ld --no-undefined build/drawing.o build/frameBuffer.o build/gpio.o build/keyboard.o build/mailbox.o build/main.o build/maths.o build/random.o build/systemTimer.o build/tags.o build/terminal.o build/text.o -L. -l csud -Map kernel.map -o build/output.elf -T kernel.ld
arm-linux-gnueabi-objcopy build/output.elf -O binary kernel.img 
arm-linux-gnueabi-objdump -d build/output.elf > kernel.list
[email protected]:~/template$ 
However I will now test it in my raspberry Pi and see if this cures my having to reinstall the system on the SD card problem ...

All the best
Jeff

Ps I don't understand the bit about altering the line endings on the makefile..

ejames
Posts: 15
Joined: Thu Feb 02, 2012 1:19 pm

Re: Err: arm-none-eabi-as: Command not found

Tue Aug 13, 2013 10:32 am

Hi Jeff,

On mine I tested it by putting a working raspibian sd card into the card reader on my linux laptop, renaming the kernel.img to kernel.img.orig, then copying the arm assembly kernel.img over from whatever baking pi project I was looking at therefore overwriting the kernel.img on the sd card. I can then get back to raspibian by renaming it back to kernel.img again. TBH, to get to grips with assembly on the pi, I think it would be a good idea to use riscos instead, you can then do arm assembly straight on the pi using the basic v assembler in riscos. riscos is way more responsive to use than linux on the pi.

Regarding the line endings, if you open Makefile in vi, you see that all the lines have ^M at the end. This is how windows / dos saves files. They use different codes for a newline (http://en.wikipedia.org/wiki/Newline). You can use dos2unix to convert text files that have windows style newlines to linux style ones which makes things work better on linux.

Hope that makes it clearer.

Emyr

jeffhaddow
Posts: 118
Joined: Thu Jun 14, 2012 1:50 pm

Re: Err: arm-none-eabi-as: Command not found

Tue Aug 13, 2013 11:28 am

Hello Emyr

Thanks for you advice. I'm not keen on moving onto the RISC/basic implementing machine code as I tried a little and it corrupted the card as I'd made a mistake in the coding. If the Baking Pi setup messes up it just seems to go into infinite loops and does not affect the rest of the system on the SD card.

All the best
Jeff

jeffhaddow
Posts: 118
Joined: Thu Jun 14, 2012 1:50 pm

Re: Err: arm-none-eabi-as: Command not found

Tue Aug 13, 2013 12:23 pm

Hello

It has happened again the SD card is corrupted as the boot sector no has:

issue.txt kernel.img kernel_emergency.img kernel_linux.img start.elf start_cd.elf and start_x.elf

showing up as uneditable with a padlock symbol on the file system in Ubuntu

I think I'll just stick to the Microsoft system meantime.

Jeff

ejames
Posts: 15
Joined: Thu Feb 02, 2012 1:19 pm

Re: Err: arm-none-eabi-as: Command not found

Tue Aug 13, 2013 12:34 pm

Have you accidentally moved the little locking tab on the side of the sd card ?

Also, after copying your baking pi kernel.img to it, you have to make sure that you eject it properly in the file manager otherwise strange things can happen.

jeffhaddow
Posts: 118
Joined: Thu Jun 14, 2012 1:50 pm

Re: Err: arm-none-eabi-as: Command not found

Tue Aug 13, 2013 12:46 pm

Hello Emyl

The lock on the sd card has not been moved, however you may be right about the closing of the SD card -- I've just been ripping it out of the system without closing. So perhaps that's the problem when I right click I get options
"Eject parent drive" and "Safely remove parent drive" which one do I choose?

I mistakenly thought that the parent drive was the system that allows the SD card to connect to the computer -- I feel a bit foolish -- I'm fairly new to linux systems.

Thanks again
Jeff

ejames
Posts: 15
Joined: Thu Feb 02, 2012 1:19 pm

Re: Err: arm-none-eabi-as: Command not found

Tue Aug 13, 2013 2:23 pm

I would go for safely remove.

On Ubuntu 13.04 I get a little eject icon next to the drive in the filemanager window - in the bookmarks section on the left - and I just click that.

My SD card shows up as 2 partitions - the FAT partition with the kernel.img stuff on it which is about 59MB and the linux partition which is much bigger. Ejecting either of them seems to cause the file windows for both to dissapear and it seems to do the trick.

jeffhaddow
Posts: 118
Joined: Thu Jun 14, 2012 1:50 pm

Re: Err: arm-none-eabi-as: Command not found

Tue Aug 13, 2013 2:54 pm

Hello Emyr

I re-initialise the system on the SD card and replaced the kernel but no joy.

I've gone back to the Microsoft -- The system I have is one which I'm trying to implement a hexadecimal system with different symbols for "A" to "F" and has a lot of code.

Anyway on the Ubuntu I tried the source files from that and all that happened was I got a raster of multi-coloured dots. However I copied the exact same source files onto the Microsoft system and they worked fine.

All the best
Jeff

ShadyGates
Posts: 1
Joined: Sat Mar 15, 2014 9:08 pm

Re: Err: arm-none-eabi-as: Command not found

Sat Mar 15, 2014 10:14 pm

I tried to make OK01 but the same error came up.
I also tried changing "arm-none-eabi" to "arm-linux-gnueabi" but the new error said
make: arm-linux-gnueabi-as: Command not found
make: *** [build/main.o] Error 127

Then I tried changing it to "arm-bcm2708-linux-gnueabi" and then the new error said
make: arm-bcm2708-linux-gnueabi-as: Command not found
make: *** [build/main.o] Error 127

Any help would be appreciated.

jeffhaddow
Posts: 118
Joined: Thu Jun 14, 2012 1:50 pm

Re: Err: arm-none-eabi-as: Command not found

Sun Mar 16, 2014 9:32 am

The problem as far as I remember it was fixed by following a thread in the "Troubleshooting" section of the Baking Pi website. The basic problem is that the code is written in 32 bit code and my Ubuntu OS is a 64 bit machine code..

Have a look at the Page on troubleshooting

All the best
Jeff

Return to “Bare metal, Assembly language”