Failed to build STM32CubeMX project with error: In function `LoopFillZerobss': (.text.Reset_Handler+0x32): undefined reference to `main'

You’re not converting the STM32CubeIDE project correctly at all.

include_dir is the name of the folder that you want to set as include directory. Not some build flag. So if you want it to be Inc, it’s include_dir = Inc, not include_dir = -I Inc. Same goes for src_dir. See documentation.

Next I see you still have “Drivers” etc. in the root of the project – if that contains the STM32HAL, CMSIS etc., then setting framework = stm32cube is wrong because then PlatformIO will try to pull in its own version of the STM32HAL, etc. Also only sources in src/ or lib/<subfolder> will be compiled, a folder like Drivers at the root of the project will be completely ignored.

Please use stm32pio as conversion program or see related topics like How to write build_flags in platformio.ini.