-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiling for m5stickc plus2 #3
Comments
Seems like the black screen is caused by a change in plus2 initialisation, so I modified the mstickcplus library TFT_eSPI class instead and got a quick build working attached to serial. I will post again when the patch is tweaked and connection tested. |
Nice work @islisis! Look forward to seeing how you go... |
OK I may not change this for a while so I'll post the quick fix here. The power hold when disconnected from USB fix is in my fork. https://github.com/islisis/Magic-Pocket-Control-ESP32 The TFT_eSPI LCD pin fix is made to /.pio/libdeps/m5stick-c/M5StickCPlus/src/utility/In_eSPI_Setup.h /* existing definitions from plus // plus and plus2 // plus2 I have a feeling the M5StickCPlus library/inherited TFT_eSPI class will be deprecated, so future builds could move to M5unified Great work and thank-you ;) |
I am new to ESP32, and am trying to compile for a m5stickc plus2 on vs code linux. I first needed to edit main-m5stick-c.cpp with "#define USING_M5GFX 0" to fix "Error: token "=" is not valid in preprocessor expressions".
After that, it will then build but with warnings such as:
'void* memcpy(void*, const void*, size_t)' reading 8 bytes from a region of size 4 [-Wstringop-overflow=]
I have attached the output at the end of this post.
I tried uploading, and received a checksum error. The next attempt to upload was successful, however nothing comes on the m5stickc plus2 display. On reset, the serial terminal reads:
rst:0x10 (RTCWDT_RTC_RESET),boot:0x1W (SP: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:0x3fff0030,len:1184
load:0x40078000,len:13232
load:0x40080400,len:3028
entry 0x400805e4
and stops.
As I said, I am new to this platform and will slowly try to understand the possible causes. I will start by trying to use the M5StickCPlus2.h header file and library. However, if you have any ideas what is required I would be very grateful for any response!
In file included from src/CCU/CCUEncodingFunctions.h:5,
from src/CCU/CCUEncodingFunctions.cpp:1:
In static member function 'static std::vector CCUUtility::ToByteArrayFromArray(T*, size_t) [with T = short int]',
inlined from 'static CCUPacketTypes::Command CCUEncodingFunctions::CreateVideoWhiteBalanceCommand(short int, short int)' at src/CCU/CCUEncodingFunctions.cpp:13:98:
src/CCU/CCUUtility.h:47:15: warning: 'void* memcpy(void*, const void*, size_t)' reading 8 bytes from a region of size 4 [-Wstringop-overflow=]
memcpy(result.data(), byteArray, length * sizeof(T));
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In static member function 'static std::vector CCUUtility::ToByteArrayFromArray(T*, size_t) [with T = short int]',
inlined from 'static CCUPacketTypes::Command CCUEncodingFunctions::CreateRecordingFormatCommand(CCUPacketTypes::RecordingFormatData)' at src/CCU/CCUEncodingFunctions.cpp:75:88:
src/CCU/CCUUtility.h:47:15: warning: 'void* memcpy(void*, const void*, size_t)' reading 20 bytes from a region of size 10 [-Wstringop-overflow=]
memcpy(result.data(), byteArray, length * sizeof(T));
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Compiling .pio/build/m5stick-c/src/main/main-m5stick-c.cpp.o
In static member function 'static std::vector CCUUtility::ToByteArrayFromArray(T*, size_t) [with T = short int]',
inlined from 'static CCUPacketTypes::Command CCUEncodingFunctions::CreateInt16Command(short int, CCUPacketTypes::Category, byte)' at src/CCU/CCUEncodingFunctions.cpp:196:98:
src/CCU/CCUUtility.h:47:15: warning: 'void* memcpy(void*, const void*, size_t)' reading 8 bytes from a region of size 4 [-Wstringop-overflow=]
memcpy(result.data(), byteArray, length * sizeof(T));
The text was updated successfully, but these errors were encountered: