MapleMini : Standalone Bootloading and USB/Serial Usage

mcnobby
Wed Sep 20, 2017 10:40 am
I can compile in my Arduino IDE, and can happily upload my sketch to my Maple Mini (blue one from Baite)
I can also use the Serial Monitor in the IDE (via the USB connection on the Maple Mini)
(My devices have the original bootloader as I am using the 17K/108k option)

But NOW I would like to do TWO more things
1. Upload a new .bin file to the device (from a PC that doesnt have the IDE installed)
2. Use a Serial Monitor (like HTComm) via the Maple Minis USB connection (also on a PC that doesnt have the IDE)

How much of this is possible ?
For uploading, Roger has pointed me to the tools directory, and I have found various BAT files, but I am kind of stuck
Is there a guide on how to do this, or has someone asked before (I cant find a relevant thread for it)

Any help would be hugely appreciated
Thanks

Bob


stevestrong
Wed Sep 20, 2017 11:14 am
http://wiki.stm32duino.com/index.php?ti … g_a_sketch
You don’t necessarily need the IDE, just the tools.

mcnobby
Wed Sep 20, 2017 1:56 pm
Thanks Steve
I did forget to mention that I wanted to upload the new bin file VIA THE BOARDS USB (and not an external serial/USB device), in the same way as it is done from within the IDE (but without the IDE, if you follow me)

Bob


stevestrong
Wed Sep 20, 2017 2:04 pm
I can follow you, that is why I suggested the link.
Please use the DFU loader, involved by uploading to the bootloader:http://wiki.stm32duino.com/index.php?ti … bootloader
Have a look to the maple loader BAT file: https://github.com/rogerclarkmelbourne/ … upload.bat
and the DFU util: https://github.com/rogerclarkmelbourne/ … -0.9-win64
You need Java though on the PC.
Here is how to use: http://dfu-util.sourceforge.net/dfu-util.1.html

mcnobby
Wed Sep 20, 2017 2:41 pm
Thanks again Steve, there’s alot to get through there, and im a bit of a newbie at this
I guess I have to pass a filename to the maple_upload.bat in a dos box or something
Im not that great in understanding windows batch files
Perseverence !

RogerClark
Wed Sep 20, 2017 9:18 pm
The bat files take multiple paramaters

The easiest way to figure out what is passed to them, is to comment out the line at the top that disables echo

Then add some echo statements to sprit out the args that are passed.

then run the ide, make sure verbose is turned on in the preferences, do an upload , and see what is spat out by the bat file


mcnobby
Thu Sep 21, 2017 8:19 am
Cheers Roger, I am going to try that today. as soon as you said VERBOSE, I smacked myself on the head.. of course !

So, about the other half of the question :
Is it possible to use the Maple Mini’s USB connection outside of the IDE ?
I would love to use the terminal-style features as I have used in other Arduinos directly from the USB connection

Regards Bob


RogerClark
Thu Sep 21, 2017 8:37 am
USB Serial works with most terminal programs but the terminal needs to set DTR (some don’t)

mcnobby
Thu Sep 21, 2017 8:39 am
I put my bin file in the same directory as the tools/win and accessed it via command prompt
maple_upload.bat COM124 1 1EAF:0003 abc.bin

worked great ! there was an error though
error resetting after download: usb_reset: could not reset device, win error: The system cannot find the file specified.
state(8) = dfuMANIFEST-WAIT-RESET, status(0) = No error condition is present


mcnobby
Thu Sep 21, 2017 8:55 am
[RogerClark – Thu Sep 21, 2017 8:37 am] –
USB Serial works with most terminal programs but the terminal needs to set DTR (some don’t)

I quickly tried Termite (nice simple terminal for windows), and set flow=DTR/DSR, instant success
The previous simple terminal I was using (HTComm) didnt have the DTR setting, and wasnt playing ball
Brilliant, thank you Roger !!
Bob


RogerClark
Thu Sep 21, 2017 8:56 am
There is a special branch of the repo for some Ham radio guys where DTR is not needed, but is quite out of date, so if you can find a terminal that can set DTR its the best bet

Leave a Reply

Your email address will not be published. Required fields are marked *