MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.36k stars 19.26k forks source link

Ender 3 V2 - Flashing Firmware - Freezes after boot screen status bar #18675

Closed mjmurray68 closed 4 years ago

mjmurray68 commented 4 years ago

Bug Description

After a successful compilation of firmware, flashing fails after boot screen status bar. Note: First time Ender 3 user, totally possible this is User Error/Process issue

My Configurations

OSX: 10.15.5 Visual Studio Code: 1.47.1 PlatformIO: 4.3.4 Ender 3v2: v1.0.1

Unmodified Configuration files from bugfix-2.0.x for Ender3 v2 platformio.in: modified to build for "STM32F103RET6_creality" board

Required: Please include a ZIP file containing your Configuration.h and Configuration_adv.h files.

Steps to Reproduce

  1. Fork Marlin & Configs
  2. Clone to Github Desktop
  3. Branch to "myEv2"
  4. Copy entire contents from Configurations bugfix2.0.0x Ender-3 V2 directory to Marlin directory
  5. Modify "platformio.ini" for correct board in VSCode.
  6. Compile (clean)
  7. Copy firmware to root of SD card
  8. Insert SD Card, and power on Ender

Expected behavior: [What you expect to happen]

New firmware would be flashed to Ender.

Actual behavior: [What actually happens]

Screen powers on, but remains black as FW is loaded, Splash Screen appears, status bar fills, printer freezes. Configs.zip

Additional Information

thisiskeithb commented 4 years ago

This sounds similar to what another user is experiencing in a previously reported issue: https://github.com/MarlinFirmware/Marlin/issues/18660

mjmurray68 commented 4 years ago

@thisiskeithb I was going to check to see if it was a replication, but you referenced this issue #.

thisiskeithb commented 4 years ago

Oops: https://github.com/MarlinFirmware/Marlin/issues/18660

mjmurray68 commented 4 years ago

I have tried every combination/cycle of flashing, deleting EEPROM.DAT, and rebooting that I can think of. Unlike issue #18660, I am never able to get past the splash screen/progress bar. So while likely related I'm not sure if they're exactly the same.

fleek commented 4 years ago

I was able to get the system to boot in the screen after reverting 7a0af01e692ddcf2ee55800a035c2276c40bee7c. However, the encoder wasn't functioning.

I think it is related to the EEPROM settings #18610

thisiskeithb commented 4 years ago

Take a look at this tweet from @thinkyhead: https://twitter.com/thinkyhead/status/1284171213548531713

Maybe try updating again?

mjmurray68 commented 4 years ago

Thanks everyone. I was waiting on a print to finish, and here's my update:

  1. On my existing branch I reverted 7a0af01, built clean, and flashed. The net result was the same: display freezes after progress bar.
  2. I deleted my branch, and refreshed as of an hour ago, built clean, and flashed. The net result was the same: display freezes after progress bar.
  3. I downloaded the binary from thinkyhead's tweet, and flashed. And it worked perfectly. Note: I refreshed the Creality's official v1.0.1 release between each attempt.

For me it's really about the journey not the destination: I want to successfully build my own branch from scratch, to make sure I have the process nailed down, and then start tweaking things. So while the prebuilt binary works, it's not my end-game, and I'm left wondering if my process is flawed, or if I should just wait on more stable source.

Gurus, should I just close this out?

fleek commented 4 years ago

Same here, I have added a BLTouch sensor and a filament out sensor to the machine and I need to compile from source to enable the functionalities. (BLTouch to 5-pin port and filament sensor to z-min-stop)

Since this branch is broken at this point in time, I guess I would have to tear out the additions and revert to the official firmware.

But hopefully the errors could be remedied soon, I would be glad to help troubleshoot .

Furthermore, the frozen screen doesn't even accept connections to my octopi, so the serial is also not working.

thisiskeithb commented 4 years ago

That’s odd that the precompiled binary works and updating from bugfix/source does not. Those fixes were integrated here about two hours ago, so there shouldn’t be any difference.

mjmurray68 commented 4 years ago

It's likely something with my process then. let me go one step further and nuke everything I have local via GHDesktop and start completely fresh. I'll post back in a few minutes.

thisiskeithb commented 4 years ago

Can you attach the top of your compile output where is shows all the library versions? Either attach it as a text file or use pastebin would work.

fleek commented 4 years ago

