Reply by Hul Tytus April 19, 20212021-04-19
Thanks Theo. I will get the version 8 manual. Is the title for that "Armv8-m
Archetecture Reference Manual"? From what you've said, I was probably looking
at the v8-A manual.

Hul

Theo <theom+news@chiark.greenend.org.uk> wrote:
> Hul Tytus <ht@panix.com> wrote: > > I'm aiming at the 32 bit devices and looking at the v7 text.
> ARMv8-M devices /are/ 32 bit.
> ARMv8-A brought in the 64 bit instruction set (AArch64) for Application > cores. The classic 32 bit instruction set (AArch32) remains optional for > Application cores. v8-A (and v9-A) describe the Application class > architecture.
> ARMv8-M describes the Microcontroller class architecture and it's all 32 > bit. For example v8-M brought in TrustZone instructions which weren't in > ARMv7-M.
> You should check which core(s) you plan to use and what architecture they > are. For example the Cortex M55 follows ARMv8.1-M while the Cortex M7 > follows ARMv7E-M.
> Theo
Reply by Theo April 18, 20212021-04-18
Hul Tytus <ht@panix.com> wrote:
> I'm aiming at the 32 bit devices and looking at the v7 text.
ARMv8-M devices /are/ 32 bit. ARMv8-A brought in the 64 bit instruction set (AArch64) for Application cores. The classic 32 bit instruction set (AArch32) remains optional for Application cores. v8-A (and v9-A) describe the Application class architecture. ARMv8-M describes the Microcontroller class architecture and it's all 32 bit. For example v8-M brought in TrustZone instructions which weren't in ARMv7-M. You should check which core(s) you plan to use and what architecture they are. For example the Cortex M55 follows ARMv8.1-M while the Cortex M7 follows ARMv7E-M. Theo
Reply by Hul Tytus April 18, 20212021-04-18
Apparantly you read a different version of the GNU copyright
than I did but I didn't read it all. It does vary with
time.

Hul

Tauno Voipio <tauno.voipio@notused.fi.invalid> wrote:
> Your code is just data passed through the tools, the GNU > copyright does not limit it.
> You'll be safe as long as you are not going to modify the > tools. Even then you have to publish the modifications, not > the code processed using the tools.
> For libraries, there is the GNU LGPL coversin such cases > and permitting to use them.
> --
> -TV
> On 17.4.2021 22:38 PM, Hul Tytus wrote: > > Tauno - just the GNU copyright provides reason for not using it. > > I would expect anyone using it, or considering same, to a major extent, whether > > government sponsored or private, would look closely. > > > > Hul > > > > Tauno Voipio <tauno.voipio@notused.fi.invalid> wrote: > >> On 17.4.21 18.53, Hul Tytus wrote: > >>> David - I'm in the process of putting together an assembler for the Arm > >>> 32 bit processors. There is no all-knowing compiler envolved so I need > >>> to know what machine codes are valid for a given processor. Any suggestions > >>> on where that information can be found? > > > > > >> Why on earth? > > > >> What is wrong with the GNU arm-none-eabi-as? > > > >> The arm-none-eabi-gcc has switches for different processor > >> architectures. > > > >> ARM has an instruction reference card for Thumb2, with > >> different processors marked on the card. > > > >> -- > > > >> -TV
Reply by Hul Tytus April 18, 20212021-04-18
Maybe I should take a look at the version 8 text. Thanks

Hul

antispam@math.uni.wroc.pl wrote:
> Hul Tytus <ht@panix.com> wrote: > > David - I'm in the process of putting together an assembler for the Arm > > 32 bit processors. There is no all-knowing compiler envolved so I need > > to know what machine codes are valid for a given processor. Any suggestions > > on where that information can be found?
> If you think about microcontrollers, then most relevant probably > is ARM v8-M Architecture Reference Manual which I found under > file name DDI0553A_e_armv8m_arm.pdf
> It contains list of instructions with their encodings. v8 is resonably > recent (maybe newest) version of ARM architecture. Since ARM is > mostly adding instructions it probably covers all intructions that > you want to support. ARM defined several subsets, for example > Cortex -M3 Devices Generic User Guide file name > DUI0552A_cortex_m3_dgug.pdf describes Cortex M3, in particular > provides list of valid instructions.
> Collectiong information that you need looks like large and tedious > job: you need to check instruction descriptions to know if > instruction is valid for given subset (given mnemonic may be > valid, but specific combination of argument may be invalid). > I am not aware any documents containing needed data is > syntetic form. You may try a shortcut: generate "program" > that contains all varianants of all instructions and look > which one GNU assembler accepts for given subset (model). > Of course, in this way you will repeat any bugs in tables > in GNU assembler. OTOH tables in GNU assembler are probably > debugged at least as well as ARM documents...
> -- > Waldek Hebisch
Reply by Hul Tytus April 18, 20212021-04-18
I'm aiming at the 32 bit devices and looking at the v7 text.

Hul

