Vai al contenuto

Aggiornamento firmware Marlin 2


Vai alla soluzione Risolta da Truck64,

Messaggi raccomandati

Inviato

Buongiorno a tutti,

sto avendo problemi ad aggiornare il firmware alla mia stampante ender 3 pro.

Vorrei iniziare ad usare Marlin 2 principalmente per poter modificare il parametro del linear advance.

La mia stampante monta una scheda melzi v1.1.6.2 e processore atmega1284p. (foto)

Ho scaricato il firmware e la cartella Configurations dal sito ufficiale Marlin. Ho estratto i file di esempio per la Creality ender 3 pro v1 ed ho copiato le 4 cartelle (config, config_advance, Bootscreen e StatusScreen) nella cartella Marlin.

Utilizzando Platform.io su Visual Studio Code ho aperto la cartella Marlin 2.1.2, ho controllato i file configuartion.h e configuration_adv.h (dove ho decommentato l'impostazione del linear advance).

Ho provato a compilare ma mi da errore, credo che il problema siano le impostazioni nel file Platformio.ini che non riesco proprio a capire come mettere. (ho provato diverse combinazioni ma mi da sempre qualche errore)

Qualcuno sa aiutarmi?

Grazie mille,

questo è il contenuto del file Platformio.ini:

#
# Marlin Firmware
# PlatformIO Configuration File
#
# For detailed documentation with EXAMPLES:
#
# https://docs.platformio.org/en/latest/projectconf/index.html
#

# Automatic targets - enable auto-uploading
#targets = upload

[platformio]
src_dir      = Marlin
boards_dir   = buildroot/share/PlatformIO/boards
default_envs = melzi
include_dir  = Marlin
extra_configs =
    Marlin/config.ini
    ini/avr.ini
    ini/due.ini
    ini/esp32.ini
    ini/features.ini
    ini/lpc176x.ini
    ini/native.ini
    ini/samd21.ini
    ini/samd51.ini
    ini/stm32-common.ini
    ini/stm32f0.ini
    ini/stm32f1-maple.ini
    ini/stm32f1.ini
    ini/stm32f4.ini
    ini/stm32f7.ini
    ini/stm32h7.ini
    ini/stm32g0.ini
    ini/teensy.ini
    ini/renamed.ini

#
# The 'common' section applies to most Marlin builds.
#
# By default platformio build will abort after 5 errors.
# Remove '-fmax-errors=5' from build_flags below to see all.
#
[common]
build_flags        = -g3 -D__MARLIN_FIRMWARE__ -DNDEBUG
                     -fmax-errors=5
extra_scripts      =
  pre:buildroot/share/PlatformIO/scripts/configuration.py
  pre:buildroot/share/PlatformIO/scripts/common-dependencies.py
  pre:buildroot/share/PlatformIO/scripts/common-cxxflags.py
  pre:buildroot/share/PlatformIO/scripts/preflight-checks.py
  post:buildroot/share/PlatformIO/scripts/common-dependencies-post.py
lib_deps           =
default_src_filter = +<src/*> -<src/config> -<src/HAL> +<src/HAL/shared> -<src/tests>
  -<src/lcd/HD44780> -<src/lcd/TFTGLCD> -<src/lcd/dogm> -<src/lcd/tft> -<src/lcd/tft_io>
  -<src/HAL/STM32/tft> -<src/HAL/STM32F1/tft>
  -<src/lcd/e3v2/common> -<src/lcd/e3v2/creality> -<src/lcd/e3v2/proui> -<src/lcd/e3v2/jyersui> -<src/lcd/e3v2/marlinui>
  -<src/lcd/menu>
  -<src/lcd/menu/game/game.cpp> -<src/lcd/menu/game/brickout.cpp> -<src/lcd/menu/game/invaders.cpp>
  -<src/lcd/menu/game/maze.cpp> -<src/lcd/menu/game/snake.cpp>
  -<src/lcd/menu/menu_backlash.cpp>
  -<src/lcd/menu/menu_bed_corners.cpp>
  -<src/lcd/menu/menu_bed_leveling.cpp>
  -<src/lcd/menu/menu_cancelobject.cpp>
  -<src/lcd/menu/menu_delta_calibrate.cpp>
  -<src/lcd/menu/menu_filament.cpp>
  -<src/lcd/menu/menu_info.cpp>
  -<src/lcd/menu/menu_job_recovery.cpp>
  -<src/lcd/menu/menu_language.cpp>
  -<src/lcd/menu/menu_led.cpp>
  -<src/lcd/menu/menu_media.cpp>
  -<src/lcd/menu/menu_mmu2.cpp>
  -<src/lcd/menu/menu_password.cpp>
  -<src/lcd/menu/menu_power_monitor.cpp>
  -<src/lcd/menu/menu_spindle_laser.cpp>
  -<src/lcd/menu/menu_temperature.cpp>
  -<src/lcd/menu/menu_tmc.cpp>
  -<src/lcd/menu/menu_touch_screen.cpp>
  -<src/lcd/menu/menu_tramming.cpp>
  -<src/lcd/menu/menu_ubl.cpp>
  -<src/lcd/menu/menu_x_twist.cpp>
  -<src/lcd/extui/anycubic_chiron>
  -<src/lcd/extui/anycubic_i3mega>
  -<src/lcd/extui/dgus> -<src/lcd/extui/dgus/fysetc> -<src/lcd/extui/dgus/hiprecy> -<src/lcd/extui/dgus/mks> -<src/lcd/extui/dgus/origin>
  -<src/lcd/extui/dgus_reloaded>
  -<src/lcd/extui/example>
  -<src/lcd/extui/ftdi_eve_touch_ui>
  -<src/lcd/extui/malyan>
  -<src/lcd/extui/mks_ui>
  -<src/lcd/extui/nextion>
  -<src/lcd/lcdprint.cpp>
  -<src/lcd/touch/touch_buttons.cpp>
  -<src/sd/usb_flashdrive/lib-uhs2> -<src/sd/usb_flashdrive/lib-uhs3>
  -<src/sd/usb_flashdrive/Sd2Card_FlashDrive.cpp>
  -<src/sd/cardreader.cpp> -<src/sd/Sd2Card.cpp> -<src/sd/SdBaseFile.cpp> -<src/sd/SdFatUtil.cpp> -<src/sd/SdFile.cpp> -<src/sd/SdVolume.cpp>
  -<src/HAL/shared/backtrace>
  -<src/HAL/shared/cpu_exception>
  -<src/HAL/shared/eeprom_if_i2c.cpp>
  -<src/HAL/shared/eeprom_if_spi.cpp>
  -<src/feature/adc> -<src/gcode/feature/adc>
  -<src/feature/ammeter.cpp>
  -<src/feature/babystep.cpp>
  -<src/feature/backlash.cpp>
  -<src/feature/baricuda.cpp> -<src/gcode/feature/baricuda>
  -<src/feature/bedlevel/abl> -<src/gcode/bedlevel/abl>
  -<src/feature/bedlevel/bdl> -<src/gcode/probe/M102.cpp>
  -<src/feature/bedlevel/mbl> -<src/gcode/bedlevel/mbl>
  -<src/feature/bedlevel/ubl> -<src/gcode/bedlevel/ubl>
  -<src/feature/bedlevel/hilbert_curve.cpp>
  -<src/feature/binary_stream.cpp> -<src/libs/heatshrink>
  -<src/feature/bltouch.cpp>
  -<src/feature/cancel_object.cpp> -<src/gcode/feature/cancel>
  -<src/feature/caselight.cpp> -<src/gcode/feature/caselight>
  -<src/feature/closedloop.cpp>
  -<src/feature/controllerfan.cpp> -<src/gcode/feature/controllerfan>
  -<src/feature/cooler.cpp>  -<src/gcode/temp/M143_M193.cpp>
  -<src/feature/dac> -<src/feature/digipot>
  -<src/feature/direct_stepping.cpp> -<src/gcode/motion/G6.cpp>
  -<src/feature/e_parser.cpp>
  -<src/feature/easythreed_ui.cpp>
  -<src/feature/encoder_i2c.cpp>
  -<src/feature/ethernet.cpp> -<src/gcode/feature/network/M552-M554.cpp>
  -<src/feature/fancheck.cpp>
  -<src/feature/fanmux.cpp>
  -<src/feature/filwidth.cpp> -<src/gcode/feature/filwidth>
  -<src/feature/fwretract.cpp> -<src/gcode/feature/fwretract>
  -<src/feature/host_actions.cpp>
  -<src/feature/hotend_idle.cpp>
  -<src/feature/joystick.cpp>
  -<src/feature/leds/blinkm.cpp>
  -<src/feature/leds/leds.cpp>
  -<src/feature/leds/neopixel.cpp>
  -<src/feature/leds/pca9533.cpp>
  -<src/feature/leds/pca9632.cpp>
  -<src/feature/leds/printer_event_leds.cpp>
  -<src/feature/leds/tempstat.cpp>
  -<src/feature/max7219.cpp>
  -<src/feature/meatpack.cpp>
  -<src/feature/mixing.cpp>
  -<src/feature/mmu/mmu.cpp>
  -<src/feature/mmu/mmu2.cpp> -<src/gcode/feature/prusa_MMU2>
  -<src/feature/password> -<src/gcode/feature/password>
  -<src/feature/pause.cpp>
  -<src/feature/power.cpp>
  -<src/feature/power_monitor.cpp> -<src/gcode/feature/power_monitor>
  -<src/feature/powerloss.cpp> -<src/gcode/feature/powerloss>
  -<src/feature/probe_temp_comp.cpp>
  -<src/feature/repeat.cpp>
  -<src/feature/runout.cpp> -<src/gcode/feature/runout>
  -<src/feature/snmm.cpp>
  -<src/feature/solenoid.cpp> -<src/gcode/control/M380_M381.cpp>
  -<src/feature/spindle_laser.cpp> -<src/gcode/control/M3-M5.cpp>
  -<src/feature/stepper_driver_safety.cpp>
  -<src/feature/tmc_util.cpp> -<src/module/stepper/trinamic.cpp>
  -<src/feature/tramming.cpp>
  -<src/feature/twibus.cpp>
  -<src/feature/x_twist.cpp> -<src/gcode/probe/M423.cpp>
  -<src/feature/z_stepper_align.cpp>
  -<src/gcode/bedlevel/G26.cpp>
  -<src/gcode/bedlevel/G35.cpp>
  -<src/gcode/bedlevel/G42.cpp>
  -<src/gcode/bedlevel/M420.cpp> -<src/feature/bedlevel/bedlevel.cpp>
  -<src/gcode/calibrate/G33.cpp>
  -<src/gcode/calibrate/G34.cpp>
  -<src/gcode/calibrate/G34_M422.cpp>
  -<src/gcode/calibrate/G76_M871.cpp>
  -<src/gcode/calibrate/G425.cpp>
  -<src/gcode/calibrate/M12.cpp>
  -<src/gcode/calibrate/M48.cpp>
  -<src/gcode/calibrate/M100.cpp>
  -<src/gcode/calibrate/M425.cpp>
  -<src/gcode/calibrate/M665.cpp>
  -<src/gcode/calibrate/M666.cpp>
  -<src/gcode/calibrate/M852.cpp>
  -<src/gcode/control/M10-M11.cpp>
  -<src/gcode/control/M42.cpp> -<src/gcode/control/M226.cpp>
  -<src/gcode/config/M43.cpp>
  -<src/gcode/config/M217.cpp>
  -<src/gcode/config/M218.cpp>
  -<src/gcode/config/M221.cpp>
  -<src/gcode/config/M301.cpp>
  -<src/gcode/config/M302.cpp>
  -<src/gcode/config/M304.cpp>
  -<src/gcode/config/M305.cpp>
  -<src/gcode/config/M540.cpp>
  -<src/gcode/config/M575.cpp>
  -<src/gcode/config/M672.cpp>
  -<src/gcode/control/M7-M9.cpp>
  -<src/gcode/control/M211.cpp>
  -<src/gcode/control/M350_M351.cpp>
  -<src/gcode/control/M605.cpp>
  -<src/gcode/feature/advance>
  -<src/gcode/feature/camera>
  -<src/gcode/feature/i2c>
  -<src/gcode/feature/input_shaping>
  -<src/gcode/feature/L6470>
  -<src/gcode/feature/leds/M150.cpp>
  -<src/gcode/feature/leds/M7219.cpp>
  -<src/gcode/feature/macro>
  -<src/gcode/feature/mixing/M163-M165.cpp>
  -<src/gcode/feature/mixing/M166.cpp>
  -<src/gcode/feature/pause/G27.cpp>
  -<src/gcode/feature/pause/G60.cpp>
  -<src/gcode/feature/pause/G61.cpp>
  -<src/gcode/feature/pause/M125.cpp>
  -<src/gcode/feature/pause/M600.cpp>
  -<src/gcode/feature/pause/M603.cpp>
  -<src/gcode/feature/pause/M701_M702.cpp>
  -<src/gcode/feature/trinamic/M122.cpp>
  -<src/gcode/feature/trinamic/M569.cpp>
  -<src/gcode/feature/trinamic/M906.cpp>
  -<src/gcode/feature/trinamic/M911-M914.cpp>
  -<src/gcode/feature/trinamic/M919.cpp>
  -<src/gcode/geometry/G17-G19.cpp>
  -<src/gcode/geometry/G53-G59.cpp>
  -<src/gcode/geometry/M206_M428.cpp>
  -<src/gcode/host/M16.cpp>
  -<src/gcode/host/M113.cpp>
  -<src/gcode/host/M154.cpp>
  -<src/gcode/host/M360.cpp>
  -<src/gcode/host/M876.cpp>
  -<src/gcode/lcd/M0_M1.cpp>
  -<src/gcode/lcd/M73.cpp>
  -<src/gcode/lcd/M117.cpp>
  -<src/gcode/lcd/M250.cpp> -<src/gcode/lcd/M255.cpp> -<src/gcode/lcd/M256.cpp>
  -<src/gcode/lcd/M300.cpp>
  -<src/gcode/lcd/M414.cpp>
  -<src/gcode/lcd/M995.cpp>
  -<src/gcode/motion/G2_G3.cpp>
  -<src/gcode/motion/G5.cpp>
  -<src/gcode/motion/G80.cpp>
  -<src/gcode/motion/M290.cpp>
  -<src/gcode/probe/G30.cpp>
  -<src/gcode/probe/G31_G32.cpp>
  -<src/gcode/probe/G38.cpp>
  -<src/gcode/probe/M401_M402.cpp>
  -<src/gcode/probe/M851.cpp>
  -<src/gcode/probe/M951.cpp>
  -<src/gcode/scara>
  -<src/gcode/sd>
  -<src/gcode/sd/M32.cpp>
  -<src/gcode/sd/M808.cpp>
  -<src/gcode/temp/M104_M109.cpp>
  -<src/gcode/temp/M123.cpp>
  -<src/gcode/temp/M155.cpp>
  -<src/gcode/temp/M192.cpp>
  -<src/gcode/temp/M306.cpp>
  -<src/gcode/units/G20_G21.cpp>
  -<src/gcode/units/M82_M83.cpp>
  -<src/gcode/units/M149.cpp>
  -<src/libs/BL24CXX.cpp> -<src/libs/W25Qxx.cpp>
  -<src/libs/L64XX> -<src/module/stepper/L64xx.cpp> -<src/HAL/shared/HAL_spi_L6470.cpp>
  -<src/libs/MAX31865.cpp>
  -<src/libs/hex_print.cpp>
  -<src/libs/least_squares_fit.cpp>
  -<src/libs/nozzle.cpp> -<src/gcode/feature/clean>
  -<src/module/planner_bezier.cpp>
  -<src/module/polargraph.cpp>
  -<src/module/printcounter.cpp>
  -<src/module/probe.cpp>
  -<src/module/scara.cpp>
  -<src/module/servo.cpp> -<src/gcode/control/M280.cpp> -<src/gcode/config/M281.cpp> -<src/gcode/control/M282.cpp>
  -<src/module/stepper/TMC26X.cpp>

#
# Default values apply to all 'env:' prefixed environments
#
[env:ATmega1284P]
platform = atmelavr
board = ATmega1284P
framework      = arduino
extra_scripts  = ${common.extra_scripts}
build_flags    = ${common.build_flags}
lib_deps       = ${common.lib_deps}
monitor_speed  = 115200

 

im1.jpeg

im2.jpeg

im3.jpeg

Inviato
16 ore fa, TOAD ha scritto:

Ho provato a compilare ma mi da errore, credo che il problema siano le impostazioni nel file Platformio.ini che non riesco proprio a capire come mettere. (ho provato diverse combinazioni ma mi da sempre qualche errore)

Non ho provato direttamente ma credo che il problema sia la carenza di memoria per il firmware. Hai un processore a 8bit con la metà della memoria di un arduino mega, non penso che si possa caricare il codice per le funzioni avanzate (linear advance, UBL, ecc) con così poche risorse. Se non sei soddisfatto delle prestazioni della tua stampante e sei sicuro che il problema non sia meccanico ti consiglio prima di tutto di cambiare scheda di controllo.

  • Like 2
Inviato
20 ore fa, TOAD ha scritto:

Ho provato a compilare ma mi da errore

Di solito il compilatore specifica anche l'errore... che errore da?

Se è un problema di memoria lo dice.

Inviato

Questo è l'errore che esce:

Processing melzi (board: sanguino_atmega1284p; platform: atmelavr@~3.4)
--------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/atmelavr/sanguino_atmega1284p.html
PLATFORM: Atmel AVR (3.4.0) > Sanguino ATmega1284p (16MHz)
HARDWARE: ATMEGA1284P 16MHz, 16KB RAM, 124KB Flash
DEBUG: Current (simavr) On-board (simavr)
PACKAGES: 
 - toolchain-atmelavr @ 1.70300.191015 (7.3.0)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 1 compatible libraries
Scanning dependencies...
Dependency Graph
|-- U8glib-HAL @ 0.5.2
Building in release mode
Compiling .pio/build/melzi/src/src/HAL/AVR/HAL.o
Compiling .pio/build/melzi/src/src/HAL/AVR/HAL_SPI.o
Compiling .pio/build/melzi/src/src/HAL/AVR/MarlinSerial.o
Compiling .pio/build/melzi/src/src/HAL/AVR/Servo.o
In file included from Marlin/src/HAL/AVR/../../inc/../HAL/./AVR/HAL.h:26:0,
                 from Marlin/src/HAL/AVR/../../inc/../HAL/HAL.h:30,
                 from Marlin/src/HAL/AVR/../../inc/MarlinConfig.h:31,
                 from Marlin/src/HAL/AVR/HAL_SPI.cpp:34:
Marlin/src/HAL/AVR/../../inc/../HAL/./AVR/../shared/Marduino.h:36:10: fatal error: Arduino.h: No such file or directory

*****************************************************************
* Looking for Arduino.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:Arduino.h"
* Web  > https://registry.platformio.org/search?q=header:Arduino.h
*
*****************************************************************

 #include <Arduino.h>  // NOTE: If included earlier then this line is a NOOP
          ^~~~~~~~~~~
compilation terminated.
In file included from Marlin/src/HAL/AVR/../../inc/../HAL/./AVR/HAL.h:26:0,
                 from Marlin/src/HAL/AVR/../../inc/../HAL/HAL.h:30,
                 from Marlin/src/HAL/AVR/../../inc/MarlinConfig.h:31,
                 from Marlin/src/HAL/AVR/MarlinSerial.cpp:39:
Marlin/src/HAL/AVR/../../inc/../HAL/./AVR/../shared/Marduino.h:36:10: fatal error: Arduino.h: No such file or directory

*****************************************************************
* Looking for Arduino.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:Arduino.h"
* Web  > https://registry.platformio.org/search?q=header:Arduino.h
*
*****************************************************************

 #include <Arduino.h>  // NOTE: If included earlier then this line is a NOOP
          ^~~~~~~~~~~
compilation terminated.
*** [.pio/build/melzi/src/src/HAL/AVR/MarlinSerial.o] Error 1
In file included from Marlin/src/HAL/AVR/../../inc/../HAL/./AVR/HAL.h:26:0,
                 from Marlin/src/HAL/AVR/../../inc/../HAL/HAL.h:30,
                 from Marlin/src/HAL/AVR/../../inc/MarlinConfig.h:31,
                 from Marlin/src/HAL/AVR/Servo.cpp:55:
Marlin/src/HAL/AVR/../../inc/../HAL/./AVR/../shared/Marduino.h:36:10: fatal error: Arduino.h: No such file or directory

*****************************************************************
* Looking for Arduino.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:Arduino.h"
* Web  > https://registry.platformio.org/search?q=header:Arduino.h
*
*****************************************************************

 #include <Arduino.h>  // NOTE: If included earlier then this line is a NOOP
          ^~~~~~~~~~~
compilation terminated.
*** [.pio/build/melzi/src/src/HAL/AVR/Servo.o] Error 1
*** [.pio/build/melzi/src/src/HAL/AVR/HAL_SPI.o] Error 1
In file included from Marlin/src/HAL/AVR/../../inc/../HAL/./AVR/HAL.h:26:0,
                 from Marlin/src/HAL/AVR/../../inc/../HAL/HAL.h:30,
                 from Marlin/src/HAL/AVR/../../inc/MarlinConfig.h:31,
                 from Marlin/src/HAL/AVR/HAL.cpp:24:
Marlin/src/HAL/AVR/../../inc/../HAL/./AVR/../shared/Marduino.h:36:10: fatal error: Arduino.h: No such file or directory

*****************************************************************
* Looking for Arduino.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:Arduino.h"
* Web  > https://registry.platformio.org/search?q=header:Arduino.h
*
*****************************************************************

 #include <Arduino.h>  // NOTE: If included earlier then this line is a NOOP
          ^~~~~~~~~~~
compilation terminated.
*** [.pio/build/melzi/src/src/HAL/AVR/HAL.o] Error 1
================================================== [FAILED] Took 5.71 seconds ==================================================

Environment    Status    Duration
-------------  --------  ------------
melzi          FAILED    00:00:05.708
============================================ 1 failed, 0 succeeded in 00:00:05.708 ============================================

 

Inviato

ho modificato una riga del file platformio.ini

[env:melzi] che prima era [env:ATmega1284p].

Credo che sia giusto ora, o comunque meglio di prima.

[env:melzi]
platform = atmelavr
board = ATmega1284P
framework      = arduino
extra_scripts  = ${common.extra_scripts}
build_flags    = ${common.build_flags}
lib_deps       = ${common.lib_deps}
monitor_speed  = 115200

Quando vado a compilare mi da comunque errore ma diverso:

Processing melzi (platform: atmelavr; board: ATmega1284P; framework: arduino)
-------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/atmelavr/ATmega1284P.html
PLATFORM: Atmel AVR (3.4.0) > ATmega1284P
HARDWARE: ATMEGA1284P 16MHz, 16KB RAM, 124KB Flash
DEBUG: Current (simavr) On-board (simavr)
PACKAGES: 
 - framework-arduino-avr-mightycore @ 2.1.3 
 - toolchain-atmelavr @ 1.70300.191015 (7.3.0)
Converting Marlin.ino
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 12 compatible libraries
Scanning dependencies...
Dependency Graph
|-- U8glib-HAL @ 0.5.2
|   |-- Wire @ 1.0
|   |-- SPI @ 1.0
|-- Wire @ 1.0
|-- SPI @ 1.0
|-- Servo (MightyCore) @ 1.1.1
Building in release mode
Compiling .pio/build/melzi/src/src/HAL/AVR/HAL.cpp.o
Compiling .pio/build/melzi/src/src/HAL/AVR/HAL_SPI.cpp.o
Compiling .pio/build/melzi/src/src/HAL/AVR/MarlinSerial.cpp.o
Compiling .pio/build/melzi/src/src/HAL/AVR/Servo.cpp.o
Compiling .pio/build/melzi/src/src/HAL/AVR/eeprom.cpp.o
Compiling .pio/build/melzi/src/src/HAL/AVR/fast_pwm.cpp.o
Compiling .pio/build/melzi/src/src/HAL/AVR/fastio.cpp.o
Compiling .pio/build/melzi/src/src/HAL/AVR/u8g_com_HAL_AVR_sw_spi.cpp.o
Compiling .pio/build/melzi/src/src/HAL/shared/Delay.cpp.o
Compiling .pio/build/melzi/src/src/HAL/shared/HAL.cpp.o
Compiling .pio/build/melzi/src/src/HAL/shared/MinSerial.cpp.o
Compiling .pio/build/melzi/src/src/HAL/shared/eeprom_api.cpp.o
Compiling .pio/build/melzi/src/src/HAL/shared/esp_wifi.cpp.o
Compiling .pio/build/melzi/src/src/HAL/shared/servo.cpp.o
Compiling .pio/build/melzi/src/src/MarlinCore.cpp.o
Compiling .pio/build/melzi/src/src/core/serial.cpp.o
Compiling .pio/build/melzi/src/src/core/utility.cpp.o
Compiling .pio/build/melzi/src/src/feature/babystep.cpp.o
Compiling .pio/build/melzi/src/src/gcode/calibrate/G28.cpp.o
Compiling .pio/build/melzi/src/src/gcode/config/M200-M205.cpp.o
Compiling .pio/build/melzi/src/src/gcode/config/M220.cpp.o
Compiling .pio/build/melzi/src/src/gcode/config/M221.cpp.o
Compiling .pio/build/melzi/src/src/gcode/config/M301.cpp.o
Compiling .pio/build/melzi/src/src/gcode/config/M302.cpp.o
Compiling .pio/build/melzi/src/src/gcode/config/M309.cpp.o
Compiling .pio/build/melzi/src/src/gcode/config/M92.cpp.o
Compiling .pio/build/melzi/src/src/gcode/control/M108_M112_M410.cpp.o
Compiling .pio/build/melzi/src/src/gcode/control/M111.cpp.o
Compiling .pio/build/melzi/src/src/gcode/control/M120_M121.cpp.o
Compiling .pio/build/melzi/src/src/gcode/control/M17_M18_M84.cpp.o
Compiling .pio/build/melzi/src/src/gcode/control/M211.cpp.o
Compiling .pio/build/melzi/src/src/gcode/control/M400.cpp.o
Compiling .pio/build/melzi/src/src/gcode/control/M80_M81.cpp.o
Compiling .pio/build/melzi/src/src/gcode/control/M85.cpp.o
Compiling .pio/build/melzi/src/src/gcode/control/M993_M994.cpp.o
Compiling .pio/build/melzi/src/src/gcode/control/M997.cpp.o
Compiling .pio/build/melzi/src/src/gcode/control/M999.cpp.o
Compiling .pio/build/melzi/src/src/gcode/control/T.cpp.o
Compiling .pio/build/melzi/src/src/gcode/eeprom/M500-M504.cpp.o
Compiling .pio/build/melzi/src/src/gcode/feature/advance/M900.cpp.o
Compiling .pio/build/melzi/src/src/gcode/feature/digipot/M907-M910.cpp.o
Compiling .pio/build/melzi/src/src/gcode/gcode.cpp.o
Compiling .pio/build/melzi/src/src/gcode/gcode_d.cpp.o
Compiling .pio/build/melzi/src/src/gcode/geometry/G92.cpp.o
Compiling .pio/build/melzi/src/src/gcode/geometry/M206_M428.cpp.o
Compiling .pio/build/melzi/src/src/gcode/host/M110.cpp.o
Compiling .pio/build/melzi/src/src/gcode/host/M113.cpp.o
Compiling .pio/build/melzi/src/src/gcode/host/M114.cpp.o
Compiling .pio/build/melzi/src/src/gcode/host/M115.cpp.o
Compiling .pio/build/melzi/src/src/gcode/host/M118.cpp.o
Compiling .pio/build/melzi/src/src/gcode/host/M119.cpp.o
Compiling .pio/build/melzi/src/src/gcode/lcd/M0_M1.cpp.o
Compiling .pio/build/melzi/src/src/gcode/lcd/M117.cpp.o
Compiling .pio/build/melzi/src/src/gcode/lcd/M145.cpp.o
Compiling .pio/build/melzi/src/src/gcode/lcd/M300.cpp.o
Compiling .pio/build/melzi/src/src/gcode/motion/G0_G1.cpp.o
Compiling .pio/build/melzi/src/src/gcode/motion/G2_G3.cpp.o
Compiling .pio/build/melzi/src/src/gcode/motion/G4.cpp.o
Compiling .pio/build/melzi/src/src/gcode/motion/M290.cpp.o
Compiling .pio/build/melzi/src/src/gcode/parser.cpp.o
Compiling .pio/build/melzi/src/src/gcode/queue.cpp.o
Compiling .pio/build/melzi/src/src/gcode/sd/M1001.cpp.o
Compiling .pio/build/melzi/src/src/gcode/sd/M20.cpp.o
Compiling .pio/build/melzi/src/src/gcode/sd/M21_M22.cpp.o
Compiling .pio/build/melzi/src/src/gcode/sd/M23.cpp.o
Compiling .pio/build/melzi/src/src/gcode/sd/M24_M25.cpp.o
Compiling .pio/build/melzi/src/src/gcode/sd/M26.cpp.o
Compiling .pio/build/melzi/src/src/gcode/sd/M27.cpp.o
Compiling .pio/build/melzi/src/src/gcode/sd/M28_M29.cpp.o
Compiling .pio/build/melzi/src/src/gcode/sd/M30.cpp.o
Compiling .pio/build/melzi/src/src/gcode/sd/M32.cpp.o
Compiling .pio/build/melzi/src/src/gcode/sd/M33.cpp.o
Compiling .pio/build/melzi/src/src/gcode/sd/M34.cpp.o
Compiling .pio/build/melzi/src/src/gcode/sd/M524.cpp.o
Compiling .pio/build/melzi/src/src/gcode/sd/M928.cpp.o
Compiling .pio/build/melzi/src/src/gcode/stats/M31.cpp.o
Compiling .pio/build/melzi/src/src/gcode/stats/M75-M78.cpp.o
Compiling .pio/build/melzi/src/src/gcode/temp/M104_M109.cpp.o
Compiling .pio/build/melzi/src/src/gcode/temp/M105.cpp.o
Compiling .pio/build/melzi/src/src/gcode/temp/M106_M107.cpp.o
Compiling .pio/build/melzi/src/src/gcode/temp/M140_M190.cpp.o
Compiling .pio/build/melzi/src/src/gcode/temp/M141_M191.cpp.o
Compiling .pio/build/melzi/src/src/gcode/temp/M155.cpp.o
Compiling .pio/build/melzi/src/src/gcode/temp/M303.cpp.o
Compiling .pio/build/melzi/src/src/gcode/units/M82_M83.cpp.o
Compiling .pio/build/melzi/src/src/inc/Warnings.cpp.o
Compiling .pio/build/melzi/src/src/lcd/dogm/lcdprint_u8g.cpp.o
Compiling .pio/build/melzi/src/src/lcd/dogm/marlinui_DOGM.cpp.o
Compiling .pio/build/melzi/src/src/lcd/dogm/status_screen_DOGM.cpp.o
Compiling .pio/build/melzi/src/src/lcd/dogm/status_screen_lite_ST7920.cpp.o
In file included from /Users/tommaso/.platformio/packages/framework-arduino-avr-mightycore/cores/MightyCore/wiring_extras.h:19:0,
                 from /Users/tommaso/.platformio/packages/framework-arduino-avr-mightycore/cores/MightyCore/Arduino.h:301,
                 from Marlin/src/lcd/dogm/../../inc/../HAL/./AVR/../shared/Marduino.h:36,
                 from Marlin/src/lcd/dogm/../../inc/../HAL/./AVR/HAL.h:26,
                 from Marlin/src/lcd/dogm/../../inc/../HAL/HAL.h:30,
                 from Marlin/src/lcd/dogm/../../inc/MarlinConfig.h:31,
                 from Marlin/src/lcd/dogm/HAL_LCD_class_defines.h:24,
                 from Marlin/src/lcd/dogm/marlinui_DOGM.h:31,
                 from Marlin/src/lcd/dogm/lcdprint_u8g.cpp:14:
/Users/tommaso/.platformio/packages/toolchain-atmelavr/avr/include/avr/power.h: In function 'void clock_prescale_set(clock_div_t)':
/Users/tommaso/.platformio/packages/toolchain-atmelavr/avr/include/avr/power.h:1511:21: error: '_BV' was not declared in this scope
     uint8_t __tmp = _BV(CLKPCE);
                     ^~~
In file included from /Users/tommaso/.platformio/packages/framework-arduino-avr-mightycore/cores/MightyCore/wiring_extras.h:14:0,
                 from /Users/tommaso/.platformio/packages/framework-arduino-avr-mightycore/cores/MightyCore/Arduino.h:301,
                 from Marlin/src/lcd/dogm/../../inc/../HAL/./AVR/../shared/Marduino.h:36,
                 from Marlin/src/lcd/dogm/../../inc/../HAL/./AVR/HAL.h:26,
                 from Marlin/src/lcd/dogm/../../inc/../HAL/HAL.h:30,
                 from Marlin/src/lcd/dogm/../../inc/MarlinConfig.h:31,
                 from Marlin/src/lcd/dogm/HAL_LCD_class_defines.h:24,
                 from Marlin/src/lcd/dogm/marlinui_DOGM.h:31,
                 from Marlin/src/lcd/dogm/lcdprint_u8g.cpp:14:
/Users/tommaso/.platformio/packages/framework-arduino-avr-mightycore/cores/MightyCore/wiring_extras.h: In function 'void enableSleep()':
/Users/tommaso/.platformio/packages/framework-arduino-avr-mightycore/cores/MightyCore/wiring_extras.h:81:5: error: '_BV' was not declared in this scope
     sleep_enable();
     ^
/Users/tommaso/.platformio/packages/framework-arduino-avr-mightycore/cores/MightyCore/wiring_extras.h: In function 'void disableSleep()':
/Users/tommaso/.platformio/packages/framework-arduino-avr-mightycore/cores/MightyCore/wiring_extras.h:90:5: error: '_BV' was not declared in this scope
     sleep_disable();
     ^
/Users/tommaso/.platformio/packages/framework-arduino-avr-mightycore/cores/MightyCore/wiring_extras.h: In function 'void sleepMode(uint8_t)':
/Users/tommaso/.platformio/packages/framework-arduino-avr-mightycore/cores/MightyCore/wiring_extras.h:102:9: error: '_BV' was not declared in this scope
         set_sleep_mode(SLEEP_MODE_IDLE);
         ^
/Users/tommaso/.platformio/packages/framework-arduino-avr-mightycore/cores/MightyCore/wiring_extras.h:107:9: error: '_BV' was not declared in this scope
         set_sleep_mode(SLEEP_MODE_ADC);
         ^
compilation terminated due to -fmax-errors=5.
*** [.pio/build/melzi/src/src/lcd/dogm/lcdprint_u8g.cpp.o] Error 1
In file included from /Users/tommaso/.platformio/packages/framework-arduino-avr-mightycore/cores/MightyCore/wiring_extras.h:19:0,
                 from /Users/tommaso/.platformio/packages/framework-arduino-avr-mightycore/cores/MightyCore/Arduino.h:301,
                 from Marlin/src/lcd/dogm/../../inc/../HAL/./AVR/../shared/Marduino.h:36,
                 from Marlin/src/lcd/dogm/../../inc/../HAL/./AVR/HAL.h:26,
                 from Marlin/src/lcd/dogm/../../inc/../HAL/HAL.h:30,
                 from Marlin/src/lcd/dogm/../../inc/MarlinConfig.h:31,
                 from Marlin/src/lcd/dogm/HAL_LCD_class_defines.h:24,
                 from Marlin/src/lcd/dogm/marlinui_DOGM.h:31,
                 from Marlin/src/lcd/dogm/marlinui_DOGM.cpp:42:
/Users/tommaso/.platformio/packages/toolchain-atmelavr/avr/include/avr/power.h: In function 'void clock_prescale_set(clock_div_t)':
/Users/tommaso/.platformio/packages/toolchain-atmelavr/avr/include/avr/power.h:1511:21: error: '_BV' was not declared in this scope
     uint8_t __tmp = _BV(CLKPCE);
                     ^~~
In file included from /Users/tommaso/.platformio/packages/framework-arduino-avr-mightycore/cores/MightyCore/wiring_extras.h:14:0,
                 from /Users/tommaso/.platformio/packages/framework-arduino-avr-mightycore/cores/MightyCore/Arduino.h:301,
                 from Marlin/src/lcd/dogm/../../inc/../HAL/./AVR/../shared/Marduino.h:36,
                 from Marlin/src/lcd/dogm/../../inc/../HAL/./AVR/HAL.h:26,
                 from Marlin/src/lcd/dogm/../../inc/../HAL/HAL.h:30,
                 from Marlin/src/lcd/dogm/../../inc/MarlinConfig.h:31,
                 from Marlin/src/lcd/dogm/HAL_LCD_class_defines.h:24,
                 from Marlin/src/lcd/dogm/marlinui_DOGM.h:31,
                 from Marlin/src/lcd/dogm/marlinui_DOGM.cpp:42:
/Users/tommaso/.platformio/packages/framework-arduino-avr-mightycore/cores/MightyCore/wiring_extras.h: In function 'void enableSleep()':
/Users/tommaso/.platformio/packages/framework-arduino-avr-mightycore/cores/MightyCore/wiring_extras.h:81:5: error: '_BV' was not declared in this scope
     sleep_enable();
     ^
/Users/tommaso/.platformio/packages/framework-arduino-avr-mightycore/cores/MightyCore/wiring_extras.h: In function 'void disableSleep()':
/Users/tommaso/.platformio/packages/framework-arduino-avr-mightycore/cores/MightyCore/wiring_extras.h:90:5: error: '_BV' was not declared in this scope
     sleep_disable();
     ^
/Users/tommaso/.platformio/packages/framework-arduino-avr-mightycore/cores/MightyCore/wiring_extras.h: In function 'void sleepMode(uint8_t)':
/Users/tommaso/.platformio/packages/framework-arduino-avr-mightycore/cores/MightyCore/wiring_extras.h:102:9: error: '_BV' was not declared in this scope
         set_sleep_mode(SLEEP_MODE_IDLE);
         ^
/Users/tommaso/.platformio/packages/framework-arduino-avr-mightycore/cores/MightyCore/wiring_extras.h:107:9: error: '_BV' was not declared in this scope
         set_sleep_mode(SLEEP_MODE_ADC);
         ^
compilation terminated due to -fmax-errors=5.
*** [.pio/build/melzi/src/src/lcd/dogm/marlinui_DOGM.cpp.o] Error 1
==================================================== [FAILED] Took 76.83 seconds ====================================================

Environment    Status    Duration
-------------  --------  ------------
melzi          FAILED    00:01:16.826
=============================================== 1 failed, 0 succeeded in 00:01:16.826 ===============================================
 
Inviato

Ho fatto un passo avanti ma ancora non ho risolto.

Ho risolto il problema di compilazione eliminando la riga che specifica la board nel file platformio.ini. eliminando la riga in automatico quando compila invece che ATmega1284p viene usato sanguino_atmega1284p. Non so se è corretto per il mio caso ma riesce a compilare correttamente.

A questo punto mi dava comunque un errore di memoria, il nuovo firmware occupa il 100.2% della memoria disponibile. Ho risolto andando a decommentare un'impostazione in configuration.h che fa risparmiare circa 3000 bytes. (disable M503)

Sono quindi riuscito a compilare ed il tutto occupa il 99.5% della memoria!

Ora però quando connetto la stampante al computer per caricare il firmware mi da questo errore:

Checking size .pio/build/melzi/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [===       ]  29.6% (used 4842 bytes from 16384 bytes)
Flash: [==========]  99.5% (used 126314 bytes from 126976 bytes)
Building .pio/build/melzi/firmware.hex
Configuring upload protocol...
AVAILABLE: arduino
CURRENT: upload_protocol = arduino
Looking for upload port...
Auto-detected: /dev/cu.usbserial-1420
Uploading .pio/build/melzi/firmware.hex
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x67
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xea
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x0d
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xd6
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xf6
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x0a
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xd6
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xfe
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x67
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xea

avrdude done.  Thank you.

*** [upload] Error 1
=================================== [FAILED] Took 176.65 seconds ===================================

Environment    Status    Duration
-------------  --------  ------------
melzi          FAILED    00:02:56.650
============================== 1 failed, 0 succeeded in 00:02:56.650 ==============================

 

Inviato

Non ho mai usato vscode con platformio, ma usando l'ide di arduino quell'errore esce quando non c'è comunicazione con la scheda.

In ogni caso, non credo sia bene arrivare al 99.5% di occupazione della memoria... dubito che si reisca ad avere una stabilità nel funzionamento.

  • Soluzione
Inviato
58 minuti fa, TOAD ha scritto:

Ora però quando connetto la stampante al computer per caricare il firmware mi da questo errore:

Mi sembra che tua sia arrivato allo stesso problema mostrato in questo video:

Alla tua scheda potrebbe mancare il bootloader. Se è quello il tuo problema la procedura per caricarlo è un poco complessa, torno a suggerirti di prendere una scheda nuova e tenere quella che hai come riserva.

  • Like 1

Partecipa alla conversazione

Puoi pubblicare ora e registrarti più tardi. Se hai un account, accedi ora per pubblicarlo con il tuo account.

Ospite
Rispondi a questa discussione...

×   Hai incollato il contenuto con la formattazione.   Rimuovere la formattazione

  Sono consentiti solo 75 emoticon max.

×   Il tuo collegamento è stato incorporato automaticamente.   Mostra come un collegamento

×   Il tuo contenuto precedente è stato ripristinato.   Pulisci editor

×   Non puoi incollare le immagini direttamente. Carica o inserisci immagini dall'URL.

×
×
  • Crea Nuovo...