BlueAndi / Pixelix

Full RGB LED matrix, based on an ESP32 and WS2812B LEDs.
MIT License
300 stars 59 forks source link

Cant build in platformio #47

Closed XIlent112 closed 3 years ago

XIlent112 commented 3 years ago

When I want to build in VSStudio with platformio it shows me some errors:

fatal: not a git repository (or any of the parent directories): .git CalledProcessError: Command '['git', 'rev-parse', '--abbrev-ref', 'HEAD']' returned non-zero exit status 128.:
File "C:\Users\xilent.platformio\penv\lib\site-packages\platformio\builder\main.py", line 175: env.SConscript(item, exports="env") File "C:\Users\xilent.platformio\packages\tool-scons\scons-local-4.1.0\SCons\Script\SConscript.py", line 591: return _SConscript(self.fs, *files, subst_kw) File "C:\Users\xilent.platformio\packages\tool-scons\scons-local-4.1.0\SCons\Script\SConscript.py", line 280: exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals) File "C:\Users\xilent\Downloads\esp-rgb-led-matrix-3.0.0\esp-rgb-led-matrix-3.0.0\scripts\getGitRev.py", line 84: softwareVersion = "-DSW_VERSION=" + getVersion() File "C:\Users\xilent\Downloads\esp-rgb-led-matrix-3.0.0\esp-rgb-led-matrix-3.0.0\scripts\getGitRev.py", line 63: branchName = getCurrentGitBranch() File "C:\Users\xilent\Downloads\esp-rgb-led-matrix-3.0.0\esp-rgb-led-matrix-3.0.0\scripts\getGitRev.py", line 35: return subprocess.check_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD']).decode('ascii').strip() File "C:\Users\xilent.platformio\python3\lib\subprocess.py", line 411: kwargs).stdout File "C:\Users\xilent.platformio\python3\lib\subprocess.py", line 512: output=stdout, stderr=stderr)

I tried it on linux, windows and with different Python versions. Thank you for your help!

BlueAndi commented 3 years ago

You downloaded the sources, instead of using git clone ..., right?

BlueAndi commented 3 years ago

Please try PluginDevelopment branch and give a short feedback.

XIlent112 commented 3 years ago

Thanks for the hint. I downloaded the sources now with git clone and it works, but i have another problem.

I got a ESP32_Devkitc_v4 from AZ-delivery and when i upload it it shows some errors.

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0018,len:4 load:0x3fff001c,len:1044 load:0x40078000,len:10124 load:0x40080400,len:5828 entry 0x400806a8 |30| INFO: InitState.cpp:335 PIXELIX starts up ... |30| INFO: InitState.cpp:336 SW version: v3.0.0 |30| INFO: InitState.cpp:337 SW revision: 4b2b2ac22e40b4ee8b41ee60c1725e4f5634e4 1a |35| INFO: InitState.cpp:338 ESP32 chip rev.: 1 |39| INFO: InitState.cpp:339 ESP32 SDK version: v3.3.5-1-g85c43024c |46| INFO: InitState.cpp:340 Ambient light sensor detected: 1 |51| INFO: InitState.cpp:341 Wifi MAC: 24:0A:C4:EC:28:C8 |56| INFO: InitState.cpp:342 LwIP version: 2.0.3 |62| INFO: ButtonDrv.cpp:153 ButtonDrv task is ready. |61| ERROR: SPIFFS:0 mount failed, -10025 [E][SPIFFS.cpp:89] begin(): Mounting SPIFFS failed! Error: -1 [E][Preferences.cpp:472] getString(): nvs_get_str len fail: hostname NOT_FOUND |93| INFO: wifi:0 : mount failed, -10025 |0| INFO: :0 |0| INFO: :0 iver task: 3ffb55dc, prio:23, stack:3584, core=0 |239| INFO: wifi:0 sk: 3ffb55dc, prio:23, stack:3584, core=0 |0| INFO: :0 3, stack:3584, core=0 |0| INFO: :0 rmware version: dc30037 |240| INFO: wifi:0 version: dc30037 |0| INFO: :0 7 |0| INFO: :0 NVS flash: enabled |248| INFO: wifi:0 sh: enabled |0| INFO: :0 , stack:3584, core=0 |0| INFO: :0 nano formating: disabled |257| INFO: wifi:0 rmating: disabled |0| INFO: :0 84, core=0 |0| INFO: :0 ta frame dynamic rx buffer num: 32 |267| INFO: wifi:0 e dynamic rx buffer num: 32 |0| INFO: :0 re=0 |0| INFO: :0 nagement frame dynamic rx buffer num: 32 |277| INFO: wifi:0 t frame dynamic rx buffer num: 32 |0| INFO: :0 num: 32 |0| INFO: :0 nagement short buffer num: 32 |288| INFO: wifi:0 t short buffer num: 32 |0| INFO: :0 32 |0| INFO: :0 namic tx buffer num: 32 |297| INFO: wifi:0 x buffer num: 32 |0| INFO: :0 |0| INFO: :0 atic rx buffer size: 1600 |305| INFO: wifi:0 buffer size: 1600 |0| INFO: :0 32 |0| INFO: :0 atic rx buffer num: 16 |313| INFO: wifi:0 buffer num: 16 |0| INFO: :0 32 |0| INFO: :0 namic rx buffer num: 32 |405| INFO: wifi:0 x buffer num: 32 |0| INFO: :0 32 |0| INFO: :0 sta (24:0a:c4:ec:28:c8) [E][Preferences.cpp:472] getString(): nvs_get_str len fail: web_login_user NOT_F OUND [E][Preferences.cpp:472] getString(): nvs_get_str len fail: web_login_pass NOT_F OUND [E][Preferences.cpp:472] getString(): nvs_get_str len fail: web_login_user NOT_F OUND [E][Preferences.cpp:472] getString(): nvs_get_str len fail: web_login_pass NOT_F OUND [E][Preferences.cpp:472] getString(): nvs_get_str len fail: plugin_install NOT_F OUND |935| WARNING: PluginMgr.cpp:150 Plugin installation is empty. [E][Preferences.cpp:472] getString(): nvs_get_str len fail: plugin_install NOT_F OUND |947| INFO: ErrorState.cpp:68 Going in error state.

