board.mk 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. DEPS_SUBMODULES += hw/mcu/nxp/lpcopen
  2. CFLAGS += \
  3. -flto \
  4. -mthumb \
  5. -mabi=aapcs \
  6. -mcpu=cortex-m4 \
  7. -mfloat-abi=hard \
  8. -mfpu=fpv4-sp-d16 \
  9. -nostdlib \
  10. -DCORE_M4 \
  11. -D__USE_LPCOPEN \
  12. -DCFG_TUSB_MEM_SECTION='__attribute__((section(".data.$$RAM2")))' \
  13. -DCFG_TUSB_MCU=OPT_MCU_LPC40XX
  14. # mcu driver cause following warnings
  15. CFLAGS += -Wno-error=strict-prototypes -Wno-error=unused-parameter -Wno-error=cast-qual
  16. MCU_DIR = hw/mcu/nxp/lpcopen/lpc40xx/lpc_chip_40xx
  17. # All source paths should be relative to the top level.
  18. LD_FILE = hw/bsp/$(BOARD)/lpc4088.ld
  19. SRC_C += \
  20. src/portable/nxp/lpc17_40/dcd_lpc17_40.c \
  21. $(MCU_DIR)/../gcc/cr_startup_lpc40xx.c \
  22. $(MCU_DIR)/src/chip_17xx_40xx.c \
  23. $(MCU_DIR)/src/clock_17xx_40xx.c \
  24. $(MCU_DIR)/src/gpio_17xx_40xx.c \
  25. $(MCU_DIR)/src/iocon_17xx_40xx.c \
  26. $(MCU_DIR)/src/sysctl_17xx_40xx.c \
  27. $(MCU_DIR)/src/sysinit_17xx_40xx.c \
  28. $(MCU_DIR)/src/uart_17xx_40xx.c \
  29. $(MCU_DIR)/src/fpu_init.c
  30. INC += \
  31. $(TOP)/$(MCU_DIR)/inc
  32. # For freeRTOS port source
  33. FREERTOS_PORT = ARM_CM4F
  34. # For flash-jlink target
  35. JLINK_DEVICE = LPC4088
  36. # flash using jlink
  37. flash: flash-jlink