Revision 4c72a54c modules/NUCLEO-F103RB/Makefile

View differences:

modules/NUCLEO-F103RB/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 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= STM32F103xB.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= STM32F103xB.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/LED/v1 \
145
                            $(AMIROLLD)/drivers/button/v1
146
#                            $(AMIROLLD)/drivers/DW1000/v1
147

  
148
# Tests.
149
AMIROOS_TEST_INC += $(AMIROOS_TEST_DIR)periphery-lld/button_v1 \
150
                    $(AMIROOS_TEST_DIR)periphery-lld/LED_v1
151
#                    $(AMIROOS_TEST_DIR)periphery-lld/DW1000_v1
152

  
153
# Module specific inclusion directories
154
MODULE_INC = $(MODULEDIR) \
155
             $(wildcard $(MODULEDIR)/test/*)
156

  
157
# Module specific C source files.
158
MODULE_CSRC = $(wildcard $(MODULE_INC:%=%/*.[Cc]))
159

  
160
# C warning options.
206 161
CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes
207 162

  
208
# Define C++ warning options here.
163
# C++ warning options.
209 164
CPPWARN = -Wall -Wextra -Wundef
210 165

  
211 166
#                                                                              #

Also available in: Unified diff