felias-fogg / dw-link

An Arduino-based debugWIRE hardware-debugger
https://www.codeproject.com/Articles/5321801/Debugging-an-Arduino-project-with-GDB-on-Classic-A
GNU General Public License v3.0
55 stars 11 forks source link

Flash write speed? #12

Closed RandoSY closed 1 year ago

RandoSY commented 1 year ago

(My lab is in disarray after a burst pipe, so I can't doing bench testing for a while ...)

I was looking through your exceptionally clear documentation; you reported that you had worked on increasing the flash write speed over the course of the development of your firmware?

1651-atmega328p-xmini

I have experience with using the mEDBG degug-wire facility on the ATMEGA328P XPLAINED MINI development board, and having it struggle with a largish 28k program. It would often take over a minute to flash program when in debug-wire mode. It just defeats the purpose when you make a small change in the code, and it takes so long to program the mew image, and restart the debug session.

I was wondering if you have any ball-park sense of what you're approximate flash write speed is, especially for 30K+ programs, in the specific case of the ATMega328p?

Thanks for this superb project!

RandoSY commented 1 year ago

I did find this info in your excellent manual

With an optimal setting, i.e., 250 kbps for the debugWIRE line and 230400 bps for the host communication line, loading is done with 500-800 bytes/second. It should be 3-5 KiB/second when the identical file is loaded again (in which case only a comparison with the already loaded file is performed). For the default setting (115200bps to host, 125000bps for debugWIRE), it is probably half the speed.

felias-fogg commented 1 year ago

Yes, it is roughly 40-100 seconds for flashing 30K+ and 5-10 seconds when attempting to load a program that is already present in flash. So, depending on how much you change and at what place the change has taken place, flashing a changed program could take anything between 5 and 100 seconds.

RandoSY commented 1 year ago

Thank you!