Revision 4c72a54c modules/DiWheelDrive_1-2/Makefile

View differences:

modules/DiWheelDrive_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-m3
122
MCU := cortex-m3
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= STM32F103xE.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_stm32f1xx.mk
137
# HAL-OSAL files (optional).
138
include $(CHIBIOS)/os/hal/hal.mk
139 140
include $(CHIBIOS)/os/hal/ports/STM32/STM32F1xx/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= STM32F103xE.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/A3906/v1 \
145
                            $(AMIROLLD)/drivers/AT24C01B/v1 \
146
                            $(AMIROLLD)/drivers/BNO055/v1 \
147
                            $(AMIROLLD)/drivers/INA219/v1 \
148
                            $(AMIROLLD)/drivers/LED/v1 \
149
                            $(AMIROLLD)/drivers/LTC4412/v1 \
150
                            $(AMIROLLD)/drivers/PCA9544A/v1 \
151
                            $(AMIROLLD)/drivers/TPS6211x/v1 \
152
                            $(AMIROLLD)/drivers/VCNL4020/v1
153

  
154
# Tests.
155
AMIROOS_TEST_INC += $(AMIROOS_TEST_DIR)periphery-lld/A3906_v1 \
156
                    $(AMIROOS_TEST_DIR)periphery-lld/AT24C01B_v1 \
157
                    $(AMIROOS_TEST_DIR)periphery-lld/BNO055_v1 \
158
                    $(AMIROOS_TEST_DIR)periphery-lld/INA219_v1 \
159
                    $(AMIROOS_TEST_DIR)periphery-lld/LED_v1 \
160
                    $(AMIROOS_TEST_DIR)periphery-lld/LTC4412_v1 \
161
                    $(AMIROOS_TEST_DIR)periphery-lld/PCA9544A_v1 \
162
                    $(AMIROOS_TEST_DIR)periphery-lld/TPS6211x_v1 \
163
                    $(AMIROOS_TEST_DIR)periphery-lld/VCNL4020_v1
164

  
165
# Module specific inclusion directories
166
MODULE_INC = $(MODULEDIR) \
167
             $(wildcard $(MODULEDIR)/test/*)
168

  
169
# Module specific C source files.
170
MODULE_CSRC = $(wildcard $(MODULE_INC:%=%/*.[Cc]))
171

  
172
# C warning options.
206 173
CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes
207 174

  
208
# Define C++ warning options here.
175
# C++ warning options.
209 176
CPPWARN = -Wall -Wextra -Wundef
210 177

  
211 178
# Create an additional .srec image file.

Also available in: Unified diff