I would like to cross compile Pascal to the AVR microcontroller series. My specific target is the AVR64DU32, but would want to be able to compile to other AVR architectures as well as to Texas Instruments MSP430 series. I understand that the processors even in a family have significant differences. I have cloned the FPC source with
https://gitlab.com/freepascal.org/fpc/source.git and I have a nice set of files in ~/src/source. There I find a Makefile and a Makefile.fpc. I understand the Makefile is created by running fpcmake from the directory with the Makefile.fpc file. If I do that, how do I set it up for building a compiler that can do all of AVR, MSP430, and my desktop programs? I have found in the makefile that I should probably do something like fpcmake CROSSCOMPILE=1 CPU_TARGET=avr to get the AVR architecture, but does that build an FPC that is specific to the AVR architecture only or will the compiler work for more than one target architecture? I also found that for the GCC compiler I need the option -mmcu=x, where X is specific the the MCU. There I see -mmcu=avrxmega2 refers to the AVR64DU32. I also see the FPC doesn't handle all the specifier and AI tells me to use SUBARCH=avr25, but whether I put that into the fpcmake or make isn't clear. Is it possible to have one FPC compiler that will compile to my native desktop architecture (Mac) and also compile to AVR or MSP430 with a command line option? To check if all has gone well, what directories are the files and support files supposed to go? Thanks, Steve
_______________________________________________ fpc-pascal maillist - [email protected] https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
