Revision 4c72a54c modules/PowerManagement_1-2/Makefile
modules/PowerManagement_1-2/Makefile | ||
---|---|---|
112 | 112 |
# Project, target, sources and paths # |
113 | 113 |
# # |
114 | 114 |
|
115 |
# Absolute path to the project |
|
116 |
PROJECT_PATH := $(abspath $(dir $(abspath $(lastword $(MAKEFILE_LIST)))))
|
|
115 |
# Absolute path to the project.
|
|
116 |
PROJECT_PATH := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
|
|
117 | 117 |
|
118 |
# Define project name here
|
|
119 |
PROJECT := $(patsubst $(abspath $(dir $(abspath $(lastword $(MAKEFILE_LIST))))..)/%,%,$(PROJECT_PATH))
|
|
118 |
# Project name.
|
|
119 |
PROJECT := $(notdir $(PROJECT_PATH))
|
|
120 | 120 |
|
121 | 121 |
# Target settings. |
122 |
MCU = cortex-m4 |
|
122 |
MCU := cortex-m4
|
|
123 | 123 |
|
124 |
# Imported source files and paths. |
|
125 |
include ../../kernel/kernel.mk |
|
126 |
CHIBIOS := $(AMIROOS_KERNEL) |
|
127 |
CONFDIR := . |
|
124 |
# Module specific paths and directories. |
|
125 |
MODULEDIR := . |
|
126 |
CONFDIR := $(MODULEDIR) |
|
128 | 127 |
ifeq ($(BUILDDIR),) |
129 | 128 |
BUILDDIR := $(PROJECT_PATH)/build |
130 | 129 |
endif |
131 |
DEPDIR := $(dir $(BUILDDIR)).dep |
|
132 |
AMIROOS := ../.. |
|
133 |
# Licensing files. |
|
134 |
include $(CHIBIOS)/os/license/license.mk |
|
135 |
# Startup files. |
|
130 |
DEPDIR := $(dir $(BUILDDIR)).dep |
|
131 |
|
|
132 |
# Linker script. |
|
133 |
LDSCRIPT= STM32F405xG.ld |
|
134 |
|
|
135 |
# General AMiRo-OS files. |
|
136 |
include ../../amiroos.mk |
|
137 |
|
|
138 |
# Module specific ChibiOS files. |
|
136 | 139 |
include $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f4xx.mk |
137 |
# HAL-OSAL files (optional). |
|
138 |
include $(CHIBIOS)/os/hal/hal.mk |
|
139 | 140 |
include $(CHIBIOS)/os/hal/ports/STM32/STM32F4xx/platform.mk |
140 |
include $(CHIBIOS)/os/hal/osal/rt/osal.mk |
|
141 |
include $(CHIBIOS)/os/hal/lib/streams/streams.mk |
|
142 |
# RTOS files (optional). |
|
143 |
include $(CHIBIOS)/os/rt/rt.mk |
|
144 | 141 |
include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk |
145 |
# Auto-build files in ./source recursively. |
|
146 |
include $(CHIBIOS)/tools/mk/autobuild.mk |
|
147 |
# Other files (optional). |
|
148 |
include $(CHIBIOS)/test/lib/test.mk |
|
149 |
include $(CHIBIOS)/test/rt/rt_test.mk |
|
150 |
include $(CHIBIOS)/test/oslib/oslib_test.mk |
|
151 |
# AMiRo-BLT files |
|
152 |
include ../../bootloader/bootloader.mk |
|
153 |
# AMiRo-LLD files |
|
154 |
include ../../periphery-lld/periphery-lld.mk |
|
155 |
# AMiRo-OS files |
|
156 |
include ../modules.mk |
|
157 |
include $(AMIROOS)/core/core.mk |
|
158 |
include $(AMIROOS)/unittests/unittests.mk |
|
159 |
|
|
160 |
# Define linker script file here |
|
161 |
LDSCRIPT= STM32F405xG.ld |
|
162 | 142 |
|
163 |
# C sources that can be compiled in ARM or THUMB mode depending on the global |
|
164 |
# setting. |
|
165 |
CSRC = $(ALLCSRC) \ |
|
166 |
$(CHIBIOS)/os/various/syscalls.c \ |
|
167 |
$(CHIBIOS)/os/various/evtimer.c \ |
|
168 |
$(TESTSRC) \ |
|
169 |
board.c \ |
|
170 |
$(PERIPHERYLLDCSRC) \ |
|
171 |
$(UNITTESTSCSRC) \ |
|
172 |
$(AMIROOSCORECSRC) \ |
|
173 |
$(MODULESCSRC) \ |
|
174 |
module.c \ |
|
175 |
$(APPSCSRC) |
|
176 |
|
|
177 |
# C++ sources that can be compiled in ARM or THUMB mode depending on the global |
|
178 |
# setting. |
|
179 |
CPPSRC = $(ALLCPPSRC) \ |
|
180 |
$(CHIBIOS)/os/various/cpp_wrappers/syscalls_cpp.cpp \ |
|
181 |
$(AMIROOSCORECPPSRC) \ |
|
182 |
$(APPSCPPSRC) |
|
183 |
|
|
184 |
# List ASM source files here. |
|
185 |
ASMSRC = $(ALLASMSRC) \ |
|
186 |
$(APPSASMSRC) |
|
187 |
|
|
188 |
# List ASM with preprocessor source files here. |
|
189 |
ASMXSRC = $(ALLXASMSRC) \ |
|
190 |
$(APPSASMXSRC) |
|
191 |
|
|
192 |
# Inclusion directories. |
|
193 |
INCDIR = $(CONFDIR) \ |
|
194 |
$(ALLINC) \ |
|
195 |
$(TESTINC) \ |
|
196 |
$(CHIBIOS)/os/hal/lib/streams \ |
|
197 |
$(BOOTLOADERINC) \ |
|
198 |
$(PERIPHERYLLDINC) \ |
|
199 |
$(AMIROOS) \ |
|
200 |
$(UNITTESTSINC) \ |
|
201 |
$(AMIROOSCOREINC) \ |
|
202 |
$(MODULESINC) \ |
|
203 |
$(APPSINC) |
|
204 |
|
|
205 |
# Define C warning options here. |
|
143 |
# Periphery LLDs. |
|
144 |
AMIROOS_PERIPHERYLLD_INC += $(AMIROLLD)/drivers/AT24C01B/v1 \ |
|
145 |
$(AMIROLLD)/drivers/AT42QT1050/v1 \ |
|
146 |
$(AMIROLLD)/drivers/bq241xx/v1 \ |
|
147 |
$(AMIROLLD)/drivers/bq27500/v1 \ |
|
148 |
$(AMIROLLD)/drivers/INA219/v1 \ |
|
149 |
$(AMIROLLD)/drivers/LED/v1 \ |
|
150 |
$(AMIROLLD)/drivers/MPR121/v1 \ |
|
151 |
$(AMIROLLD)/drivers/PCA9544A/v1 \ |
|
152 |
$(AMIROLLD)/drivers/PCAL6524/v1 \ |
|
153 |
$(AMIROLLD)/drivers/PKxxxExxx/v1 \ |
|
154 |
$(AMIROLLD)/drivers/TPS6211x/v1 \ |
|
155 |
$(AMIROLLD)/drivers/VCNL4020/v1 |
|
156 |
|
|
157 |
# Tests. |
|
158 |
AMIROOS_TEST_INC += $(AMIROOS_TEST_DIR)lld/adc \ |
|
159 |
$(AMIROOS_TEST_DIR)periphery-lld/AT24C01B_v1 \ |
|
160 |
$(AMIROOS_TEST_DIR)periphery-lld/AT42QT1050_v1 \ |
|
161 |
$(AMIROOS_TEST_DIR)periphery-lld/bq241xx_v1 \ |
|
162 |
$(AMIROOS_TEST_DIR)periphery-lld/bq27500_v1 \ |
|
163 |
$(AMIROOS_TEST_DIR)periphery-lld/bq27500_v1_bq241xx_v1 \ |
|
164 |
$(AMIROOS_TEST_DIR)periphery-lld/INA219_v1 \ |
|
165 |
$(AMIROOS_TEST_DIR)periphery-lld/LED_v1 \ |
|
166 |
$(AMIROOS_TEST_DIR)periphery-lld/MPR121_v1 \ |
|
167 |
$(AMIROOS_TEST_DIR)periphery-lld/PCA9544A_v1 \ |
|
168 |
$(AMIROOS_TEST_DIR)periphery-lld/PCAL6524_v1 \ |
|
169 |
$(AMIROOS_TEST_DIR)periphery-lld/PKxxxExxx_v1 \ |
|
170 |
$(AMIROOS_TEST_DIR)periphery-lld/TPS6211x_v1 \ |
|
171 |
$(AMIROOS_TEST_DIR)periphery-lld/TPS6211x_v1_INA219_v1 \ |
|
172 |
$(AMIROOS_TEST_DIR)periphery-lld/VCNL4020_v1 |
|
173 |
|
|
174 |
# Module specific inclusion directories |
|
175 |
MODULE_INC = $(MODULEDIR) \ |
|
176 |
$(wildcard $(MODULEDIR)/test/*) |
|
177 |
|
|
178 |
# Module specific C source files. |
|
179 |
MODULE_CSRC = $(wildcard $(MODULE_INC:%=%/*.[Cc])) |
|
180 |
|
|
181 |
# C warning options. |
|
206 | 182 |
CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes |
207 | 183 |
|
208 |
# Define C++ warning options here.
|
|
184 |
# C++ warning options.
|
|
209 | 185 |
CPPWARN = -Wall -Wextra -Wundef |
210 | 186 |
|
211 | 187 |
# Create an additional .srec image file. |
Also available in: Unified diff