<?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: Compiling for maple on raspberry pi</title>
		<link>http://forums.leaflabs.com/topic.php?id=9201</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:08:23 +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=9201" rel="self" type="application/rss+xml" />

		<item>
			<title>gbulmer on "Compiling for maple on raspberry pi"</title>
			<link>http://forums.leaflabs.com/topic.php?id=9201#post-105322</link>
			<pubDate>Fri, 11 Apr 2014 10:55:12 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">105322@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;nickc - &#60;em&#62;&#34;The one thing I didn't do was creat the exit() function. What's this specifically?&#34;&#60;/em&#62;&#60;/p&#62;
&#60;p&#62;The &#60;code&#62;exit()&#60;/code&#62; function terminates the program. On a machine with an Operating System, it is the last thing your program does. (Edit: strictly, there are 'hooks' which might run after &#60;code&#62;exit()&#60;/code&#62; is called, but you get the idea; once a user program calls &#60;code&#62;exit()&#60;/code&#62; it should never return)&#60;/p&#62;
&#60;p&#62;I'd recommend either:&#60;br /&#62;
1. never ever using &#60;code&#62;exit()&#60;/code&#62;, and try to remove all uses until your programs link.&#60;br /&#62;
2. implement it yourself so it calls the libmaple error function &#60;code&#62;throb()&#60;/code&#62; (in util.h), i.e.&#60;br /&#62;
&#60;code&#62;void exit(int status) { throb(); }&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;(Full disclosure: I am not a member of LeafLabs staff.)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>feurig on "Compiling for maple on raspberry pi"</title>
			<link>http://forums.leaflabs.com/topic.php?id=9201#post-105321</link>
			<pubDate>Thu, 10 Apr 2014 12:38:13 +0000</pubDate>
			<dc:creator>feurig</dc:creator>
			<guid isPermaLink="false">105321@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;any chance of a .deb coming out of this thread?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>nickc on "Compiling for maple on raspberry pi"</title>
			<link>http://forums.leaflabs.com/topic.php?id=9201#post-105305</link>
			<pubDate>Sat, 29 Mar 2014 11:32:19 +0000</pubDate>
			<dc:creator>nickc</dc:creator>
			<guid isPermaLink="false">105305@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I have the example building following mconners instructions, get a clean build and can upload with make install, but the code doesn't run.&#60;/p&#62;
&#60;p&#62;&#34;the --disable-newlib-supplied-syscalls was important because of conflicts in several functions, and one other thing I needed to do was create an exit() function.&#34;&#60;/p&#62;
&#60;p&#62;The one thing I didn't do was creat the exit() function.  What's this specifically?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mconners on "Compiling for maple on raspberry pi"</title>
			<link>http://forums.leaflabs.com/topic.php?id=9201#post-20394</link>
			<pubDate>Sun, 21 Oct 2012 19:28:41 +0000</pubDate>
			<dc:creator>mconners</dc:creator>
			<guid isPermaLink="false">20394@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;One more comment on this and I'm done :-)&#60;/p&#62;
