<?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: Trouble including files from libmaple [solved]</title>
		<link>http://forums.leaflabs.com/topic.php?id=9199</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:20:01 +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=9199" rel="self" type="application/rss+xml" />

		<item>
			<title>Mars Saxman on "Trouble including files from libmaple [solved]"</title>
			<link>http://forums.leaflabs.com/topic.php?id=9199#post-20299</link>
			<pubDate>Mon, 15 Oct 2012 17:51:10 +0000</pubDate>
			<dc:creator>Mars Saxman</dc:creator>
			<guid isPermaLink="false">20299@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I posted some time ago about reusing a Maple board's JTAG pins as GPIOs. This is proving to be very frustrating. I can't get the Maple IDE to let me use any of the utilities defined in libmaple.&#60;/p&#62;
&#60;p&#62;I want to do this:&#60;br /&#62;
  afio_remap(AFIO_MAPR_SWJ_CFG_NO_JTAG_NO_SW);&#60;/p&#62;
&#60;p&#62;afio_remap() is defined in libmaple/stm32f1/include/series/gpio.h. Trying to include that directory leads to the following stupid guessing game:&#60;/p&#62;
&#60;p&#62;fatal error: libmaple/stm32f1/include/series/gpio.h: No such file or directorycompilation terminated.&#60;br /&#62;
fatal error: stm32f1/include/series/gpio.h: No such file or directorycompilation terminated.&#60;br /&#62;
fatal error: include/series/gpio.h: No such file or directorycompilation terminated.&#60;br /&#62;
fatal error: series/gpio.h: No such file or directorycompilation terminated.&#60;/p&#62;
&#60;p&#62;Not really clear how to find the gpio.h which defines afio_remap. Unfortunately for me, there is a second gpio.h which *is* on the include path, and when I #include &#34;gpio.h&#34; I get several dozen repetitions of this error:&#60;/p&#62;
&#60;p&#62;/Applications/MapleIDE.app/Contents/Resources/Java/hardware/leaflabs/cores/maple/gpio.h:82: error: 'uint32' does not name a type&#60;/p&#62;
&#60;p&#62;For some reason gpio.h does not include all the headers it needs, so I have to #include &#38;lt;util.h&#38;gt; and &#38;lt;libmaple_types.h&#38;gt; in order to make it compile; but that still doesn't solve my problem, because neither AFIO_MAPR_SWJ_CFG_NO_JTAG_NO_SW nor afio_remap() are defined in this version of gpio.h.&#60;/p&#62;
&#60;p&#62;Time for some brutal kludgery. I copy all the definitions I need out of the correct version of gpio.h and paste them into my maple sketch, hoping that the linker will sort it out. No such luck:&#60;/p&#62;
&#60;p&#62;undefined reference to `afio_remap(afio_remap_peripheral)'collect2: ld returned 1 exit status&#60;/p&#62;
&#60;p&#62;This is really frustrating. How is this *supposed* to work? Is there documentation *anywhere* of the include path? &#60;/p&#62;
&#60;p&#62;I'd just ditch the whole Maple IDE thing and try to build my project on the command line, but I have never had any luck getting dfu-util to work, and on this project I can't just use the serial bootloader.&#60;/p&#62;
&#60;p&#62;-----&#60;/p&#62;
&#60;p&#62;Right. I was running an old version of the Maple IDE (0.0.9). Upgrading to 0.0.12 solved the problem, afio_remap did its job, and I have control over the JTAG pins within the Maple IDE system. All good. On to the next thing.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
