<?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: Mutual awareness of libraries</title>
		<link>http://forums.leaflabs.com/topic.php?id=74455</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:00:33 +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=74455" rel="self" type="application/rss+xml" />

		<item>
			<title>gbulmer on "Mutual awareness of libraries"</title>
			<link>http://forums.leaflabs.com/topic.php?id=74455#post-105796</link>
			<pubDate>Thu, 29 Oct 2015 11:58:40 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">105796@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;@Phono - I think it's been a few years since anyone posted about injecting a new '#define symbol'. I've just done a quick search, and can't see anything, and I can't remember any of the details. Clearly, you could change one of the common include files to have an #define.&#60;/p&#62;
&#60;p&#62;IIRC, without control of the build system, the only ways I can suggest to have two files with the same name, with the Maple IDE, are to&#60;br /&#62;
a. replicate up the directory tree until you get above the directory name it is using, or&#60;br /&#62;
b. put an 'Archive' directory into the directories effected, and write a little script to 'swizzle' the changed files between the real and archive directories,  or&#60;br /&#62;
c. use a source code control system which is 'friendly' to your process, and keep them on separate branches. You could probably use git for this.&#60;/p&#62;
&#60;p&#62;You might consider looking at &#60;a href=&#34;http://www.stm32duino.com/&#34; rel=&#34;nofollow&#34;&#62;http://www.stm32duino.com/&#60;/a&#62;&#60;br /&#62;
They have added a LeafLabs Maple compatible build system to the Arduino IDE. They may have a more direct way to control builds.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Phono on "Mutual awareness of libraries"</title>
			<link>http://forums.leaflabs.com/topic.php?id=74455#post-105794</link>
			<pubDate>Thu, 29 Oct 2015 03:55:38 +0000</pubDate>
			<dc:creator>Phono</dc:creator>
			<guid isPermaLink="false">105794@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Yes, I am using the (legacy) maple IDE 0.0.12.&#60;br /&#62;
So far, I have modified the Ethernet library with a few #ifdef around the changes, and added some #include that refer to the FreeRTOS library. What I miss, is being able to put a #define somewhere in the sketch to tell the Ethernet library whether it should use the original or the modified version.&#60;br /&#62;
A side question : I have duplicated the Ethernet subdirectory in the library directory, to keep the original one, that I have renamed EthernetOriginal. But when I put in my sketch the line&#60;br /&#62;
#include &#34;Ethernet.h&#34;&#60;br /&#62;
How can I tell the compiler which version to take, from the original or the modified directory?&#60;br /&#62;
I suspect that this is not possible. Does it mean that no two files in the library should have the same name even if they are in two different directories?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "Mutual awareness of libraries"</title>
			<link>http://forums.leaflabs.com/topic.php?id=74455#post-105791</link>
			<pubDate>Wed, 28 Oct 2015 22:06:25 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">105791@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;How are you building and linking your program and the two libraries now? Are you using the Maple IDE?&#60;/p&#62;
&#60;p&#62;The linker can link calls from one library to another. &#60;/p&#62;
&#60;p&#62;To achieve that, either&#60;br /&#62;
a. the libraries can not be independent, one must depend on the other, or&#60;br /&#62;
b. all operations which need to be atomic must be 'wrap' with some code which protects them.&#60;/p&#62;
&#60;p&#62;Neither of these approaches &#60;em&#62;prevent&#60;/em&#62; the libraries being compiled separately.&#60;/p&#62;
&#60;p&#62;(Full disclosure: I am not a member of LeafLabs staff.)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Phono on "Mutual awareness of libraries"</title>
			<link>http://forums.leaflabs.com/topic.php?id=74455#post-105789</link>
			<pubDate>Wed, 28 Oct 2015 07:54:55 +0000</pubDate>
			<dc:creator>Phono</dc:creator>
			<guid isPermaLink="false">105789@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hi,&#60;br /&#62;
I have a project where I use and ethernet shield, and that requires multitasking through the use of FreeRTOS.&#60;br /&#62;
After encountering problems with the project at debug time, I ended with the conviction that it came from the fact that when two tasks access the shield, there must be a protection scheme around the read and write functions of the W5100.cpp module, to keep the SPI transactions atomic.&#60;br /&#62;
I started to implement the changes to the Ethernet library, but as far as I understand, each library is compiled separately before the sketch itself.&#60;br /&#62;
As a consequence, I cannot call from the Ethernet library functions that are defined in the FreeRTOS library. So far, the only obvious solution is to merge both libraries, which is a thing I do not want.&#60;br /&#62;
Is there a means to call from one library functions of another library, while keeping both libraries separate?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
