<?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: Yet another bootloader scheme?</title>
		<link>http://forums.leaflabs.com/topic.php?id=758</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:09:40 +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=758" rel="self" type="application/rss+xml" />

		<item>
			<title>gbulmer on "Yet another bootloader scheme?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=758#post-4551</link>
			<pubDate>Tue, 10 May 2011 18:46:32 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">4551@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;poslathian - according to Section 3.4 &#34;Boot configuration&#34; of RM0008, system memory is aliased to appear at 0x0000 0000:&#60;/p&#62;
&#60;p&#62;&#34;Depending on the selected boot mode, main Flash memory, system memory or SRAM is accessible as follows:&#60;br /&#62;
●	Boot from main Flash memory: the main Flash memory is aliased in the boot memory space (0x0000 0000), but still accessible from its original memory space (0x800 0000). In other words, the Flash memory contents can be accessed starting from address 0x0000 0000 or 0x800 0000.&#60;br /&#62;
●	Boot from system memory: the system memory is aliased in the boot memory space (0x0000 0000), but still accessible from its original memory space (0x1FFF B000 in connectivity line devices, 0x1FFF F000 in other devices).&#34;&#60;/p&#62;
&#60;p&#62;So, if the System memory resident bootloader is position independent code, the code at 0x1fffc000 should run. This is conjecture, I have never tried to make this work, but it is plausible.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>poslathian on "Yet another bootloader scheme?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=758#post-4544</link>
			<pubDate>Tue, 10 May 2011 13:50:03 +0000</pubDate>
			<dc:creator>poslathian</dc:creator>
			<guid isPermaLink="false">4544@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I am not aware of any means of accessing the built-in hardware serial bootloader from a user application. However, ST does not make it clear how this little program is implemented, so I dont want to say its &#34;not possible.&#34; Its far simpler, though, to just re-implement the protocol in a user program that we can actually attach to USB. As gbulmer pointed out, the current status of this effort is recorded in the other post
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "Yet another bootloader scheme?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=758#post-4521</link>
			<pubDate>Sun, 08 May 2011 08:09:08 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">4521@http://forums.leaflabs.com/</guid>
			<description>&#60;blockquote&#62;&#60;p&#62;Can the STM32's serial bootloader be accessed via the user application? &#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;AFAIK, there is nothing to prevent a user program accessing the serial bootloader, it is just code, and starts at a known address. It might need a little assembly language code to set things up correctly to be called from a user program, but likely very little because I don't think the serial bootloader will come back to the user program.&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;If it can't be accessed from the application level, then the maple leaf folks will end up having to re-implement STM's serial bootloader protocol (see reference below). &#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;The manufactured-in serial bootloader in the STM32F103 (on Maple) does not support booting over its USB peripheral interface, so the manufactured in serial bootloader code is only useful if you want to boot over serial, and as you have discovered that is available anyway. The STM32F105 can boot over USB in its manufactured state; it wouldn't need a new bootloader.&#60;/p&#62;
&#60;p&#62;Also LeafLabs might choose not to implement the STM32F serial bootloader protocol over USB-serial.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>kqr2 on "Yet another bootloader scheme?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=758#post-4485</link>
			<pubDate>Wed, 04 May 2011 14:58:22 +0000</pubDate>
			<dc:creator>kqr2</dc:creator>
			<guid isPermaLink="false">4485@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Thanks for pointing out the earlier discussion. I'm pretty new to the maple.&#60;/p&#62;
&#60;p&#62;Can the STM32's serial bootloader be accessed via the user application?  From the schematics, it looks like the BUT button is tied to BOOT0 which causes the STM32 to enter bootloader mode after reset.&#60;/p&#62;
&#60;p&#62;If it can't be accessed from the application level, then the maple leaf folks will end up having to re-implement STM's serial bootloader protocol (see reference below).  &#60;/p&#62;
&#60;p&#62;Since the protocol seems STM32 specific, I don't know if there would be any implications if you later tried to port it to another ARM processor.&#60;/p&#62;
&#60;p&#62;Actually, the nice thing with STM's IAP example is that you can even upgrade the system using hyperterminal.  You just select transfer -&#38;gt; send file / ymodem. Also, I looked at the source code and the ymodem protocol seems very simple.&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/APPLICATION_NOTE/CD00264342.pdf&#34; rel=&#34;nofollow&#34;&#62;http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/APPLICATION_NOTE/CD00264342.pdf&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "Yet another bootloader scheme?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=758#post-4484</link>
			<pubDate>Wed, 04 May 2011 06:05:54 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">4484@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Proposed changes to the bootloader are in several threads, the most current one is &#34;A proposal to improve Maple Firmware&#34;:&#60;br /&#62;
&#60;a href=&#34;http://forums.leaflabs.com/topic.php?id=207&#34; rel=&#34;nofollow&#34;&#62;http://forums.leaflabs.com/topic.php?id=207&#60;/a&#62;&#60;br /&#62;
That proposes pretty much the same idea and includes similar reasons.&#60;br /&#62;
Switching between USB 'virtual serial' and DFU creates problems on some platforms, and some of those are posted on that thread, and some on other threads. &#60;/p&#62;
&#60;p&#62;There is a thread (sorry can't see it) where poslathian (of LeafLabs) explains the rationale for the dual interface. I think we all now feel that is more trouble than its worth.&#60;/p&#62;
&#60;p&#62;1. An STM32F103 doesn't have a usb-to-serial interface on board, but I think I understand what you mean. STM32F has a USB hardware peripheral, and the type of device it implements is purely software/firmware, so that it how the USB-to-serial interface is implemented now. The scheme you propose can be made using the on-board USB peripheral - see other thread.&#60;/p&#62;
&#60;p&#62;2. STM32F's are manufactured with a Serial bootloader, so a physical USB-to-Serial scheme works now. I use an FTDI USB-to-Serial cable to program 'raw' STM32F103's. I have lobbied for implementing exactly the same protocol over the USB virtual serial device in the bootloader. There is a list of advantages including removing the necessity to write and port a host-side upload application on all supported platforms.&#60;/p&#62;
&#60;p&#62;LeafLabs have written that they will rework the USB bootloader, so please contribute!-)&#60;/p&#62;
&#60;p&#62;(full disclosure: I am not a member of LeafLabs staff)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>kqr2 on "Yet another bootloader scheme?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=758#post-4482</link>
			<pubDate>Wed, 04 May 2011 03:21:17 +0000</pubDate>
			<dc:creator>kqr2</dc:creator>
			<guid isPermaLink="false">4482@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I was reading through the bootloader schemes at &#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; and wondered if leaflabs ever considered a pure usb-to-serial bootloader.&#60;/p&#62;
&#60;p&#62;ST Micro gives an example of IAP (in application programming) which uses the RS232 port (AN2557 : see below for link). In their application note, they use the standard ymodem protocol.&#60;/p&#62;
&#60;p&#62;Instead of using the RS232 port, you could use the same method via the usb-to-serial interface. DTR / Reset would cause the maple to go into upgrade mode for a few seconds. If it detects the ymodem protocol, it would start the upgrade process. If nothing happened, it would proceed to run the user application. &#60;/p&#62;
&#60;p&#62;The advantage is that you wouldn't have to switch from DFU to virtual com port drivers.&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/APPLICATION_NOTE/CD00161640.pdf&#34; rel=&#34;nofollow&#34;&#62;http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/APPLICATION_NOTE/CD00161640.pdf&#60;/a&#62;
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