Also i got a error when i try the memory inspection: 14.4% (used 47076 bytes from 327680 bytes)\r\nFlash: [==========] 107.4% (used 1407490 bytes from 1310720 bytes)\r\n\r\n\n\nError: The program size (1407490 bytes) is greater than maximum allowed (1310720 bytes)\r\n*** [checkprogsize] Explicit exit, status 1\r\n========================= [FAILED]

It seems that it don't write all of the code on the ESP? When i uploaded it, it shows that it compressed many of the first files:

Chip is ESP32-D0WDQ6 (revision 1) Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None Crystal is 40MHz MAC: 24:0a:c4:ec:28:c8 Uploading stub... Running stub... Stub running... Changing baud rate to 460800 Changed. Configuring flash size... Auto-detected Flash size: 4MB Compressed 17104 bytes to 11191... Writing at 0x00001000... (100 %) Wrote 17104 bytes (11191 compressed) at 0x00001000 in 0.3 seconds (effective 517.9 kbit/s)... Hash of data verified. Compressed 3072 bytes to 128... Writing at 0x00008000... (100 %) Wrote 3072 bytes (128 compressed) at 0x00008000 in 0.0 seconds (effective 945.2 kbit/s)... Hash of data verified. Compressed 8192 bytes to 47... Writing at 0x0000e000... (100 %) Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 4229.0 kbit/s)... Hash of data verified. Compressed 1126160 bytes to 637153...

Thank you for your help!

BlueAndi commented 3 years ago

Looks for me as the filesystem is missing and the board id is wrong. I updated the configuration to support your board out of the box in the PluginDevelopment branch. Please additional follow the update flow: https://github.com/BlueAndi/esp-rgb-led-matrix/blob/PluginDevelopment/doc/SW-UPDATE.md#software-update

XIlent112 commented 3 years ago

I tried it, but it gives me the same Errors on the board.

XIlent112 commented 3 years ago

You are right it seems to be a Problem with the Filesystem. When i change the Filesystem to LITTLEFS the board accept the code. I will test it and give you a Feedback.

XIlent112 commented 3 years ago

Now the board boot normally, but when i try to connect to the Webserver it gives some other errors.

[E][vfs_api.cpp:64] open(): /littlefs/cp/captivePortal.html does not exist [E][vfs_api.cpp:64] open(): /littlefs/cp/captivePortal.html.gz does not exist

I only changed your Code in the platform.ini to load LITTLEFS and in Filesystem.h

#define FILESYSTEM_USE_SPIFFS (0) #define FILESYSTEM_USE_LITTLEFS (1)..

#if FILESYSTEM_USE_LITTLEFS #define FILESYSTEM LITTLEFS #endif..

#if FILESYSTEM_USE_LITTLEFS #include <LITTLEFS.h> #endif

BlueAndi commented 3 years ago

In general SPIFFS should work. LITTLEFS is currently not available directly via esp32-arduino. So I guess you injected via platformio.ini the mklittlefs.exe (https://github.com/lorol/LITTLEFS), right? Did you enable the compatibility mode?

Anyway SPIFFS should work out of the box. Can you test this again and provide the output during the build process (sw + filesystem) and the complete log during startup?

BlueAndi commented 3 years ago

@XIlent112 Any progress?

BlueAndi commented 3 years ago

I close the issue. Please reopen if necessary.