Repository navigation
how to correctly handle "pre-upload" build steps that use serial connection with serial monitor active #1749
Unanswered
PerennialNovice
asked this question in
Q&A
Replies: 2 comments
|
The timing of resetting the board before upload is still very hard for some boards (for instance leonardo on linux). |
0 replies
|
Ah, didn't know about that Thanks for the valuable hint! |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I use STM32 with DFU upload and want to automate the upload process a bit more
So I have connected pins to reset and boot0 inputs and the board resets upon reception of a string sequence
To send them I use post-build steps (I know that is not pre-upload... but it's the only way I found out on how to do this so far)
mode ${serial.port}:115200,N,8,1 >nul & set /p x="&" <nul >\\.\${serial.port}First, I had the commands directly, but that triggered a build error even on success, so the upload was canceled
So I put the commands in a batch file and forced successful return
Now, this seems to work fine...
Only problem is: it does not work when serial monitor is active in sloeber.
Even though it gets disconnected for upload, the post-build step happens to early in the chain of commands and the port is not yet released when my batch is run
Is there any way to get sloeber to release the port earlier?
Can I trigger a command in pre-build steps that closes the serial monitor?
Or a completely other way, like I don't know, are there any "pre-upload" hooks I could use in the platform.txt?
would really be nice to have this :)
All reactions