thirtythreeforty / bullycpp

A Bully Bootloader PC driver program
GNU General Public License v3.0
12 stars 6 forks source link

Add cancel button during programming #1

Closed panhejia closed 9 years ago

panhejia commented 9 years ago

Awesome work George! Sometimes the programming progress might get stuck, and I have no way to stop the programming process but restart the BullyCPP image After BullyCPP is restarted, error message "Failed to open serial port: Access is denied" is shown image

To reproduce this error, load a hex file into BullyCPP, enable "MCLR before programming" and program. After it completes, disable "MCLR before programming", and hit "program!" again. Now the progress bar freezes. Restarting BullyCPP will show "Access denied" message. Sometimes "Retry" button won't work. The only way that I know is to replug the FTDI cable and restart BullyCPP.

Students usually either prefer to manually MCLR the PIC, or use MCLR wire from FTDI cable, they will rarely switch between these two methods. So I do not think this will be a big issue though.

thirtythreeforty commented 9 years ago

Yep, I've run into this issue, and you're right, you'll have to restart BullyCPP currently. I've started working on it (involves throwing an exception from within the programHex() method). This is the thing I'm holding back on for a v1.0 release.

The reason "Access is denied" is because although the old BullyCPP window is closed, the process doesn't exit because the receiver code can't exit its wait loop. The old BullyCPP retains the lock on the COM port. That issue will vanish when the timeout is implemented.

Thanks for the feedback!

thirtythreeforty commented 9 years ago

This should now be implemented; please let me know if you see any glitches. I'll be pushing a new Windows build shortly. Your existing copy should bother you about the update.