Reply by Simon Clubley May 29, 20132013-05-29
On 2013-05-28, Theo Markettos <theom+news@chiark.greenend.org.uk> wrote:
> > Then you get all the frontends for free (want > to run Ada on your microcontroller? No problem!). >
Just a little digression on your Ada comment in case anyone wants to play with Ada on microcontrollers. To run full blown Ada on a target requires adding support for the target to the Ada runtime as full Ada functionality requires a runtime to support it, so just altering the compiler itself isn't enough. However, gcc Ada also has a zero runtime footprint mode which can make it easier to get a subset of Ada functionality running on a new target. The gcc Ada port for the AVR at http://sourceforge.net/p/avr-ada/wiki/Home/ uses this option. Comments on the AVR runtime support are here: http://sourceforge.net/p/avr-ada/wiki/InstallRunTimeSystem/ BTW, if you want more general Ada support on microcontrollers, the RTEMS RTOS has support for writing programs in Ada. Simon. -- Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP Microsoft: Bringing you 1980s technology to a 21st century world
Reply by Anssi Saari May 29, 20132013-05-29
Mel Wilson <mwilson@the-wire.com> writes:

> There's an abbreviated write-up at > <http://fsoss.senecac.on.ca/2012/node/150>, but since the speaker is > releasing his hardware design for others to use, there must be a real write- > up somewhere else.
I didn't find a better writeup or the presentation, but the project's on GitHub, https://github.com/atgreen/moxiedev Links to a blog and wiki are there too.
Reply by lang...@fonz.dk May 28, 20132013-05-28
On 28 Maj, 16:25, David Brown <da...@westcontrol.removethisbit.com>
wrote:
> On 28/05/13 15:39, Ulf Samuelsson wrote: > > > > > > > > > > > On 2013-05-28 05:43, Robert Wessel wrote: > >> On Mon, 27 May 2013 17:07:31 -0500, "TonyStarkPE" > >> <95197@embeddedrelated> wrote: > > >>> I'm trying to recreate a simple ARM compatible processor in a > >>> FPGA. I did one similar to the 68HC11 in my Digital Design course > >>> in school. But when we did the assembly language we had to hand > >>> assemble it as well and change the instructions to machine code > >>> ex. LDAA --> 0x43 (not a real opcode) Then we made all our > >>> instructions and data in hex into a file that represented a > >>> memory with Altera's Quartus II. > > >>> What I need is to skip the hand assembly if possible and better > >>> yet be able to write in C. Compiling down to an ARM instruction > >>> set. Are there any free tools that can help me with this? As I > >>> just want to concentrate on creating the ARM processor and > >>> writing simple bare metal software. > > >> There's lots of FOSS support for ARM. &#4294967295;Not least, as Przemek > >> Klosowski mentioned 13 times, a GCC port (plus all the related > >> stuff, like GAS). There are also a number of Linux ports, as well > >> as other OSs. &#4294967295;There are also many non-free tools. > > >> I'm not sure what your motivations are, but there are a number of > >> FOSS ARM cores out there, including several projects on > >> opencores.org. While not all of those are complete, several are > >> under active development, and would probably welcome additional > >> developers. > > >> But one comment: ARM has been fairly protective of their IP, I'd > >> do some research on the legal issues if you wanted to use your own > >> ARM implementation commercially. > > > The ARM7DI datasheet was released in 1994. IIRC Patents are valid for > > 20 years, so then it is not too far away. > > > BR Ulf Samuelsson > > I can't imagine that patents are the main issue here - I would expect > most of ARM's patents to cover the implementation rather than the ISA. > But they will have copyrights on the instruction set, and they will have > trademarks on ARM and many related terms that make it difficult to talk > about "ARM compatible cpu" without their permission. > > Patents run out, unless they are extended by devious means, copyrights > last forever (due to USA's Mikey Mouse laws), and trademarks last as > long as the owner defends them. > > I can only guess what ARM's attitude to these sorts of soft cpus is - > since such cores exist on opencores.org, I assume they tolerate them for > learning or academic exercises, but I'd imagine anything commercial > would provoke a reaction.
for learning or academic exercises probably ok for commercial use almost certainly not and it doesn't really matter if they are right or wrong, they have an almost infinite supply of money and lawyers to protect their golden egg http://en.wikipedia.org/wiki/Lexra -Lasse
Reply by Theo Markettos May 28, 20132013-05-28
Mel Wilson <mwilson@the-wire.com> wrote:
> It occurs to me, the last FSOSS conference included a speaker who > developed his own processor on an FPGA and built the design process around > gcc. According to the talk, he implemented a stub of a code generator > (that would have generated assembly for a specific architecture) and then > studied the intermediate pseudo-code that he got when he compiled simple C > programs. Then he implemented on the FPGA instructions that would effect > the mid-level operations that gcc generated.
LLVM is quite nice for this. It's essentially a toolkit for writing compilers. The intermediate representation generated by frontends like Clang (for C/C++) is an infinite-register RISC instruction set where each register is used only once. That's not too painful to translate into whatever real instruction set you have - you just build a compile pipeline from various C++ components. Then you get all the frontends for free (want to run Ada on your microcontroller? No problem!). There's an ARM LLVM backend too. If you want a free synthesisable ARM core, there's Amber: http://opencores.org/project,amber However it's only the ARM2 with 26 bit addressing modes as that's already out of patent. Theo
Reply by Mel Wilson May 28, 20132013-05-28
Robert Wessel wrote:

