Welcome! Log In Create A New Profile

Advanced

unable to build mega2560 for bugfix 2.1.x branch

Posted by bschwand 
unable to build mega2560 for bugfix 2.1.x branch
February 13, 2026 05:35AM
Hello,

I am trying to build marlin for a trigorilla 1.4 board. I did that before on a different machine so I know it builds. However now on a branc new platformio install, the mega2560 build fails. The mega2560ext does build however.
What I find weird is that it seems to tray to build files that have nothing to do with mega2560 ? see the build log below* Executing task: platformio run --environment mega2560
Any help appreciated

Processing mega2560 (board: megaatmega2560; platform: atmelavr@~4.0.1; framework: arduino)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: [docs.platformio.org]
PLATFORM: Atmel AVR (4.0.1) > Arduino Mega or Mega 2560 ATmega2560 (Mega 2560)
HARDWARE: ATMEGA2560 16MHz, 8KB RAM, 248KB Flash
DEBUG: Current (avr-stub) External (avr-stub, simavr)
PACKAGES:
- framework-arduino-avr @ 5.1.0
- toolchain-atmelavr @ 1.70300.191015 (7.3.0)
Converting Marlin.ino
LDF: Library Dependency Finder -> [bit.ly]
LDF Modes: Finder ~ chain, Compatibility ~ soft
Library Manager: Installing [github.com]
Unpacking 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Library Manager: LiquidCrystal@1.5.1 has been installed!
Found 6 compatible libraries
Scanning dependencies...
Dependency Graph
|-- LiquidCrystal @ 1.5.1
|-- Wire @ 1.0
|-- SPI @ 1.0
Building in release mode
Compiling .pio/build/mega2560/src/src/HAL/AVR/HAL.cpp.o
Compiling .pio/build/mega2560/src/src/HAL/AVR/HAL_SPI.cpp.o
Compiling .pio/build/mega2560/src/src/HAL/AVR/MarlinSerial.cpp.o
Compiling .pio/build/mega2560/src/src/HAL/AVR/Servo.cpp.o
Compiling .pio/build/mega2560/src/src/HAL/AVR/eeprom.cpp.o
Compiling .pio/build/mega2560/src/src/HAL/AVR/fast_pwm.cpp.o
Compiling .pio/build/mega2560/src/src/HAL/AVR/fastio.cpp.o
Compiling .pio/build/mega2560/src/src/HAL/AVR/registers.cpp.o
Compiling .pio/build/mega2560/src/src/HAL/AVR/u8g_com_HAL_AVR_sw_spi.cpp.o
Compiling .pio/build/mega2560/src/src/HAL/shared/Delay.cpp.o
Compiling .pio/build/mega2560/src/src/HAL/shared/HAL.cpp.o
Compiling .pio/build/mega2560/src/src/HAL/shared/MinSerial.cpp.o
Compiling .pio/build/mega2560/src/src/HAL/shared/eeprom_api.cpp.o
Compiling .pio/build/mega2560/src/src/HAL/shared/esp_wifi.cpp.o
Compiling .pio/build/mega2560/src/src/HAL/shared/servo.cpp.o
Compiling .pio/build/mega2560/src/src/MarlinCore.cpp.o
Assembler messages:
Fatal error: can't create .pio/build/mega2560/src/src/HAL/shared/MinSerial.cpp.o: No such file or directory
*** [.pio/build/mega2560/src/src/HAL/shared/MinSerial.cpp.o] Error 1
Assembler messages:
Fatal error: can't create .pio/build/mega2560/src/src/HAL/shared/esp_wifi.cpp.o: No such file or directory
*** [.pio/build/mega2560/src/src/HAL/shared/esp_wifi.cpp.o] Error 1
Assembler messages:
Fatal error: can't create .pio/build/mega2560/src/src/HAL/shared/servo.cpp.o: No such file or directory
*** [.pio/build/mega2560/src/src/HAL/shared/servo.cpp.o] Error 1
Assembler messages:
Fatal error: can't create .pio/build/mega2560/src/src/MarlinCore.cpp.o: No such file or directory
*** [.pio/build/mega2560/src/src/MarlinCore.cpp.o] Error 1
================================================================================================ [FAILED] Took 6.84 seconds ================================================================================================

Environment Status Duration
------------- -------- ------------
mega2560 FAILED 00:00:06.837
Re: unable to build mega2560 for bugfix 2.1.x branch
February 13, 2026 05:48AM
That error I have seen a bit of late, seems platformio is falling over itself.

deleting the .pio directory under Marlin and trying again seems to fit it for me.

Edited 1 time(s). Last edit at 02/13/2026 05:49AM by Dust.
Re: unable to build mega2560 for bugfix 2.1.x branch
February 13, 2026 06:00AM
well you are right, why didn't I think of this... I figured the "Full clean" was in fact a full clean spinning smiley sticking its tongue out but I guess not...
thanks, it works
Sorry, only registered users may post in this forum.

Click here to login