2009-09-21 15:53:48 +02:00
|
|
|
############################################################################
|
|
|
|
# arch/arm/src/stm32/Make.defs
|
|
|
|
#
|
2015-02-04 13:49:05 +01:00
|
|
|
# Copyright (C) 2009, 2011-2015 Gregory Nutt. All rights reserved.
|
2011-12-21 16:50:06 +01:00
|
|
|
# Author: Gregory Nutt <gnutt@nuttx.org>
|
2009-09-21 15:53:48 +02:00
|
|
|
#
|
|
|
|
# Redistribution and use in source and binary forms, with or without
|
|
|
|
# modification, are permitted provided that the following conditions
|
|
|
|
# are met:
|
|
|
|
#
|
|
|
|
# 1. Redistributions of source code must retain the above copyright
|
|
|
|
# notice, this list of conditions and the following disclaimer.
|
|
|
|
# 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
# notice, this list of conditions and the following disclaimer in
|
|
|
|
# the documentation and/or other materials provided with the
|
|
|
|
# distribution.
|
|
|
|
# 3. Neither the name NuttX nor the names of its contributors may be
|
|
|
|
# used to endorse or promote products derived from this software
|
|
|
|
# without specific prior written permission.
|
|
|
|
#
|
|
|
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
|
|
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
|
|
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
|
|
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
|
|
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
|
|
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
|
|
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
# POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
#
|
|
|
|
############################################################################
|
|
|
|
|
2012-02-22 19:14:18 +01:00
|
|
|
ifeq ($(CONFIG_ARMV7M_CMNVECTOR),y)
|
2014-04-12 17:33:52 +02:00
|
|
|
HEAD_ASRC =
|
2012-02-22 19:14:18 +01:00
|
|
|
else
|
2013-02-08 01:17:54 +01:00
|
|
|
HEAD_ASRC = stm32_vectors.S
|
2012-02-22 19:14:18 +01:00
|
|
|
endif
|
2009-09-21 15:53:48 +02:00
|
|
|
|
2013-03-23 15:46:02 +01:00
|
|
|
CMN_UASRCS =
|
|
|
|
CMN_UCSRCS =
|
|
|
|
|
2013-02-08 01:17:54 +01:00
|
|
|
CMN_ASRCS = up_saveusercontext.S up_fullcontextrestore.S up_switchcontext.S
|
2016-02-09 20:44:22 +01:00
|
|
|
CMN_ASRCS += up_testset.S vfork.S
|
2013-02-08 01:17:54 +01:00
|
|
|
|
2013-07-24 01:52:06 +02:00
|
|
|
CMN_CSRCS = up_assert.c up_blocktask.c up_copyfullstate.c
|
2013-02-08 01:17:54 +01:00
|
|
|
CMN_CSRCS += up_createstack.c up_mdelay.c up_udelay.c up_exit.c
|
|
|
|
CMN_CSRCS += up_initialize.c up_initialstate.c up_interruptcontext.c
|
|
|
|
CMN_CSRCS += up_memfault.c up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c
|
|
|
|
CMN_CSRCS += up_releasepending.c up_releasestack.c up_reprioritizertr.c
|
2014-09-01 23:39:34 +02:00
|
|
|
CMN_CSRCS += up_schedulesigaction.c up_sigdeliver.c up_stackframe.c
|
|
|
|
CMN_CSRCS += up_systemreset.c up_unblocktask.c up_usestack.c up_doirq.c
|
|
|
|
CMN_CSRCS += up_hardfault.c up_svcall.c up_vfork.c
|
2009-09-21 15:53:48 +02:00
|
|
|
|
2015-04-12 14:26:50 +02:00
|
|
|
ifeq ($(CONFIG_ARMV7M_STACKCHECK),y)
|
|
|
|
CMN_CSRCS += up_stackcheck.c
|
|
|
|
endif
|
|
|
|
|
2012-02-22 19:14:18 +01:00
|
|
|
ifeq ($(CONFIG_ARMV7M_CMNVECTOR),y)
|
2015-03-11 19:30:14 +01:00
|
|
|
ifeq ($(CONFIG_ARMV7M_LAZYFPU),y)
|
2015-03-06 15:26:43 +01:00
|
|
|
CMN_ASRCS += up_lazyexception.S
|
|
|
|
else
|
2013-02-08 01:17:54 +01:00
|
|
|
CMN_ASRCS += up_exception.S
|
2015-03-06 15:26:43 +01:00
|
|
|
endif
|
2013-02-08 01:17:54 +01:00
|
|
|
CMN_CSRCS += up_vectors.c
|
2012-02-22 19:14:18 +01:00
|
|
|
endif
|
|
|
|
|
2013-03-18 22:10:08 +01:00
|
|
|
ifeq ($(CONFIG_ARCH_RAMVECTORS),y)
|
|
|
|
CMN_CSRCS += up_ramvec_initialize.c up_ramvec_attach.c
|
|
|
|
endif
|
|
|
|
|
2012-10-20 20:56:55 +02:00
|
|
|
ifeq ($(CONFIG_ARCH_MEMCPY),y)
|
2013-02-08 01:17:54 +01:00
|
|
|
CMN_ASRCS += up_memcpy.S
|
2012-10-20 20:56:55 +02:00
|
|
|
endif
|
|
|
|
|
2014-08-29 22:47:22 +02:00
|
|
|
ifeq ($(CONFIG_BUILD_PROTECTED),y)
|
2014-09-01 23:39:34 +02:00
|
|
|
CMN_CSRCS += up_mpu.c up_task_start.c up_pthread_start.c
|
2013-03-22 15:49:21 +01:00
|
|
|
ifneq ($(CONFIG_DISABLE_SIGNALS),y)
|
2013-03-23 15:46:02 +01:00
|
|
|
CMN_CSRCS += up_signal_dispatch.c
|
|
|
|
CMN_UASRCS += up_signal_handler.S
|
2013-03-22 15:49:21 +01:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2015-01-24 13:03:39 +01:00
|
|
|
ifeq ($(CONFIG_STACK_COLORATION),y)
|
|
|
|
CMN_CSRCS += up_checkstack.c
|
|
|
|
endif
|
|
|
|
|
2012-10-26 21:53:20 +02:00
|
|
|
ifeq ($(CONFIG_ELF),y)
|
|
|
|
CMN_CSRCS += up_elf.c
|
2015-12-12 16:35:05 +01:00
|
|
|
else ifeq ($(CONFIG_MODULE),y)
|
|
|
|
CMN_CSRCS += up_elf.c
|
2012-10-26 21:53:20 +02:00
|
|
|
endif
|
|
|
|
|
2011-12-07 19:58:21 +01:00
|
|
|
ifeq ($(CONFIG_ARCH_FPU),y)
|
2013-02-08 01:17:54 +01:00
|
|
|
CMN_ASRCS += up_fpu.S
|
2013-07-24 01:52:06 +02:00
|
|
|
ifneq ($(CONFIG_ARMV7M_CMNVECTOR),y)
|
|
|
|
CMN_CSRCS += up_copyarmstate.c
|
2015-08-31 16:40:02 +02:00
|
|
|
else ifeq ($(CONFIG_ARMV7M_LAZYFPU),y)
|
|
|
|
CMN_CSRCS += up_copyarmstate.c
|
2013-07-24 01:52:06 +02:00
|
|
|
endif
|
2011-12-07 19:58:21 +01:00
|
|
|
endif
|
|
|
|
|
2015-09-23 22:51:22 +02:00
|
|
|
ifeq ($(CONFIG_ARMV7M_ITMSYSLOG),y)
|
|
|
|
CMN_CSRCS += up_itm_syslog.c
|
|
|
|
endif
|
|
|
|
|
2014-04-12 17:33:52 +02:00
|
|
|
CHIP_ASRCS =
|
2013-02-08 01:17:54 +01:00
|
|
|
|
|
|
|
CHIP_CSRCS = stm32_allocateheap.c stm32_start.c stm32_rcc.c stm32_lse.c
|
2016-06-04 15:22:45 +02:00
|
|
|
CHIP_CSRCS += stm32_lsi.c stm32_gpio.c stm32_exti_gpio.c stm32_flash.c
|
|
|
|
CHIP_CSRCS += stm32_irq.c stm32_dma.c stm32_lowputc.c stm32_lowgetc.c
|
|
|
|
CHIP_CSRCS += stm32_serial.c stm32_spi.c stm32_sdio.c stm32_tim.c
|
|
|
|
CHIP_CSRCS += stm32_waste.c stm32_ccm.c stm32_uid.c stm32_capture.c
|
2014-08-07 00:26:01 +02:00
|
|
|
|
2015-11-17 22:57:02 +01:00
|
|
|
ifeq ($(CONFIG_TIMER),y)
|
|
|
|
CHIP_CSRCS += stm32_tim_lowerhalf.c
|
|
|
|
endif
|
|
|
|
|
2014-08-07 00:26:01 +02:00
|
|
|
ifneq ($(CONFIG_SCHED_TICKLESS),y)
|
|
|
|
CHIP_CSRCS += stm32_timerisr.c
|
|
|
|
endif
|
2013-02-08 01:17:54 +01:00
|
|
|
|
|
|
|
ifeq ($(CONFIG_ARMV7M_CMNVECTOR),y)
|
|
|
|
CHIP_ASRCS += stm32_vectors.S
|
|
|
|
endif
|
2012-04-03 00:20:39 +02:00
|
|
|
|
2014-08-29 22:47:22 +02:00
|
|
|
ifeq ($(CONFIG_BUILD_PROTECTED),y)
|
2013-03-22 15:49:21 +01:00
|
|
|
CHIP_CSRCS += stm32_userspace.c stm32_mpuinit.c
|
|
|
|
endif
|
|
|
|
|
2014-07-03 16:50:24 +02:00
|
|
|
ifeq ($(CONFIG_STM32_CCM_PROCFS),y)
|
|
|
|
CHIP_CSRCS += stm32_procfs_ccm.c
|
|
|
|
endif
|
|
|
|
|
2014-05-14 15:48:47 +02:00
|
|
|
ifeq ($(CONFIG_STM32_I2C_ALT),y)
|
|
|
|
CHIP_CSRCS += stm32_i2c_alt.c
|
|
|
|
else
|
2013-07-30 18:35:17 +02:00
|
|
|
ifeq ($(CONFIG_STM32_STM32F30XX),y)
|
2013-08-13 15:48:18 +02:00
|
|
|
CHIP_CSRCS += stm32f30xxx_i2c.c
|
2013-07-30 18:35:17 +02:00
|
|
|
else
|
|
|
|
CHIP_CSRCS += stm32_i2c.c
|
|
|
|
endif
|
2014-05-14 15:48:47 +02:00
|
|
|
endif
|
2013-07-30 18:35:17 +02:00
|
|
|
|
2012-04-03 00:20:39 +02:00
|
|
|
ifeq ($(CONFIG_USBDEV),y)
|
|
|
|
ifeq ($(CONFIG_STM32_USB),y)
|
2013-02-08 01:17:54 +01:00
|
|
|
CHIP_CSRCS += stm32_usbdev.c
|
2012-04-03 00:20:39 +02:00
|
|
|
endif
|
|
|
|
ifeq ($(CONFIG_STM32_OTGFS),y)
|
2013-02-08 01:17:54 +01:00
|
|
|
CHIP_CSRCS += stm32_otgfsdev.c
|
2012-08-15 19:58:54 +02:00
|
|
|
endif
|
2014-11-20 14:19:04 +01:00
|
|
|
ifeq ($(CONFIG_STM32_OTGHS),y)
|
|
|
|
CHIP_CSRCS += stm32_otghsdev.c
|
|
|
|
endif
|
2012-08-15 19:58:54 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_USBHOST),y)
|
|
|
|
ifeq ($(CONFIG_STM32_OTGFS),y)
|
2013-02-08 01:17:54 +01:00
|
|
|
CHIP_CSRCS += stm32_otgfshost.c
|
2013-11-10 14:23:06 +01:00
|
|
|
endif
|
2014-10-07 23:05:30 +02:00
|
|
|
ifeq ($(CONFIG_STM32_OTGHS),y)
|
|
|
|
CHIP_CSRCS += stm32_otghshost.c
|
2012-04-03 00:20:39 +02:00
|
|
|
endif
|
2012-02-22 19:14:18 +01:00
|
|
|
endif
|
|
|
|
|
2014-04-12 16:44:22 +02:00
|
|
|
ifeq ($(CONFIG_USBHOST),y)
|
|
|
|
ifeq ($(CONFIG_USBHOST_TRACE),y)
|
|
|
|
CHIP_CSRCS += stm32_usbhost.c
|
|
|
|
else
|
|
|
|
ifeq ($(CONFIG_DEBUG_USB),y)
|
|
|
|
CHIP_CSRCS += stm32_usbhost.c
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2014-03-04 15:58:01 +01:00
|
|
|
ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y)
|
2013-02-08 01:17:54 +01:00
|
|
|
CHIP_CSRCS += stm32_idle.c
|
2011-12-08 19:02:38 +01:00
|
|
|
endif
|
|
|
|
|
2013-02-08 01:17:54 +01:00
|
|
|
CHIP_CSRCS += stm32_pmstop.c stm32_pmstandby.c stm32_pmsleep.c
|
2012-06-28 02:48:00 +02:00
|
|
|
|
2014-03-04 15:58:01 +01:00
|
|
|
ifneq ($(CONFIG_ARCH_CUSTOM_PMINIT),y)
|
2013-02-08 01:17:54 +01:00
|
|
|
CHIP_CSRCS += stm32_pminitialize.c
|
2012-03-14 20:37:28 +01:00
|
|
|
endif
|
|
|
|
|
2012-01-08 22:33:57 +01:00
|
|
|
ifeq ($(CONFIG_STM32_ETHMAC),y)
|
2013-02-08 01:17:54 +01:00
|
|
|
CHIP_CSRCS += stm32_eth.c
|
2011-08-20 15:23:34 +02:00
|
|
|
endif
|
2011-10-07 19:21:16 +02:00
|
|
|
|
2011-12-14 20:59:06 +01:00
|
|
|
ifeq ($(CONFIG_STM32_PWR),y)
|
2015-04-28 14:37:59 +02:00
|
|
|
CHIP_CSRCS += stm32_pwr.c stm32_exti_pwr.c
|
2011-12-14 20:59:06 +01:00
|
|
|
endif
|
|
|
|
|
2011-10-07 19:21:16 +02:00
|
|
|
ifeq ($(CONFIG_RTC),y)
|
2013-02-08 01:17:54 +01:00
|
|
|
CHIP_CSRCS += stm32_rtc.c
|
2012-07-17 02:22:48 +02:00
|
|
|
ifeq ($(CONFIG_RTC_ALARM),y)
|
2013-02-08 01:17:54 +01:00
|
|
|
CHIP_CSRCS += stm32_exti_alarm.c
|
2012-07-17 02:22:48 +02:00
|
|
|
endif
|
2015-02-13 19:56:58 +01:00
|
|
|
ifeq ($(CONFIG_RTC_DRIVER),y)
|
|
|
|
CHIP_CSRCS += stm32_rtc_lowerhalf.c
|
|
|
|
endif
|
2011-10-07 19:21:16 +02:00
|
|
|
endif
|
2011-11-22 21:07:42 +01:00
|
|
|
|
2016-05-27 14:46:33 +02:00
|
|
|
ifeq ($(CONFIG_STM32_ADC),y)
|
2013-02-08 01:17:54 +01:00
|
|
|
CHIP_CSRCS += stm32_adc.c
|
2011-12-12 02:04:53 +01:00
|
|
|
endif
|
|
|
|
|
2011-12-12 04:37:37 +01:00
|
|
|
ifeq ($(CONFIG_DAC),y)
|
2013-02-08 01:17:54 +01:00
|
|
|
CHIP_CSRCS += stm32_dac.c
|
2011-12-12 04:37:37 +01:00
|
|
|
endif
|
|
|
|
|
2016-05-25 20:31:32 +02:00
|
|
|
ifeq ($(CONFIG_STM32_1WIREDRIVER),y)
|
|
|
|
CHIP_CSRCS += stm32_1wire.c
|
|
|
|
endif
|
|
|
|
|
2015-05-21 15:47:22 +02:00
|
|
|
ifeq ($(CONFIG_STM32_RNG),y)
|
2013-02-08 01:17:54 +01:00
|
|
|
CHIP_CSRCS += stm32_rng.c
|
2012-09-29 22:34:25 +02:00
|
|
|
endif
|
|
|
|
|
2013-11-11 21:05:29 +01:00
|
|
|
ifeq ($(CONFIG_STM32_LTDC),y)
|
|
|
|
CHIP_CSRCS += stm32_ltdc.c
|
|
|
|
endif
|
|
|
|
|
2014-12-19 20:41:08 +01:00
|
|
|
ifeq ($(CONFIG_STM32_DMA2D),y)
|
|
|
|
CHIP_CSRCS += stm32_dma2d.c
|
|
|
|
endif
|
|
|
|
|
2011-12-16 20:29:41 +01:00
|
|
|
ifeq ($(CONFIG_PWM),y)
|
2013-02-08 01:17:54 +01:00
|
|
|
CHIP_CSRCS += stm32_pwm.c
|
2011-12-16 20:29:41 +01:00
|
|
|
endif
|
|
|
|
|
2012-02-14 16:32:57 +01:00
|
|
|
ifeq ($(CONFIG_QENCODER),y)
|
2013-02-08 01:17:54 +01:00
|
|
|
CHIP_CSRCS += stm32_qencoder.c
|
2012-02-14 16:32:57 +01:00
|
|
|
endif
|
|
|
|
|
2011-12-21 16:50:06 +01:00
|
|
|
ifeq ($(CONFIG_CAN),y)
|
2013-02-08 01:17:54 +01:00
|
|
|
CHIP_CSRCS += stm32_can.c
|
2011-12-21 16:50:06 +01:00
|
|
|
endif
|
|
|
|
|
2012-04-15 18:42:09 +02:00
|
|
|
ifeq ($(CONFIG_STM32_IWDG),y)
|
2013-02-08 01:17:54 +01:00
|
|
|
CHIP_CSRCS += stm32_iwdg.c
|
2012-04-15 18:42:09 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_STM32_WWDG),y)
|
2013-02-08 01:17:54 +01:00
|
|
|
CHIP_CSRCS += stm32_wwdg.c
|
2012-04-15 03:11:54 +02:00
|
|
|
endif
|
|
|
|
|
2011-11-22 21:07:42 +01:00
|
|
|
ifeq ($(CONFIG_DEBUG),y)
|
2013-02-08 01:17:54 +01:00
|
|
|
CHIP_CSRCS += stm32_dumpgpio.c
|
2011-11-22 21:07:42 +01:00
|
|
|
endif
|
2015-02-04 13:49:05 +01:00
|
|
|
|
2015-02-04 14:24:19 +01:00
|
|
|
ifeq ($(CONFIG_STM32_AES),y)
|
2015-02-04 13:49:05 +01:00
|
|
|
CHIP_CSRCS += stm32_aes.c
|
|
|
|
endif
|
2015-02-21 22:15:51 +01:00
|
|
|
|
|
|
|
ifeq ($(CONFIG_STM32_BBSRAM),y)
|
|
|
|
CHIP_CSRCS += stm32_bbsram.c
|
|
|
|
endif
|