ARM compiler

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.

Thanks.

--------------------------------------- Posted through

formatting link

Reply to
TonyStarkPE
Loading thread data ...

You mean a free compiler like ARM GCC?

formatting link

Reply to
Przemek Klosowski

You mean a free compiler like ARM GCC?

formatting link

Reply to
Przemek Klosowski

You mean a free compiler like ARM GCC?

formatting link

Reply to
Przemek Klosowski

You mean a free compiler like ARM GCC?

formatting link

Reply to
Przemek Klosowski

You mean a free compiler like ARM GCC?

formatting link

Reply to
Przemek Klosowski

You mean a free compiler like ARM GCC?

formatting link

Reply to
Przemek Klosowski

You mean a free compiler like ARM GCC?

formatting link

Reply to
Przemek Klosowski

You mean a free compiler like ARM GCC?

formatting link

Reply to
Przemek Klosowski

You mean a free compiler like ARM GCC?

formatting link

Reply to
Przemek Klosowski

You mean a free compiler like ARM GCC?

formatting link

Reply to
Przemek Klosowski

You mean a free compiler like ARM GCC?

formatting link

Reply to
Przemek Klosowski

You mean a free compiler like ARM GCC?

formatting link

Reply to
Przemek Klosowski

You mean a free compiler like ARM GCC?

formatting link

Reply to
Przemek Klosowski

You mean a free compiler like ARM GCC?

formatting link

Reply to
Przemek Klosowski

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 to
Robert Wessel

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 to
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 to
David Brown

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 , but since the speaker is releasing his hardware design for others to use, there must be a real write- up somewhere else.

Mel.

Reply to
Mel Wilson

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:

formatting link
However it's only the ARM2 with 26 bit addressing modes as that's already out of patent.

Theo

Reply to
Theo Markettos

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.