<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>LeafLabs Garden &#187; Topic: Flash a bootloader to maple mini</title>
		<link>http://forums.leaflabs.com/topic.php?id=1140</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:06:21 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://forums.leaflabs.com/search.php</link>
		</textInput>
		<atom:link href="http://forums.leaflabs.com/rss.php?topic=1140" rel="self" type="application/rss+xml" />

		<item>
			<title>feurig on "Flash a bootloader to maple mini"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1140&amp;page=2#post-21867</link>
			<pubDate>Sat, 05 Jan 2013 16:44:32 +0000</pubDate>
			<dc:creator>feurig</dc:creator>
			<guid isPermaLink="false">21867@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Thats better. Now the issues are related to the chip not talking to you. Yes you do need to wire boot1 to gnd and pull boot0 high (which is what holding the button does) during the reset. It couldn't hurt to just hardwire boot0 high until you get the bootloader talking. At some point one of us should probably tweak on the python so it handles the exception a bit more gracefully.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Leonardo on "Flash a bootloader to maple mini"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1140&amp;page=2#post-21828</link>
			<pubDate>Wed, 02 Jan 2013 18:36:31 +0000</pubDate>
			<dc:creator>Leonardo</dc:creator>
			<guid isPermaLink="false">21828@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hi feurig. &#60;/p&#62;
