2009-09-21 15:53:48 +02:00
|
|
|
############################################################################
|
|
|
|
# arch/arm/src/stm32/Make.defs
|
|
|
|
#
|
2014-04-12 16:44:22 +02:00
|
|
|
# Copyright (C) 2009, 2011-2014 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
|
|
|
|
CMN_ASRCS += vfork.S
|
|
|
|
|
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
|
|
|
|
CMN_CSRCS += up_schedulesigaction.c up_sigdeliver.c up_systemreset.c
|
|
|
|
CMN_CSRCS += up_unblocktask.c up_usestack.c up_doirq.c up_hardfault.c
|
|
|
|
CMN_CSRCS += up_svcall.c up_vfork.c
|
2009-09-21 15:53:48 +02:00
|
|
|
|
2012-02-22 19:14:18 +01:00
|
|
|
ifeq ($(CONFIG_ARMV7M_CMNVECTOR),y)
|
2013-02-08 01:17:54 +01:00
|
|
|
CMN_ASRCS += up_exception.S
|
|
|
|
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
|
|
|
|
|
2013-03-22 15:49:21 +01:00
|
|
|
ifeq ($(CONFIG_NUTTX_KERNEL),y)
|
|
|
|
CMN_CSRCS += up_mpu.c up_task_start.c up_pthread_start.c up_stackframe.c
|
|
|
|
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
|
|
|
|
|
2011-09-15 15:26:00 +02:00
|
|
|
ifeq ($(CONFIG_DEBUG_STACK),y)
|
2013-02-08 01:17:54 +01:00
|
|
|
CMN_CSRCS += up_checkstack.c
|
2011-09-15 15:26:00 +02:00
|
|
|
endif
|
|
|
|
|
2012-10-26 21:53:20 +02:00
|
|
|
ifeq ($(CONFIG_ELF),y)
|
|
|
|
CMN_CSRCS += up_elf.c
|
|
|
|
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
|
|
|
|
endif
|
2011-12-07 19:58:21 +01:00
|
|
|
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
|
|
|
|
CHIP_CSRCS += stm32_lsi.c stm32_gpio.c stm32_exti_gpio.c stm32_flash.c stm32_irq.c
|
2014-08-07 00:26:01 +02:00
|
|
|
CHIP_CSRCS += stm32_dma.c stm32_lowputc.c stm32_serial.c stm32_spi.c
|
|
|
|
CHIP_CSRCS += stm32_sdio.c stm32_tim.c stm32_waste.c stm32_ccm.c
|
|
|
|
|
|
|
|
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
|
|
|
|
2013-03-22 15:49:21 +01:00
|
|
|
ifeq ($(CONFIG_NUTTX_KERNEL),y)
|
|
|
|
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
|
2013-11-10 14:23:06 +01:00
|
|
|
ifeq ($(CONFIG_STM32_OTGFS2),y)
|
|
|
|
CHIP_CSRCS += stm32_otgfsdev.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
|
|
|
|
ifeq ($(CONFIG_STM32_OTGFS2),y)
|
|
|
|
CHIP_CSRCS += stm32_otgfshost.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)
|
2013-02-08 01:17:54 +01:00
|
|
|
CHIP_CSRCS += stm32_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
|
2011-10-07 19:21:16 +02:00
|
|
|
endif
|
2011-11-22 21:07:42 +01:00
|
|
|
|
2011-12-12 02:04:53 +01:00
|
|
|
ifeq ($(CONFIG_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
|
|
|
|
|
2012-09-29 22:34:25 +02:00
|
|
|
ifeq ($(CONFIG_DEV_RANDOM),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
|
|
|
|
|
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
|