PlatformIO Project for M5Paper
m5stack / m5paper_factorytest Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
The file tree in my SD card looks like this(sd card test passed):
SD
|
|--tag1
| |--tag2
| |--1234.txt
|--123.txt
When trying to read files in storage, serial output was like this (I added the arrows):
[ 2638][D][M5EPD_Driver.cpp:68] begin(): Init SUCCESS.
[ 3265][E][esp32-hal-cpu.c:110] addApbChangeCallback(): duplicate func=0x400fd4cc arg=0x3ffbde2c
[ 3423][W][sd_diskio.cpp:186] sdCommand(): token error [13] 0x33
①-------->[ 3423][E][sd_diskio.cpp:621] ff_sd_status(): Check status failed
[ 4353][W][sd_diskio.cpp:174] sdCommand(): no token received
[ 4454][W][sd_diskio.cpp:186] sdCommand(): token error [13] 0x23
②-------->[ 4454][E][sd_diskio.cpp:621] ff_sd_status(): Check status failed
[ 4458][D][GT911.cpp:35] begin(): GT911: Initialization
[ 4816][W][sd_diskio.cpp:186] sdCommand(): token error [13] 0x33
③-------->[ 4817][E][sd_diskio.cpp:621] ff_sd_status(): Check status failed
[ 4835][D][font_render.c:63] font_cache_init(): Chace use 51104 bytes
[ 4941][W][Wire.cpp:204] begin(): Bus already started in Master Mode.
[ 4941][W][Wire.cpp:204] begin(): Bus already started in Master Mode.
[ 4945][D][systeminit.cpp:173] SysInit_Start(): done
OK
[ 5636][D][epdgui.cpp:131] EPDGUI_MainLoop(): Run Frame_Main
[ 6348][D][font_render.c:63] font_cache_init(): Chace use 6820 bytes
[ 8261][D][epdgui.cpp:83] EPDGUI_Run(): Exit Frame_Main
[ 8262][D][epdgui.cpp:131] EPDGUI_MainLoop(): Run Frame_FileIndex
[ 14328][D][frame_fileindex.cpp:13] key_fileindex_floder_cb(): tag1
[ 14962][D][epdgui.cpp:83] EPDGUI_Run(): Exit Frame_FileIndex
[ 14962][D][epdgui.cpp:131] EPDGUI_MainLoop(): Run Frame_FileIndex
④-------->[ 14962][E][vfs_api.cpp:29] open(): tag1 does not start with /
[ 14967][D][frame_fileindex.cpp:70] listDir(): Failed to open directory
Here I met two problems:
[ 41005][D][epdgui.cpp:131] EPDGUI_MainLoop(): Run Frame_FileIndex
[ 43836][D][frame_fileindex.cpp:29] key_fileindex_text_cb(): 123.txt
[ 44464][D][epdgui.cpp:83] EPDGUI_Run(): Exit Frame_FileIndex
[ 44465][D][epdgui.cpp:131] EPDGUI_MainLoop(): Run Frame_txtReader
[ 45196][D][font_render.c:63] font_cache_init(): Chace use 73376 bytes
[ 45563][W][sd_diskio.cpp:186] sdCommand(): token error [13] 0x33
[ 45563][E][sd_diskio.cpp:621] ff_sd_status(): Check status failed
[ 45565][W][sd_diskio.cpp:186] sdCommand(): token error [13] 0x33
[ 45570][E][sd_diskio.cpp:621] ff_sd_status(): Check status failed
[ 49378][E][M5EPD_Driver.cpp:531] WaitBusy(): Device response timeout.
[ 49378][E][M5EPD_Driver.cpp:531] WaitBusy(): Device response timeout.
I know changing the library code isn't right, but I'm not clear about the factory test code structure. I was trying to find out where the bug is these days, but it seems that I lacked the ability...
Project did not compile out of the box with PlatfromIO. Needed to add library dependency for M5EPD.
On the "Storage" applet (Frame_FileIndex
), if there are more than four files/folders in a certain folder on the SD card, the fifth and later files are not displayed. i.e., only up-to 4 file items on the folder is displayed.
In which case, following error message is displayed (enabling debug CORE_DEBUG_LEVEL=5
required):
E (41892) vfs_fat: open: no free file descriptors
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: [email protected] 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...
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: [email protected] 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...
src/frame/frame_factorytest.cpp: In member function 'bool Frame_FactoryTest::checkGrove(int, int)':
src/frame/frame_factorytest.cpp:180:32: error: call of overloaded 'begin(int&, int&, int)' is ambiguous
Wire1.begin(sda, scl, 10000);
^
In file included from .pio/libdeps/m5stack-fire/M5EPD/src/M5EPD.h:5,
from src/frame/frame_base.h:4,
from src/frame/frame_factorytest.h:4,
from src/frame/frame_factorytest.cpp:1:
C:/Users/name/.platformio/packages/framework-arduinoespressif32/libraries/Wire/src/Wire.h:79:10: note: candidate: 'bool TwoWire::begin(int, int, uint32_t)'
bool begin(int sda=-1, int scl=-1, uint32_t frequency=0); // returns true, if successful init of i2c bus
^~~~~
C:/Users/name/.platformio/packages/framework-arduinoespressif32/libraries/Wire/src/Wire.h:80:10: note: candidate: 'bool TwoWire::begin(uint8_t, int, int, uint32_t)'
bool begin(uint8_t slaveAddr, int sda=-1, int scl=-1, uint32_t frequency=0);
^~~~~
Compiling .pio\build\m5stack-fire\lib2b7\M5EPD\base\ftgloadr.c.o
Compiling .pio\build\m5stack-fire\lib2b7\M5EPD\base\ftglyph.c.o
*** [.pio\build\m5stack-fire\src\frame\frame_factorytest.cpp.o] Error 1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.