-
Notifications
You must be signed in to change notification settings - Fork 9
Compile&Flash firmware
2. Download PandaZHU marlin source code this code is based on the marlin2.0.8.
5. Choose the PANDA_ZHU or PANDA_M4 list and click build, then download esp32-hal-uart.c and replace the esp32-hal-uart.c in the following path of your computer,
%HOMEPATH%\.platformio\packages\[email protected]\cores\esp32
or else the esp32 will reboot all the time. if the folder is not exist,please try %HOMEPATH%\.platformio\packages\framework-arduinoespressif32\cores\esp32
Download WebServer.h and replace the WebServer.h in the following path of your computer,
%HOMEPATH%\.platformio\packages\[email protected]\libraries\WebServer\src
if the folder is not exist,please try %HOMEPATH%\.platformio\packages\framework-arduinoespressif32\libraries\WebServer\src
then clean, build again.
Connect pandaZHU or pandaM4 board to your computer with a microusb line,install CH340G USB driver , make sure there is a SD card in the slot(use the sd card detection pin(GPIO2) as firmware Download boot mode) and no serial/uart touch screen connected. Click to upload as shown below.
there is a Webserver program running on ESP32,so you can upload the firmware OTA from wifi.
after booting the esp32 will try to connect to a default SSID first,if it can not connect,it will switch to AP mode(Access Point),so you can scan and find a new wifi server named "MARLIN_ESP",connect to it,then open browser,type in 192.168.0.1, like the picture shown below.
the firmware.bin you builded is normally in the folder Marlin-2.0.x\.pio\build\PANDA_ZHU
or Marlin-2.0.x\.pio\build\PANDA_M4
In the Configuration.h,
If you use PandaLCD touch screen,please uncomment the line
#define DGUS_LCD_UI_FYSETC
of course you need to disable other LCD like comment the REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
For MKS-H43 touch screen,please uncomment the line
#define DGUS_LCD_UI_MKS
by the way,the PandaLCD and MKS-H43 use the same hardware core,so you can flash the MKS-H43 UI file into PandaLCD.
For LCD12864 that is commonly used in the creality printers like ender3/5,CR10... , please uncomment the line
#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
you can goto (https://github.com/luc-github/ESP3DLib) for more about ESP3D.
from the Configuration_adv.h we can know the default wifi SSID and password can be changed in the Configuration_Secure.h
/**
* To set a default WiFi SSID / Password, create a file called Configuration_Secure.h with
* the following defines, customized for your network. This specific file is excluded via
* .gitignore to prevent it from accidentally leaking to the public.
*
* #define WIFI_SSID "WiFi SSID"
* #define WIFI_PWD "WiFi Password"
*/
#include "Configuration_Secure.h" // External file with WiFi SSID / Password
other default Configuration
AP:MARLIN_ESP
PW:12345678
Authentification: WPA
Mode: g (n is not supported by AP, just by STA)
channel: 1
IP: 192.168.0.1
Mask: 255.255.255.0
GW:192.168.0.1
Web port:80
the websocket is web port + 1 => 80+1 : 81
User: admin
Password: admin
User:user
Password: user
FAQ 1: try several times but still can not download firmware,and there are some errors of timeout message in the log?
-
the software driver of CH340 run on PC may not pull download the GPIO0 by the USB line. From the page 10 of ESP32,we can know the GPIO0 should pull-down while in Download Boot mode. you can connect the GPIO0(PWM pin of the BLTOUCH) to the GND pin with one wire.and then download again.after that disconnect the GPIO0.
-
Do not forget to power the board with external power supply,the 5v from the USB can not power the board.
FAQ 2:download firmware successful,but the board is not boot while connect to PC with usb line.
-
replug the usb line and try again.
-
Insert a SD card.
FAQ 3: Compile error: ESP3DLib / src / espcom.cpp: 31: 26: fatal error: U8glib-HAL.h: No such file or directory
- we can fixed it by disable 2 lines in the .pio\libdeps\PANDA_M4\ESP3DLib\src\espcom.cpp or .pio\libdeps\PANDA_ZHU\ESP3DLib\src\espcom.cpp
-
#include <U8glib-HAL.h>
to//#include <U8glib-HAL.h>
-
SERIAL_ECHOLNPGM("", data);
to//SERIAL_ECHOLNPGM("", data);