&#60;p&#62;I tried what you said but the result was:&#60;/p&#62;
&#60;p&#62;Microsoft Windows [versão 6.1.7600]&#60;br /&#62;
Copyright (c) 2009 Microsoft Corporation. Todos os direitos reservados.&#60;/p&#62;
&#60;p&#62;C:\Users\Leonardo&#38;gt;cd c:\python27&#60;/p&#62;
&#60;p&#62;c:\Python27&#38;gt;python.exe stm32loader.py -p COM3 -evw maple_mini_boot.bin&#60;br /&#62;
Reading data from maple_mini_boot.bin&#60;br /&#62;
Can't init. Ensure BOOT0=1, BOOT1=0, and reset device&#60;br /&#62;
Traceback (most recent call last):&#60;br /&#62;
  File &#34;stm32loader.py&#34;, line 486, in &#38;lt;module&#38;gt;&#60;br /&#62;
    bootversion = cmd.cmdGet()&#60;br /&#62;
  File &#34;stm32loader.py&#34;, line 139, in cmdGet&#60;br /&#62;
    if self.cmdGeneric(0x00):&#60;br /&#62;
  File &#34;stm32loader.py&#34;, line 136, in cmdGeneric&#60;br /&#62;
    return self._wait_for_ack(hex(cmd))&#60;br /&#62;
  File &#34;stm32loader.py&#34;, line 87, in _wait_for_ack&#60;br /&#62;
    raise CmdException(&#34;No response to %s&#34; % info)&#60;br /&#62;
__main__.CmdException: No response to 0x0&#60;/p&#62;
&#60;p&#62;My &#34;boot1&#34; pin has already set to the ground. I run the &#34;built-in serial bootloader&#34; exactly as step 3:&#60;/p&#62;
&#60;p&#62;Step 3: Run the built-in hardware serial bootloader[2]. Accomplish this using the following steps:&#60;/p&#62;
&#60;p&#62;Press and hold the reset and BUT buttons.&#60;br /&#62;
Release the reset button without releasing BUT.&#60;br /&#62;
Release BUT.&#60;/p&#62;
&#60;p&#62;Need I set the &#34;but&#34; pin (pin 32) to Vcc as i put the &#34;boot1&#34; pin to the ground (phisically, with a wire)?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>feurig on "Flash a bootloader to maple mini"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1140&amp;page=2#post-21810</link>
			<pubDate>Sat, 29 Dec 2012 15:07:11 +0000</pubDate>
			<dc:creator>feurig</dc:creator>
			<guid isPermaLink="false">21810@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Thats a python error. &#60;/p&#62;
&#60;p&#62;That looks a lot like a &#34;python 3 makes significant changes so no one is adapting or testing against it yet&#34; error. &#60;/p&#62;
&#60;p&#62;Can you try it with python2.7?&#60;/p&#62;
&#60;p&#62;I have only run the stmloader with python 2.5-2.7.3 and it seems to work well on linux and osx on those versions.&#60;br /&#62;
I have only done pyserial and wxpython stuff using python for windows (also version 2.7)&#60;/p&#62;
&#60;p&#62;I am surprised no one has made a py2exe bundle for it.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Leonardo on "Flash a bootloader to maple mini"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1140&amp;page=2#post-21809</link>
			<pubDate>Sat, 29 Dec 2012 14:49:05 +0000</pubDate>
			<dc:creator>Leonardo</dc:creator>
			<guid isPermaLink="false">21809@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hi guys.&#60;br /&#62;
I'm having a big problem with my maple mini. I probably erased the bootloader from it. I'm trying to flash it back. I'm using the FTDI CI of my arduino duemilanove. When I run the &#34;python.exe stm32loader.py -p COM3 -evw maple_mini_boot.bin&#34; command it return this:&#60;/p&#62;
&#60;p&#62;Microsoft Windows [versão 6.1.7600]&#60;br /&#62;
Copyright (c) 2009 Microsoft Corporation. Todos os direitos reservados.&#60;/p&#62;
&#60;p&#62;C:\Users\Leonardo&#38;gt;cd c:\python33&#60;/p&#62;
&#60;p&#62;c:\Python33&#38;gt;python.exe stm32loader.py -p COM3 -evw maple_mini_boot.bin&#60;br /&#62;
Reading data from maple_mini_boot.bin&#60;br /&#62;
Traceback (most recent call last):&#60;br /&#62;
  File &#34;stm32loader.py&#34;, line 479, in &#38;lt;module&#38;gt;&#60;br /&#62;
    data = read(args[0])&#60;br /&#62;
  File &#34;stm32loader.py&#34;, line 383, in read&#60;br /&#62;
    if bytes.startswith('\x7FELF'):&#60;br /&#62;
TypeError: startswith first arg must be bytes or a tuple of bytes, not str&#60;/p&#62;
&#60;p&#62;Why he is saying that I'm trying to use a srt? What is that mean? I read in the datasheet of FTDI  FT232RT that it have a buffer to the RX and Tx data. This buffer can be a problem? It can be the origem of my problem?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mikep on "Flash a bootloader to maple mini"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1140&amp;page=2#post-7615</link>
			<pubDate>Fri, 13 Jan 2012 08:47:06 +0000</pubDate>
			<dc:creator>mikep</dc:creator>
			<guid isPermaLink="false">7615@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;If everything else works fine and you can flash properly, then it might be that the LED_PIN is wrong in the bootloader source for the board you are using. I had the same issue when I flashed the Maple bootloader on another board which was using a different LED_PIN. Not sure why the official Maple Mini bootloader would have the wrong LED_PIN for the Maple Mini, but I would check that first, just to make sure.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>siy on "Flash a bootloader to maple mini"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1140&amp;page=2#post-7611</link>
			<pubDate>Fri, 13 Jan 2012 02:48:13 +0000</pubDate>
			<dc:creator>siy</dc:creator>
			<guid isPermaLink="false">7611@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I've noticed this issue with Maple Mini like board and appropriate bootloader. I've used binary downloaded from the page dedicated to the bootloader. Perhaps this is the cause. When I'll have some spare time I'll try to prepare binary from sources and check if this will solve the issue. In fact missing blinks, beside some inconveniences, don't prevent uploading sketches, at least for my board.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>rosendo on "Flash a bootloader to maple mini"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1140&amp;page=2#post-7604</link>
			<pubDate>Thu, 12 Jan 2012 20:21:30 +0000</pubDate>
			<dc:creator>rosendo</dc:creator>
			<guid isPermaLink="false">7604@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Something that I just noticed after flashing the file maple_mini_boot.bin is that those 4 blinks fast blinks followed by slow blinks are gone!&#60;/p&#62;
&#60;p&#62;I thought that maybe the problem could be in both stm32loader.py files, so I tried the method suggested by siy (using stm32flash on linux terminal) and even though I could flash properly (very nice by the way, siy! Python and pyserial are not needed at all), the blinks that I would have are not there.&#60;/p&#62;
&#60;p&#62;Was there any bootloader change from the Rev1 to Rev2, or something like this? Did other people experience this same problem, or is it just me?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>poslathian on "Flash a bootloader to maple mini"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1140&amp;page=2#post-7557</link>
			<pubDate>Wed, 11 Jan 2012 11:38:12 +0000</pubDate>
			<dc:creator>poslathian</dc:creator>
			<guid isPermaLink="false">7557@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;hmm, its possible the stm32loader script in the boot loader repo is out of date. Not sure whats happening there. &#60;/p&#62;
&#60;p&#62;I wonder why the Arduino-as-serial-passthrough was not working. At the end of the day, the rx/tx lines on an arduino are just hard wired to the onboard FTDI chip. Serial1 on Maple is 5V compatible so no problem there. Its possible that while the rx line on maple is 5v compatible, the ftdi chip on the Arduino running at 5V is not sensitive to Maple's 3.3V output on tx. &#60;/p&#62;
&#60;p&#62;Also, as mike pointed out, Vin is a pre-regulator input. Since there is a drop from the regulator, you need to give it something more than 3.3. The official range is 5V-12V, but in practice 4.2V should get you there. &#60;/p&#62;
&#60;p&#62;Sometimes, and this is a little dangerous, you might want to have multiple systems running on exactly the same power source. In this case you can provide 3.3V directly onto Maple's Vcc pins. This is handy when comm busses are very sensitive to differences in voltages. However, if you put too much voltage on Vcc directly you can fry the MCU. Its quite sensitive, and will usually smokes around 4.2.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>siy on "Flash a bootloader to maple mini"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1140#post-7552</link>
			<pubDate>Wed, 11 Jan 2012 02:35:12 +0000</pubDate>
			<dc:creator>siy</dc:creator>
			<guid isPermaLink="false">7552@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I'm glad that you have solved this issue. And no, stm32flash is not mine, I just found it while fighting with similar issue with my own board. I had much more &#34;unknown&#34; things that time - new for me MCU, new DIY just soldered board, new just soldered USB&#38;lt;-&#38;gt;UART bridge, new flashing procedure (in fact, very convenient comparing to AVR MCU which I had used before), and so on and so forth. After a number of failed attempts with different versions of stm32loader.py, I was googling for something helpful and then found stm32flash site. In few minutes after compiling it I had board which appeared in USB devices list and couple minutes later it was blinking with LED after flashing compiled sketch. If I'll have chance to meet author of stm32flash in person I put him a box of beer :)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>rosendo on "Flash a bootloader to maple mini"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1140#post-7551</link>
			<pubDate>Wed, 11 Jan 2012 01:12:25 +0000</pubDate>
			<dc:creator>rosendo</dc:creator>
			<guid isPermaLink="false">7551@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Yes! And that was the problem! I bought something looking like an USB stick with an FTDI 3.3V and some place to solder RXD,TXD,GND and VCC cables. The procedure worked really well (sorry siy, I didn't need your stm32flash program.&#60;/p&#62;
&#60;p&#62;But something happened that made me really nervous. First I used the stm32loader.py from maple-bootloader/blob/master/flash ( &#60;a href=&#34;https://github.com/leaflabs/maple-bootloader/blob/master/flash/stm32loader.py&#34; rel=&#34;nofollow&#34;&#62;https://github.com/leaflabs/maple-bootloader/blob/master/flash/stm32loader.py&#60;/a&#62; ) and this one didn't work at all. I tried to upload the example &#34;Blink&#34; after flashing and it failed while waiting for DFU.&#60;/p&#62;
&#60;p&#62;Then, I took the one from libmaple/master/support/ ( &#60;a href=&#34;https://raw.github.com/leaflabs/libmaple/master/support/stm32loader.py&#34; rel=&#34;nofollow&#34;&#62;https://raw.github.com/leaflabs/libmaple/master/support/stm32loader.py&#60;/a&#62; ) and this one worked fine.&#60;/p&#62;
&#60;p&#62;Anyway... Thanks for the help guys!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>rosendo on "Flash a bootloader to maple mini"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1140#post-7538</link>
			<pubDate>Mon, 09 Jan 2012 20:02:26 +0000</pubDate>
			<dc:creator>rosendo</dc:creator>
			<guid isPermaLink="false">7538@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I decided to go for a FTDI 3.3V, as you guys suggested. It will arrive in a couple of days, so I will keep you guys posted! Thanks a lot for the help!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "Flash a bootloader to maple mini"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1140#post-7511</link>
			<pubDate>Fri, 06 Jan 2012 17:10:56 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">7511@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;rosendo - have you got access to test equipment, for example an oscilloscope? You might be able to measure the voltages across the USART connections with it.&#60;/p&#62;
&#60;p&#62;IIRC, the FTDI FT232RL chip on the Arduino Duemilanove is set up to drive at 5Volts, which might be causing some problems. You might be able to confirm this with an oscilloscope (e.g by cat'ing a file to the Arduino's USB device with the ATmega pulled out).&#60;/p&#62;
&#60;p&#62;The 5V out from the FTDI FT232RL can be solved with a pair of resistors as a voltage divider, to divide down 5V to 3.3V. This might help. I think the Maple mini should be able to drive the FTDI. It should work because the FTDI FT232R spec says the switching voltage is 1.5V, but there might be something else going on. You should be able to see USART data coming back from Maple with an oscilloscope, and hence get an idea that the whole round-trip is doing something.&#60;/p&#62;
&#60;p&#62;I strongly agree with siy. Try a different USB&#38;lt;-&#38;gt;USART if you can, to remove a possible cause of problems.&#60;/p&#62;
&#60;p&#62;I have used an ordinary FTDI 3.3V USB to USART cable to program STM32F1xx, along with the Python loader, and it works fine, though it is expensive compared to some other options. I decided saving a couple of hours faffing around more than paid for the FTDI cable.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>siy on "Flash a bootloader to maple mini"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1140#post-7507</link>
			<pubDate>Fri, 06 Jan 2012 07:05:50 +0000</pubDate>
			<dc:creator>siy</dc:creator>
			<guid isPermaLink="false">7507@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Perhaps it worth to use some other USB&#38;lt;-&#38;gt;USART converter, there are a number of different ones available from various sources - from computer shops to ebay. For initial flashing of my boards I'm using very simple converter built on CP2102 and it works just great. I took scheme right from the datasheet, but in first version of my converter only three pins were broken out - RX/TX/GND. Later I've added 3.3V output and this made things even simpler - no need to use additional power source for flashed board (CP2102 on-chip voltage regulator capable to source up to 100ma, which is enough for my boards and, I think, for Maple Mini too). Despite small QFN package this IC is quite simple to solder it manually.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>rosendo on "Flash a bootloader to maple mini"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1140#post-7505</link>
			<pubDate>Fri, 06 Jan 2012 04:22:30 +0000</pubDate>
			<dc:creator>rosendo</dc:creator>
			<guid isPermaLink="false">7505@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I tried from Ubuntu and got the same error. I even tried the stm32flash suggested by siy, but still failed. Now I am thinking about trying a different arduino...&#60;/p&#62;
&#60;p&#62;I am using 25 and 26 (RX1 and TX1), where the RX1 goes to arduino pin 1 (TX) and TX1 goes to pin 0 (RX). Thanks for the help guys... I will try to find another arduino to keep trying.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mikep on "Flash a bootloader to maple mini"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1140#post-7498</link>
			<pubDate>Thu, 05 Jan 2012 23:38:30 +0000</pubDate>
			<dc:creator>mikep</dc:creator>
			<guid isPermaLink="false">7498@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hi rose do,&#60;br /&#62;
One more thing came to mind: You did not mention which RX and TX pins you are using on the Maple Mini!&#60;br /&#62;
The built-in flash loader uses USART1, so on the Maple Mini this would be pins 25 and 26 ( &#60;a href=&#34;http://leaflabs.com/wp-content/uploads/2010/02/maplemini-r21.png&#34; rel=&#34;nofollow&#34;&#62;http://leaflabs.com/wp-content/uploads/2010/02/maplemini-r21.png&#60;/a&#62; ).&#60;br /&#62;
Maybe you used pin 0 and 1?&#60;br /&#62;
Also it seems you should power the Mini from USB as I mentioned before, since if the LED is dimmer it probably wasn't getting enough power.&#60;br /&#62;
Mike
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
