<?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: Added EEPROM user-mdoule and now my rules.mk is being ignored?</title>
		<link>http://forums.leaflabs.com/topic.php?id=74276</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:04:42 +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=74276" rel="self" type="application/rss+xml" />

		<item>
			<title>tmash on "Added EEPROM user-mdoule and now my rules.mk is being ignored?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=74276#post-105590</link>
			<pubDate>Thu, 25 Dec 2014 11:16:18 +0000</pubDate>
			<dc:creator>tmash</dc:creator>
			<guid isPermaLink="false">105590@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Do: make library first.&#60;br /&#62;
make sure that library and rules.mk are under MAPLE_ROOT/libraries.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gruvin on "Added EEPROM user-mdoule and now my rules.mk is being ignored?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=74276#post-105290</link>
			<pubDate>Mon, 17 Mar 2014 22:45:33 +0000</pubDate>
			<dc:creator>gruvin</dc:creator>
			<guid isPermaLink="false">105290@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Anyone?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gruvin on "Added EEPROM user-mdoule and now my rules.mk is being ignored?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=74276#post-105245</link>
			<pubDate>Wed, 19 Feb 2014 22:26:32 +0000</pubDate>
			<dc:creator>gruvin</dc:creator>
			<guid isPermaLink="false">105245@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hi&#60;/p&#62;
&#60;p&#62;I'm perplexed. :-/&#60;/p&#62;
&#60;p&#62;I added a module &#34;EEPROM&#34; (files found from another forum contributor, based on ST AN2594) to my command line toolchain &#60;code&#62;~/libmaple/libraries/&#60;/code&#62; folder. &#60;/p&#62;
&#60;p&#62;I had to create a &#60;code&#62;rules.mk&#60;/code&#62; file. This is what I have for that ...&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;~/libmaple/libraries/EEPROM/rules.mk:
---
# Standard things
sp := $(sp).x
dirstack_$(sp) := $(d)
d := $(dir)
BUILDDIRS += $(BUILD_PATH)/$(d)

# Local flags
CFLAGS_$(d) := $(WIRISH_INCLUDES) $(LIBMAPLE_INCLUDES)
CXXFLAGS_$(d) := $(WIRISH_INCLUDES) $(LIBMAPLE_INCLUDES)

# Local rules and targets
cSRCS_$(d) := flash_stm32.c

cppSRCS_$(d) := EEPROM.cpp

cFILES_$(d) := $(cSRCS_$(d):%=$(d)/%)
cppFILES_$(d) := $(cppSRCS_$(d):%=$(d)/%)

OBJS_$(d) := $(cFILES_$(d):%.c=$(BUILD_PATH)/%.o) \
             $(cppFILES_$(d):%.cpp=$(BUILD_PATH)/%.o)
DEPS_$(d) := $(OBJS_$(d):%.o=%.d)

$(OBJS_$(d)): TGT_CFLAGS := $(CFLAGS_$(d))
$(OBJS_$(d)): TGT_CXXFLAGS := $(CXXFLAGS_$(d))

TGT_BIN += $(OBJS_$(d))

# Standard things
-include $(DEPS_$(d))
d := $(dirstack_$(sp))
sp := $(basename $(sp))&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Now when I compile, it appears that my main project &#60;code&#62;rules.mk&#60;/code&#62; file is being ignored -- or at least the &#60;code&#62;cppSRCS&#60;/code&#62; part ...&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;make
...
[CXX]       /Users/bryan/libmaple/libraries/FreeRTOS/MapleFreeRTOS.cpp
  [CC]        /Users/bryan/libmaple/libraries/EEPROM/flash_stm32.c
  [CXX]       /Users/bryan/libmaple/libraries/EEPROM/EEPROM.cpp
  [CXX]       main.cpp
  [LD]        maple_mini.elf&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Notice that there is no longer a  &#60;code&#62;real-main.cpp&#60;/code&#62;, as there normally is! Huh?!&#60;/p&#62;
&#60;p&#62;When I remove  the new EEPROM library from &#60;code&#62;~/libmaple/Makefile&#60;/code&#62; ...&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;# User modules
###USER_MODULES := $(SRCROOT)/libraries/EEPROM &#38;lt;--- commented out

# User modules:
ifneq ($(USER_MODULES),)
LIBMAPLE_MODULES += $(USER_MODULES)
endif&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;... my &#60;code&#62;real-main.cpp&#60;/code&#62; gets compiled again and all is well -- except I don't have my new EEPROM library available, of course.&#60;/p&#62;
&#60;p&#62;- - -&#60;/p&#62;
&#60;p&#62;I've spent well over an hour trying to figure out what I've done wrong. I just can't see it for the looking. :-/&#60;/p&#62;
&#60;p&#62;Any ideas? Thanks!&#60;/p&#62;
&#60;p&#62;P.S: When I aded this same new EEPROM module to the IDE, by placing it in &#60;code&#62;~/Documents/MapleIDE/libraries&#60;/code&#62;, all worked as expected. That is, the Maple IDE compiler worked. But then, it doesn't use a &#60;code&#62;real-main.cpp&#60;/code&#62; anyway. Hmmm. {shrug}
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
