board.mk 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. CFLAGS += \
  2. -flto \
  3. -mthumb \
  4. -mabi=aapcs \
  5. -mcpu=cortex-m33 \
  6. -mfloat-abi=hard \
  7. -mfpu=fpv5-sp-d16 \
  8. -DCPU_LPC55S69JBD100_cm33_core0 \
  9. -DCFG_TUSB_MCU=OPT_MCU_LPC55XX \
  10. -DCFG_TUSB_MEM_SECTION='__attribute__((section(".data")))' \
  11. -DCFG_TUSB_MEM_ALIGN='__attribute__((aligned(64)))'
  12. # mcu driver cause following warnings
  13. CFLAGS += -Wno-error=unused-parameter -Wno-error=float-equal
  14. MCU_DIR = hw/mcu/nxp/sdk/devices/LPC55S69
  15. # All source paths should be relative to the top level.
  16. LD_FILE = hw/bsp/$(BOARD)/LPC55S69_cm33_core0_uf2.ld
  17. SRC_C += \
  18. $(MCU_DIR)/system_LPC55S69_cm33_core0.c \
  19. $(MCU_DIR)/drivers/fsl_clock.c \
  20. $(MCU_DIR)/drivers/fsl_gpio.c \
  21. $(MCU_DIR)/drivers/fsl_power.c \
  22. $(MCU_DIR)/drivers/fsl_reset.c \
  23. $(MCU_DIR)/drivers/fsl_usart.c \
  24. $(MCU_DIR)/drivers/fsl_flexcomm.c \
  25. lib/sct_neopixel/sct_neopixel.c
  26. INC += \
  27. $(TOP)/hw/bsp/ \
  28. $(TOP)/hw/bsp/$(BOARD) \
  29. $(TOP)/lib/sct_neopixel \
  30. $(TOP)/$(MCU_DIR)/../../CMSIS/Include \
  31. $(TOP)/$(MCU_DIR) \
  32. $(TOP)/$(MCU_DIR)/drivers
  33. SRC_S += $(MCU_DIR)/gcc/startup_LPC55S69_cm33_core0.S
  34. LIBS += $(TOP)/$(MCU_DIR)/gcc/libpower_hardabi.a
  35. # For TinyUSB port source
  36. VENDOR = nxp
  37. CHIP_FAMILY = lpc_ip3511
  38. # For freeRTOS port source
  39. FREERTOS_PORT = ARM_CM33_NTZ/non_secure
  40. # For flash-jlink target
  41. JLINK_DEVICE = LPC55S69
  42. # flash using pyocd
  43. flash: $(BUILD)/$(PROJECT).hex
  44. pyocd flash -t LPC55S69 $<