Problems by compiling Marlin

Hello everyone,

i tried to compile an adjusted version of Marlin 2.1.2 with PlatformIO. First i had the problem, that the files
c++allocator.h, c++config.h, cpu_defines.h, os_defines.h were missing in the folder .platformio\packages\toolchain-gccarmnoneeabi\arm-none-eabi\include\c++\11.3.1\bits. So i searched them in te top folder .platformio\packages\toolchain-gccarmnoneeabi\arm-none-eabi\include\c++\11.3.1 and copied them to the “bits” folder. So far so good, compiling didn’t firectly fail on first files.
So now my problem is that the compilation process errors right before the end with the message:

Linking .pio\build\LPC1769\firmware.elf
c:/users/brend/.platformio/packages/toolchain-gccarmnoneeabi/bin/…/lib/gcc/arm-none-eabi/11.3.1/…/…/…/…/arm-none-eabi/bin/ld.exe: cannot find crti.o: No such file or directory
c:/users/brend/.platformio/packages/toolchain-gccarmnoneeabi/bin/…/lib/gcc/arm-none-eabi/11.3.1/…/…/…/…/arm-none-eabi/bin/ld.exe: cannot find crtbegin.o: No such file or directory
c:/users/brend/.platformio/packages/toolchain-gccarmnoneeabi/bin/…/lib/gcc/arm-none-eabi/11.3.1/…/…/…/…/arm-none-eabi/bin/ld.exe: cannot find crt0.o: No such file or directory
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\LPC1769\firmware.elf] Error 1

I deleted the whole .platformio folder several times, deinstalled platformio and reinstalled it, but its everytime the same. After serveral hours of testing i realized the that the compilation process fails at the moment is change the board and processor in the marlin files from stock entry to BOARD_BTT_SKR_V1_4_TURBO and LPC1769. In stock configuration verything works fine. I also tried several versions of Marlin.

Can anyone please help me fix this problem? I don’t know much about programming and compilers and so on so please be patient with me.

Thanks!

This is being discussed in

Thanks a lot, now it works properly.
I didn’t realize that post. So thanks for quoting.