Makefile.imxrt1062 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # Makefile for CW308T-IMX1062 Target
  2. VPATH += :$(HALPATH)/imxrt1062
  3. VPATH += :$(HALPATH)/imxrt1062/nxp
  4. VPATH += :$(HALPATH)/imxrt1062/nxp/board
  5. VPATH += :$(HALPATH)/imxrt1062/nxp/component/uart
  6. VPATH += :$(HALPATH)/imxrt1062/nxp/component/serial_manager
  7. VPATH += :$(HALPATH)/imxrt1062/nxp/component/lists
  8. VPATH += :$(HALPATH)/imxrt1062/nxp/device
  9. VPATH += :$(HALPATH)/imxrt1062/nxp/drivers
  10. VPATH += :$(HALPATH)/imxrt1062/nxp/source
  11. VPATH += :$(HALPATH)/imxrt1062/nxp/startup
  12. VPATH += :$(HALPATH)/imxrt1062/nxp/utilities
  13. VPATH += :$(HALPATH)/imxrt1062/xip
  14. EXTRAINCDIRS += $(HALPATH)/imxrt1062/nxp
  15. EXTRAINCDIRS += $(HALPATH)/imxrt1062/nxp/board
  16. EXTRAINCDIRS += $(HALPATH)/imxrt1062/nxp/CMSIS
  17. EXTRAINCDIRS += $(HALPATH)/imxrt1062/nxp/component/uart
  18. EXTRAINCDIRS += $(HALPATH)/imxrt1062/nxp/component/serial_manager
  19. EXTRAINCDIRS += $(HALPATH)/imxrt1062/nxp/component/lists
  20. EXTRAINCDIRS += $(HALPATH)/imxrt1062/nxp/device
  21. EXTRAINCDIRS += $(HALPATH)/imxrt1062/nxp/drivers
  22. EXTRAINCDIRS += $(HALPATH)/imxrt1062/nxp/source
  23. EXTRAINCDIRS += $(HALPATH)/imxrt1062/nxp/startup
  24. EXTRAINCDIRS += $(HALPATH)/imxrt1062/nxp/utilities
  25. EXTRAINCDIRS += $(HALPATH)/imxrt1062/xip
  26. SRC += board.c clock_config.c pin_mux.c
  27. SRC += generic_list.c serial_manager.c serial_port_uart.c lpuart_adapter.c
  28. SRC += system_MIMXRT1062.c
  29. SRC += fsl_clock.c fsl_common.c fsl_gpio.c fsl_lpuart.c
  30. SRC += semihost_hardfault.c
  31. SRC += startup_mimxrt1062.c
  32. SRC += fsl_assert.c fsl_debug_console.c fsl_str.c
  33. SRC += imxrt1062_hal.c
  34. SRC += evkmimxrt1060_flexspi_nor_config.c fsl_flexspi_nor_boot.c
  35. SRC += fsl_dcp.c fsl_snvs_lp.c
  36. MCU_FLAGS = -mcpu=cortex-m7 -mthumb -mfloat-abi=soft
  37. CC = arm-none-eabi-gcc
  38. OBJCOPY = arm-none-eabi-objcopy
  39. OBJDUMP = arm-none-eabi-objdump
  40. SIZE = arm-none-eabi-size
  41. AR = arm-none-eabi-ar rcs
  42. NM = arm-none-eabi-nm
  43. #Output Format = Binary for this target
  44. FORMAT = binary
  45. CPPFLAGS += $(CFLAGS)
  46. ASFLAGS += -mthumb
  47. CDEFS += -DCPU_MIMXRT1062DVL6A -DCPU_MIMXRT1062DVL6A_cm7 -DSDK_DEBUGCONSOLE=1
  48. CDEFS += -DXIP_EXTERNAL_FLASH=1 -DXIP_BOOT_HEADER_ENABLE=1 -DSERIAL_PORT_TYPE_UART=1
  49. CDEFS += -DCR_INTEGER_PRINTF -DPRINTF_FLOAT_ENABLE=0 -D__MCUXPRESSO -D__USE_CMSIS -DDEBUG
  50. CPPDEFS += $(CDEFS)
  51. # -D__REDLIB__
  52. # redlib.specs
  53. LDFLAGS += -specs=nosys.specs -T $(HALPATH)/imxrt1062/nxp/evkmimxrt1060_debug.ld -Xlinker --gc-sections -lm