m5stack / M5Core2

M5Core2 Arduino Library
MIT License
263 stars 115 forks source link

V 0.1.4 Will not compile #101

Closed ortlof closed 1 year ago

ortlof commented 2 years ago

Describe the bug

Code Builds not with 0.1.4 Version. New I2S is not initialized with framework-arduinoespressif32@3.10006.210326

To reproduce

Change build to 0.1.4 -> code Fails to build with Error:

`C:/Users/-/.platformio/packages/framework-arduinoespressif32@3.10006.210326/tools/sdk/include/freertos/freertos/semphr.h:74:3: error: #error "include FreeRTOS.h" must appear in source files before "include semphr.h"

error "include FreeRTOS.h" must appear in source files before "include semphr.h"`

Expected behavior

Build runs with 0.1.2

Screenshots

Error:

`Indexing .pio\build\m5stack-core2\libd34\libWiFiClientSecure.a In file included from C:/Users/Vampix/.platformio/packages/framework-arduinoespressif32@3.10006.210326/tools/sdk/include/driver/driver/i2s.h:30:0, from .pio/libdeps/m5stack-core2/M5Core2/src/Speaker.h:4, from .pio/libdeps/m5stack-core2/M5Core2/src/Speaker.cpp:1: C:/Users/-/.platformio/packages/framework-arduinoespressif32@3.10006.210326/tools/sdk/include/freertos/freertos/semphr.h:74:3: error: #error "include FreeRTOS.h" must appear in source files before "include semphr.h"

error "include FreeRTOS.h" must appear in source files before "include semphr.h"

^ In file included from C:/Users/-/.platformio/packages/framework-arduinoespressif32@3.10006.210326/tools/sdk/include/freertos/freertos/semphr.h:77:0, from C:/Users/Vampix/.platformio/packages/framework-arduinoespressif32@3.10006.210326/tools/sdk/include/driver/driver/i2s.h:30, from .pio/libdeps/m5stack-core2/M5Core2/src/Speaker.h:4, from .pio/libdeps/m5stack-core2/M5Core2/src/Speaker.cpp:1: C:/Users/-/.platformio/packages/framework-arduinoespressif32@3.10006.210326/tools/sdk/include/freertos/freertos/queue.h:75:3: error: #error "include FreeRTOS.h" must appear in source files before "include queue.h"

error "include FreeRTOS.h" must appear in source files before "include queue.h"

^`

Environment

Additional context

No response

Issue checklist

Tinyu-Zhao commented 2 years ago

I will check it.

Tinyu-Zhao commented 1 year ago

I did have this problem when I changed the library dependency to 0.1.4 in PlatformIO, but if I pull the latest repository on Github, it doesn't report the error, I suggest you try pulling the Github repository as a local dependency and try again, if that's ok I will release 0.1.5 to fix the problem.

ortlof commented 1 year ago

Hi Thanks with 0.1.5 it complies when local pulled.

Tinyu-Zhao commented 1 year ago

Thank you for your feedback.