<?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: Anyone using libmaple.a?</title>
		<link>http://forums.leaflabs.com/topic.php?id=74382</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=74382" rel="self" type="application/rss+xml" />

		<item>
			<title>jonatan.olofsson on "Anyone using libmaple.a?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=74382#post-105565</link>
			<pubDate>Tue, 28 Oct 2014 14:09:06 +0000</pubDate>
			<dc:creator>jonatan.olofsson</dc:creator>
			<guid isPermaLink="false">105565@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Thanks, gbulmer,&#60;/p&#62;
&#60;p&#62;Great advices, it was of much use.&#60;/p&#62;
&#60;p&#62;I did, indeed, use just a &#34;blink&#34; program. In the end, I had to ditch building/linking with libmaple.a, as it seems too much was stripped away by the linker if linked with the library.. Fortunately, this was trivial with my tup setup, so once I decided for that, it worked right away!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "Anyone using libmaple.a?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=74382#post-105564</link>
			<pubDate>Mon, 27 Oct 2014 10:25:30 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">105564@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Have you reduced the program to the simplest case, something like blink?&#60;/p&#62;
&#60;p&#62;Have you tried comparing a small, simple, sketch built in a way which works with the same sketch built in a way that does not?&#60;/p&#62;
&#60;p&#62;There are a few causes I can think of.&#60;/p&#62;
&#60;p&#62;This probably is not the issue, but it is worth being clear. Are you loading to RAM intitially? IIRC, there was a period when there was a bug in the bootloader that might look like that problem.. If a program is loaded in RAM, the bootloader needs to know. however, part of the point of loading into RAM is to *not* load from there after a power cycle. So, IIRC, the bootloader sets a 'magic value' in RAM so that it would come back through reset and start at the program in RAM. However, it did not reset the magic value after a load into Flash. So it would keep trying to run from RAM until a power cycle destroyed the magic value. I thought it had been fixed, but maybe you have an old bootloader?&#60;/p&#62;
&#60;p&#62;If you have a program that works when built by the Maple IDE, but not when built otherwise, try to compare the files.&#60;br /&#62;
A first step would be just check their sizes.&#60;/p&#62;
&#60;p&#62;Within the Maple IDE package, there is gcc's &#60;em&#62;nm&#60;/em&#62; and &#60;em&#62;objdump&#60;/em&#62;. The nm program will give the list of symbols (functions and global variables) in a executable (before the IDE strips it down to a hex, IIRC). So a step would be to get the symbols in each file and then sort and compare the two lists, e.g. with sort &#124; uniq, or sort the files then diff. If there are different symbols, then it may be clear what is happening.&#60;/p&#62;
&#60;p&#62;If this shows very few differences, and it isn;t clear, then try &#60;em&#62;objdump&#60;/em&#62; on each program to get an assembler listing, and diff those. If you are lucky, the order of the object files will be similar enough that the differences are clearer.&#60;/p&#62;
&#60;p&#62;(Full disclosure. I am not a member of LeafLabs staff)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jonatan.olofsson on "Anyone using libmaple.a?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=74382#post-105561</link>
			<pubDate>Sat, 25 Oct 2014 09:13:21 +0000</pubDate>
			<dc:creator>jonatan.olofsson</dc:creator>
			<guid isPermaLink="false">105561@http://forums.leaflabs.com/</guid>
			<description>&#60;blockquote&#62;&#60;p&#62;
The problem is that the sketch I built doesn't run after it is downloaded. A reset doesn't help, but after a power cycle it runs fine. I'm pretty sure it is not hardware, the same thing happens on 3 different boards.
&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;I am having this issue with my maple mini right now as well! I have been replacing the makefiles with another buildsystem (tup), and have everything working great except for this issue. Do you know what fixed this particular problem, in your case?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>bobc on "Anyone using libmaple.a?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=74382#post-105558</link>
			<pubDate>Sat, 18 Oct 2014 05:31:16 +0000</pubDate>
			<dc:creator>bobc</dc:creator>
			<guid isPermaLink="false">105558@http://forums.leaflabs.com/</guid>
			<description>&#60;blockquote&#62;&#60;p&#62;There are several changes in my version that are significant for sure :) One example is the nops I had to add in the micros() code because of the better gcc 4.8 optimization, otherwise the interrupt was too slow to intercept in time. &#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;Nice one :) I think I was hitting that bug as well. &#60;/p&#62;
&#60;p&#62;After more struggling, I have now got sketches to run reliably built using maple-asp. I have to have a copy of libmaple code for each variant, which is very messy. Sometime I will get a JTAG set up and have a more detailed look, but there are other things I want to look at. e.g. how to get drivers signed, how to download using ROM bootloaders, provide support for linux, etc&#60;/p&#62;
&#60;p&#62;Thanks for your help.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ala42 on "Anyone using libmaple.a?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=74382#post-105557</link>
			<pubDate>Thu, 16 Oct 2014 17:00:35 +0000</pubDate>
			<dc:creator>ala42</dc:creator>
			<guid isPermaLink="false">105557@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;&#38;gt; I note that your version of libmaple is based on the leaflabs one around June 2012, there have been a few changes in the leaflabs source since then which may be significant (or maybe not!)&#60;/p&#62;
&#60;p&#62;There are several changes in my version that are significant for sure :) One example is the nops I had to add in the micros() code because of the better gcc 4.8 optimization, otherwise the interrupt was too slow to intercept in time.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>bobc on "Anyone using libmaple.a?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=74382#post-105556</link>
			<pubDate>Thu, 16 Oct 2014 15:21:29 +0000</pubDate>
			<dc:creator>bobc</dc:creator>
			<guid isPermaLink="false">105556@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;@ala42, thanks for the info. That gives me confidence to pursue the problem. I note that your version of libmaple is based on the leaflabs one around June 2012, there have been a few changes in the leaflabs source since then which may be significant (or maybe not!)&#60;/p&#62;