I need to check this logic. `#if NO_EEPROM_SELECTED // FLASH //#define FLASH_EEPROM_EMULATION

// I2C

define IIC_BL24CXX_EEPROM // EEPROM on I2C-0 used only for display settings

if ENABLED(IIC_BL24CXX_EEPROM)

#define IIC_EEPROM_SDA                  PA11
#define IIC_EEPROM_SCL                  PA12
//#define MARLIN_EEPROM_SIZE 0x4000           // 16Kb (24c16)

endif

define SDCARD_EEPROM_EMULATION // SD EEPROM until all EEPROM is BL24CXX

define MARLIN_EEPROM_SIZE 0x1000 // 4Kb

// SPI //#define SPI_EEPROM // EEPROM on SPI-0 //#define SPI_CHAN_EEPROM1 ? //#define SPI_EEPROM1_CS ?

// 2K EEPROM //#define SPI_EEPROM2_CS ?

// 32Mb FLASH //#define SPI_FLASH_CS ?

endif`

Where do I need to put the "NO_EEPROM_SELECTED" flag? It is neither in Configuration.h nor Configuration_adv.h

thisiskeithb commented 4 years ago

Where do I need to put the "NO_EEPROM_SELECTED" flag?

You don't. NO_EEPROM_SELECTED is a macro:

https://github.com/MarlinFirmware/Marlin/blob/c2363a81b47a4c5ced63fa0765c67c0a4ccf462f/Marlin/src/inc/Conditionals_adv.h#L366-L369

It'll default to SD card emulation per the CREALITY_V4 pins file.

fleek commented 4 years ago

Can you attach the top of your compile output where is shows all the library versions? Either attach it as a text file or use pastebin would work.

dependencies.txt

I am getting these warning during compile. Compiling .pio\build\STM32F103RET6_creality\lib6a5\FreeRTOS701\utility\queue.c.o C:\users\frank\.platformio\packages\framework-arduinoststm32-maple\STM32F1\libraries\FreeRTOS701\utility\port.c: In function 'xPortStartScheduler': C:\users\frank\.platformio\packages\framework-arduinoststm32-maple\STM32F1\libraries\FreeRTOS701\utility\port.c:178:2: warning: implicit declaration of function 'systick_attach_callback' [-Wimplicit-function-declaration] systick_attach_callback(&xPortSysTickHandler); ^~~~~~~~~~~~~~~~~~~~~~~ At top level: C:\users\frank\.platformio\packages\framework-arduinoststm32-maple\STM32F1\libraries\FreeRTOS701\utility\port.c:285:6: warning: 'prvSetupTimerInterrupt' defined but not used [-Wunused-function] void prvSetupTimerInterrupt( void ) ^~~~~~~~~~~~~~~~~~~~~~

and

Archiving .pio\build\STM32F103RET6_creality\libd8a\libUSBComposite.a C:\users\frank\.platformio\packages\framework-arduinoststm32-maple\STM32F1\libraries\STM32ADC\src\utility\util_adc.c:10:30: warning: 'adc_result' initialized and declared 'extern' extern volatile unsigned int adc_result = 0; ^~~~~~~~~~

thisiskeithb commented 4 years ago

@mjmurray68: I just realized I wasn't replying to you. Please attach the top part of your log output as well.

For good measure, I've compiled the default Ender-3 V2 config firmware on my system: ender-3-v2-7-17-2020.zip & here's the branch, but it's just the default config rebased to the latest code since it was missing REPORT_FAN_CHANGE.

@fleek: Those are just warnings and can be ignored.

mjmurray68 commented 4 years ago

@thisiskeithb after re-building all of my repository forks, clones and branches, I was able to successfully build and flash the generic bugfix-2.0.x code.

For good measure here is the compile header: Processing STM32F103RET6_creality (platform: ststm32@~6.1.0; board: genericSTM32F103RC; framework: arduino)

Verbose mode can be enabled via -v, --verbose option CONFIGURATION: https://docs.platformio.org/page/boards/ststm32/genericSTM32F103RC.html PLATFORM: ST STM32 6.1.1 > STM32F103RC (48k RAM. 256k Flash) HARDWARE: STM32F103RCT6 72MHz, 48KB RAM, 256KB Flash DEBUG: Current (jlink) External (blackmagic, jlink, stlink) PACKAGES:

thisiskeithb commented 4 years ago

So does your Ender-3 V2 behave as expected?

mjmurray68 commented 4 years ago

It does. I'm all set to close, just didn't want to cut off fleek if they were looking for more information.

fleek commented 4 years ago

@mjmurray68 you can close this, sorry for highjacking your thread. I will open up a new issue if I encounter any problems.

mjmurray68 commented 4 years ago

Combination of early release, and timing issues with commits. Thanks to everyone who helped me figure this out!

thinkyhead commented 4 years ago

When Chuck Hellebuyck had this issue, he said he solved it by just renaming the firmware.bin with a unique name. You have to do that with this style of board, because it ignores a file that has the same name as the last-flashed file.

thisiskeithb commented 4 years ago

That’s....different, but good to know.

thinkyhead commented 4 years ago

I've added a README to the example configurations. That should eliminate all support requests for this issue.

github-actions[bot] commented 4 years ago

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.