Arm-none-eabi-g++: error: src/main.ino.cpp: No such file or directory

Well, TD-er here… :slight_smile:
I did also have issues when using the latest dev (upto 4 or 5 days ago at least, the last time I tried)
My laptop is unable to complete a build then and my desktop only fails every now and then.

The errors seem to suggest some files are being deleted while a build is in progress, just like VS code is checking some other PIO envs in the background.
A lot of my users reported similar issues, also tested with the dev version and some also never could get a build to complete.

This issue ticket by @deladriere is reporting the build problem. If I open another issue it seems to me that it will be a duplicate of this one. I don’t want to spam the issue tracker with another topic about it.

  • Thomas

I didn’t open any issue on the Github but just reported this problem here

Working on my second Mac:
I did :

pip install "platformio<6"`

deleted

  • ~/.platformio/platforms
  • ~/.platformio/packages
  • .pio folder

still having the same (random problem)

arm-none-eabi-g++: error: src/main.ino.cpp: No such file or directory
arm-none-eabi-g++: fatal error: no input files
compilation terminated.

next compilation gives :

Assembler messages:
Fatal error: can't create .pio/build/cube/SrcWrapper/src/HAL/stm32yyxx_hal_adc_ex.c.o: No such file or directory
*** [.pio/build/cube/SrcWrapper/src/HAL/stm32yyxx_hal_adc_ex.c.o] Error 1
Assembler messages:
Fatal error: can't create .pio/build/cube/SrcWrapper/src/HAL/stm32yyxx_hal_crc.c.o: No such file or directory
*** [.pio/build/cube/SrcWrapper/src/HAL/stm32yyxx_hal_crc.c.o] Error 1
Assembler messages:
Fatal error: can't create .pio/build/cube/SrcWrapper/src/HAL/stm32yyxx_hal_adc.c.o: No such file or directory
*** [.pio/build/cube/SrcWrapper/src/HAL/stm32yyxx_hal_adc.c.o] Error 1
Assembler messages:
Fatal error: can't create .pio/build/cube/SrcWrapper/src/HAL/stm32yyxx_hal_cortex.c.o: No such file or directory
*** [.pio/build/cube/SrcWrapper/src/HAL/stm32yyxx_hal_cortex.c.o] Error 1

trying run --target clean <

and then I have

Error: Multiple requests to rebuild the project "***" index have been received! Automatic index rebuilding process has been terminated for 10 minutes

but the compilations works and then fails when I want to upload !!!

Nothing works anymore ! I can’t upload nor compile
I am opening an issue https://github.com/platformio/platformio-core/issues/4301

1 Like
  1. Could you close VSCode?
  2. Open system terminal and type
source ~/.platformio/penv/bin/activate
pio run -d /path/to/project

Does it work now?

It seems like a problem with projects that use INO files. We highly recommend moving to classic Arduino IDE for people who need INO files. Otherwise, please port your INO to CPP Convert Arduino file to C++ manually — PlatformIO latest documentation