<?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: new bootloader written to board with no errors but doesn&#039;t work</title>
		<link>http://forums.leaflabs.com/topic.php?id=9232</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:18:46 +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=9232" rel="self" type="application/rss+xml" />

		<item>
			<title>StephenFromNYC on "new bootloader written to board with no errors but doesn&#039;t work"</title>
			<link>http://forums.leaflabs.com/topic.php?id=9232#post-20373</link>
			<pubDate>Fri, 19 Oct 2012 21:19:47 +0000</pubDate>
			<dc:creator>StephenFromNYC</dc:creator>
			<guid isPermaLink="false">20373@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;@dsoodak-&#60;/p&#62;
&#60;p&#62;I do not code using Python, so this post may not help you solve your problem.&#60;/p&#62;
&#60;p&#62;In your &#60;a href=&#34;http://forums.leaflabs.com/topic.php?id=9232#post-20345&#34;&#62;first post&#60;/a&#62; you said you are using a Maple Rev 5 board.&#60;/p&#62;
&#60;p&#62;However, in your last post (see DOS prompt line) it appears you are using the RET6 board?&#60;/p&#62;
&#60;p&#62;Hope this helps.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>dsoodak on "new bootloader written to board with no errors but doesn&#039;t work"</title>
			<link>http://forums.leaflabs.com/topic.php?id=9232#post-20371</link>
			<pubDate>Fri, 19 Oct 2012 17:39:36 +0000</pubDate>
			<dc:creator>dsoodak</dc:creator>
			<guid isPermaLink="false">20371@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Update: This part of the problem is now solved. Make the following change to run the Python bootloader loading script to make it read the entire binary in Windows:&#60;/p&#62;
&#60;p&#62;data = map(lambda c: ord(c), file(args[0]).read())&#60;br /&#62;
-&#38;gt;&#60;br /&#62;
f=open(args[0], mode='rb')&#60;br /&#62;
data = map(lambda c: ord(c), f.read())&#60;/p&#62;
&#60;p&#62;in DOS, this input&#60;br /&#62;
C:\Python27\python.exe stm32loader.py -p COM5 -evw maple_RET6_boot.bin&#60;br /&#62;
Produced the following output(some parts skipped):&#60;br /&#62;
Bootloader version 22&#60;br /&#62;
Chip id `['0x4', '0x10']'&#60;br /&#62;
Write 15744 bytes&#60;br /&#62;
Write 256 bytes at 0x8000000&#60;br /&#62;
...&#60;br /&#62;
Write 256 bytes at 0x8003D00&#60;br /&#62;
...&#60;br /&#62;
Read 256 bytes at 0x8003D00&#60;br /&#62;
Verification OK&#60;/p&#62;
&#60;p&#62;Still not actually working, though (usb not connecting to PC on reset like it used to before I started trying to reload the bootloader).
&#60;/p&#62;</description>
		</item>
		<item>
			<title>dsoodak on "new bootloader written to board with no errors but doesn&#039;t work"</title>
			<link>http://forums.leaflabs.com/topic.php?id=9232#post-20370</link>
			<pubDate>Fri, 19 Oct 2012 15:04:20 +0000</pubDate>
			<dc:creator>dsoodak</dc:creator>
			<guid isPermaLink="false">20370@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Update: Evidently, the python &#34;read&#34; function, when implemented in Windows, interprets &#34;0x1A&#34; as EOF. I suppose the workaround is a more suitable question for a Python board, but I will post the results here in case anyone else tries to do this in Windows.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>dsoodak on "new bootloader written to board with no errors but doesn&#039;t work"</title>
			<link>http://forums.leaflabs.com/topic.php?id=9232#post-20369</link>
			<pubDate>Fri, 19 Oct 2012 14:31:15 +0000</pubDate>
			<dc:creator>dsoodak</dc:creator>
			<guid isPermaLink="false">20369@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Update: The problem is that python refuses to read the whole file. Maybe because it was compiled in a linux environment so it thinks it sees EOF?&#60;/p&#62;
&#60;p&#62;I added &#34;open(args[0], 'rb')&#34; before&#60;br /&#62;
&#34;data = map(lambda c: ord(c), file(args[0]).read())&#34;,&#60;br /&#62;
then tried&#60;br /&#62;
&#34;data = map(lambda c: ord(c), file(args[0]).read(os.path.getsize(args[0])))&#34;, but it is still only reading 486 bytes even though os.path.getsize() returns 15744 bytes.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>dsoodak on "new bootloader written to board with no errors but doesn&#039;t work"</title>
			<link>http://forums.leaflabs.com/topic.php?id=9232#post-20345</link>
			<pubDate>Thu, 18 Oct 2012 20:15:39 +0000</pubDate>
			<dc:creator>dsoodak</dc:creator>
			<guid isPermaLink="false">20345@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Following the instructions on &#60;a href=&#34;http://leaflabs.com/docs/bootloader.html&#34; rel=&#34;nofollow&#34;&#62;http://leaflabs.com/docs/bootloader.html&#60;/a&#62;:&#60;/p&#62;
&#60;p&#62;C:\Python27\python.exe stm32loader.py -p COM5 -evw maple_RET6_boot.bin&#60;br /&#62;
Bootloader version 22&#60;br /&#62;
Chip id `['0x4', '0x10']'&#60;br /&#62;
Write 256 bytes at 0x8000000&#60;br /&#62;
Write 256 bytes at 0x8000100&#60;br /&#62;
Read 256 bytes at 0x8000000&#60;br /&#62;
Read 256 bytes at 0x8000100&#60;br /&#62;
Verification OK&#60;/p&#62;
&#60;p&#62;For some reason it only wrote 512 bytes of the file(I downloaded the pre-compiled binary from the website)...any idea what would cause this?&#60;/p&#62;
&#60;p&#62;I'm using WindowsXP, Python 2.7, py-serial 2.6, and have the Maple Rev5 board.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