> On Mon, 27 May 2013 17:07:31 -0500, "TonyStarkPE" > <95197@embeddedrelated> wrote: > >>I'm trying to recreate a simple ARM compatible processor in a FPGA. >>[ ... ] >>What I need is to skip the hand assembly if possible and better yet be >>able to write in C. Compiling down to an ARM instruction set. Are there >>any free tools that can help me with this? As I just want to concentrate >>on creating the ARM processor and writing simple bare metal software. > > > There's lots of FOSS support for ARM. Not least, as Przemek Klosowski > mentioned 13 times, a GCC port (plus all the related stuff, like GAS). > There are also a number of Linux ports, as well as other OSs. There > are also many non-free tools. > > I'm not sure what your motivations are, but there are a number of FOSS > ARM cores out there, including several projects on opencores.org. > While not all of those are complete, several are under active > development, and would probably welcome additional developers. > > But one comment: ARM has been fairly protective of their IP, I'd do > some research on the legal issues if you wanted to use your own ARM > implementation commercially.
It occurs to me, the last FSOSS conference included a speaker who developed his own processor on an FPGA and built the design process around gcc. According to the talk, he implemented a stub of a code generator (that would have generated assembly for a specific architecture) and then studied the intermediate pseudo-code that he got when he compiled simple C programs. Then he implemented on the FPGA instructions that would effect the mid-level operations that gcc generated. There's an abbreviated write-up at <http://fsoss.senecac.on.ca/2012/node/150>, but since the speaker is releasing his hardware design for others to use, there must be a real write- up somewhere else. Mel.
Reply by David Brown May 28, 20132013-05-28
On 28/05/13 15:39, Ulf Samuelsson wrote:
> On 2013-05-28 05:43, Robert Wessel wrote: >> On Mon, 27 May 2013 17:07:31 -0500, "TonyStarkPE" >> <95197@embeddedrelated> wrote: >> >>> I'm trying to recreate a simple ARM compatible processor in a >>> FPGA. I did one similar to the 68HC11 in my Digital Design course >>> in school. But when we did the assembly language we had to hand >>> assemble it as well and change the instructions to machine code >>> ex. LDAA --> 0x43 (not a real opcode) Then we made all our >>> instructions and data in hex into a file that represented a >>> memory with Altera's Quartus II. >>> >>> What I need is to skip the hand assembly if possible and better >>> yet be able to write in C. Compiling down to an ARM instruction >>> set. Are there any free tools that can help me with this? As I >>> just want to concentrate on creating the ARM processor and >>> writing simple bare metal software. >> >> >> There's lots of FOSS support for ARM. Not least, as Przemek >> Klosowski mentioned 13 times, a GCC port (plus all the related >> stuff, like GAS). There are also a number of Linux ports, as well >> as other OSs. There are also many non-free tools. >> >> I'm not sure what your motivations are, but there are a number of >> FOSS ARM cores out there, including several projects on >> opencores.org. While not all of those are complete, several are >> under active development, and would probably welcome additional >> developers. >> >> But one comment: ARM has been fairly protective of their IP, I'd >> do some research on the legal issues if you wanted to use your own >> ARM implementation commercially. >> > > The ARM7DI datasheet was released in 1994. IIRC Patents are valid for > 20 years, so then it is not too far away. > > BR Ulf Samuelsson >
I can't imagine that patents are the main issue here - I would expect most of ARM's patents to cover the implementation rather than the ISA. But they will have copyrights on the instruction set, and they will have trademarks on ARM and many related terms that make it difficult to talk about "ARM compatible cpu" without their permission. Patents run out, unless they are extended by devious means, copyrights last forever (due to USA's Mikey Mouse laws), and trademarks last as long as the owner defends them. I can only guess what ARM's attitude to these sorts of soft cpus is - since such cores exist on opencores.org, I assume they tolerate them for learning or academic exercises, but I'd imagine anything commercial would provoke a reaction.
Reply by Ulf Samuelsson May 28, 20132013-05-28
On 2013-05-28 05:43, Robert Wessel wrote:
> On Mon, 27 May 2013 17:07:31 -0500, "TonyStarkPE" > <95197@embeddedrelated> wrote: > >> I'm trying to recreate a simple ARM compatible processor in a FPGA. I did >> one similar to the 68HC11 in my Digital Design course in school. But when >> we did the assembly language we had to hand assemble it as well and change >> the instructions to machine code ex. LDAA --> 0x43 (not a real opcode) Then >> we made all our instructions and data in hex into a file that represented a >> memory with Altera's Quartus II. >> >> What I need is to skip the hand assembly if possible and better yet be able >> to write in C. Compiling down to an ARM instruction set. Are there any free >> tools that can help me with this? As I just want to concentrate on creating >> the ARM processor and writing simple bare metal software. > > > There's lots of FOSS support for ARM. Not least, as Przemek Klosowski > mentioned 13 times, a GCC port (plus all the related stuff, like GAS). > There are also a number of Linux ports, as well as other OSs. There > are also many non-free tools. > > I'm not sure what your motivations are, but there are a number of FOSS > ARM cores out there, including several projects on opencores.org. > While not all of those are complete, several are under active > development, and would probably welcome additional developers. > > But one comment: ARM has been fairly protective of their IP, I'd do > some research on the legal issues if you wanted to use your own ARM > implementation commercially. >
The ARM7DI datasheet was released in 1994. IIRC Patents are valid for 20 years, so then it is not too far away. BR Ulf Samuelsson
Reply by Robert Wessel May 28, 20132013-05-28
On Mon, 27 May 2013 17:07:31 -0500, "TonyStarkPE"
<95197@embeddedrelated> wrote:

>I'm trying to recreate a simple ARM compatible processor in a FPGA. I did >one similar to the 68HC11 in my Digital Design course in school. But when >we did the assembly language we had to hand assemble it as well and change >the instructions to machine code ex. LDAA --> 0x43 (not a real opcode) Then >we made all our instructions and data in hex into a file that represented a >memory with Altera's Quartus II. > >What I need is to skip the hand assembly if possible and better yet be able >to write in C. Compiling down to an ARM instruction set. Are there any free >tools that can help me with this? As I just want to concentrate on creating >the ARM processor and writing simple bare metal software.
There's lots of FOSS support for ARM. Not least, as Przemek Klosowski mentioned 13 times, a GCC port (plus all the related stuff, like GAS). There are also a number of Linux ports, as well as other OSs. There are also many non-free tools. I'm not sure what your motivations are, but there are a number of FOSS ARM cores out there, including several projects on opencores.org. While not all of those are complete, several are under active development, and would probably welcome additional developers. But one comment: ARM has been fairly protective of their IP, I'd do some research on the legal issues if you wanted to use your own ARM implementation commercially.
Reply by Przemek Klosowski May 27, 20132013-05-27
On Mon, 27 May 2013 17:07:31 -0500, TonyStarkPE wrote:

> What I need is to skip the hand assembly if possible and better yet be > able to write in C. Compiling down to an ARM instruction set. Are there > any free tools that can help me with this?
You mean a free compiler like ARM GCC? https://launchpad.net/gcc-arm-embedded/+download
Reply by Przemek Klosowski May 27, 20132013-05-27
On Mon, 27 May 2013 17:07:31 -0500, TonyStarkPE wrote:

> What I need is to skip the hand assembly if possible and better yet be > able to write in C. Compiling down to an ARM instruction set. Are there > any free tools that can help me with this?
You mean a free compiler like ARM GCC? https://launchpad.net/gcc-arm-embedded/+download