Implement a secure ICS protocol targeting LoRa Node151 microcontroller for controlling irrigation.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

84 lines
1.8 KiB

  1. SRCS.NODE151+= board.c
  2. SRCS.NODE151+= misc.c
  3. .include <mk/mu.opts.mk>
  4. # Strobe
  5. .if ${MK_STROBE} == "yes"
  6. .PATH: $(.CURDIR)/strobe
  7. CFLAGS+= -I$(.CURDIR)/strobe
  8. STROBE_SRCS+= strobe.c \
  9. x25519.c
  10. .endif
  11. # LoRamac (SX1276) radio code
  12. .if ${MK_SX1276} == "yes"
  13. LORAMAC_SRC = $(.CURDIR)/loramac/src
  14. .PATH: $(LORAMAC_SRC)/radio/sx1276 $(LORAMAC_SRC)/system $(LORAMAC_SRC)/boards/mcu $(LORAMAC_SRC)/boards/NucleoL152
  15. CFLAGS+= -I$(LORAMAC_SRC)/boards
  16. CFLAGS+= -I$(LORAMAC_SRC)/system
  17. CFLAGS+= -I$(LORAMAC_SRC)/radio
  18. CFLAGS+= -DUSE_HAL_DRIVER -DSX1276MB1LAS
  19. SRCS+= sx1276.c
  20. SRCS+= utilities.c
  21. SRCS+= adc.c timer.c delay.c gpio.c uart.c fifo.c
  22. 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
  23. .endif
  24. # NODE151 Microcontroller
  25. .if ${MK_NODE151} == "yes"
  26. STM32=$(.CURDIR)/stm32
  27. .PATH: $(STM32)/l151ccux
  28. LINKER_SCRIPT=$(STM32)/l151ccux/STM32L151CCUX_FLASH.ld
  29. SRCS+= \
  30. startup_stm32l151ccux.s \
  31. stm32l1xx_hal.c \
  32. stm32l1xx_hal_adc.c \
  33. stm32l1xx_hal_adc_ex.c \
  34. stm32l1xx_hal_cortex.c \
  35. stm32l1xx_hal_dma.c \
  36. stm32l1xx_hal_flash.c \
  37. stm32l1xx_hal_flash_ex.c \
  38. stm32l1xx_hal_gpio.c \
  39. stm32l1xx_hal_pcd.c \
  40. stm32l1xx_hal_pcd_ex.c \
  41. stm32l1xx_hal_pwr.c \
  42. stm32l1xx_hal_pwr_ex.c \
  43. stm32l1xx_hal_rcc.c \
  44. stm32l1xx_hal_rcc_ex.c \
  45. stm32l1xx_hal_rtc.c \
  46. stm32l1xx_hal_rtc_ex.c \
  47. stm32l1xx_hal_spi.c \
  48. stm32l1xx_hal_uart.c \
  49. system_stm32l1xx.c
  50. SRCS+= \
  51. stm32l1xx_it.c \
  52. stm32l1xx_hal_msp.c
  53. CFLAGS+= -I$(STM32)
  54. CFLAGS+= -I$(STM32)/l151ccux
  55. CFLAGS+= -DSTM32L151xC
  56. .endif
  57. # USB CDC
  58. .if ${MK_USB_CDC} == "yes"
  59. .PATH: $(STM32)/usb
  60. SRCS+= \
  61. usb_device.c \
  62. usbd_cdc.c \
  63. usbd_cdc_if.c \
  64. usbd_conf.c \
  65. usbd_core.c \
  66. usbd_ctlreq.c \
  67. usbd_desc.c \
  68. usbd_ioreq.c
  69. CFLAGS+= -I$(STM32)/usb
  70. .endif
  71. .if ${MK_USB_CDC} == "yes" && ${MK_NODE151} == "yes"
  72. SRCS+= \
  73. stm32l1xx_ll_usb.c
  74. .endif