First of all, thank you to the developers that you can create projects with Lazarus AVR.
But what is quite tedious, you have to build a separate Lazarus for each SubArch.
Wouldn't it be possible to build FPC to support all SubArch?
What I found, "Project / Project Settings / Configuration and Goals / Target Processor (-Cp)" has no effect.
The -Cp could be used for the AVR type, e.g. for the ATtiny2313a. For that you could leave out the -Wpattiny2313a.
What is the reason that you have to make such a detour?
If I build an AVR25 cross compiler and want to program an Atmega328p, I get the following error:
If I choose the wrong SubArch for the first time, I get the following error.
Compile project, OS: embedded, CPU: avr, target: /home/tux/fpcupdeluxe_test/projects/Project1.elf: Exit code 1, error: 1
Fatal: Can't find unit ATMEGA328P used by Project1
If I build an AVR5 compiler in the meantime, and then again an AVR25, I get the following error:
Compile project, OS: embedded, CPU: avr, target: /home/tux/fpcupdeluxe_test/projects/Project1.elf: Exit code 1, error: 5
Error: / home / tux / fpcupdeluxe_test / cross / bin / avr-embedded / avr-ld: incompatible /home/tux/fpcupdeluxe_test/fpc/units/avr-embedded/rtl/system.o is searched for / home / tux / fpcupdeluxe_test / fpc / units / avr-embedded / rtl / system.o skipped
Error: / home / tux / fpcupdeluxe_test / cross / bin / avr-embedded / avr-ld: /home/tux/fpcupdeluxe_test/fpc/units/avr-embedded/rtl/system.o could not be found
Error: / home / tux / fpcupdeluxe_test / cross / bin / avr-embedded / avr-ld: incompatible /home/tux/fpcupdeluxe_test/fpc/units/avr-embedded/rtl/objpas.o is searched for / home / tux / fpcupdeluxe_test / fpc / units / avr-embedded / rtl / objpas.o skipped
Error: / home / tux / fpcupdeluxe_test / cross / bin / avr-embedded / avr-ld: /home/tux/fpcupdeluxe_test/fpc/units/avr-embedded/rtl/objpas.o could not be found
Assembling project1
Linking /home/tux/fpcupdeluxe_test/projects/Project1.elf
Project1.pas (13.4) Error: Error while linking
As I see it, it is ligating to the files in the "fpc / units / avr-embedded" folder.
Couldn't you make such folders:
"fpc / units / avr-embedded-avr25", "fpc / units / avr-embedded-avr5", etc.
Wouldn't it be possible to build different system.o and objpas.o.
With Linux / i386 or win32 / i386, there are also different target processors.