Chat freely about anything...

User avatar
By lucasromeiro
#79949
McChubby007 wrote:I'm glad that we gave enough info for you to make an informed decision and that it is most likely the correct one.

It's good that you have explained your experience as this may help others to decide also. I think it is essential to make the decision early-on after the Arduino IDE has become tiresome as we all invest our time/effort into learning an IDE and it is painful having to change. I think I would have used platformIO immediately if it had been available when I started with esp8266. Once I move to esp32 work on platformIO I will most likely move all my esp8266 stuff over to it also.

Yes, unless you are planning to hack the esp core or use development versions not published in PlatformIO's database then it is definitely a more user friendly environment than Eclipse. I'm looking forward to doing some esp32 development with platformIO and the debugger as I have bought a JTAG adapter especially to work with it. See http://docs.platformio.org/en/latest/tu ... sting.html


I thank everyone who helped!
And I like and share to help others who need it as much as we need.
I'm surprised and very satisfied with the PlatformIO

Wow!! Awesome debug!
I had heard, but I had not read this page.
I was tempted to buy !!!
But it does not exist yet for esp8266 = (
I'm looking for other forms of debugging for esp8266, because I have 2 annoying problems finding the solution!

One is the external interrupt that hangs esp and it does not return anymore.
The other is a WDT reset that happens "randomly" when I have modbus communication enabled.

But esp8266 has few tools.
If you know anything, just let me know.
User avatar
By McChubby007
#79952 I may be wrong but I don't believe there is anything similar for esp8266. This is because the microprocessor and supplementary electronics has to support hardware debug, normally via JTAG or SWD (serial wire debug) and it has additional circuits and sometimes an additional processor. The ARM processors, such as STM32, can use SWD or JTAG. The dongle/adapter is just a converter from USB to either JTAG or SWD, the main debug control etc is within the target microprocessor which it attaches to via a special port. Arduino Due, which is an ARM chip also support this.

As far as esp8266 debug is concerned, I have spent the last 2 years working on a system trace and performance tool. Unfortunately it is still not finished, and the least finished is the documentation. Since my 30 year career has been in embedded real-time software, I have put all my accumulated knowledge into this new tool, and it's a shame it's not finished yet. I will give some thought over the next week or so, and perhaps if I can package the library up and provide some demos then you could try it out. I will have a think.

In fact a library has functionality to similar to mine which is already available. It's not surprising, since we all want to do similar things. This however, requires use of FreeRTOS, something which the espressif OS-SDK is based upon. By using freeRTOS you can enable trace 'hooks' which can send trace info via serial port to an analysis tool. The tool is called Percepio see https://www.freertos.org/FreeRTOS-Plus/ ... race.shtml

One important thing with this method of system trace (print etc) is that it uses highly compressed info, and so the microprocessor is not held-up in the same way that it is when sending normal text via serial, via printf, println etc. In addition these system trace/print calls are in themselves much faster than printf etc, so all in all the system's operation is mostly unaffected in terms of timing, which of course is essential in real time software. The serial/uart processing normally uses interrupt routines and buffers so that all serial comms is done in the background.

To give you an idea, to print a line of text in esp8266 would take 5ms for 70 chars, whereas the scheme I use (and Percepio probably uses too) only takes 3us, so it is 2000 times more efficient.
User avatar
By lucasromeiro
#79956
McChubby007 wrote:I may be wrong but I don't believe there is anything similar for esp8266. This is because the microprocessor and supplementary electronics has to support hardware debug, normally via JTAG or SWD (serial wire debug) and it has additional circuits and sometimes an additional processor. The ARM processors, such as STM32, can use SWD or JTAG. The dongle/adapter is just a converter from USB to either JTAG or SWD, the main debug control etc is within the target microprocessor which it attaches to via a special port. Arduino Due, which is an ARM chip also support this.

As far as esp8266 debug is concerned, I have spent the last 2 years working on a system trace and performance tool. Unfortunately it is still not finished, and the least finished is the documentation. Since my 30 year career has been in embedded real-time software, I have put all my accumulated knowledge into this new tool, and it's a shame it's not finished yet. I will give some thought over the next week or so, and perhaps if I can package the library up and provide some demos then you could try it out. I will have a think.

In fact a library has functionality to similar to mine which is already available. It's not surprising, since we all want to do similar things. This however, requires use of FreeRTOS, something which the espressif OS-SDK is based upon. By using freeRTOS you can enable trace 'hooks' which can send trace info via serial port to an analysis tool. The tool is called Percepio see https://www.freertos.org/FreeRTOS-Plus/ ... race.shtml

One important thing with this method of system trace (print etc) is that it uses highly compressed info, and so the microprocessor is not held-up in the same way that it is when sending normal text via serial, via printf, println etc. In addition these system trace/print calls are in themselves much faster than printf etc, so all in all the system's operation is mostly unaffected in terms of timing, which of course is essential in real time software. The serial/uart processing normally uses interrupt routines and buffers so that all serial comms is done in the background.

To give you an idea, to print a line of text in esp8266 would take 5ms for 70 chars, whereas the scheme I use (and Percepio probably uses too) only takes 3us, so it is 2000 times more efficient.


How wonderful! I'll look at the link carefully.
But in a quick glance, I was lost! I do not understand any of this ...
Flee from my knowledge
I did not understand how to use this ....
As it does not have MAC OS I could not download and try to use.
From what you have explained to me, it seems to be a phenomenal tool!
I need to learn to use!
That can help me a lot.

It will be a pleasure to test your library!

With 3us for an instruction of 70 characters, it increased my curiosity !!!!

:)
User avatar
By McChubby007
#79957 It is a large and complex topic, and most 'Arduino people' are not interested; it is what industry uses. I decided to share this with you as you are interested which pleases me.

As far as my 3us timing goes, obviously you cannot cheat physics and 70 chars @ 115200bps = 5ms. The 3us that I quote is delay impact on the user's calling code when doing the trace; what actually happens is that this data is then buffered and sent over serial (or wi-fi or SD/Spiffs) in the background during idle foreground activity. In reality the delay to user code is actually even less, more like 800ns. For an Arduino Uno it is abut 40us as that processor is a lot slower and 8-bit architecture.

If you have any questions about this subject in general or the tools specifically then please ask, as I am happy to share my knowledge, since as I say, most arduino hobbyists don't seem that interested.