Chat freely about anything...

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.
User avatar
By McChubby007
#79968 Given what you said in the other topic about this is work for a company, I have decided not to provide you with the library I am working on. This is because right now, it has no licensing files nor headers and that will take up too much of my time. I hope you understand that I feel uneasy about giving this to you which may then end up in the hands of a commercial organisation, without the necessary legal text included.

Other than that I am happy to help and provide answers.