MapleMini : Standalone Bootloading and USB/Serial Usage

STM32duino bootloader aka Maple bootloader
mcnobby
Posts: 7
Joined: Thu Apr 30, 2015 5:41 am

MapleMini : Standalone Bootloading and USB/Serial Usage

Post by 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
Posts: 1611
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: MapleMini : Standalone Bootloading and USB/Serial Usage

Post by 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
Posts: 7
Joined: Thu Apr 30, 2015 5:41 am

Re: MapleMini : Standalone Bootloading and USB/Serial Usage

Post by 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
Posts: 1611
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: MapleMini : Standalone Bootloading and USB/Serial Usage

Post by 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
Posts: 7
Joined: Thu Apr 30, 2015 5:41 am

Re: MapleMini : Standalone Bootloading and USB/Serial Usage

Post by 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 !

User avatar
RogerClark
Posts: 6917
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: MapleMini : Standalone Bootloading and USB/Serial Usage

Post by 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
Posts: 7
Joined: Thu Apr 30, 2015 5:41 am

Re: MapleMini : Standalone Bootloading and USB/Serial Usage

Post by 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

User avatar
RogerClark
Posts: 6917
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: MapleMini : Standalone Bootloading and USB/Serial Usage

Post by 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
Posts: 7
Joined: Thu Apr 30, 2015 5:41 am

Re: MapleMini : Standalone Bootloading and USB/Serial Usage

Post by 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

Code: Select all

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
I get the COM[port number], and I am guessing the '1' is an fixed thing..
But I dont not know if 1EAF:0003 is specific to my set up, or device, or if this is something I can use on another computer

I think the simplest way is for me to write a batch file that calls the other batch file, passing the parameters in

Cheers for any extra assistance on this, HUGE help so far !

Bob

mcnobby
Posts: 7
Joined: Thu Apr 30, 2015 5:41 am

Re: MapleMini : Standalone Bootloading and USB/Serial Usage

Post by mcnobby » Thu Sep 21, 2017 8:55 am

RogerClark wrote:
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

Post Reply