diff --git a/board/starterkit/starterkit.mk b/board/starterkit/starterkit.mk index 1f17bd6482..3ea63eea86 100644 --- a/board/starterkit/starterkit.mk +++ b/board/starterkit/starterkit.mk @@ -10,10 +10,6 @@ HOST_MCU_NAME := STM32L433RC-Nucleo $(NAME)_SOURCES += board.c board_cli.c -ifneq ($(IDE),keil) -$(NAME)_SOURCES += st7789.c -endif - GLOBAL_INCLUDES += . GLOBAL_DEFINES += STDIO_UART=0 diff --git a/build/aos_target_config.mk b/build/aos_target_config.mk index d18ab14fd5..dce0d38314 100644 --- a/build/aos_target_config.mk +++ b/build/aos_target_config.mk @@ -458,6 +458,8 @@ $(call WRITE_FILE_APPEND, $(CONFIG_PY_FILE) ,{'name':'$(comp)'$(COMMA) ) $(call WRITE_FILE_APPEND, $(CONFIG_PY_FILE) ,'src':[ ) $(eval SOURCES_FULLPATH := $(addprefix $($(comp)_LOCATION), $($(comp)_SOURCES))) $(foreach src,$(SOURCES_FULLPATH), $(call WRITE_FILE_APPEND, $(CONFIG_PY_FILE) ,'$(src)'$(COMMA))) +$(eval LIB_FULLPATH := $(addprefix $($(comp)_LOCATION), $($(comp)_PREBUILT_LIBRARY))) +$(foreach complib,$(LIB_FULLPATH), $(call WRITE_FILE_APPEND, $(CONFIG_PY_FILE) ,'$(complib)'$(COMMA))) $(call WRITE_FILE_APPEND, $(CONFIG_PY_FILE) ,]$(COMMA)) $(call WRITE_FILE_APPEND, $(CONFIG_PY_FILE) ,'include':[ ) diff --git a/example/starterkitgui/STemWin/Lib/STemWin540_CM4_OS_Keil_ot.lib b/example/starterkitgui/STemWin/Lib/STemWin540_CM4_OS_Keil_ot.lib new file mode 100644 index 0000000000..49b8ed0943 Binary files /dev/null and b/example/starterkitgui/STemWin/Lib/STemWin540_CM4_OS_Keil_ot.lib differ diff --git a/board/starterkit/st7789.c b/example/starterkitgui/st7789.c similarity index 100% rename from board/starterkit/st7789.c rename to example/starterkitgui/st7789.c diff --git a/board/starterkit/st7789.h b/example/starterkitgui/st7789.h similarity index 100% rename from board/starterkit/st7789.h rename to example/starterkitgui/st7789.h diff --git a/example/starterkitgui/starterkitgui.mk b/example/starterkitgui/starterkitgui.mk index 80c69652b6..f9cc4f665d 100644 --- a/example/starterkitgui/starterkitgui.mk +++ b/example/starterkitgui/starterkitgui.mk @@ -1,6 +1,7 @@ NAME := starterkitgui $(NAME)_SOURCES := starterkitgui.c +$(NAME)_SOURCES += st7789.c $(NAME)_SOURCES += app/GUIDEMO.c $(NAME)_SOURCES += app/GUIDEMO_BarGraph.c @@ -27,11 +28,15 @@ $(NAME)_COMPONENTS += benchmarks GLOBAL_DEFINES += CONFIG_CMD_BENCHMARKS endif -$(NAME)_PREBUILT_LIBRARY := STemWin/Lib/STemWin540_CM4_OS_GCC_ot.a +ifeq ($(COMPILER),armcc) + $(NAME)_PREBUILT_LIBRARY := STemWin/Lib/STemWin540_CM4_OS_Keil_ot.lib +else ifeq ($(COMPILER),iar) + +else + $(NAME)_PREBUILT_LIBRARY := STemWin/Lib/STemWin540_CM4_OS_GCC_ot.a +endif $(NAME)_INCLUDES += core/include/ $(NAME)_INCLUDES += STemWin/Config/ $(NAME)_INCLUDES += STemWin/inc/ - -GLOBAL_CFLAGS += -mfpu=fpv4-sp-d16 -mfloat-abi=hard -GLOBAL_LDFLAGS += -mfpu=fpv4-sp-d16 -mfloat-abi=hard +$(NAME)_INCLUDES += . diff --git a/platform/mcu/stm32l4xx/stm32l4xx.mk b/platform/mcu/stm32l4xx/stm32l4xx.mk index e9c8ee2983..14a5a377eb 100644 --- a/platform/mcu/stm32l4xx/stm32l4xx.mk +++ b/platform/mcu/stm32l4xx/stm32l4xx.mk @@ -83,7 +83,7 @@ $(NAME)_SOURCES += src/$(HOST_MCU_NAME)/runapp/soc_init.c \ src/$(HOST_MCU_NAME)/hal/flash_port.c ifeq ($(COMPILER),armcc) -GLOBAL_CFLAGS += --c99 --cpu=7E-M -D__MICROLIB -g --apcs=interwork --split_sections +GLOBAL_CFLAGS += --c99 --cpu=Cortex-M4 --apcs=/hardfp --fpu=vfpv4_sp_d16 -D__MICROLIB -g --split_sections else ifeq ($(COMPILER),iar) GLOBAL_CFLAGS += --cpu=Cortex-M4 \ --cpu_mode=thumb \ @@ -100,7 +100,7 @@ GLOBAL_CFLAGS += -D__VFP_FP__ endif ifeq ($(COMPILER),armcc) -GLOBAL_ASMFLAGS += --cpu=7E-M -g --apcs=interwork --library_type=microlib --pd "__MICROLIB SETA 1" +GLOBAL_ASMFLAGS += --cpu=Cortex-M4 -g --apcs=/hardfp --fpu=vfpv4_sp_d16 --library_type=microlib --pd "__MICROLIB SETA 1" else ifeq ($(COMPILER),iar) GLOBAL_ASMFLAGS += --cpu Cortex-M4 \ --cpu_mode thumb \ @@ -115,7 +115,9 @@ GLOBAL_ASMFLAGS += -mcpu=cortex-m4 \ endif ifeq ($(COMPILER),armcc) -GLOBAL_LDFLAGS += -L --cpu=7E-M \ +GLOBAL_LDFLAGS += -L --cpu=Cortex-M4 \ + -L --fpu=vfpv4_sp_d16 \ + -L --apcs=/hardfp \ -L --strict \ -L --xref -L --callgraph -L --symbols \ -L --info=sizes -L --info=totals -L --info=unused -L --info=veneers -L --info=summarysizes