board.mk 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. SDK_DIR = hw/mcu/nxp/mcux-sdk
  2. DEPS_SUBMODULES += $(SDK_DIR)
  3. CFLAGS += \
  4. -mthumb \
  5. -mabi=aapcs \
  6. -mcpu=cortex-m0plus \
  7. -DCPU_K32L2B31VLH0A \
  8. -DCFG_TUSB_MCU=OPT_MCU_K32L2BXX
  9. # mcu driver cause following warnings
  10. CFLAGS += -Wno-error=unused-parameter -Wno-error=redundant-decls
  11. MCU_DIR = $(SDK_DIR)/devices/K32L2B31A
  12. # All source paths should be relative to the top level.
  13. LD_FILE = $(MCU_DIR)/gcc/K32L2B31xxxxA_flash.ld
  14. SRC_C += \
  15. src/portable/nxp/khci/dcd_khci.c \
  16. $(MCU_DIR)/system_K32L2B31A.c \
  17. $(MCU_DIR)/project_template/clock_config.c \
  18. $(MCU_DIR)/drivers/fsl_clock.c \
  19. $(SDK_DIR)/drivers/gpio/fsl_gpio.c \
  20. $(SDK_DIR)/drivers/lpuart/fsl_lpuart.c
  21. INC += \
  22. $(TOP)/hw/bsp/$(BOARD) \
  23. $(TOP)/$(SDK_DIR)/CMSIS/Include \
  24. $(TOP)/$(SDK_DIR)/drivers/smc \
  25. $(TOP)/$(SDK_DIR)/drivers/common \
  26. $(TOP)/$(SDK_DIR)/drivers/gpio \
  27. $(TOP)/$(SDK_DIR)/drivers/port \
  28. $(TOP)/$(SDK_DIR)/drivers/lpuart \
  29. $(TOP)/$(MCU_DIR) \
  30. $(TOP)/$(MCU_DIR)/drivers \
  31. $(TOP)/$(MCU_DIR)/project_template \
  32. SRC_S += $(MCU_DIR)/gcc/startup_K32L2B31A.S
  33. # For freeRTOS port source
  34. FREERTOS_PORT = ARM_CM0
  35. # For flash-jlink target
  36. JLINK_DEVICE = MKL25Z128xxx4
  37. # For flash-pyocd target
  38. PYOCD_TARGET = K32L2B
  39. # flash using pyocd
  40. flash: flash-pyocd