Baking Pi 01 can't compile.


9 posts
by kevinf » Mon Oct 01, 2012 4:57 pm
Hi all, just got my pi and have started on the Baking Pi course. I've installed the toolchain as per instructions but can't get OK01 to compile.

arm-none-eabi-as -I source/ source/main.s -o build/main.o
/home/pi/arm-2008q3/bin/arm-none-eabi-as: 1: /home/pi/arm-2008q3/bin/arm-none-eabi-as: Syntax error: "(" unexpected
make: *** [build/main.o] Error 2

I get this error on both the pi and emulated in QEMU. However it all worked fine when I tried it on my install of openSUSE in VMware.

Thanks for any help.
Kevin.
Posts: 1
Joined: Mon Oct 01, 2012 4:45 pm
by sevillalarry » Fri Feb 15, 2013 2:35 pm
Got the same error...
Posts: 3
Joined: Thu Feb 14, 2013 2:07 pm
by rurwin » Fri Feb 15, 2013 3:30 pm
You know that Linux toolchain only works on a x86 Linux, not the RaspPi, right?
User avatar
Moderator
Moderator
Posts: 2888
Joined: Mon Jan 09, 2012 3:16 pm
by sevillalarry » Sun Feb 17, 2013 1:50 am
No.

Can you give some advise...
Posts: 3
Joined: Thu Feb 14, 2013 2:07 pm
by DavidS » Sun Feb 17, 2013 2:45 pm
sevillalarry wrote:No.

Can you give some advise...

Not as yet, though I would like to convert Alex Chadwicks tutorials to a more standard assembler so they could be used by people that are working on the RPi unning RISC OS with ExtASM, OBJAsm, or similar. GAS is far from a standard Assembler on the ARM, and GAS is ugly ompared to the more standard assemblers for the ARM.

Maybe I will finaly get aound to asking his permision to do so.
ARM Assembly Language: For those that want: Simple, Powerful, Easy to learn, and Easy to debug.
User avatar
Posts: 1251
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
by DavidS » Sun Feb 17, 2013 2:53 pm
@Alex Chadwick:
If yoiu read this I sent you a PM asking permisin for translation of the assembly and updating of the instructions.
ARM Assembly Language: For those that want: Simple, Powerful, Easy to learn, and Easy to debug.
User avatar
Posts: 1251
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
by tufty » Sun Feb 17, 2013 5:48 pm
DavidS wrote:GAS is far from a standard Assembler on the ARM

Cobblers.

There's 2 standard toolchains for the ARM in general use : Realview (the ARM toolchain, used either standalone or with something like Keil's stuff) and the GNU toolchain (not only is this the "standard" toolchain for those developing under Linux, which is *ahem* the standard" OS for the Pi, but also used by commercial stuff like CodeSourcery). The GNU tools are far more widely used outside of "big business" usage - not because they are better, but because they are good enough (in the case of the gnu assembler, it's every bit as capable as any other assembler), works on anything vaguely POSIXy, coexists nicely with cross-dev toolkits for other platforms, and, above all, is free as in [beer / speech].

Yes, there are others, including what's used on RiscOS, and Dex's favourite, fasmarm. RiscOS could hardly be called a "standard" environment, and fasmarm is not a full toolchain. Neither are crossplatform (RiscOS is, unsurprisingly RiscOS only, and fasm is restricted to Windows or linux).
Posts: 1330
Joined: Sun Sep 11, 2011 2:32 pm
by tufty » Sun Feb 17, 2013 5:55 pm
sevillalarry wrote:No.

Can you give some advise...


Yep, if you're developing on the Pi itself, you want to get the standard dev tools, rather than an intel-based cross-development toolkit.
Posts: 1330
Joined: Sun Sep 11, 2011 2:32 pm
by DavidS » Sun Feb 17, 2013 8:50 pm
tufty wrote:
DavidS wrote:GAS is far from a standard Assembler on the ARM

Cobblers.

There's 2 standard toolchains for the ARM in general use : Realview (the ARM toolchain, used either standalone or with something like Keil's stuff) and the GNU toolchain (not only is this the "standard" toolchain for those developing under Linux, which is *ahem* the standard" OS for the Pi, but also used by commercial stuff like CodeSourcery). The GNU tools are far more widely used outside of "big business" usage - not because they are better, but because they are good enough (in the case of the gnu assembler, it's every bit as capable as any other assembler), works on anything vaguely POSIXy, coexists nicely with cross-dev toolkits for other platforms, and, above all, is free as in [beer / speech].

Yes, there are others, including what's used on RiscOS, and Dex's favourite, fasmarm. RiscOS could hardly be called a "standard" environment, and fasmarm is not a full toolchain. Neither are crossplatform (RiscOS is, unsurprisingly RiscOS only, and fasm is restricted to Windows or linux).

And are you forgetting ObjAsm, probably the longest standing ARM assembler in existance, and usualy included in the longest standing C/C++ development toolchain for RISC OS: Norcroft C/C++ (aka Acorn C/C++). Just because there is a large number of Linux users for ARM Based products does not make the two Linux toolchains the standard, the standard should be the one developed by the company that iniialy developed the Chip (Acorn), and that is ObjAsm and Norcroft C/C++, as targetted on RISC OS.

I will give you tht Linux is the most widely used OS, though like with the x86, the standard tools belong to a different OS. On the x86 it took the efforts of NASM and the like to bring standard x86 Assembly to Linux as GAS never had it (this has been added in much later versions of GAS).

And again GAS is a lot less freindly than ObjASM, ExtASM or even the BBC BASIC V assembler. Give people that which is the easist to work with, do not force them to use the most difficult tool just because it comes with Linux.
ARM Assembly Language: For those that want: Simple, Powerful, Easy to learn, and Easy to debug.
User avatar
Posts: 1251
Joined: Thu Dec 15, 2011 6:39 am
Location: USA