Closed stickmansam4 closed 9 months ago
Thanks, that issue was reported first here: https://github.com/mriscoc/Ender3V2S1/discussions/1164#discussioncomment-7805341
Indeed the current sources and precompiled firmware for the F4 202312XX version have a bug that prevents to reboot. Unfortunately I don't have that board for do the proper debug. I suspect about the CRC corruption in settings.cpp.
I need the debugging information sent by the printer to a serial console when the printer reboots.
Ok I will try to get that info tonight.
I tried several configurations and even manually disabled the items you mentioned in your post to reduce program size but still gets the same result.
Last time I hooked the serial console up during boot it read back mostly garbage characters but eventually I started to see repeating "SD bootloader" and then the name of the bin file over and over.
That was using baud 115200, all other baudrates were illegible.
Thanks, try with the baud rate in 250000
I have experienced this same or a similar issue with my F4 S1, when trying to load a custom-compiled professional firmware from SD card the printer is stuck on the "wait for reboot" screen and stays like this until another firmware is flashed. When connected to a host (pronterface at 250000 baud), this is the output I received:
Marlin ProUI Version: 2.1.3 MRiscoC CUSTOM BUILD: 20231214 - 13:42 Author: Miguel Risco-Castillo (MRiscoC) echo: Free Memory: 42351 PlannerBufferBytes: 1728 Warning:EEPROM CRC mismatch - (stored) 62963 != 64046 (calculated)! //action:notification Err: EEPROM CRC //action:notification Hardcoded Default Settings Loaded echo:Hardcoded Default Settings Loaded echo:Settings Stored (1065 bytes; crc 62963) //action:notification Settings Stored echo:EEPROM Initialized Got rubbish reply from COM3 at baudrate 250000: Maybe a bad baudrate? Software Reset
This repeated until the printer was turned off, and rebooting even without the SD card inserted produced the same output.
By disabling EEPROM_AUTO_INIT and EEPROM_INIT_NOW and adding DEBUG_EEPROM_READWRITE in Configuration.h and recompiling I was able to get the custom firmware to boot, though it would give the message "Error: EEPROM CRC" on the printer screen at startup and when rebooted would discard any saved settings. Sometimes a message with "EEPROM Size" would show on the printer screen as well.
Thanks, that confirms my suspicions, CRC was corrupt. So, a firmware where CRC is tested at different places is needed to discover where it is being corrupted, please enable DEBUG_EEPROM_READWRITE and paste here the serial console results.
Just got home and tried it as well looks like i got the same thing. # Marlin ProUI Version: 2.1.3 MRiscoC CUSTOM BUILD: 20231218 - 20:18 Author: Miguel Risco-Castillo (MRiscoC) echo: Free Memory: 53711 PlannerBufferBytes: 1856 Warning:EEPROM CRC mismatch - (stored) 31692 != 34548 (calculated)! //action:notification Err: EEPROM CRC //action:notification Hardcoded Default Settings Loaded echo:Hardcoded Default Settings Loaded echo:Settings Stored (1050 bytes; crc 31692) //action:notification Settings Stored echo:EEPROM Initialized #
Here is the output I received when DEBUG_EEPROM_READWRITE was enabled and EEPROM_BOOT_SILENT was disabled:
External Reset Marlin ProUI Version: 2.1.3 MRiscoC CUSTOM BUILD: 20231219 - 21:47 Author: Miguel Risco-Castillo (MRiscoC) echo: Free Memory: 54431 PlannerBufferBytes: 1536 echo:EEPROM version mismatch (EEPROM=V89 Marlin=P89) //action:notification Hardcoded Default Settings Loaded echo:Hardcoded Default Settings Loaded Field: proui_data Field: e_factors Field: home_offset Field: runout_sensor_enabled Field: planner_autotemp_max Field: probe_offset Field: planner_leveling_active Field: servo_angles Field: bltouch_od_5v_mode Field: bltouch_high_speed_mode Field: ui_material_preset Field: hotendPID Field: lpq_len Field: bedPID Field: chamberPID Field: power_monitor_flags Field: lcd_contrast Field: lcd_brightness Field: controllerFan_settings Field: recovery_enabled Field: fwretract_settings Field: parser_volumetric_enabled Field: tmc_stepper_current Field: tmc_hybrid_threshold Field: tmc_stealth_enabled Field: planner_extruder_advance_K Field: motor_current_setting Field: coordinate_system Field: fc_settings Field: backlash_distance_mm Field: dwin_data echo:Settings Stored (1049 bytes; crc 7352) //action:notification Settings Stored echo:EEPROM Initialized Got rubbish reply from COM3 at baudrate 250000: Maybe a bad baudrate? Software Reset Marlin ProUI Version: 2.1.3 MRiscoC CUSTOM BUILD: 20231219 - 21:47 Author: Miguel Risco-Castillo (MRiscoC) echo: Free Memory: 54431 PlannerBufferBytes: 1536 Field: proui_data Field: e_factors Field: home_offset Field: runout_sensor_enabled Field: probe_offset Field: planner_leveling_active Field: servo_angles Field: bltouch_od_5v_mode Field: bltouch_high_speed_mode Field: ui_material_preset Field: lpq_len Field: power_monitor_flags Field: lcd_contrast Field: lcd_brightness Field: controllerFan_settings Field: recovery_enabled Field: fwretract_settings Field: parser_volumetric_enabled Field: tmc_stepper_current Field: tmc_hybrid_threshold Field: tmc_sgt Field: tmc_stealth_enabled Field: planner_extruder_advance_K Field: motor_current_setting Field: coordinate_system Field: fc_settings Field: backlash_distance_mm Field: dwin_data Warning:EEPROM CRC mismatch - (stored) 7352 != 10178 (calculated)! //action:notification Err: EEPROM CRC //action:notification Hardcoded Default Settings Loaded echo:Hardcoded Default Settings Loaded Field: proui_data Field: e_factors Field: home_offset Field: runout_sensor_enabled Field: planner_autotemp_max Field: probe_offset Field: planner_leveling_active Field: servo_angles Field: bltouch_od_5v_mode Field: bltouch_high_speed_mode Field: ui_material_preset Field: hotendPID Field: lpq_len Field: bedPID Field: chamberPID Field: power_monitor_flags Field: lcd_contrast Field: lcd_brightness Field: controllerFan_settings Field: recovery_enabled Field: fwretract_settings Field: parser_volumetric_enabled Field: tmc_stepper_current Field: tmc_hybrid_threshold Field: tmc_stealth_enabled Field: planner_extruder_advance_K Field: motor_current_setting Field: coordinate_system Field: fc_settings Field: backlash_distance_mm Field: dwin_data echo:Settings Stored (1049 bytes; crc 7352) //action:notification Settings Stored echo:EEPROM Initialized Got rubbish reply from COM3 at baudrate 250000: Maybe a bad baudrate? Software Reset
When EEPROM_AUTO_INIT and EEPROM_INIT_NOW were disabled, this is what I got on boot:
External Reset Marlin ProUI Version: 2.1.3 MRiscoC CUSTOM BUILD: 20231219 - 22:00 Author: Miguel Risco-Castillo (MRiscoC) echo: Free Memory: 54431 PlannerBufferBytes: 1536 Warning:EEPROM datasize error. echo:Index: 8 Size: 1045 //action:notification Err: EEPROM Size //action:notification Hardcoded Default Settings Loaded echo:Hardcoded Default Settings Loaded //action:prompt_end BL24CXX Check succeeded! echo:SD card ok Printer is now online.
I then clicked the "Store Settings" option on the printer, which slowly output these:
Field: proui_data Field: e_factors Field: home_offset Field: runout_sensor_enabled Field: planner_autotemp_max Field: probe_offset Field: planner_leveling_active Field: servo_angles Field: bltouch_od_5v_mode Field: bltouch_high_speed_mode Field: ui_material_preset Field: hotendPID Field: lpq_len Field: bedPID Field: chamberPID Field: power_monitor_flags Field: lcd_contrast Field: lcd_brightness Field: controllerFan_settings Field: recovery_enabled Field: fwretract_settings Field: parser_volumetric_enabled Field: tmc_stepper_current Field: tmc_hybrid_threshold Field: tmc_stealth_enabled Field: planner_extruder_advance_K Field: motor_current_setting Field: coordinate_system Field: fc_settings Field: backlash_distance_mm Field: dwin_data Got rubbish reply from COM3 at baudrate 250000: Maybe a bad baudrate?
At this point the printer froze and quickly rebooted. When the reboot finished, Err: EEPROM Version showed on the printer's status bar. On subsequent reboots this does not happen when saving settings, though settings are still not saved when turning the printer off and on.
On subsequent reboots this does not happen when saving settings, though settings are still not saved when turning the printer off and on.
echo:EEPROM version mismatch (EEPROM=V89 Marlin=P89)
that is also something I have experience. but only using Bilinear_auto_bed_leveling where it wouldn't save the mesh
It looks like the problems are with these settings: motor_current_setting tmc_sgt
Quick fix: comment out everything about these settings in Marlin\src\module\settings.cpp Also define new eeprom structure vesion here:
change to
It looks like the problems are with these settings: motor_current_setting tmc_sgt
Quick fix: comment out everything about these settings in Marlin\src\module\settings.cpp Also define new eeprom structure vesion here: #define EEPROM_VERSION "P89" change to #define EEPROM_VERSION "P90"
Thanks for your findings, but I can't understand why F4 UBL version doesn't suffer of bootloops. Trying to give more details, if follow your steps. there isn't a bootloop, but ¿are the settings saved and loaded correctly?
I made the changes suggested by @Arturchik29, commenting out all instances of motor_current_setting and tmc_sgt in settings.cpp, as well as changing the EEPROM version to P90. At least in my case, the printer was able to save and load settings on reboot when I made these changes to my custom firmware build. I also tried only changing the EEPROM version, but it went back to bootlooping as usual, so there appears to be something wrong with motor_current_setting and tmc_sgt being present in settings.cpp.
Thanks for your findings, but I can't understand why F4 UBL version doesn't suffer of bootloops
This simple configuration will not compile due to flash overflow. Could this be due to differences in dependency library versions? Build log:
Processing STM32F401RC_creality (board: genericSTM32F401RC; platform: ststm32@~12.1; framework: arduino)
--------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
Processing Professional Firmware requirements
STM32F4 Architecture detected
DWIN UI detected
Unified Mesh Bed Leveling detected
ProUI detected
Copying variant MARLIN_CREALITY_STM32F401 to framework directory...
CONFIGURATION: https://docs.platformio.org/page/boards/ststm32/genericSTM32F401RC.html
PLATFORM: ST STM32 (12.1.1) > STM32F401RC (64k RAM. 256k Flash)
HARDWARE: STM32F401RC 84MHz, 64KB RAM, 256KB Flash
DEBUG: Current (blackmagic) External (blackmagic, jlink, stlink)
PACKAGES:
- framework-arduinoststm32 @ 4.10900.200819 (1.9.0)
- framework-cmsis @ 2.50501.200527 (5.5.1)
- toolchain-gccarmnoneeabi @ 1.90201.191206 (9.2.1)
Converting Marlin.ino
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 10 compatible libraries
Scanning dependencies...
Dependency Graph
|-- IWatchdog @ 1.0.0
|-- SPI @ 1.0
|-- EEPROM @ 2.0.1
|-- SoftwareSerial @ 1.0
|-- Wire @ 1.0
|-- Servo @ 1.1.2
Building in release mode
Compiling .pio\build\STM32F401RC_creality\src\src\HAL\STM32\HAL.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\HAL\STM32\HAL_SPI.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\HAL\STM32\MarlinSPI.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\HAL\STM32\MarlinSerial.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\HAL\STM32\MinSerial.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\HAL\STM32\Servo.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\HAL\STM32\eeprom_bl24cxx.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\HAL\STM32\eeprom_flash.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\HAL\STM32\eeprom_if_iic.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\HAL\STM32\eeprom_sdcard.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\HAL\STM32\eeprom_sram.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\HAL\STM32\eeprom_wired.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\HAL\STM32\fast_pwm.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\HAL\STM32\fastio.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\HAL\STM32\msc_sd.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\HAL\STM32\sdio.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\HAL\STM32\timers.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\HAL\STM32\usb_host.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\HAL\STM32\usb_serial.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\HAL\shared\Delay.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\HAL\shared\HAL.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\HAL\shared\MinSerial.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\HAL\shared\backtrace\backtrace.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\HAL\shared\backtrace\unwmemaccess.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\HAL\shared\eeprom_api.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\HAL\shared\esp_wifi.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\HAL\shared\servo.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\MarlinCore.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\core\serial.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\core\utility.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\feature\babystep.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\feature\bedlevel\bedlevel.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\feature\bedlevel\bedlevel_tools.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\feature\bedlevel\ubl\ubl.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\feature\bedlevel\ubl\ubl_G29.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\feature\bedlevel\ubl\ubl_motion.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\feature\bltouch.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\feature\cancel_object.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\feature\e_parser.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\feature\fwretract.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\feature\host_actions.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\feature\hotend_idle.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\feature\pause.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\feature\powerloss.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\feature\runout.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\bedlevel\G42.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\bedlevel\M420.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\bedlevel\ubl\G29.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\bedlevel\ubl\M421.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\calibrate\G28.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\calibrate\M48.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\config\M200-M205.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\config\M220.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\config\M221.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\config\M301.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\config\M302.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\config\M304.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\config\M575.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\config\M92.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\control\M111.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\control\M120_M121.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\control\M17_M18_M84.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\control\M211.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\control\M280.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\control\M80_M81.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\control\M85.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\control\M997.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\control\M999.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\control\T.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\eeprom\M500-M504.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\feature\cancel\M486.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\feature\fwretract\G10_G11.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\feature\fwretract\M207-M209.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\feature\pause\G27.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\feature\pause\M125.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\feature\pause\M600.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\feature\pause\M603.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\feature\pause\M701_M702.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\feature\powerloss\M1000.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\feature\powerloss\M413.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\feature\runout\M412.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\gcode.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\gcode_d.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\geometry\G92.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\host\M110.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\host\M113.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\host\M114.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\host\M115.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\host\M118.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\host\M119.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\lcd\M0_M1.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\lcd\M117.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\lcd\M145.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\lcd\M255.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\lcd\M256.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\lcd\M300.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\lcd\M73.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\motion\G0_G1.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\motion\G2_G3.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\motion\G4.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\motion\M290.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\motion\M400.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\ota\M936.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\parser.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\probe\G30.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\probe\M401_M402.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\probe\M851.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\queue.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\sd\M1001.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\sd\M20.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\sd\M21_M22.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\sd\M23.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\sd\M24_M25.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\sd\M26.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\sd\M27.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\sd\M28_M29.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\sd\M30.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\sd\M32.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\sd\M33.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\sd\M34.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\sd\M524.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\sd\M808.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\sd\M928.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\stats\M31.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\stats\M75-M78.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\stats\M79.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\temp\M104_M109.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\temp\M105.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\temp\M106_M107.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\temp\M140_M190.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\temp\M155.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\temp\M303.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\temp\M86-M87.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\gcode\units\M82_M83.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\inc\Warnings.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\lcd\e3v2\common\dwin_api.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\lcd\e3v2\common\encoder.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\lcd\e3v2\proui\bed_tramming.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\lcd\e3v2\proui\dwin.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\lcd\e3v2\proui\dwin_lcd.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\lcd\e3v2\proui\dwin_popup.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\lcd\e3v2\proui\dwinui.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\lcd\e3v2\proui\endstop_diag.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\lcd\e3v2\proui\lockscreen.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\lcd\e3v2\proui\meshviewer.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\lcd\e3v2\proui\plot.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\lcd\e3v2\proui\printstats.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\lcd\e3v2\proui\toolbar.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\lcd\marlinui.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\lcd\utf8.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\libs\BL24CXX.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\libs\buzzer.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\libs\hex_print.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\libs\least_squares_fit.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\libs\nozzle.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\libs\numtostr.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\libs\stopwatch.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\libs\vector_3.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\module\endstops.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\module\motion.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\module\planner.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\module\printcounter.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\module\probe.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\module\servo.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\module\settings.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\module\stepper.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\module\stepper\indirection.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\module\temperature.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\module\tool_change.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\prouiex\custom_gcodes.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\sd\Sd2Card.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\sd\SdBaseFile.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\sd\SdFatUtil.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\sd\SdFile.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\sd\SdVolume.cpp.o
Compiling .pio\build\STM32F401RC_creality\src\src\sd\cardreader.cpp.o
Linking .pio\build\STM32F401RC_creality\firmware.elf
c:/users/workbench/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: .pio/build/STM32F401RC_creality/firmware.elf section `.rodata' will not fit in region `FLASH'
c:/users/workbench/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: region `FLASH' overflowed by 9948 bytes
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\STM32F401RC_creality\firmware.elf] Error 1
============================================================= [FAILED] Took 183.45 seconds =============================================================
are the settings saved and loaded correctly?
yes
Please test it:
[firmware-20231224-140101.zip]()
Please test it:
Bootloop. Console output:
Software Reset
Marlin ProUI Version: 2.1.3 MRiscoC
OFFICIAL BUILD: 20231224 - 14:00
Author: Miguel Risco-Castillo (MRiscoC)
echo: Free Memory: 53711 PlannerBufferBytes: 1856
Warning:EEPROM CRC mismatch - (stored) 46634 != 54985 (calculated)!
//action:notification Err: EEPROM CRC
//action:notification Hardcoded Default Settings Loaded
echo:Hardcoded Default Settings Loaded
echo:Settings Stored (823 bytes; crc 46634)
//action:notification Settings Stored
echo:EEPROM Initialized
▒▒▒▒▒▒x`▒▒▒▒▒▒▒▒怘▒x~▒▒▒▒▒▒▒▒▒▒~▒▒▒f▒▒▒▒▒f▒▒▒▒▒▒▒▒▒▒8▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒~▒~▒~~~▒▒▒▒▒x▒▒~▒▒▒▒x▒▒▒▒▒▒▒▒`▒`▒`▒▒▒▒▒>▒▒▒~▒x怘怘▒▒▒▒▒▒▒▒▒▒▒▒▒▒>▒▒▒~▒▒start
Bootloop. Console output:
Thanks, so I can't replicate the successful of here https://github.com/mriscoc/Ender3V2S1/issues/1180#issuecomment-1867081306
Maybe the bug is feature dependent and moves according to the use of the used EEPROM space
It looks like something happened with the bootloader. I cant reflash to custom build or stock firmware. It's always "OFFICIAL BUILD: 20231224 - 14:00" There is also an empty DWIN_SET folder in STM32F4_UPDATE. Never seen this before. It is now created by the bootloader every time on strartup if STM32F4_UPDATE exists
It looks like something happened with the bootloader. I cant reflash to custom build or stock firmware. It's always "OFFICIAL BUILD: 20231224 - 14:00" There is also an empty DWIN_SET folder in STM32F4_UPDATE. Never seen this before. It is now created by the bootloader every time on strartup if STM32F4_UPDATE exists
Try with another SD card, format it.
This simple configuration will not compile due to flash overflow. Could this be due to differences in dependency library versions? Build log:
I think that was covered in another issue, it is a matter of lack of program memory in the STM32F4xxx SoC.
This firmware build should help us to know where the CRC was corrupted, please log the error messages for EEPROM read and EEPROM write without change any settings.
[Ender3S1-F4-DEBUG-20240108.zip]()
This firmware build should help us to know where the CRC was corrupted, please log the error messages for EEPROM read and EEPROM write without change any settings.
[Ender3S1-F4-DEBUG-20240108.zip]()
After this firmware i cant flash to custom build or stock firmware. Always OFFICIAL BUILD: 20240108 - 14:18. Reflash only after bootloader flash.
External Reset
Marlin ProUI Version: 2.1.3 MRiscoC
OFFICIAL BUILD: 20240108 - 14:18
Author: Miguel Risco-Castillo (MRiscoC)
echo: Free Memory: 53719 PlannerBufferBytes: 1856
READ: stored_ver CRC: 18057
READ: stored_hash CRC: 32557
READ: stored_crc CRC: 5859
READ: stored_size CRC: 44129
READ: meshSet CRC: 9031
Field: proui_data
READ: proui_data CRC: 29806
READ: meshViewer.meshmode CRC: 16434
Field: e_factors
READ: e_factors CRC: 27365
READ: (uint8_t *)tmp1 CRC: 41944
READ: planner.settings.min_segment_time_us CRC: 35965
READ: (uint8_t *)tmp2 CRC: 63355
READ: (uint8_t *)tmp3 CRC: 59653
READ: planner.settings.acceleration CRC: 6336
READ: planner.settings.retract_acceleration CRC: 13494
READ: planner.settings.travel_acceleration CRC: 17813
READ: planner.settings.min_feedrate_mm_s CRC: 16656
READ: planner.settings.min_travel_feedrate_mm_s CRC: 23371
READ: planner.max_jerk CRC: 23743
READ: dummyf CRC: 57242
Field: runout_sensor_enabled
READ: runout_sensor_enabled CRC: 41106
READ: runout_distance_mm CRC: 237
READ: new_z_fade_height CRC: 48227
READ: planner.autotemp.max CRC: 64431
READ: planner.autotemp.min CRC: 63611
READ: planner.autotemp.factor CRC: 24324
Field: probe_offset
READ: zpo CRC: 53067
READ: grid_max_x CRC: 62090
READ: grid_max_y CRC: 54388
READ: grid_check CRC: 36584
READ: spacing CRC: 59614
READ: start CRC: 7429
READ: bedlevel.z_values CRC: 59994
Field: bltouch_od_5v_mode
READ: bltouch_od_5v_mode CRC: 1636
Field: bltouch_high_speed_mode
READ: bltouch_high_speed_mode CRC: 5351
Field: ui_material_preset
READ: ui.material_preset CRC: 45534
READ: pidcf CRC: 22774
Field: lpq_len
READ: lpq_len CRC: 51064
READ: pid CRC: 62587
Field: lcd_brightness
READ: lcd_brightness CRC: 23523
READ: ui.backlight_timeout_minutes CRC: 22587
Field: recovery_enabled
READ: recovery_enabled CRC: 57597
Field: fwretract_settings
READ: fwretract_settings CRC: 63582
READ: autoretract_enabled CRC: 12311
Field: parser_volumetric_enabled
READ: storage CRC: 60545
Field: coordinate_system
Field: fc_settings
READ: fc_settings CRC: 34157
Field: dwin_data
READ: dwin_data CRC: 24735
Field: sound_on
READ: ui.sound_on CRC: 58247
READ: hotend_idle.cfg CRC: 47205
Warning:EEPROM CRC mismatch - (stored) 55430 != 47205 (calculated)!
//action:notification Err: EEPROM CRC
//action:notification Hardcoded Default Settings Loaded
echo:Hardcoded Default Settings Loaded
WRITE: ver CRC: 35498
WRITE: data_size CRC: 44129
WRITE: meshSet CRC: 9031
Field: proui_data
WRITE: proui_data CRC: 29806
WRITE: meshViewer.meshmode CRC: 16434
Field: e_factors
WRITE: e_factors CRC: 27365
WRITE: planner.settings CRC: 23371
WRITE: planner.max_jerk CRC: 23743
WRITE: dummyf CRC: 57242
Field: runout_sensor_enabled
WRITE: runout_sensor_enabled CRC: 41106
WRITE: runout_distance_mm CRC: 237
WRITE: zfh CRC: 48227
Field: planner_autotemp_max
WRITE: planner.autotemp.max CRC: 64431
WRITE: planner.autotemp.min CRC: 63611
WRITE: planner.autotemp.factor CRC: 24324
Field: probe_offset
WRITE: zpo CRC: 53067
WRITE: grid_max_x CRC: 62090
WRITE: grid_max_y CRC: 54388
WRITE: grid_check CRC: 36584
WRITE: bedlevel.grid_spacing CRC: 59614
WRITE: bedlevel.grid_start CRC: 7429
WRITE: bedlevel.z_values CRC: 59994
Field: bltouch_od_5v_mode
WRITE: bltouch_od_5v_mode CRC: 1636
Field: bltouch_high_speed_mode
WRITE: bltouch_high_speed_mode CRC: 5351
Field: ui_material_preset
WRITE: ui.material_preset CRC: 45534
Field: hotendPID
WRITE: pidcf CRC: 22774
Field: lpq_len
WRITE: lpq_len CRC: 51064
Field: bedPID
WRITE: bed_pid CRC: 62587
Field: lcd_brightness
WRITE: lcd_brightness CRC: 23523
WRITE: ui.backlight_timeout_minutes CRC: 22587
Field: recovery_enabled
WRITE: recovery_enabled CRC: 57597
Field: fwretract_settings
WRITE: fwretract.settings CRC: 63582
WRITE: autoretract_enabled CRC: 12311
Field: parser_volumetric_enabled
WRITE: parser.volumetric_enabled CRC: 8531
WRITE: planner.filament_size CRC: 37226
WRITE: dummyf CRC: 60545
Field: coordinate_system
Field: fc_settings
WRITE: fc_settings CRC: 34157
Field: dwin_data
WRITE: dwin_data CRC: 24735
WRITE: ui.sound_on CRC: 58247
WRITE: hotend_idle.cfg CRC: 55430
WRITE: version CRC: 58035
WRITE: build_hash CRC: 24014
WRITE: final_crc CRC: 47914
echo:Settings Stored (823 bytes; crc 55430)
//action:notification Settings Stored
echo:EEPROM Initialized
//action:prompt_end
BL24CXX Check succeeded!
echo:SD card ok
Excellent:
READ: hotend_idle.cfg CRC: 47205
WRITE: hotend_idle.cfg CRC: 55430
So, now I need to analyze why the CRC is different.
Any update to this? i suspect im running into the same issue with my compiled build but am not tech savvy enough to be useful for debugging
It looks like something happened with the bootloader. I cant reflash to custom build or stock firmware. It's always "OFFICIAL BUILD: 20231224 - 14:00" There is also an empty DWIN_SET folder in STM32F4_UPDATE. Never seen this before. It is now created by the bootloader every time on strartup if STM32F4_UPDATE exists
i am also unable to reflash after using this firmware
@dmenzie unfortunately, I my case the only thing what can help is reflashing with ST-Link. The bootloader area seems to be overwritten after flashing. Do you need help with this?
Excellent:
READ: hotend_idle.cfg CRC: 47205 WRITE: hotend_idle.cfg CRC: 55430
So, now I need to analyze why the CRC is different.
Can you upload your test builds for my configuration?
Previous builds cause to bootloader corruption and I don't know why. Can this be due to the display version (my display TJC) Can you share the start of your build output log? There are lot of differences between my build and yours. For example if I set UBL check in configurator, firmware wont compile at all (even if no features selected). Let's make shure we use the same libs. It may help solve the issue:
Processing STM32F401RC_creality (board: genericSTM32F401RC; platform: ststm32@~12.1; framework: arduino)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
Processing Professional Firmware requirements
STM32F4 Architecture detected
DWIN UI detected
Auto Mesh Bed Leveling detected
ProUI detected
Copying variant MARLIN_CREALITY_STM32F401 to framework directory...
CONFIGURATION: https://docs.platformio.org/page/boards/ststm32/genericSTM32F401RC.html
PLATFORM: ST STM32 (12.1.1) > STM32F401RC (64k RAM. 256k Flash)
HARDWARE: STM32F401RC 84MHz, 64KB RAM, 256KB Flash
DEBUG: Current (blackmagic) External (blackmagic, jlink, stlink)
PACKAGES:
- framework-arduinoststm32 @ 4.10900.200819 (1.9.0)
- framework-cmsis @ 2.50501.200527 (5.5.1)
- toolchain-gccarmnoneeabi @ 1.90201.191206 (9.2.1)
Converting Marlin.ino
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 10 compatible libraries
Scanning dependencies...
Dependency Graph
|-- IWatchdog @ 1.0.0
|-- SPI @ 1.0
|-- EEPROM @ 2.0.1
|-- SoftwareSerial @ 1.0
|-- Wire @ 1.0
|-- Servo @ 1.1.2
Building in release mode
@Arturchik29 that is a different issue already answered, check the issue history.
@Arturchik29 yes please, any advice/guidance would be appreciated. I have an ST-link clone and/or an Arduino to get it done, but am unfamiliar with programming microcontrollers, id assume the process is similar to an older ender 3 (which I can find video documentation on how to do), but am unsure if there is anything specific to the stm32f4 boards that I need to be aware of
Issue solved!, We just found that Creality implemented some kind of flag zone in the EEPROM for the Ender3S1 F4 bootloader, if that zone is written with non 0 values the bootloader refuses to flash a new firmware.
That solves the mystery of why that printer sometimes refuses to update new firmware and only can be solved by using a ST-link device, also that solves the mystery about the CRC EEPROM corruption
That also means we have even less space to work with. 😮💨
That also means we have even less space to work with. 😮💨
it is not a problem with the flash program memory is a matter of EEPROM memory
With the new per-slot ABL 2.0 settings, are we at any risk of filling it up?
With the new per-slot ABL 2.0 settings, are we at any risk of filling it up?
UBL has its own EEPROM zone out of that flag zone. But normal firmware without UBL is affected. Ok that mystery also was solved.
And we don't have room for UBL in the CVLM firmware without some other major sacrifice, correct?
And we don't have room for UBL in the CVLM firmware without some other major sacrifice, correct?
But don't worry, the solution is on the way, we are trying it here: https://t.me/ender3v2s1firmware/66444 of course if more people test the fixes we will able to release it soon.
I could perhaps give it a try this evening.
A PR https://github.com/MarlinFirmware/Marlin/pull/26729 was posted in Marlin repository which solves this issue.
Seems to be resolved in the latest sources.
For people with an Ender3S1F4 printer which refuses to flash new firmware, @trotus47 has prepared a G-code file which could help with the flash process, simply put the new firmware (in the folder STM32F4_UPDATE), this file in the SD card and select and click on it in the Media menu, then reboot the printer.
; Professional Firmware Configuration File
;=====================================================
C10 ; Mark as a configuration file
M117 Applying configuration
;-----------------------------------------------------
M86 S0 T3 E0 B0 ; Reset flag zone
M500 ; Save all settings
;-----------------------------------------------------
G4 S1 ; Wait a second
M300 P200 ; Beep
M117 Configuration Applied
;-----------------------------------------------------
For people with an Ender3S1F4 printer which refuses to flash new firmware, @trotus47 has prepared a G-code file which could help with the flash process, simply put the new firmware (in the folder STM32F4_UPDATE), this file in the SD card and select and click on it in the Media menu, then reboot the printer.
; Professional Firmware Configuration File ;===================================================== C10 ; Mark as a configuration file M117 Applying configuration ;----------------------------------------------------- M86 S0 T3 E0 B0 ; Reset flag zone M500 ; Save all settings ;----------------------------------------------------- G4 S1 ; Wait a second M300 P200 ; Beep M117 Configuration Applied ;-----------------------------------------------------
- The compiled firmware from the updated released branch, with Fix Ender-3 S1F4 EEPROM exclusion zone, still doesn't work
None of the S1 F4? or an specific bin file?
- The compiled firmware from the updated released branch, with Fix Ender-3 S1F4 EEPROM exclusion zone, still doesn't work
None of the S1 F4? or an specific bin file?
I was following the topic, meaning that compiling from scratch the firmware with the "Fix Ender-3 S1F4 EEPROM exclusion zone" won't work. To fix properly the EEPROM exclusion zone, I had to #define EEPROM_EXCL_ZONE 915,926 [was 916]
In our test board the 916 was the start of the EEPROM exclusion zone that was checked doing a EEPROM dump. If the zone is filled with 0xFF values, the boot loader changes it when the printer is rebooted:
0370: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
0380: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
0390: FF FF FF FF 00 FF FF FF FF FF FF FF FF 66 FF FF
03A0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
03B0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
So maybe the zone changes depending on the bootloader version installed in the printer board. If more reports are obtained, the exclusion zone will have to be expanded.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Did you test with a precompiled firmware?
Yes, problem fixed. printer boots fine.
Bug Description
When compiling MRISCO Source from scratch, causes Ender 3 S1 to soft brick and bootloop.
However if i load the precompiled binary file from GIT repo "Ender3S1-F4-UBL-20231214.bin" it boots just fine.
Alternatively if i compile creality stock firmware from GIT using marlin vers 2.0.8.3 that also boots OK.
Bug Timeline
New, 2023 Release
Expected behavior
I expect the newly complied binary to boot successfully just the same as the precompiled binary provided from GIT
Actual behavior
printer hangs on Creality splash screen and seems to bootloop when viewing the COM port.
Steps to Reproduce
1) Unpack MRISCO Source from GIT "Ender3V2S1-Ender3V2S1-Released.zip" 2) Unpack MRISCO Configurations from GIT "Special_Configurations-main.zip" 3) Using IDLE, run "Configurator.pyw" 4) Select Ender 3 S1 stock settings shown attached PNG 5) Generate Files, and move to .../src/Marlin/ 6) moved platformio.ini to .../src/ 7) Execute Build "STM32F401RC (256K)" 8) Create "SMT32F4_UPDATE" folder on root of SDCARD and copy .bin file into that folder. 9) insert into printer and power on.
Version of Professional Firmware
2.1.3
Printer model
Creality Ender 3 S1, F4
Electronics
STM23F401RC
LCD/Controller
DWIN
Other add-ons
No response
Bed Leveling
ABL Bilinear mesh
Your Slicer
Cura
Host Software
OctoPrint
Additional information & file uploads
BuildLog.txt