User avatar
RaTTuS
Posts: 10559
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Arm Assembler

Mon Feb 06, 2012 12:35 pm

Can someone link me the correct ARM assembler instruction set please, for use with the RPi

I'm an assembler programmer by heart and would like to know what I can play with ;-p
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

rpt
Posts: 51
Joined: Tue Jan 31, 2012 3:09 pm

Re: Arm Assembler

Mon Feb 06, 2012 12:45 pm


User avatar
johnbeetem
Posts: 945
Joined: Mon Oct 17, 2011 11:18 pm
Location: The Mountains
Contact: Website

Re: Arm Assembler

Mon Feb 06, 2012 2:57 pm

Here's my understanding  today 6 Feb 2012:  You need the ARM Architectural Reference Manual (the "ARM ARM") which is available at http://infocenter.arm.com/help/index.jsp .  Look under "ARM architecture / Reference Manuals" in the Contents.  The applicable version is "ARMv7-AR", which covers ARMv7-A (Cortex-A), ARMv7-R (Cortex-R), and ARMv6 which includes the ARM11 processor in RasPi's SoC.

You will need to register as an ARM customer and agree to terms of use in order to download the document.  I didn't have any problem when I registered maybe a year ago.

User avatar
johnbeetem
Posts: 945
Joined: Mon Oct 17, 2011 11:18 pm
Location: The Mountains
Contact: Website

Re: Arm Assembler

Mon Feb 06, 2012 3:05 pm

You can also get quick reference cards for the 32-bit ARM/Thumb-2, 16-bit Thumb, and Vector Floating Point instruction sets at http://infocenter.arm.com/help/index.jsp .  Look under "ARM architecture / Instruction Set Quick Reference Cards" in the Contents.  They do not require registration.  If you like to read railroad schedules with myriad footnotes you'll love these

The ARM11 core in RasPi's SoC implements the ARMv6 architecture, so you can't use ARMv7 features such as 32-bit Thumb-2 instructions.

User avatar
RaTTuS
Posts: 10559
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Arm Assembler

Mon Feb 06, 2012 3:33 pm

excellent Thanks
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

davidgoodenough
Posts: 74
Joined: Wed Sep 21, 2011 11:55 am

Re: Arm Assembler

Mon Feb 06, 2012 3:38 pm

There is an assembler (as) which is available with any Linux distribution.  It is generally packaged as part of binutils.  There is no need to get the ARM version.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26677
Joined: Sat Jul 30, 2011 7:41 pm

Re: Arm Assembler

Mon Feb 06, 2012 3:59 pm

The standard distro should come with an assembler.

