Skip to content

Commit

Permalink
Merge pull request #175 from alibaba/contrib
Browse files Browse the repository at this point in the history
for starterkit
  • Loading branch information
junjiec authored Mar 26, 2018
2 parents 3a04dcc + 03656b7 commit e7941fe
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 11 deletions.
4 changes: 0 additions & 4 deletions board/starterkit/starterkit.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions build/aos_target_config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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':[ )
Expand Down
Binary file not shown.
File renamed without changes.
File renamed without changes.
13 changes: 9 additions & 4 deletions example/starterkitgui/starterkitgui.mk
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 += .
8 changes: 5 additions & 3 deletions platform/mcu/stm32l4xx/stm32l4xx.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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 \
Expand All @@ -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
Expand Down

0 comments on commit e7941fe

Please sign in to comment.