Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[ARM] Is it possible to use gcc for ARM Assembly but without having to use gcc syntax ?

Status
Not open for further replies.

ZX_Spectrum

Newbie level 5
Joined
Apr 13, 2016
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
104
What i want to say is that i would like to use GCC to compile ARM Assembly code under linux , but i really don't want to switch to the awkward gcc arm syntax.

actually i am learning ARM Assembly right now using realview Keil under windows but as i am switching little by little to linux i want to use gcc and gdb but I really hate re-learning most of what I have already learned of ARM syntax under realview.

I think the syntax gcc uses is called At&T syntax , but i am not sure how to call the syntax used in realview keil

NOTE: please don't ask me to use keil with wine.

thank you everyone
 
Last edited:

If you're only using GCC because that's what you happen to have maybe looking at a different way of doing
it would be useful?
I think FPC/lazarus can cross compile to ARM (not really sure though) and has the ability to do
inline assembly. It does work and cross compile between linux/windows OS's.
Maybe that would be worth a look.
 

did you say FPC ?!!
can i do that ? i thought FPC is only for Pascal
i never knew that i can use FPC for ARM assembly !!
Actually i would love to use TUI based IDE as FPC . could you please direct me toward some instruction about using FPC for ARM Assembly?
 

Yes FPC/Lazarus
Pascal is just a language - FPC/lazarus is a very widely specified toolchain with the ability
to cross compile to a wide range of targets. It's a really good environment but be very careful
with the (very dodgy) documentation. Use the forum a lot.

There's even work going on to support Android (although personally I'd rather Android
was dropped into the fires of hell and never seen again)

I know there's the ability to inline code for intel procs but my own embedded knowledge
is more PIC based so I dont know much about ARM support.

I did see a thread a while back where someone confirmed it can cross compile
to bare metal ARM so I guess inlining is possible as well but I can't say for certain.

Anyway - it sounds like you know where to look - but let me know if you need help with it.

Just an FYI for anyone interested:
Cross compile targets for fpc/lazarus listed in the project window are:
a64
arm
avr
i386
i8086
jvm
m68k
mips
mipsel
powerpc
sparc
x86_64

And of course it runs on most OS's
https://forum.lazarus.freepascal.org/index.php?action=forum

One word of caution - there is at least one spin-off from lazarus - it is very good but if you
expect to maintain commercial or long term code I'd suggest you stick with vanilla lazarus and it's packages.
I've had problems in the past with packages not being compatible in the long term.
 
Last edited:
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top