Skip to content

Commit

Permalink
update makefile handling of GIT to prevent unneeded builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
pwittich committed Aug 20, 2019
1 parent a0e57e5 commit 6f3273e
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 25 deletions.
29 changes: 19 additions & 10 deletions .cproject
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildProperties="" description="" id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.base.724117538" name="Default" optionalBuildProperties="org.eclipse.cdt.docker.launcher.containerbuild.property.volumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.selectedvolumes=" parent="org.eclipse.cdt.build.core.emptycfg">
<configuration artifactName="${ProjName}" buildProperties="" description="" id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.base.724117538" name="Default" optionalBuildProperties="org.eclipse.cdt.docker.launcher.containerbuild.property.selectedvolumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.volumes=" parent="org.eclipse.cdt.build.core.emptycfg">
<folderInfo id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.base.724117538.1347534769" name="/" resourcePath="">
<toolChain id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.base.76016951" name="ARM Cross GCC" superClass="ilg.gnuarmeclipse.managedbuild.cross.toolchain.base">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.1690118310" name="Architecture" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.architecture" value="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.arm" valueType="enumerated"/>
Expand Down Expand Up @@ -102,6 +102,7 @@
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.453931992" name="GNU ARM Cross C Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler">
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs.1464512116" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs" useByScannerDiscovery="true" valueType="definedSymbols">
<listOptionValue builtIn="false" value="PART_TM4C1290NCPDT"/>
<listOptionValue builtIn="false" value="FIRMWARE_VERSION='&quot;dummy&quot;'"/>
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths.323903648" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths" useByScannerDiscovery="true" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${FREERTOS_ROOT}/include&quot;"/>
Expand Down Expand Up @@ -249,6 +250,7 @@
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.875967496" name="GNU ARM Cross C Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler">
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs.409582153" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs" useByScannerDiscovery="true" valueType="definedSymbols">
<listOptionValue builtIn="false" value="PART_TM4C1290NCPDT"/>
<listOptionValue builtIn="false" value="FIRMWARE_VERSION"/>
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths.1331348132" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths" useByScannerDiscovery="true" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${FREERTOS_ROOT}/include&quot;"/>
Expand All @@ -260,6 +262,7 @@
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.272842586" name="GNU ARM Cross C++ Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler">
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs.2059129359" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs" useByScannerDiscovery="true" valueType="definedSymbols">
<listOptionValue builtIn="false" value="PART_TM4C1290NCPDT"/>
<listOptionValue builtIn="false" value="FIRMWARE_VERSION=&quot;dummy&quot;"/>
</option>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.666937532" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input"/>
</tool>
Expand Down Expand Up @@ -309,15 +312,6 @@
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="apollo-mcu.null.1097958877" name="apollo-mcu"/>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="ilg.gnuarmeclipse.managedbuild.cross.toolchain.base.724117538;ilg.gnuarmeclipse.managedbuild.cross.toolchain.base.724117538.1347534769;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.453931992;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.1125633587">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="ilg.gnuarmeclipse.managedbuild.cross.toolchain.base.724117538;ilg.gnuarmeclipse.managedbuild.cross.toolchain.base.724117538.1347534769;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.1196536948;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.1631953936">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="refreshScope" versionNumber="2">
<configuration configurationName="Default">
Expand All @@ -329,4 +323,19 @@
</storageModule>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="ilg.gnuarmeclipse.managedbuild.cross.toolchain.base.724117538.2088541338;ilg.gnuarmeclipse.managedbuild.cross.toolchain.base.724117538.2088541338.;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.272842586;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.666937532">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="ilg.gnuarmeclipse.managedbuild.cross.toolchain.base.724117538;ilg.gnuarmeclipse.managedbuild.cross.toolchain.base.724117538.1347534769;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.453931992;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.1125633587">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="ilg.gnuarmeclipse.managedbuild.cross.toolchain.base.724117538;ilg.gnuarmeclipse.managedbuild.cross.toolchain.base.724117538.1347534769;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.1196536948;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.1631953936">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="ilg.gnuarmeclipse.managedbuild.cross.toolchain.base.724117538.2088541338;ilg.gnuarmeclipse.managedbuild.cross.toolchain.base.724117538.2088541338.;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.875967496;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.154488194">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
</storageModule>
</cproject>
11 changes: 2 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@

include ./makedefs


DIRS=driverlib projects

all: common/version.h
all:
@for d in ${DIRS}; do \
${MAKE} -C $$d ;\
done
Expand All @@ -13,11 +14,3 @@ clean:
${MAKE} -C $$d clean ;\
done

.PHONY: common/version.h
common/version.h:
@echo " GIT common/version.h"
ifeq ($(OS), Windows_NT)
@echo #define FIRMWARE_VERSION "$(shell git describe --always --dirty)" > $@
else
@echo "#define FIRMWARE_VERSION \"$(shell git describe --always --dirty)\"" > $@
endif
6 changes: 6 additions & 0 deletions projects/project2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ IPATH+=${FREERTOS_ROOT}/include
IPATH+=${FREERTOS_ROOT}/portable/GCC/ARM_CM4F
IPATH+=${FREERTOS_PLUS_ROOT}/FreeRTOS-Plus-CLI

# GIT
GIT_VERSION="$(shell git describe --abbrev=4 --dirty --always --tags)"

CFLAGS+= -DFIRMWARE_VERSION=\"$(GIT_VERSION)\"


#
# The default rule, which causes the project to be built.
#
Expand Down
3 changes: 0 additions & 3 deletions projects/project2/PowerSupplyTask.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ void PowerSupplyTask(void *parameters)
// initialize to the current tick time
TickType_t xLastWakeTime = xTaskGetTickCount();
enum ps_state oldState = UNKNOWN;
//enum state desiredState = PWR_ON; // start with power-on right away

// turn on the power supply at the start of the task, if the power enable is sent by the
// zynq
Expand All @@ -55,11 +54,9 @@ void PowerSupplyTask(void *parameters)
switch (message ) {
case PS_OFF:
disable_ps();
//desiredState= PWR_OFF;
break;
case PS_ON:
set_ps();
//desiredState = PWR_ON;
break;
default:
toggle_gpio_pin(TM4C_LED_RED); // message I don't understand? Toggle red LED
Expand Down
6 changes: 3 additions & 3 deletions projects/project2/project2.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "common/i2c_reg.h"
#include "common/pinout.h"
#include "common/pinsel.h"
#include "common/version.h"
//#include "common/version.h"
#include "common/smbus.h"

// TI Includes
Expand Down Expand Up @@ -469,9 +469,9 @@ int main( void )
// call some FreeRTOS tasks that need to be set up first.
SystemInit();


Print("\n----------------------------\n\r");
Print("\n\r----------------------------\n\r");
Print("Staring Project2 " FIRMWARE_VERSION " (FreeRTOS scheduler about to start)\n\r");
Print("Built at " __TIME__"," __DATE__ "\n\r");
Print( "----------------------------\n\r");
// start the scheduler -- this function should not return
vTaskStartScheduler();
Expand Down

0 comments on commit 6f3273e

Please sign in to comment.