<?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: Custom build not starting after reset</title>
		<link>http://forums.leaflabs.com/topic.php?id=74384</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:04:56 +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=74384" rel="self" type="application/rss+xml" />

		<item>
			<title>bobc on "Custom build not starting after reset"</title>
			<link>http://forums.leaflabs.com/topic.php?id=74384#post-105596</link>
			<pubDate>Thu, 01 Jan 2015 08:29:29 +0000</pubDate>
			<dc:creator>bobc</dc:creator>
			<guid isPermaLink="false">105596@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Here is my proposed workaround without changing the bootloader. Change common.inc as follows:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;/*
     * .data
     */
    .data :
      {
        __data_start__ = .;
      	LONG(0)
        . = ALIGN(8);

        *(.got.plt) *(.got)
        *(.data .data.* .gnu.linkonce.d.*)

        . = ALIGN(8);
        __data_end__ = .;
      } &#38;gt; REGION_DATA AT&#38;gt; REGION_RODATA&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;This ensures that the first word in RAM of Flash build is zero.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>bobc on "Custom build not starting after reset"</title>
			<link>http://forums.leaflabs.com/topic.php?id=74384#post-105595</link>
			<pubDate>Wed, 31 Dec 2014 16:25:17 +0000</pubDate>
			<dc:creator>bobc</dc:creator>
			<guid isPermaLink="false">105595@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I notice that in one of the maple-bootloader forks this fix has been applied &#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;https://github.com/chrismerck/maple-bootloader/commit/b6b45b6234dad20eda8e89a46ce7d5f825992195&#34; rel=&#34;nofollow&#34;&#62;https://github.com/chrismerck/maple-bootloader/commit/b6b45b6234dad20eda8e89a46ce7d5f825992195&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;which just disables jump to RAM. I must admit RAM builds are not a feature I ever use on embedded targets, but I guess some people might want to use it.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>bobc on "Custom build not starting after reset"</title>
			<link>http://forums.leaflabs.com/topic.php?id=74384#post-105594</link>
			<pubDate>Wed, 31 Dec 2014 16:15:48 +0000</pubDate>
			<dc:creator>bobc</dc:creator>
			<guid isPermaLink="false">105594@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hi, I had exactly the same problem, and I think I have now got to the bottom of it.&#60;/p&#62;
&#60;p&#62;The Maple bootloader has a rather simple way of checking if a RAM download is present. At startup it checks a single location in RAM for a value that matches a RAM address. The assumption is that a RAM build will have the vector table at start of RAM, and the vector table is basically a list of address.&#60;/p&#62;
&#60;p&#62;Unfortunately, a Flash build can also have an address at the start of RAM, depending on how the linker allocates RAM. So the bootloader sees what it thinks is the vector table and jumps to RAM instead of Flash. OOPS!&#60;/p&#62;
&#60;p&#62;Modifying the bootloader to be more robust could be done, but in our case we want to be able to support existing bootloaders in the field, rather than have users update their bootloaders.&#60;/p&#62;
&#60;p&#62;Therefore I think that changing the Flash build to put a zero word in the magic location will enable the bootloader to work correctly.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jonatan.olofsson on "Custom build not starting after reset"</title>
			<link>http://forums.leaflabs.com/topic.php?id=74384#post-105566</link>
			<pubDate>Tue, 28 Oct 2014 14:10:32 +0000</pubDate>
			<dc:creator>jonatan.olofsson</dc:creator>
			<guid isPermaLink="false">105566@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;For future reference; Linking with the object files instead of libmaple.a solved the issue.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jonatan.olofsson on "Custom build not starting after reset"</title>
			<link>http://forums.leaflabs.com/topic.php?id=74384#post-105563</link>
			<pubDate>Sun, 26 Oct 2014 04:56:37 +0000</pubDate>
			<dc:creator>jonatan.olofsson</dc:creator>
			<guid isPermaLink="false">105563@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Further investigation led me to a very weird observation; &#60;em&#62;every second&#60;/em&#62; reset start the application when manually built..&#60;/p&#62;
&#60;p&#62;When building with the makefiles, every reset starts the application properly..&#60;/p&#62;
&#60;p&#62;This result is invariable, and so occurs every time.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jonatan.olofsson on "Custom build not starting after reset"</title>
			<link>http://forums.leaflabs.com/topic.php?id=74384#post-105562</link>
			<pubDate>Sat, 25 Oct 2014 19:30:44 +0000</pubDate>
			<dc:creator>jonatan.olofsson</dc:creator>
			<guid isPermaLink="false">105562@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hello,&#60;/p&#62;
&#60;p&#62;I realize I am on unsupported territory by replacing the make build files with another buildsystem for libmaple, but it is indeed very rewarding to learn how to cross-compile the binaries from scratch.&#60;/p&#62;
&#60;p&#62;I have everything seemingly working except for one single issue: the application does not start after a reset, but requires a power cycle to start. (I posted about this earlier in &#34;Anyone using libmaple.a?&#34;, but I then thought it would be more appropriate to start a new thread instead of hijacking bobc's)&#60;/p&#62;
&#60;p&#62;I've been poking around, comparing compile/link flags, checking with nm and reading ld-files to see where stuff are put. I am not too familiar with ld-files however, so I am not quite sure what to look for..&#60;/p&#62;
&#60;p&#62;Any suggestions? What symbols are needed to be in what addresses for the soft reset to enter the application?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