&#60;p&#62;I have taken files out of the libmaple.a archive file until the sketch downloads and runs OK. That I think shows that at some level my compile/link process is good, and the issue is *something* to do with linking objects from the archive file.&#60;/p&#62;
&#60;p&#62;I've had problems with weak symbols before, and my hunch is that it is something to do with that, as there are several place in libmaple where weak symbols are used.&#60;/p&#62;
&#60;p&#62;Hopefully I can find the problem file by putting files one by one back into the archive file.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ala42 on "Anyone using libmaple.a?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=74382#post-105555</link>
			<pubDate>Wed, 15 Oct 2014 17:22:09 +0000</pubDate>
			<dc:creator>ala42</dc:creator>
			<guid isPermaLink="false">105555@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;There is a Makefile in the libmaple directory, simply call &#34;make library&#34;.&#60;/p&#62;
&#60;p&#62;I have tested my STM32F4 ported libmaple version with the aeroquad 3.2 code (&#60;a href=&#34;https://github.com/AeroQuad/AeroQuad&#34; rel=&#34;nofollow&#34;&#62;https://github.com/AeroQuad/AeroQuad&#60;/a&#62;) lately with the latest launchpad arm-none-eabi-gcc.exe (GNU Tools for ARM Embedded Processors) 4.8.4 20140725 (release) [ARM/embedded-4_8-branch revision 213147] without problems.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>bobc on "Anyone using libmaple.a?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=74382#post-105554</link>
			<pubDate>Wed, 15 Oct 2014 13:23:59 +0000</pubDate>
			<dc:creator>bobc</dc:creator>
			<guid isPermaLink="false">105554@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Sure, here is more info:&#60;/p&#62;
&#60;p&#62;The goal is to create a &#34;third-party hardware package&#34; for use with the stock Arduino IDE 1.5.x, as described here &#60;a href=&#34;https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification&#34; rel=&#34;nofollow&#34;&#62;https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;To do that, I have taken the libmaple code, added a new boards.txt and platforms.txt files based on information in maple-ide, and written a small java tool to call dfu-util. I haven't made any code changes to libmaple files, but have moved files around to meet the requirements of the Arduino IDE. The ARM compiler is the one delivered with Arduino 1.5.7, which hails as &#34;arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.8.3 20140228 (release) [ARM/embedded-4_8-branch revision 208322]&#34;&#60;/p&#62;
&#60;p&#62;The repo for this is at &#60;a href=&#34;https://github.com/bobc/maple-asp&#34; rel=&#34;nofollow&#34;&#62;https://github.com/bobc/maple-asp&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Hardware I am testing with:&#60;/p&#62;
&#60;p&#62;Iteadmaple&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://imall.iteadstudio.com/development-platform/arduino/arduino-compatible-mainboard/im120411012.html&#34; rel=&#34;nofollow&#34;&#62;http://imall.iteadstudio.com/development-platform/arduino/arduino-compatible-mainboard/im120411012.html&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;OLIMEXINO-STM32&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;https://www.olimex.com/Products/Duino/STM32/OLIMEXINO-STM32/&#34; rel=&#34;nofollow&#34;&#62;https://www.olimex.com/Products/Duino/STM32/OLIMEXINO-STM32/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Baite maple mini ARM STM32&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.aliexpress.com/store/product/leaflabs-Leaf-maple-mini-ARM-STM32-compatibility/812021_1987703487.html&#34; rel=&#34;nofollow&#34;&#62;http://www.aliexpress.com/store/product/leaflabs-Leaf-maple-mini-ARM-STM32-compatibility/812021_1987703487.html&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Do you have a link for &#34;libmaple.a separately build with a makefile without using the maple IDE&#34; ?&#60;/p&#62;
&#60;p&#62;Cheers
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ala42 on "Anyone using libmaple.a?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=74382#post-105553</link>
			<pubDate>Tue, 14 Oct 2014 18:36:09 +0000</pubDate>
			<dc:creator>ala42</dc:creator>
			<guid isPermaLink="false">105553@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I always used libmaple.a separatly build with a makefile without using the maple IDE at all.&#60;br /&#62;
You need to spread some information to get help.&#60;br /&#62;
Do you just want to make the lib interface compatible or do you want to use a different compiler and IDE ?&#60;br /&#62;
What did you change in your port ?&#60;br /&#62;
Which board do you use to run your code ?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>bobc on "Anyone using libmaple.a?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=74382#post-105551</link>
			<pubDate>Tue, 14 Oct 2014 18:08:48 +0000</pubDate>
			<dc:creator>bobc</dc:creator>
			<guid isPermaLink="false">105551@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I'm struggling to get my port of libmaple to Arduino 1.5.x working reliably. The problem is that the sketch I built doesn't run after it is downloaded. A reset doesn't help, but after a power cycle it runs fine. I'm pretty sure it is not hardware, the same thing happens on 3 different boards.&#60;/p&#62;
&#60;p&#62;I have built the sketch using the Maple IDE (012), and also from the command line in libmaple, and those work fine.&#60;/p&#62;
&#60;p&#62;I guess there is some initialisation not being done in my build. Trying to nail down the differences, a major one is that I build libmaple.a (make library) then link my sketch etc with it.&#60;/p&#62;
&#60;p&#62;I searched for examples of people using libmaple.a, but all makefile examples I found link against *.o directly.&#60;/p&#62;
&#60;p&#62;Tomorrow I will try without libmaple.a.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
