m5stack / M5Paper_FactoryTest

MIT License
90 stars 75 forks source link

Cannot compile under macOs #15

Closed SomeoneToIgnore closed 1 year ago

SomeoneToIgnore commented 1 year ago

Seems that a package is missing:

 *  Executing task: platformio run 

Processing m5stack-fire (platform: espressif32@^4.1.0; board: m5stack-fire; framework: arduino)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Platform Manager: Installing espressif32 @ ^4.1.0
Unpacking  [####################################]  100%
Platform Manager: espressif32@4.4.0 has been installed!
Tool Manager: Installing platformio/framework-arduinoespressif32 @ 3.20004.220825
Error: Could not find the package with 'platformio/framework-arduinoespressif32 @ 3.20004.220825' requirements for your system 'darwin_arm64'

 *  The terminal process "platformio 'run'" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 

When I use

platform_packages = 
    framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git

instead, it compiles successfully, but fails to start, bootlooping. Here's the end of the "Upload and Monitor" task output:

Wrote 2219328 bytes (783063 compressed) at 0x00010000 in 20.2 seconds (effective 879.2 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
======================================================================= [SUCCESS] Took 28.30 seconds =======================================================================
--- Terminal on /dev/cu.wchusbserial537A0108211 | 115200 8-N-1
--- Available filters and text transformations: colorize, debug, default, direct, esp32_exception_decoder, hexlify, log2file, nocontrol, printable, send_on_enter, time
--- More details at https://bit.ly/pio-monitor-filters
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H
[     7][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz, APB: 80000000 Hz
[   456][I][esp32-hal-psram.c:96] psramInit(): PSRAM enabled
M5EPD initializing...[  2643][D][M5EPD_Driver.cpp:68] begin(): Init SUCCESS.
[  3270][E][esp32-hal-cpu.c:110] addApbChangeCallback(): duplicate func=0x400fd7a8 arg=0x3ffbde2c
[  3416][W][sd_diskio.cpp:516] ff_sd_initialize(): GO_IDLE_STATE failed
[  3417][E][sd_diskio.cpp:802] sdcard_mount(): f_mount failed: (3) The physical drive cannot work
[  3427][D][GT911.cpp:35] begin(): GT911: Initialization
[  3427][I][esp32-hal-i2c.c:75] i2cInit(): Initialising I2C Master: sda=21 scl=22 freq=100000
[     7][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz, APB: 80000000 Hz
[   456][I][esp32-hal-psram.c:96] psramInit(): PSRAM enabled
M5EPD initializing...[  2643][D][M5EPD_Driver.cpp:68] begin(): Init SUCCESS.
[  3270][E][esp32-hal-cpu.c:110] addApbChangeCallback(): duplicate func=0x400fd7a8 arg=0x3ffbde2c
[  3416][W][sd_diskio.cpp:516] ff_sd_initialize(): GO_IDLE_STATE failed
[  3417][E][sd_diskio.cpp:802] sdcard_mount(): f_mount failed: (3) The physical drive cannot work
[  3425][D][GT911.cpp:35] begin(): GT911: Initialization
[  3425][I][esp32-hal-i2c.c:75] i2cInit(): Initialising I2C Master: sda=21 scl=22 freq=100000
[  3543][D][font_render.c:63] font_cache_init(): Chace use 51104 bytes
[     7][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz, APB: 80000000 Hz
[   456][I][esp32-hal-psram.c:96] psramInit(): PSRAM enabled
M5EPD initializing...[  2643][D][M5EPD_Driver.cpp:68] begin(): Init SUCCESS.
[  3270][E][esp32-hal-cpu.c:110] addApbChangeCallback(): duplicate func=0x400fd7a8 arg=0x3ffbde2c
[  3416][W][sd_diskio.cpp:516] ff_sd_initialize(): GO_IDLE_STATE failed
[  3417][E][sd_diskio.cpp:802] sdcard_mount(): f_mount failed: (3) The physical drive cannot work
[  3427][D][GT911.cpp:35] begin(): GT911: Initialization
[  3427][I][esp32-hal-i2c.c:75] i2cInit(): Initialising I2C Master: sda=21 scl=22 freq=100000
[  3543][D][font_render.c:63] font_cache_init(): Chace use 51104 bytes
[     7][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz, APB: 80000000 Hz
[   456][I][esp32-hal-psram.c:96] psramInit(): PSRAM enabled
M5EPD initializing...
SomeoneToIgnore commented 1 year ago

For comparison, I was able to compile and run successfully this project: https://github.com/tuenhidiy/m5paper-weatherstation with this patch (not related to dependency set-up):

diff --git a/src/misc.h b/src/misc.h
index f0b0340..f01df22 100644
--- a/src/misc.h
+++ b/src/misc.h
@@ -1,6 +1,7 @@
 #pragma once
 #include <functional>
 #include <HTTPClient.h>
+#include <esp_sntp.h>
 #include <ArduinoJson.hpp>
 #include <LovyanGFX.hpp>

@@ -67,4 +68,4 @@ int syncNTPTime(std::function<void(const tm &)> datetimeSetter, const char *tz,
     datetimeSetter(datetime);

     return 0;
-}
\ No newline at end of file
+}

that project uses

platform_packages = 
    framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git