Git Product home page Git Product logo

m5paper_factorytest's Introduction

M5Paper_FactoryTest

PlatformIO Project for M5Paper

m5paper_factorytest's People

Contributors

cat-in-136 avatar eggfly avatar fcapano avatar gitshaoxiang avatar icyqwq avatar someonetoignore avatar tinyu-zhao avatar tobozo avatar trex22 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

m5paper_factorytest's Issues

filesystem lacks '/' in filenames when reading(code or sd card problem?)

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:

  1. test shows SD card status was passed, however diskio gives "check status failed".
  2. when opening tag1 directory, vfs gives "does not start with /".
    1. I checked the code in vfs_api.cpp, it forced all filenames to be started with "/", so file wasn't permitted to be opened in the first place
    2. Then I changed the code in vfs_api.cpp, adding "/" for every filename that doesn't start with it. Then I succeeded in opening tag1(showing tag2 and 1234.txt), I believe this inferred that sd card can be normally accessed, plus the contents were good? At this time, the top banner shows SDtag1, lacking '/'.
    3. After changing the code, when opening /SD/123.txt, system still fails, giving the code below. Meanwhile, when opening /SD/tag1/tag2/ and /SD/tag1/1234.txt, serial monitor says "/sd/tag2/" and "/sd/1234.txt" doesn't exist (jumping over tag1, inferring the filepath concatnation failed). plus, here the top banner shows SDtag2, jumping over tag1, and still lacks '/'.
[ 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...

Missing M5EPD Dependency

Project did not compile out of the box with PlatfromIO. Needed to add library dependency for M5EPD.

5th file item and later on a folder are not displayed on Frame_FileIndex

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

Cannot download the same version of framework between NT Windows and Darwin macOS #15

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...

Cannot compile under macOs

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...

call of overloaded 'begin(int&, int&, int)' is ambiguous

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.