mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-31 05:52:55 +08:00
fix iar ci
This commit is contained in:
parent
5c537c25f0
commit
9930863b41
@ -139,7 +139,21 @@ $(BUILD)/obj/%_asm.o: %.S
|
|||||||
@echo AS $(notdir $@)
|
@echo AS $(notdir $@)
|
||||||
@$(AS) $(ASFLAGS) -c -o $@ $<
|
@$(AS) $(ASFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
ifndef USE_IAR
|
ifdef USE_IAR
|
||||||
|
# IAR Compiler
|
||||||
|
$(BUILD)/$(PROJECT).bin: $(BUILD)/$(PROJECT).elf
|
||||||
|
@echo CREATE $@
|
||||||
|
@$(OBJCOPY) --silent --bin $^ $@
|
||||||
|
|
||||||
|
$(BUILD)/$(PROJECT).hex: $(BUILD)/$(PROJECT).elf
|
||||||
|
@echo CREATE $@
|
||||||
|
@$(OBJCOPY) --silent --ihex $^ $@
|
||||||
|
|
||||||
|
$(BUILD)/$(PROJECT).elf: $(OBJ)
|
||||||
|
@echo LINK $@
|
||||||
|
@$(LD) -o $@ $(IAR_LDFLAGS) $^
|
||||||
|
|
||||||
|
else
|
||||||
# GCC based compiler
|
# GCC based compiler
|
||||||
$(BUILD)/$(PROJECT).bin: $(BUILD)/$(PROJECT).elf
|
$(BUILD)/$(PROJECT).bin: $(BUILD)/$(PROJECT).elf
|
||||||
@echo CREATE $@
|
@echo CREATE $@
|
||||||
@ -153,20 +167,6 @@ $(BUILD)/$(PROJECT).elf: $(OBJ)
|
|||||||
@echo LINK $@
|
@echo LINK $@
|
||||||
@$(LD) -o $@ $(LDFLAGS) $^ -Wl,--start-group $(LIBS) -Wl,--end-group
|
@$(LD) -o $@ $(LDFLAGS) $^ -Wl,--start-group $(LIBS) -Wl,--end-group
|
||||||
|
|
||||||
else
|
|
||||||
|
|
||||||
# IAR Compiler
|
|
||||||
$(BUILD)/$(PROJECT).bin: $(BUILD)/$(PROJECT).elf
|
|
||||||
@echo CREATE $@
|
|
||||||
@$(OBJCOPY) --silent --bin $^ $@
|
|
||||||
|
|
||||||
$(BUILD)/$(PROJECT).hex: $(BUILD)/$(PROJECT).elf
|
|
||||||
@echo CREATE $@
|
|
||||||
@$(OBJCOPY) --silent --ihex $^ $@
|
|
||||||
|
|
||||||
$(BUILD)/$(PROJECT).elf: $(OBJ)
|
|
||||||
@echo LINK $@
|
|
||||||
@$(LD) -o $@ $(IAR_LDFLAGS) $^
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# UF2 generation, iMXRT need to strip to text only before conversion
|
# UF2 generation, iMXRT need to strip to text only before conversion
|
||||||
|
@ -42,7 +42,9 @@ SRC_C += \
|
|||||||
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_rcc.c \
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_rcc.c \
|
||||||
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_rcc_ex.c \
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_rcc_ex.c \
|
||||||
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_gpio.c \
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_gpio.c \
|
||||||
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_uart.c
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_dma.c \
|
||||||
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_uart.c \
|
||||||
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_uart_ex.c
|
||||||
|
|
||||||
INC += \
|
INC += \
|
||||||
$(TOP)/$(BOARD_PATH) \
|
$(TOP)/$(BOARD_PATH) \
|
||||||
|
@ -42,6 +42,7 @@ SRC_C += \
|
|||||||
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_rcc.c \
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_rcc.c \
|
||||||
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_rcc_ex.c \
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_rcc_ex.c \
|
||||||
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_uart.c \
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_uart.c \
|
||||||
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_dma.c \
|
||||||
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_gpio.c
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_gpio.c
|
||||||
|
|
||||||
INC += \
|
INC += \
|
||||||
|
@ -52,6 +52,7 @@ SRC_C += \
|
|||||||
$(ST_CMSIS)/Source/Templates/system_stm32$(ST_FAMILY)xx.c \
|
$(ST_CMSIS)/Source/Templates/system_stm32$(ST_FAMILY)xx.c \
|
||||||
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal.c \
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal.c \
|
||||||
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_cortex.c \
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_cortex.c \
|
||||||
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_dma.c \
|
||||||
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_rcc.c \
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_rcc.c \
|
||||||
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_rcc_ex.c \
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_rcc_ex.c \
|
||||||
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_gpio.c \
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_gpio.c \
|
||||||
|
@ -43,6 +43,7 @@ SRC_C += \
|
|||||||
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_rcc.c \
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_rcc.c \
|
||||||
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_rcc_ex.c \
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_rcc_ex.c \
|
||||||
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_uart.c \
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_uart.c \
|
||||||
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_uart_ex.c \
|
||||||
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_gpio.c
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_gpio.c
|
||||||
|
|
||||||
INC += \
|
INC += \
|
||||||
|
@ -52,10 +52,13 @@ SRC_C += \
|
|||||||
$(ST_CMSIS)/Source/Templates/system_stm32$(ST_FAMILY)xx.c \
|
$(ST_CMSIS)/Source/Templates/system_stm32$(ST_FAMILY)xx.c \
|
||||||
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal.c \
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal.c \
|
||||||
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_cortex.c \
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_cortex.c \
|
||||||
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_dma.c \
|
||||||
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_rcc.c \
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_rcc.c \
|
||||||
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_rcc_ex.c \
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_rcc_ex.c \
|
||||||
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_gpio.c \
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_gpio.c \
|
||||||
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_uart.c \
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_uart.c \
|
||||||
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_uart_ex.c \
|
||||||
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_pwr.c \
|
||||||
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_pwr_ex.c
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_pwr_ex.c
|
||||||
|
|
||||||
INC += \
|
INC += \
|
||||||
|
@ -39,12 +39,14 @@ SRC_C += \
|
|||||||
$(ST_CMSIS)/Source/Templates/system_stm32$(ST_FAMILY)xx.c \
|
$(ST_CMSIS)/Source/Templates/system_stm32$(ST_FAMILY)xx.c \
|
||||||
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal.c \
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal.c \
|
||||||
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_cortex.c \
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_cortex.c \
|
||||||
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_dma.c \
|
||||||
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_rcc.c \
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_rcc.c \
|
||||||
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_rcc_ex.c \
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_rcc_ex.c \
|
||||||
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_pwr.c \
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_pwr.c \
|
||||||
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_pwr_ex.c \
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_pwr_ex.c \
|
||||||
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_gpio.c \
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_gpio.c \
|
||||||
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_uart.c
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_uart.c \
|
||||||
|
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_uart_ex.c
|
||||||
|
|
||||||
INC += \
|
INC += \
|
||||||
$(TOP)/lib/CMSIS_5/CMSIS/Core/Include \
|
$(TOP)/lib/CMSIS_5/CMSIS/Core/Include \
|
||||||
|
@ -120,9 +120,8 @@ def build_size(example, board):
|
|||||||
text_title = 'text data bss dec'
|
text_title = 'text data bss dec'
|
||||||
if text_title in l:
|
if text_title in l:
|
||||||
size_list = size_output[i+1].split('\t')
|
size_list = size_output[i+1].split('\t')
|
||||||
break
|
flash_size = int(size_list[0])
|
||||||
|
sram_size = int(size_list[1]) + int(size_list[2])
|
||||||
flash_size = int(size_list[0])
|
return (flash_size, sram_size)
|
||||||
sram_size = int(size_list[1]) + int(size_list[2])
|
|
||||||
return (flash_size, sram_size)
|
|
||||||
|
|
||||||
|
return (0, 0)
|
Loading…
x
Reference in New Issue
Block a user