This is also a very good book, but not easy to get (but replicated in PDF's from Arm anyway)

http://www.amazon.co.uk/Archit.....038;sr=8-1
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

User avatar
johnbeetem
Posts: 945
Joined: Mon Oct 17, 2011 11:18 pm
Location: The Mountains
Contact: Website

Re: Arm Assembler

Mon Feb 06, 2012 7:44 pm

JamesH said:

This is also a very good book, but not easy to get (but replicated in PDF's from Arm anyway)

http://www.amazon.co.uk/Archit.....038;sr=8-1


I believe that book (ARM ARM Second Edition) is the last ARM ARM available as hard copy.  I managed to get a used copy for a reasonable price before it became a "collector's item".  It only covers through ARMv5, but that's good enough for the fixed-point instructions that most people need.  ARMv6 adds a bunch of instructions which are good for DSP applications but I doubt a C compiler would generate them.  Anyway, you can set the compiler options to generate whichever ARM architecture version you want.

The really nice thing about ARMv5 and ARM ARM Second Edition is that ARM instruction set formats were still easy to follow and are summarized in a few tables.  ARMv7 instruction formats are a real PITA and the ARMv7-AR ARM  doesn't even try to come up with a clean table for instruction formats.  IMO, "R" hasn't stood for "RISC" in a long time.  But it's still a great processor

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26677
Joined: Sat Jul 30, 2011 7:41 pm

Re: Arm Assembler

Mon Feb 06, 2012 8:23 pm

There's also a PDF out there called Arm : Assembly Language Programming by Peter Knaggs and Stephen Walsh which is pretty useful. Don't have a link I'm afraid.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

User avatar
johnbeetem
Posts: 945
Joined: Mon Oct 17, 2011 11:18 pm
Location: The Mountains
Contact: Website

Re: Arm Assembler

Mon Feb 06, 2012 8:38 pm

JamesH said:


There's also a PDF out there called ARM: Assembly Language Programming by Peter Knaggs and Stephen Walsh which is pretty useful. Don't have a link I'm afraid.


Here it is, thanks to forum user dpawson http://www.eng.auburn.edu/~nel.....syLang.pdf

There are other links in this forum thread: http://www.raspberrypi.org/for.....ng-arm-asm

xsoliman
Posts: 3
Joined: Wed Feb 15, 2012 5:00 pm

Re: Arm Assembler

Wed Feb 15, 2012 5:08 pm

If you want to experiment with ARMv7 and Thumb-2 code, you can pick up a cheap Android tablet. Can even get some that will boot from External SD.

User avatar
Chromatix
Posts: 430
Joined: Mon Jan 02, 2012 7:00 pm
Location: Helsinki

Re: Arm Assembler

Wed Feb 15, 2012 5:16 pm

...and somebody has *completely* missed the point.

Sigh.
The key to knowledge is not to rely on people to teach you it.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26677
Joined: Sat Jul 30, 2011 7:41 pm

Re: Arm Assembler

Wed Feb 15, 2012 5:24 pm

That's nothing - I'm trying to convince someone in the comment section that those tablets are a bad idea for programming, and cost more than the Raspi anyway. Not getting very far! I do wonder if they are sellers of the tablets trying to FUD.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

xsoliman
Posts: 3
Joined: Wed Feb 15, 2012 5:00 pm

Re: Arm Assembler

Wed Feb 15, 2012 5:58 pm

This thread was explicitly about ARM assembly level programming, and I was merely mentioning a way to get familar with Thumb-2 (as opposed to classic 32bit opcode ARM or 16-bit Thumb (Thumb-1))

User avatar
RaTTuS
Posts: 10559
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Arm Assembler

Thu Feb 16, 2012 9:39 am

it's explicitly about ARM assembly on the RPi as this is where it is [and that was what I was asking] and the RPi does not support Thumb AFAIK .

but there are useful resources in this thread
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

rpt
Posts: 51
Joined: Tue Jan 31, 2012 3:09 pm

Re: Arm Assembler

Thu Feb 16, 2012 11:00 am

The ARM1176JZF-S does support Thumb so I assume the RPi does too.

xsoliman
Posts: 3
Joined: Wed Feb 15, 2012 5:00 pm

Re: Arm Assembler

Thu Feb 16, 2012 1:20 pm

Yes should support Thumb (aka Thumb-1)

I was merely pointing out that if anyone was mad enough or interested in learning the more complicated Thumb-2, they would need some other device  eg with a Cortex processor

All this is irrelevant to 99% of the people on here who wont be touching assembler and will use whatever code their compilier produces

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4258
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: Arm Assembler

Thu Feb 16, 2012 2:46 pm

This may or may not be the right place to ask.

I notice that the RPi ARM core has the Java extensions. Does this mean it will run Java more efficiently, or has nobody produced a runtime that uses it? (Or have I misunderstood?)

davidgoodenough
Posts: 74
Joined: Wed Sep 21, 2011 11:55 am

Re: Arm Assembler

Thu Feb 16, 2012 3:24 pm

rurwin said:


This may or may not be the right place to ask.

I notice that the RPi ARM core has the Java extensions. Does this mean it will run Java more efficiently, or has nobody produced a runtime that uses it? (Or have I misunderstood?)


Regrettably the Jazelle functionality (which is what you are refering to) is only available under NDA, so none of the open source JVMs use it.

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4258
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: Arm Assembler

Thu Feb 16, 2012 3:56 pm

Your implication being that there are no closed-source implementations that are zero-cost?

davidgoodenough
Posts: 74
Joined: Wed Sep 21, 2011 11:55 am

Re: Arm Assembler

Thu Feb 16, 2012 4:30 pm

rurwin said:


Your implication being that there are no closed-source implementations that are zero-cost?


None that I am aware of, if only there were.

Return to “General discussion”