PlatformIO - 5.0" Demo Program Does Not Build Out Of Box

Before getting into the PlatformIO specifics I suggest not compressing the PlatformIO code example code (.rar files). It should either remain uncompressed or maintained in another repo with the link to that repo provided in the documentation of the parent repo. This provides transparency in version history and enables others to provide suggested software fixes as pull requests in source control instead of coming here to the forum to suggest fixes.

There seems to be some glaring mistakes in the repo that prevents it from being able to build. I've discovered and corrected a handful of issues and have procured the list of fixes that I remembered how I corrected them.

First problem is that Git For Windows is a requirement that is not mentioned in the documentation. It also must be installed so that Git is available from cmd.exe. That is an easy enough correction with just re-installing to reconfigure or installing for the first time.

Second problem is that the platformio.ini file is misconfigured. The board listed is invalid. Should be:

[env:esp32-s3-devkitc-1]
platform = espressif32
board = esp32-s3-devkitc-1
framework = arduino

Third problem is an odd one that can be avoided with use of a naming convention that avoids spaces and special characters in code folder paths. A build error will result if left as-is. Change this path:

\esp32-display-master\5.0\4. platformIO\50project\WZ8048C050

to this path:

\esp32-display-master\5.0\4_platformIO\50project\WZ8048C050

Fourth problem has to do with platformio.ini again. Change build flags to include the demo widgets:

build_flags = 
    -D LV_LVGL_H_INCLUDE_SIMPLE
    -D LV_USE_DEMO_WIDGETS
    -I ./include


Tagged:

Comments

  • Compilation fixed and able to push. Now slammed right into a fancy runtime error. Seems to be an out of memory exception ESP_ERR_NO_MEM

    ELF file SHA256: 0000000000000000


    Rebooting...

    @!Ƃ␆␜ނ␀␑��JL�9�9��E (17) lcd_panel.rgb: esp_lcd_new_rgb_panel(138): no mem for frame buffer

    ESP_ERROR_CHECK failed: esp_err_t 0x101 (ESP_ERR_NO_MEM) at 0x4037a2a4

    file: ".pio/libdeps/esp32-s3-devkitc-1/GFX Library for Arduino/src/databus/Arduino_ESP32RGBPanel.cpp" line 252

    func: uint16_t* Arduino_ESP32RGBPanel::getFrameBuffer(uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, int32_t)

    expression: esp_lcd_new_rgb_panel(_panel_config, &_panel_handle)


    abort() was called at PC 0x4037a2a7 on core 1


    Backtrace:0x40376e0e:0x3fce2de00x4037a2b1:0x3fce2e00 0x4037fd05:0x3fce2e20 0x4037a2a7:0x3fce2ea0 0x4202aa37:0x3fce2ec0 0x4202ab23:0x3fce2f20 0x420027c8:0x3fce2f60 0x4202e482:0x3fce2f90

  • I discovered the ESP_ERR_NO_MEM is a self-induced problem caused by aged or corrupt PlatformIO cache. It couldn't resolve itself in order to recognize the required esp32 board for this solution. I had fixed it at about the same time I proposed the second fix above.

    Second problem is that the platformio.ini file is misconfigured. The board listed is invalid. Should be:

    [env:esp32-s3-devkitc-1]
    platform = espressif32
    board = esp32-s3-devkitc-1
    framework = arduino
    

    That wasn't required and in doing so actually broke the association with the embedded json file with additional settings for memory. Either undo the above recommendation or adjust the name of the json file to drop the -myboard from its name to match the config.

    Since my cache was polluted and preventing the build from acquiring the proper board I had to open another project and issue the PlatformIO cli command:

    pio pkg update

    This does two things. First it deletes the existing cache. Second, it updates the board listing so that existing and new projects will have the appropriate board available for download.

    After all that the build, push, and runtime are all successful.

  • Hello @MrSunshine ,

    Thank you very much for sharing, I will send your feedback to the engineers and improve our documentation and program.

  • @MrSunshine Since the errors in the official code are still present (at least from the code examples i found), would you be so kind and make your code public or share your example in some way? I tried sending you an email yesterday but i guess it went right into the spam folder. ;P

Sign In or Register to comment.