m5stack / M5Dial-UserDemo

M5Dial user demo for hardware evaluation.
MIT License
44 stars 16 forks source link

Please publish a how-to on using VSCode to launch the demo code #2

Open KennethThompson opened 1 year ago

KennethThompson commented 1 year ago

Please include steps to flash the user demo using VSCode. ESP32 has a plugin that is recommended, but my attempts to get the code flashed using VSCode have failed. Please help..

nlv-hack commented 11 months ago

@KennethThompson , did you ever manage to build it and flash it?

KennethThompson commented 11 months ago

@KennethThompson , did you ever manage to build it and flash it?

Yes- but it would be great if I could use the Arduino IDE rather than VS Code with the ESP32 build chain

nlv-hack commented 11 months ago

Can I suggest opening a branch with updated Readme file with your instructions on how to do it. And PR as well of course

KennethThompson commented 11 months ago

Can I suggest opening a branch with updated Readme file with your instructions on how to do it. And PR as well of course

I just used their build guide- VS code does not allow me to compiler + upload the code- sadly.

KennethThompson commented 11 months ago

Can I suggest opening a branch with updated Readme file with your instructions on how to do it. And PR as well of course

idf.py gets created when you install the expressif dependencies. https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/idf-py.html. <-- You have to make sure that the build dependencies are installed. Its not straight forward, and sadly its been too long since I got it working to recall exactly what I did

nlv-hack commented 11 months ago

Many thanks for this, I wonder if this could be done through PlatformIO

KennethThompson commented 10 months ago

Many thanks for this, I wonder if this could be done through PlatformIO

I tried and failed to use PlatformIO. If I recall correctly, it will not build because of an error or it does build but then will not successfully flash to the device. I hope the manufacturer produces a guide for VSCode/PlatformIO. Or even better, I hope they release an Arduino sketch that implements the same features as the default app that is preloaded on to the dial. The ESP32 stuff is just too complicated for me to learn at this time.

MotoBarsteward commented 6 months ago

So, I've just managed to get this to build and program the flash using ESP-IDF in CSCode. I'll work out how to create a branch tomorrow and upload the changes but they were quite straight forward. Where ever the build complained that unit8_t was not defined in std::, you need to add #include as the first line of the referenced header file in the error message. I fixed an common.cpp at line 652 where is should have read comd[0] rather than comd0. In the 5.1 to 5.2 upgrade of ESP-IDF, the interrupt code changed but can be fixed by changing INTR_CPU_ID_AUTO to ESP_INTR_CPU_AFFINITY_AUTO at line 314 in common.cpp. I added #define LCD_CAM_LCD_UPDATE_REG (BIT(20)) after line 452 of lcd_cam_reg.h