|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- SRCS.NODE151+= board.c
- SRCS.NODE151+= misc.c
-
- _SRCTOPDIR:= $(.PARSEDIR)/..
- SRCTOP?=$(_SRCTOPDIR:tA)
- STM32?=$(SRCTOP)/stm32
-
- ARMOBJDUMP?= arm-none-eabi-objdump
- ARMCC?= arm-none-eabi-gcc
-
- # Clang doesn't work due to no-nano libc
- #ARMCC?=clang-mp-9.0
- #ARMTARGET?= -nostdlib -ffreestanding -target arm-none-eabi -mcpu=cortex-m3 -mfloat-abi=soft -mthumb
-
- CFLAGS+= -Wall -Werror
-
- .include <$(.PARSEDIR)/mu.opts.mk>
-
- .if ${MK_SYSINIT} == "yes"
- .PATH: $(SRCTOP)
- SRCS+= sysinit.c
- .endif
-
- # Strobe
- .if ${MK_STROBE} == "yes"
- .PATH: $(SRCTOP)/strobe
- CFLAGS+= -I$(SRCTOP)/strobe -DSTROBE_SINGLE_THREAD=1
- STROBE_SRCS+= strobe.c \
- x25519.c
- .endif
-
- # LoRamac (SX1276) radio code
- .if ${MK_SX1276} == "yes"
- LORAMAC_SRC = $(SRCTOP)/loramac/src
- .PATH: $(LORAMAC_SRC)/radio/sx1276 $(LORAMAC_SRC)/system $(LORAMAC_SRC)/boards/mcu $(LORAMAC_SRC)/boards/NucleoL152
- CFLAGS+= -I$(LORAMAC_SRC)/boards
- CFLAGS+= -I$(LORAMAC_SRC)/system
- CFLAGS+= -I$(LORAMAC_SRC)/radio
- CFLAGS+= -DUSE_HAL_DRIVER -DSX1276MB1LAS
- SRCS+= sx1276.c
- SRCS+= utilities.c
- SRCS+= adc.c timer.c delay.c gpio.c uart.c fifo.c
- SRCS+= adc-board.c delay-board.c gpio-board.c rtc-board.c lpm-board.c sx1276mb1las-board.c spi-board.c uart-board.c
- .endif
-
- # Generic STM32F103 Microcontroller
- .if ${MK_STM32F103} == "yes"
-
- ARMTARGET?= -mcpu=cortex-m3 -mthumb
-
- .PATH: $(STM32)/f103c8t6
- LINKER_SCRIPT=$(STM32)/f103c8t6/STM32F103C8T6_FLASH.ld
-
- SRCS+= \
- hal_generic.c \
- startup_stm32f103xb.s \
- stm32f1xx_hal.c \
- stm32f1xx_hal_cortex.c \
- stm32f1xx_hal_gpio.c \
- stm32f1xx_hal_pcd.c \
- stm32f1xx_hal_pcd_ex.c \
- stm32f1xx_hal_rcc.c \
- stm32f1xx_hal_rcc_ex.c \
- stm32f1xx_ll_usb.c \
- system_stm32f1xx.c
-
- CFLAGS+= -I$(STM32)
- CFLAGS+= -I$(STM32)/f103c8t6
- CFLAGS+= -DSTM32F103xB
- .endif
-
- # NODE151 Microcontroller
- .if ${MK_NODE151} == "yes"
-
- ARMTARGET?= -mcpu=cortex-m3 -mthumb
-
- .PATH: $(STM32)/l151ccux
- LINKER_SCRIPT=$(STM32)/l151ccux/STM32L151CCUX_FLASH.ld
-
- SRCS+= \
- startup_stm32l151ccux.s \
- stm32l1xx_hal.c \
- stm32l1xx_hal_adc.c \
- stm32l1xx_hal_adc_ex.c \
- stm32l1xx_hal_cortex.c \
- stm32l1xx_hal_dma.c \
- stm32l1xx_hal_flash.c \
- stm32l1xx_hal_flash_ex.c \
- stm32l1xx_hal_gpio.c \
- stm32l1xx_hal_pcd.c \
- stm32l1xx_hal_pcd_ex.c \
- stm32l1xx_hal_pwr.c \
- stm32l1xx_hal_pwr_ex.c \
- stm32l1xx_hal_rcc.c \
- stm32l1xx_hal_rcc_ex.c \
- stm32l1xx_hal_rtc.c \
- stm32l1xx_hal_rtc_ex.c \
- stm32l1xx_hal_spi.c \
- stm32l1xx_hal_uart.c \
- system_stm32l1xx.c
-
- SRCS+= \
- stm32l1xx_it.c \
- stm32l1xx_hal_msp.c
-
- CFLAGS+= -I$(STM32)
- CFLAGS+= -I$(STM32)/l151ccux
- CFLAGS+= -DSTM32L151xC
- .endif
-
- # USB CDC
- .if ${MK_USB_CDC} == "yes"
- .PATH: $(STM32)/usb
- SRCS+= \
- si_usb.c \
- usb_device.c \
- usbd_cdc.c \
- usbd_cdc_if.c \
- usbd_conf.c \
- usbd_core.c \
- usbd_ctlreq.c \
- usbd_desc.c \
- usbd_ioreq.c
-
- CFLAGS+= -I$(STM32)/usb
- .endif
-
- .if ${MK_USB_CDC} == "yes" && ${MK_NODE151} == "yes"
- SRCS+= \
- stm32l1xx_ll_usb.c
- .endif
|