&#60;p&#62;I had to install several library-dev packages, you'll get the error when compiling gcc, it's easy to figure out.&#60;/p&#62;
&#60;p&#62;I had to configure newlib as follows (and I upgraded to the latest versions of everything):&#60;/p&#62;
&#60;p&#62;../../src/newlib-1.20.0/configure --target=arm-none-eabi --prefix=$MYTOOLS --enable-interwork --disable-newlib-supplied-syscalls&#60;/p&#62;
&#60;p&#62;the --disable-newlib-supplied-syscalls was important because of conflicts in several functions, and one other thing I needed to do was create an exit() function.&#60;/p&#62;
&#60;p&#62;I had to install dfu-utils and the python serial package, but after that I coped main.cpp.example to main.cpp and did make install and all went well.&#60;/p&#62;
&#60;p&#62;There is quite a bit of time waiting for compiles to finish, but its not hard, good luck.&#60;/p&#62;
&#60;p&#62;Mike
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ahunter10@gmail.com on "Compiling for maple on raspberry pi"</title>
			<link>http://forums.leaflabs.com/topic.php?id=9201#post-20393</link>
			<pubDate>Sun, 21 Oct 2012 19:16:01 +0000</pubDate>
			<dc:creator>ahunter10@gmail.com</dc:creator>
			<guid isPermaLink="false">20393@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Wow, thanks for the tip.  I was working through the compilation issues, but had some problems with the linker I wasn't able to solve.  I'll check out the link.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mconners on "Compiling for maple on raspberry pi"</title>
			<link>http://forums.leaflabs.com/topic.php?id=9201#post-20391</link>
			<pubDate>Sun, 21 Oct 2012 12:56:54 +0000</pubDate>
			<dc:creator>mconners</dc:creator>
			<guid isPermaLink="false">20391@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;OK. I was able to follow the instructions linked above and made the arm-none-eabi gcc package on the pi. From that point on instructions for the the maple command line tools work as described.&#60;/p&#62;
&#60;p&#62;I may do some maple development on the pi.&#60;/p&#62;
&#60;p&#62;Mike
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mconners on "Compiling for maple on raspberry pi"</title>
			<link>http://forums.leaflabs.com/topic.php?id=9201#post-20368</link>
			<pubDate>Fri, 19 Oct 2012 13:57:03 +0000</pubDate>
			<dc:creator>mconners</dc:creator>
			<guid isPermaLink="false">20368@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I was able to get through the above issues. It turns out that the declaration of enable_irq had the second parameter defined as uint, while in the actual code for the function/method it was defined as something else. Once I made them the same timer.c compiled fine. &#60;/p&#62;
&#60;p&#62;I then ran into the next problem, the wirish code didn't want to compile, complaining about lack of declaration of caddr_t and size_t. I think that is because the gcc distributed with debian wheezy doesn't contain newlib as part of the distribution.&#60;/p&#62;
&#60;p&#62;Although it seems odd, I may follow these &#60;a href=&#34;http://www.kunen.org/uC/gnu_tool.html&#34;&#62;instructions&#60;/a&#62; to make an arm-none-gnueabi cross compiler for baremetal compilations on the ras-pi. &#60;/p&#62;
&#60;p&#62;Unless of course some enterprising person beats me to it and links it here, or figures out how to get wirish to compile on the pi with the standard compiler.&#60;/p&#62;
&#60;p&#62;Mike
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mconners on "Compiling for maple on raspberry pi"</title>
			<link>http://forums.leaflabs.com/topic.php?id=9201#post-20346</link>
			<pubDate>Thu, 18 Oct 2012 21:29:58 +0000</pubDate>
			<dc:creator>mconners</dc:creator>
			<guid isPermaLink="false">20346@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;It seems like you are not using the native compiler, given that the error message produced points to /home/pi/libmaple/arm/bin/arm-none-eabi-gcc, so I'm guessing that you downloaded the intel version from somewhere, unless you cross compiled it yourself.&#60;/p&#62;
&#60;p&#62;I went into libmaple/support/make/build-rules.mk and changed all the instances of arm-none-eabi- to blanks leaving gcc,g++, ld -v, etc...&#60;/p&#62;
&#60;p&#62;I then changed directory to libmaple and ran make again, it started compile several of the files using the gcc distributed with the debian install for the pi.&#60;/p&#62;
&#60;p&#62;This was the output:&#60;br /&#62;
  [CC]        ./libmaple/adc.c&#60;br /&#62;
  [CC]        ./libmaple/dac.c&#60;br /&#62;
  [CC]        ./libmaple/dma.c&#60;br /&#62;
  [CC]        ./libmaple/exti.c&#60;br /&#62;
  [CC]        ./libmaple/flash.c&#60;br /&#62;
  [CC]        ./libmaple/gpio.c&#60;br /&#62;
  [CC]        ./libmaple/iwdg.c&#60;br /&#62;
  [CC]        ./libmaple/nvic.c&#60;br /&#62;
  [CC]        ./libmaple/pwr.c&#60;br /&#62;
  [CC]        ./libmaple/rcc.c&#60;br /&#62;
  [CC]        ./libmaple/spi.c&#60;br /&#62;
  [CC]        ./libmaple/systick.c&#60;br /&#62;
  [CC]        ./libmaple/timer.c&#60;br /&#62;
