Extremely slow compiling
-
Hi,
Just started playing with my M5 Stack, I've followed the instructions for using it with Arduino IDE.
It seems extremely slow to compile, even the example "hello world" and "factory reset". not only enough time to brew a splendid cup of tea, but also enough time to drink said cup of tea as well, (4-10 minutes).
I must be doing something wrong?
-
@Jonny-Spaceman Yes.
Just kidding.
What M5Stack do you have?
Are you using Arduino IDE ver2.3.2? It is very stable for last three or four months.
Try a simple sketch. Copy this sketch to a 'New Sketch', over writing the standard framework.Try the standard upload speed 921600.
Try a slower speed and double check that your USB cable is a communication cable, not just USB charge.A small sketch should take 15-20 seconds to compile and 15 to upload to the board.
-
@Jonny-Spaceman If Arduino is taking a long time to compile then the problem lies with your computer and not the device.
Now, if the upload after the compile was taking a long time it is because you have communication setting incorrect .
You need to look at your computer and see what the problem is.
-
@teastain Thanks for the feedback,
I've tried different USB ports and cables, however I don't think it's the upload/download speeds,it seems the compile time using the Arduino IDE is what's slowing things down.
Will try VScode and PlatformIO with VScode and see what differences there are
Using Arduino GUI 2.3.2 & a HP Zbook -
@Jonny-Spaceman No.
The sketch that I posted takes 20 seconds to compile and less that 15 seconds to upload. Apple M1 Mac.
It is a generic test program I wrote for this reason and to help debug Serial.print problems.
I suggest trying my diag sketch to test your environment.
VS Code will not help compile this sketch any faster.
The sketch that takes Tea Time is then the problem.If you tell me what M5Stack device you are using and the exact code, I will try it here.
-
Hi, it's literally the "hello world" example, it's my first delve into the M5 Stack, I've bought the motor/stepper/servo boards for prototyping, we've just got a couple at work to try out.
I've set up a project using PlatformIO on VS-Code to run the same "hello world" example, it's equally as slow as the Arduino IDE the first time it uploads, compiling the M5 Stack libraries seems to take a while, however subsequent uploads are much faster.
My guess is the Arduino IDE is compiling the M5 Stack libraries for every upload from scratch which is why it's taking so long whereas Platform IO doesn't, no problem, I prefer using VSCode and PIO anyway.
Thanks for your help -
@Jonny-Spaceman It sounds like you may have a conflict.
You should delete arduino and all of the libraries and start from scratch.
UIFlow Micropython is the preferred language for programming M5Stack and its much easier to learn.