IDF-M5Stack - need a hand on the explanation
Posted: Sun Feb 25, 2018 9:56 am
Hi there,
I have read the following descriptions from M5Stack. However, I could not find the Arduino option in "make menuconfig" under " │ │ FreeRTOS SystemView Tracing ---- ". It is empty. Secondly, I don't understand why initArduino(); is for? I use idf-M5Stack, not Arduino?
Any ideas?
make menuconfig has some Arduino options
"Autostart Arduino setup and loop on boot"
If you enable this options, your main.cpp should be formated like any other sketch
//file: main.cpp
#include <M5Stack.h>
void setup(){
M5.begin();
M5.Lcd.printf("hello world");
}
void loop() {
M5.update();
}
Else you need to implement app_main() and call initArduino(); in it.
Keep in mind that setup() and loop() will not be called in this case. If you plan to base your code on examples provided in esp-idf, please make sure move the app_main() function in main.cpp from the files in the example.
//file: main.cpp
#include <M5Stack.h>
extern "C" void app_main()
{
initArduino();
M5.begin();
M5.Lcd.println("hello world!");
}
"Disable mutex locks for HAL"
If enabled, there will be no protection on the drivers from concurently accessing them from another thread/interrupt/core
"Autoconnect WiFi on boot"
If enabled, WiFi will start with the last known configuration
Else it will wait for WiFi.begin
I have read the following descriptions from M5Stack. However, I could not find the Arduino option in "make menuconfig" under " │ │ FreeRTOS SystemView Tracing ---- ". It is empty. Secondly, I don't understand why initArduino(); is for? I use idf-M5Stack, not Arduino?
Any ideas?
make menuconfig has some Arduino options
"Autostart Arduino setup and loop on boot"
If you enable this options, your main.cpp should be formated like any other sketch
//file: main.cpp
#include <M5Stack.h>
void setup(){
M5.begin();
M5.Lcd.printf("hello world");
}
void loop() {
M5.update();
}
Else you need to implement app_main() and call initArduino(); in it.
Keep in mind that setup() and loop() will not be called in this case. If you plan to base your code on examples provided in esp-idf, please make sure move the app_main() function in main.cpp from the files in the example.
//file: main.cpp
#include <M5Stack.h>
extern "C" void app_main()
{
initArduino();
M5.begin();
M5.Lcd.println("hello world!");
}
"Disable mutex locks for HAL"
If enabled, there will be no protection on the drivers from concurently accessing them from another thread/interrupt/core
"Autoconnect WiFi on boot"
If enabled, WiFi will start with the last known configuration
Else it will wait for WiFi.begin