开发者

What would be involved in getting Free Pascal to compile into AVR, ATMega and Arduino?

Would it be too much of an effort to have FPC compile to the Arduino platform?

I would really like to use Lazarus to do 开发者_如何学Csome "sketches".


I'am working from time to time on the FPC AVR port. Current state is: an AVR FPC compiler can be built and it creates reasonable code and we are working on the startup code. After this, we will start to debug the code of simple programs.

If you want to play with it, you can build (not sure though if it currently builds, we run no regression tests yet on avr) an avr cross compiler from FPC trunk by

make all OS_TARGET=embedded CPU_TARGET=avr CROSSOPT=-O-

having avr binutils (avr-embedded-*) and FPC 2.4.4 installed (don't forget the CROSSOPT=-O-, the optimizer is currently broken for AVR).

Edit: Formatting

Updating my old answer: FPC for AVR got significant improvements

make all OS_TARGET=embedded CPU_TARGET=avr

works now (FPC trunk) and creates reasonable code (still needs improvements and fixes though).


I would look into http://en.wikipedia.org/wiki/GNU_Compiler_Collection since GCC is already implemented for the AVR and this front end should be easy to add.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