What would be connected with getting Free Pascal for compilation in AVR, ATMega and Arduino?

Would it be too much effort for FPC to compile on the Arduino platform?

I would really like to use Lazarus to do some β€œsketches”.

+6
source share
2 answers

I occasionally work on the FPC AVR port. Current status: The AVR FPC compiler can be built and creates reasonable code, and we are working on a startup code. After that, we will begin debugging the code of simple programs.

If you want to play with him, you can build (not sure, although if he is currently building, we are not yet running regression tests on avr) avr cross compiler from FPC trunk by

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

with installed avr binutils (avr-embedded- *) and FPC 2.4.4 (do not forget CROSSOPT = -O-, the optimizer is currently disabled for AVR).

Edit: formatting

Update of my old answer: FPC for AVR received significant improvements

 make all OS_TARGET=embedded CPU_TARGET=avr 

works now (FPC trunk) and creates reasonable code (improvements and corrections are still needed).

+10
source

I would look at http://en.wikipedia.org/wiki/GNU_Compiler_Collection , since GCC is already implemented for AVR, and this interface should be easily added.

0
source

Source: https://habr.com/ru/post/896570/


All Articles