Page 1 of 1

IDF-M5Stack - need a hand on the explanation

Posted: Sun Feb 25, 2018 9:56 am
by vibnwis
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

Re: IDF-M5Stack - need a hand on the explanation

Posted: Sun Feb 25, 2018 10:26 am
by vibnwis
Also, compilation failed with the following errors
CXX build/M5Stack/src/Display.o
In file included from /home/esp32/esp/M5Stack-IDF/components/M5Stack/src/Display.cpp:20:0:
/home/esp32/esp/M5Stack-IDF/components/M5Stack/src/Display.h:22:21: fatal error: Arduino.h: No such file or directory

I searched for Arduino.h, not found in M5Stack-IDF folder.

Has anyone experienced similar things?

Re: IDF-M5Stack - need a hand on the explanation

Posted: Sun Feb 25, 2018 6:37 pm
by WiFive
https://github.com/espressif/arduino-es ... mponent.md

Please don't make a million different threads about "m5stack getting started"

Re: IDF-M5Stack - need a hand on the explanation

Posted: Sun Feb 25, 2018 11:40 pm
by vibnwis
Many thanks for the reply. Especially the arduino folder solution.
As for the comment of not making a million threads of M5Stack, I just agree. Sorry, no offence.
1. Each thread is a different scenario.
2. M5Stack getting started has missed out so many information. From a newbie, it does not help. I am not blaming M5Stack. That how things evolved. By your way of restricting members creating threads regarding M5Stack is totally a self-centered demands.
For instance, the arduino folder in M5Stack-IDF/components exists, but it is empty. By right, it should be a submodule. However, it is not. If the M5Stack-IDF had it described in its repo, then it would have been resolved. Also, the cp210x driver. M5Stack repo emphasizes so much that it need to install that on Linux, Windows, MacOs. Well, it failed to mentioned that Ubuntu 16.04 has got that installed by default. M5STack links to 2.6 kernel which was old and one of the reasons it failed.
When someone has no knowledge of a system. All this litten information is critical to moving forward. Someone who has learned would see those questions useless, blaming newbie for not reading the documentation. However,
what about, the misleading/misinformed/missing information. Those examples I mentioned are the shortcomings. However, I don't blame M5Stack. As I said, this how things evolved.
FYI, I had informed M5STack's staff that their link of the cp210x driver is old. I will probably inform that they should add ardunio-esp32 link as well. Hmm......

Re: IDF-M5Stack - need a hand on the explanation

Posted: Mon Feb 26, 2018 12:36 am
by WiFive
Well this is not an m5stack forum so one thread would be nice unless you have a generic problem. But you can make as many threads on http://forum.m5stack.com and their GitHub repos as you want. 8-)

Re: IDF-M5Stack - need a hand on the explanation

Posted: Mon Feb 26, 2018 2:30 am
by vibnwis
Yes, I did.
However, the github is so no active. It would probably take ages to have a response. As M5Stack is also ESP32 in essence and also it is about IDF, hence, I think it is a good place to ask my questions. Those questions were posted as they were encountered, not accumulated. I do wish, I know upfront or when to post accumulated problems.

Anyway, I have resolved the issue with your pointer. Thank you