Theo <theom+news@chiark.greenend.org.uk> wrote:
> Hul Tytus <ht@panix.com> wrote: > > Thanks again Richard. I will assume that the "Arm v7-m Architecture Reference > > Manual" is most current. The only similiarly titled text on Arm's web site > > was for a 64 bit version.
> You probably want the ARMv8-M architecture reference, unless you're dealing > with older hardware: > https://developer.arm.com/documentation/ddi0553/latest
> THeo
Reply by David Brown April 18, 20212021-04-18
(Please don't top-post - it is making a serious mess of this thread.
I've fixed it here.)

On 17/04/2021 21:38, Hul Tytus wrote:
> > Tauno Voipio <tauno.voipio@notused.fi.invalid> wrote: >> On 17.4.21 18.53, Hul Tytus wrote: >>> David - I'm in the process of putting together an assembler for the Arm >>> 32 bit processors. There is no all-knowing compiler envolved so I need >>> to know what machine codes are valid for a given processor. Any suggestions >>> on where that information can be found? > > >> Why on earth? > >> What is wrong with the GNU arm-none-eabi-as? > >> The arm-none-eabi-gcc has switches for different processor >> architectures. > >> ARM has an instruction reference card for Thumb2, with >> different processors marked on the card. > > Tauno - just the GNU copyright provides reason for not using it. > I would expect anyone using it, or considering same, to a major
extent, whether
> government sponsored or private, would look closely. > > Hul
The copyright ownership has no particular relevance here, it is the license that is important. And the license lets you use the tools completely freely for any purpose - commercial, governmental, private, or whatever. It only places restrictions on what you can do with the source code to the assembler - you can modify it that source as much as you like, but if you give people a copy of a binary version of the assembler, you need to give them a copy of the modified source too. The GPL does not affect your ARM code in any way. The GNU toolchain - assembler, linker, compiler collection - are far and away the most used development toolchain in the world, and cover the widest range of targets. If the copyright or license caused some restriction in how they could be used or who could use them, someone would have noticed by now. And if you want to be able to take the source code for an ARM assembler, modify it, and pass on (or sell) the binaries while keeping your changes secret, then you could look to the LLVM project which also includes an assembler and supports ARM as a target, and is all under a BSD/MIT style license.
Reply by David Brown April 18, 20212021-04-18
(Please don't top-post.  Usenet has its standards for formatting posts,
and it is best to stick to those.)

On 17/04/2021 21:30, Hul Tytus wrote:
> David: writing an assembler isn't really a "big effort" although > the documentation of the Arm and the heaps of machine codes it > has moves in that direction. As for "why?", there are several > reasons and fun is one. > Thanks for the direction regarding the Arm device. > > Hul
I have always felt that "fun" is a perfectly good reason for any programming project - you don't need more than that. But there is no doubt that as assemblers go, making one for ARM is complicated by all its variations and the fact that unlike most assemblies, there is not a one-to-one relationship between assembly instructions and machine code instructions. But have fun with it anyway!
Reply by Tauno Voipio April 18, 20212021-04-18
Your code is just data passed through the tools, the GNU
copyright does not limit it.

You'll be safe as long as you are not going to modify the
tools. Even then you have to publish the modifications, not
the code processed using the tools.

For libraries, there is the GNU LGPL coversin such cases
and permitting to use them.

-- 

-TV


On 17.4.2021 22:38 PM, Hul Tytus wrote:
> Tauno - just the GNU copyright provides reason for not using it. > I would expect anyone using it, or considering same, to a major extent, whether > government sponsored or private, would look closely. > > Hul > > Tauno Voipio <tauno.voipio@notused.fi.invalid> wrote: >> On 17.4.21 18.53, Hul Tytus wrote: >>> David - I'm in the process of putting together an assembler for the Arm >>> 32 bit processors. There is no all-knowing compiler envolved so I need >>> to know what machine codes are valid for a given processor. Any suggestions >>> on where that information can be found? > > >> Why on earth? > >> What is wrong with the GNU arm-none-eabi-as? > >> The arm-none-eabi-gcc has switches for different processor >> architectures. > >> ARM has an instruction reference card for Thumb2, with >> different processors marked on the card. > >> -- > >> -TV
Reply by April 17, 20212021-04-17
Hul Tytus <ht@panix.com> wrote:
> David - I'm in the process of putting together an assembler for the Arm > 32 bit processors. There is no all-knowing compiler envolved so I need > to know what machine codes are valid for a given processor. Any suggestions > on where that information can be found?
If you think about microcontrollers, then most relevant probably is ARM v8-M Architecture Reference Manual which I found under file name DDI0553A_e_armv8m_arm.pdf It contains list of instructions with their encodings. v8 is resonably recent (maybe newest) version of ARM architecture. Since ARM is mostly adding instructions it probably covers all intructions that you want to support. ARM defined several subsets, for example Cortex -M3 Devices Generic User Guide file name DUI0552A_cortex_m3_dgug.pdf describes Cortex M3, in particular provides list of valid instructions. Collectiong information that you need looks like large and tedious job: you need to check instruction descriptions to know if instruction is valid for given subset (given mnemonic may be valid, but specific combination of argument may be invalid). I am not aware any documents containing needed data is syntetic form. You may try a shortcut: generate "program" that contains all varianants of all instructions and look which one GNU assembler accepts for given subset (model). Of course, in this way you will repeat any bugs in tables in GNU assembler. OTOH tables in GNU assembler are probably debugged at least as well as ARM documents... -- Waldek Hebisch
Reply by Theo April 17, 20212021-04-17
Hul Tytus <ht@panix.com> wrote:
> Thanks again Richard. I will assume that the "Arm v7-m Architecture Reference > Manual" is most current. The only similiarly titled text on Arm's web site > was for a 64 bit version.
You probably want the ARMv8-M architecture reference, unless you're dealing with older hardware: https://developer.arm.com/documentation/ddi0553/latest THeo