Undefined reference to `_init' collect2: error: ld returned 1 exit status

Hi I am using this platformio.ini configuration:

[env:xmc4700]
platform = infineonxmc
board = kit_xmc47_relax
framework = arduino
monitor_speed = 19200

In my last version of platfomIO I get this link error during the build process:

.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/nofp/libc_nano.a(lib_a-init.o): in function `__libc_init_array’:
(.text.__libc_init_array+0x14): undefined
collect2: error: ld returned 1 exit status
*** [.pio/build/xmc4700/program.elf] Error 1

Must I define this C function?

That Infineon platform seems to be third-party.

Please open an issue in Issues · Infineon/platformio-infineonxmc · GitHub

It may also help to point the platform at the current, latest commit. I see an update of the Arduino core has been made last month, but no new version tag has been released for the last 6 years.

Just replace your old platform = line with:

platform = https://github.com/Infineon/platformio-infineonxmc/archive/67fccf2f3130ff112be43031ea7134b8aa0a10d8.zip