libmaple/timer.c:318:20: error: conflicting types for 'enable_irq'&#60;br /&#62;
libmaple/timer.c:41:20: note: previous declaration of 'enable_irq' was here&#60;br /&#62;
libmaple/timer.c:41:20: error: 'enable_irq' used but never defined [-Werror]&#60;br /&#62;
cc1: all warnings being treated as errors&#60;br /&#62;
make: *** [build/./libmaple/timer.o] Error 1&#60;/p&#62;
&#60;p&#62;I haven't resolved those issues yet, but maybe you can start there, it seems closer than you were.&#60;/p&#62;
&#60;p&#62;Mike
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ahunter10@gmail.com on "Compiling for maple on raspberry pi"</title>
			<link>http://forums.leaflabs.com/topic.php?id=9201#post-20320</link>
			<pubDate>Tue, 16 Oct 2012 21:03:25 +0000</pubDate>
			<dc:creator>ahunter10@gmail.com</dc:creator>
			<guid isPermaLink="false">20320@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;thanks for the help!&#60;/p&#62;
&#60;p&#62;When I run &#34;gcc --target-help&#34;, cortex-m3 is listed under the heading &#34;Known ARM CPUs (for use with the -mcpu= and -mtune= options)&#34; &#60;/p&#62;
&#60;p&#62;I am using the latest version of libmaple, downloaded from the github server yesterday.&#60;/p&#62;
&#60;p&#62;I am trying to compile the example file included with libmaple.  I get the same error no matter what I compile.  I get an error on make clean...&#60;/p&#62;
&#60;p&#62;pi@raspberrypi ~/libmaple $ make clean&#60;br /&#62;
/home/pi/libmaple/arm/bin/arm-none-eabi-gcc: 1: /home/pi/libmaple/arm/bin/arm-none-eabi-gcc: Syntax error: &#34;(&#34; unexpected&#60;br /&#62;
rm -rf build&#60;br /&#62;
pi@raspberrypi ~/libmaple $
&#60;/p&#62;</description>
		</item>
		<item>
			<title>feurig on "Compiling for maple on raspberry pi"</title>
			<link>http://forums.leaflabs.com/topic.php?id=9201#post-20309</link>
			<pubDate>Tue, 16 Oct 2012 00:11:01 +0000</pubDate>
			<dc:creator>feurig</dc:creator>
			<guid isPermaLink="false">20309@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;you may want to do gcc --target-help and see if the cortex-m3 is supported. After that you could give us a little more to go on like in what file the syntax error occurs and which version of libmaple you are using.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ahunter10@gmail.com on "Compiling for maple on raspberry pi"</title>
			<link>http://forums.leaflabs.com/topic.php?id=9201#post-20301</link>
			<pubDate>Mon, 15 Oct 2012 20:57:04 +0000</pubDate>
			<dc:creator>ahunter10@gmail.com</dc:creator>
			<guid isPermaLink="false">20301@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hello,&#60;/p&#62;
&#60;p&#62;I am trying to compile code for the maple on the raspberry pi, running their standard OS image. I am using the libmaple command line toolchain.  Has anyone been successful with this?&#60;/p&#62;
&#60;p&#62;I am getting an error:&#60;br /&#62;
/home/pi/libmaple/arm/bin/arm-none-eabi-gcc: 1: /home/pi/libmaple/arm/bin/arm-none-eabi-gcc: Syntax error: &#34;(&#34; unexpected&#60;/p&#62;
&#60;p&#62;I think this may be caused by using an incorrect compiler.  Since i'm running on an ARM, I think I should be able to use the native version of gcc.  &#60;/p&#62;
&#60;p&#62;Any suggestions for getting this working?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
