I am playing with an alternative USBasp firmware ( I didn't write it ), which supports UART communication ( can be used for serial debugging ) (
https://github.com/akrasuski1/usbasp-uart ).
I wrote a simple client using libusb ( it's a custom HID class ) to connect to it and I can say that it's working great ( linux and Windows 10 )! Now, I was thinking how can I intergrate it to Lazarus and create an Arduino like behavior.
Something like, you opened the serial window in Lazarus which will connect to USBasp and then, when you need to upload new firmware it will disconnect the client ( hook when the project compile ? build ? run ? run without debugging ? all of them ? ), upload the firmware and when the upload is finished reconnect .
I need to hook the IDE events but I'm not familiar with the code. Any hint, sample project, advice on how to proceed ? ( currently reading
https://wiki.freepascal.org/Extending_the_IDE ).
PS: FYI, in my private repo (
https://scm.nephelae.eu/Nephelae/usbasp-uart ) I patched the USBasp firmware to allow programming of AVR chips with 256k also.