diff --git a/hw/bsp/circuitplayground_bluefruit/board.mk b/hw/bsp/circuitplayground_bluefruit/board.mk index bfeaa235..3b2137d7 100644 --- a/hw/bsp/circuitplayground_bluefruit/board.mk +++ b/hw/bsp/circuitplayground_bluefruit/board.mk @@ -19,7 +19,7 @@ CFLAGS += -Wno-error=cast-function-type endif # All source paths should be relative to the top level. -LD_FILE = hw/bsp/circuitplayground_bluefruit/nrf52840_s140_v6.ld +LD_FILE = hw/bsp/$(BOARD)/nrf52840_s140_v6.ld LDFLAGS += -L$(TOP)/hw/mcu/nordic/nrfx/mdk diff --git a/hw/bsp/circuitplayground_express/board.mk b/hw/bsp/circuitplayground_express/board.mk index 7ea90e8e..32b44071 100644 --- a/hw/bsp/circuitplayground_express/board.mk +++ b/hw/bsp/circuitplayground_express/board.mk @@ -8,7 +8,7 @@ CFLAGS += \ -DCFG_TUSB_MCU=OPT_MCU_SAMD21 # All source paths should be relative to the top level. -LD_FILE = hw/bsp/circuitplayground_express/samd21g18a_flash.ld +LD_FILE = hw/bsp/$(BOARD)/samd21g18a_flash.ld SRC_C += \ hw/mcu/microchip/samd/asf4/samd21/gcc/gcc/startup_samd21.c \ diff --git a/hw/bsp/ea4088qs/board.mk b/hw/bsp/ea4088qs/board.mk index a88976d3..950aa484 100644 --- a/hw/bsp/ea4088qs/board.mk +++ b/hw/bsp/ea4088qs/board.mk @@ -15,7 +15,7 @@ CFLAGS += -Wno-error=strict-prototypes -Wno-error=unused-parameter MCU_DIR = hw/mcu/nxp/lpcopen/lpc40xx/lpc_chip_40xx # All source paths should be relative to the top level. -LD_FILE = hw/bsp/ea4088qs/lpc4088.ld +LD_FILE = hw/bsp/$(BOARD)/lpc4088.ld SRC_C += \ $(MCU_DIR)/../gcc/cr_startup_lpc40xx.c \ diff --git a/hw/bsp/ea4357/board.mk b/hw/bsp/ea4357/board.mk index 098fb4c9..ff7b7a15 100644 --- a/hw/bsp/ea4357/board.mk +++ b/hw/bsp/ea4357/board.mk @@ -14,7 +14,7 @@ CFLAGS += -Wno-error=unused-parameter -Wno-error=strict-prototypes MCU_DIR = hw/mcu/nxp/lpcopen/lpc43xx/lpc_chip_43xx # All source paths should be relative to the top level. -LD_FILE = hw/bsp/ea4357/lpc4357.ld +LD_FILE = hw/bsp/$(BOARD)/lpc4357.ld SRC_C += \ $(MCU_DIR)/../gcc/cr_startup_lpc43xx.c \ diff --git a/hw/bsp/feather_m0_express/board.mk b/hw/bsp/feather_m0_express/board.mk index a147cf82..d762c4ec 100644 --- a/hw/bsp/feather_m0_express/board.mk +++ b/hw/bsp/feather_m0_express/board.mk @@ -9,7 +9,7 @@ CFLAGS += \ -DCFG_TUSB_MCU=OPT_MCU_SAMD21 # All source paths should be relative to the top level. -LD_FILE = hw/bsp/feather_m0_express/samd21g18a_flash.ld +LD_FILE = hw/bsp/$(BOARD)/samd21g18a_flash.ld SRC_C += \ hw/mcu/microchip/samd/asf4/samd21/gcc/gcc/startup_samd21.c \ diff --git a/hw/bsp/feather_m4_express/board.mk b/hw/bsp/feather_m4_express/board.mk index f42aa770..49c2d7f2 100644 --- a/hw/bsp/feather_m4_express/board.mk +++ b/hw/bsp/feather_m4_express/board.mk @@ -12,7 +12,7 @@ CFLAGS += \ CFLAGS += -Wno-error=undef # All source paths should be relative to the top level. -LD_FILE = hw/bsp/metro_m4_express/samd51g19a_flash.ld +LD_FILE = hw/bsp/$(BOARD)/samd51g19a_flash.ld SRC_C += \ hw/mcu/microchip/samd/asf4/samd51/gcc/gcc/startup_samd51.c \ diff --git a/hw/bsp/feather_nrf52840_express/board.mk b/hw/bsp/feather_nrf52840_express/board.mk index b4d6fbe9..3b2137d7 100644 --- a/hw/bsp/feather_nrf52840_express/board.mk +++ b/hw/bsp/feather_nrf52840_express/board.mk @@ -19,7 +19,7 @@ CFLAGS += -Wno-error=cast-function-type endif # All source paths should be relative to the top level. -LD_FILE = hw/bsp/feather_nrf52840_express/nrf52840_s140_v6.ld +LD_FILE = hw/bsp/$(BOARD)/nrf52840_s140_v6.ld LDFLAGS += -L$(TOP)/hw/mcu/nordic/nrfx/mdk diff --git a/hw/bsp/feather_nrf52840_sense/board.mk b/hw/bsp/feather_nrf52840_sense/board.mk index b4d6fbe9..3b2137d7 100644 --- a/hw/bsp/feather_nrf52840_sense/board.mk +++ b/hw/bsp/feather_nrf52840_sense/board.mk @@ -19,7 +19,7 @@ CFLAGS += -Wno-error=cast-function-type endif # All source paths should be relative to the top level. -LD_FILE = hw/bsp/feather_nrf52840_express/nrf52840_s140_v6.ld +LD_FILE = hw/bsp/$(BOARD)/nrf52840_s140_v6.ld LDFLAGS += -L$(TOP)/hw/mcu/nordic/nrfx/mdk diff --git a/hw/bsp/feather_stm32f405/board.mk b/hw/bsp/feather_stm32f405/board.mk index 5a007cad..2d1f8bb8 100644 --- a/hw/bsp/feather_stm32f405/board.mk +++ b/hw/bsp/feather_stm32f405/board.mk @@ -13,7 +13,7 @@ ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32F4xx_HAL_Driver ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32F4xx # All source paths should be relative to the top level. -LD_FILE = hw/bsp/pyboardv11/STM32F405RGTx_FLASH.ld +LD_FILE = hw/bsp/$(BOARD)/STM32F405RGTx_FLASH.ld SRC_C += \ $(ST_CMSIS)/Source/Templates/system_stm32f4xx.c \ diff --git a/hw/bsp/fomu/board.mk b/hw/bsp/fomu/board.mk index 4e8101b7..8687cf41 100644 --- a/hw/bsp/fomu/board.mk +++ b/hw/bsp/fomu/board.mk @@ -9,7 +9,7 @@ MCU_DIR = hw/mcu/fomu BSP_DIR = hw/bsp/fomu # All source paths should be relative to the top level. -LD_FILE = hw/bsp/fomu/fomu.ld +LD_FILE = hw/bsp/$(BOARD)/fomu.ld # TODO remove later SRC_C += src/portable/$(VENDOR)/$(CHIP_FAMILY)/hal_$(CHIP_FAMILY).c diff --git a/hw/bsp/lpcxpresso11u37/board.mk b/hw/bsp/lpcxpresso11u37/board.mk index d3121ab9..790516c7 100644 --- a/hw/bsp/lpcxpresso11u37/board.mk +++ b/hw/bsp/lpcxpresso11u37/board.mk @@ -17,7 +17,7 @@ CFLAGS += -Wno-error=nested-externs -Wno-error=strict-prototypes -Wno-error=unus MCU_DIR = hw/mcu/nxp/lpcopen/lpc11uxx/lpc_chip_11uxx # All source paths should be relative to the top level. -LD_FILE = hw/bsp/lpcxpresso11u37/lpc11u37.ld +LD_FILE = hw/bsp/$(BOARD)/lpc11u37.ld SRC_C += \ $(MCU_DIR)/../gcc/cr_startup_lpc11xx.c \ diff --git a/hw/bsp/lpcxpresso11u68/board.mk b/hw/bsp/lpcxpresso11u68/board.mk index ba84b7d9..d9017ae1 100644 --- a/hw/bsp/lpcxpresso11u68/board.mk +++ b/hw/bsp/lpcxpresso11u68/board.mk @@ -14,7 +14,7 @@ CFLAGS += \ MCU_DIR = hw/mcu/nxp/lpcopen/lpc11u6x/lpc_chip_11u6x # All source paths should be relative to the top level. -LD_FILE = hw/bsp/lpcxpresso11u68/lpc11u68.ld +LD_FILE = hw/bsp/$(BOARD)/lpc11u68.ld SRC_C += \ $(MCU_DIR)/../gcc/cr_startup_lpc11u6x.c \ diff --git a/hw/bsp/lpcxpresso1347/board.mk b/hw/bsp/lpcxpresso1347/board.mk index 54a83a3b..6a72a798 100644 --- a/hw/bsp/lpcxpresso1347/board.mk +++ b/hw/bsp/lpcxpresso1347/board.mk @@ -17,7 +17,7 @@ CFLAGS += -Wno-error=nested-externs -Wno-error=strict-prototypes MCU_DIR = hw/mcu/nxp/lpcopen/lpc13xx/lpc_chip_13xx # All source paths should be relative to the top level. -LD_FILE = hw/bsp/lpcxpresso1347/lpc1347.ld +LD_FILE = hw/bsp/$(BOARD)/lpc1347.ld SRC_C += \ $(MCU_DIR)/../gcc/cr_startup_lpc13xx.c \ diff --git a/hw/bsp/lpcxpresso1769/board.mk b/hw/bsp/lpcxpresso1769/board.mk index b87d6afc..a345e5a2 100644 --- a/hw/bsp/lpcxpresso1769/board.mk +++ b/hw/bsp/lpcxpresso1769/board.mk @@ -15,7 +15,7 @@ CFLAGS += -Wno-error=strict-prototypes MCU_DIR = hw/mcu/nxp/lpcopen/lpc175x_6x/lpc_chip_175x_6x # All source paths should be relative to the top level. -LD_FILE = hw/bsp/lpcxpresso1769/lpc1769.ld +LD_FILE = hw/bsp/$(BOARD)/lpc1769.ld SRC_C += \ $(MCU_DIR)/../gcc/cr_startup_lpc175x_6x.c \ diff --git a/hw/bsp/mbed1768/board.mk b/hw/bsp/mbed1768/board.mk index 60428bcb..60beb5e3 100644 --- a/hw/bsp/mbed1768/board.mk +++ b/hw/bsp/mbed1768/board.mk @@ -15,7 +15,7 @@ CFLAGS += -Wno-error=nested-externs -Wno-error=strict-prototypes MCU_DIR = hw/mcu/nxp/lpcopen/lpc175x_6x/lpc_chip_175x_6x # All source paths should be relative to the top level. -LD_FILE = hw/bsp/mbed1768/lpc1768.ld +LD_FILE = hw/bsp/$(BOARD)/lpc1768.ld SRC_C += \ $(MCU_DIR)/../gcc/cr_startup_lpc175x_6x.c \ diff --git a/hw/bsp/mcb1800/board.mk b/hw/bsp/mcb1800/board.mk index b05d4d71..7806bff4 100644 --- a/hw/bsp/mcb1800/board.mk +++ b/hw/bsp/mcb1800/board.mk @@ -14,7 +14,7 @@ CFLAGS += -Wno-error=unused-parameter -Wno-error=strict-prototypes MCU_DIR = hw/mcu/nxp/lpcopen/lpc18xx/lpc_chip_18xx # All source paths should be relative to the top level. -LD_FILE = hw/bsp/mcb1800/lpc1857.ld +LD_FILE = hw/bsp/$(BOARD)/lpc1857.ld SRC_C += \ $(MCU_DIR)/../gcc/cr_startup_lpc18xx.c \ diff --git a/hw/bsp/metro_m0_express/board.mk b/hw/bsp/metro_m0_express/board.mk index 4d6dedcf..d762c4ec 100644 --- a/hw/bsp/metro_m0_express/board.mk +++ b/hw/bsp/metro_m0_express/board.mk @@ -9,7 +9,7 @@ CFLAGS += \ -DCFG_TUSB_MCU=OPT_MCU_SAMD21 # All source paths should be relative to the top level. -LD_FILE = hw/bsp/metro_m0_express/samd21g18a_flash.ld +LD_FILE = hw/bsp/$(BOARD)/samd21g18a_flash.ld SRC_C += \ hw/mcu/microchip/samd/asf4/samd21/gcc/gcc/startup_samd21.c \ diff --git a/hw/bsp/metro_m4_express/board.mk b/hw/bsp/metro_m4_express/board.mk index f42aa770..49c2d7f2 100644 --- a/hw/bsp/metro_m4_express/board.mk +++ b/hw/bsp/metro_m4_express/board.mk @@ -12,7 +12,7 @@ CFLAGS += \ CFLAGS += -Wno-error=undef # All source paths should be relative to the top level. -LD_FILE = hw/bsp/metro_m4_express/samd51g19a_flash.ld +LD_FILE = hw/bsp/$(BOARD)/samd51g19a_flash.ld SRC_C += \ hw/mcu/microchip/samd/asf4/samd51/gcc/gcc/startup_samd51.c \ diff --git a/hw/bsp/nutiny_nuc121s/board.mk b/hw/bsp/nutiny_nuc121s/board.mk index 893c8500..e8987782 100644 --- a/hw/bsp/nutiny_nuc121s/board.mk +++ b/hw/bsp/nutiny_nuc121s/board.mk @@ -9,7 +9,7 @@ CFLAGS += \ -DCFG_TUSB_MCU=OPT_MCU_NUC121 # All source paths should be relative to the top level. -LD_FILE = hw/bsp/nutiny_nuc121s/nuc121_flash.ld +LD_FILE = hw/bsp/$(BOARD)/nuc121_flash.ld SRC_C += \ hw/mcu/nuvoton/nuc121_125/Device/Nuvoton/NUC121/Source/system_NUC121.c \ diff --git a/hw/bsp/nutiny_nuc125s/board.mk b/hw/bsp/nutiny_nuc125s/board.mk index e2eecff1..5bba8dee 100644 --- a/hw/bsp/nutiny_nuc125s/board.mk +++ b/hw/bsp/nutiny_nuc125s/board.mk @@ -9,7 +9,7 @@ CFLAGS += \ -DCFG_TUSB_MCU=OPT_MCU_NUC121 # All source paths should be relative to the top level. -LD_FILE = hw/bsp/nutiny_nuc125s/nuc125_flash.ld +LD_FILE = hw/bsp/$(BOARD)/nuc125_flash.ld SRC_C += \ hw/mcu/nuvoton/nuc121_125/Device/Nuvoton/NUC121/Source/system_NUC121.c \ diff --git a/hw/bsp/nutiny_nuc126v/board.mk b/hw/bsp/nutiny_nuc126v/board.mk index cc88b552..21f2c9c5 100644 --- a/hw/bsp/nutiny_nuc126v/board.mk +++ b/hw/bsp/nutiny_nuc126v/board.mk @@ -9,7 +9,7 @@ CFLAGS += \ -DCFG_TUSB_MCU=OPT_MCU_NUC126 # All source paths should be relative to the top level. -LD_FILE = hw/bsp/nutiny_nuc126v/nuc126_flash.ld +LD_FILE = hw/bsp/$(BOARD)/nuc126_flash.ld SRC_C += \ hw/mcu/nuvoton/nuc126/Device/Nuvoton/NUC126/Source/system_NUC126.c \ diff --git a/hw/bsp/nutiny_sdk_nuc505/board.mk b/hw/bsp/nutiny_sdk_nuc505/board.mk index 259d1108..68dea63a 100644 --- a/hw/bsp/nutiny_sdk_nuc505/board.mk +++ b/hw/bsp/nutiny_sdk_nuc505/board.mk @@ -6,7 +6,7 @@ CFLAGS += \ -DCFG_TUSB_MCU=OPT_MCU_NUC505 # All source paths should be relative to the top level. -LD_FILE = hw/bsp/nutiny_sdk_nuc505/nuc505_flashtoram.ld +LD_FILE = hw/bsp/$(BOARD)/nuc505_flashtoram.ld SRC_C += \ hw/mcu/nuvoton/nuc505/Device/Nuvoton/NUC505Series/Source/system_NUC505Series.c \ diff --git a/hw/bsp/pyboardv11/board.mk b/hw/bsp/pyboardv11/board.mk index a0b07f26..9da0541e 100644 --- a/hw/bsp/pyboardv11/board.mk +++ b/hw/bsp/pyboardv11/board.mk @@ -13,7 +13,7 @@ ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32F4xx_HAL_Driver ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32F4xx # All source paths should be relative to the top level. -LD_FILE = hw/bsp/pyboardv11/STM32F405RGTx_FLASH.ld +LD_FILE = hw/bsp/$(BOARD)/STM32F405RGTx_FLASH.ld SRC_C += \ $(ST_CMSIS)/Source/Templates/system_stm32f4xx.c \