mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-15 06:28:14 +08:00
修复代码错误
This commit is contained in:
@@ -11,7 +11,7 @@ default: Help
|
||||
|
||||
export MiCO_SDK_VERSION_MAJOR := 3
|
||||
export MiCO_SDK_VERSION_MINOR := 5
|
||||
export MiCO_SDK_VERSION_REVISION := 4
|
||||
export MiCO_SDK_VERSION_REVISION := 2
|
||||
|
||||
export SOURCE_ROOT ?= ./
|
||||
|
||||
|
||||
0
mico-os/makefiles/OpenOCD/interface/swj-dp.tcl
Normal file → Executable file
0
mico-os/makefiles/OpenOCD/interface/swj-dp.tcl
Normal file → Executable file
0
mico-os/makefiles/OpenOCD/mem_helper.tcl
Normal file → Executable file
0
mico-os/makefiles/OpenOCD/mem_helper.tcl
Normal file → Executable file
0
mico-os/makefiles/OpenOCD/memory.tcl
Normal file → Executable file
0
mico-os/makefiles/OpenOCD/memory.tcl
Normal file → Executable file
0
mico-os/makefiles/OpenOCD/mmr_helpers.tcl
Normal file → Executable file
0
mico-os/makefiles/OpenOCD/mmr_helpers.tcl
Normal file → Executable file
30
mico-os/makefiles/images_download.mk
Normal file → Executable file
30
mico-os/makefiles/images_download.mk
Normal file → Executable file
@@ -35,33 +35,13 @@ endef
|
||||
|
||||
# MACRO: BUILD_IMAGE_DOWNLOAD_DEPENDENCY
|
||||
define BUILD_IMAGE_DOWNLOAD_DEPENDENCY
|
||||
$(if $($(1)),$(eval $(1)_DOWNLOAD_DEPENDENCY := $($(1)) $(CURRENT_DEPENDENCY) sflash_write_app display_map_summary $(EXT_IMAGES_DOWNLOAD_DEP) IMAGES_DOWNLOAD_RULES $(LINK_APPS_FILE) EXT_FILESYSTEM_IMAGE_DOWNLOAD) ,)
|
||||
$(if $($(1)),$(eval $(1)_DOWNLOAD_DEPENDENCY := $($(1)) $(CURRENT_DEPENDENCY) sflash_write_app display_map_summary $(EXT_IMAGES_DOWNLOAD_DEP) IMAGES_DOWNLOAD_RULES $(LINK_APPS_FILE)),)
|
||||
$(if $($(1)),$(eval CURRENT_DEPENDENCY += $(1)_DOWNLOAD),)
|
||||
endef
|
||||
#### end of BUILD_IMAGE_DOWNLOAD_DEPENDENCY
|
||||
|
||||
IMAGES_DOWNLOADS_DEPENDENCY :=
|
||||
FILE_RESOURCE :=
|
||||
#### add download filesystem image
|
||||
ifeq ($(APP_FULL), bootloader)
|
||||
FILE_BUILD_RESOURCE :=
|
||||
else
|
||||
ifeq ($(APP_FULL), sub_build/spi_flash_write)
|
||||
FILE_BUILD_RESOURCE :=
|
||||
else
|
||||
FILE_BUILD_RESOURCE := $(APP_FULL)/resources
|
||||
endif
|
||||
endif
|
||||
ifeq ($(wildcard $(FILE_BUILD_RESOURCE)),)
|
||||
FILE_RESOURCE :=
|
||||
else
|
||||
FILE_RESOURCE := build/$(CLEANED_BUILD_STRING)/resources/filesystem.bin
|
||||
endif
|
||||
ifeq ($(FILE_RESOURCE),)
|
||||
IMAGES := WIFI_FIRMWARE BT_PATCH_FIRMWARE BOOTLOAD_FIRMWARE APPLICATION_FIRMWARE ATE_FIRMWARE PARAMETER_1_IMAGE PARAMETER_2_IMAGEFILESYSTEM_IMAGE
|
||||
else
|
||||
IMAGES := WIFI_FIRMWARE FILESYSTEM_IMAGE BT_PATCH_FIRMWARE BOOTLOAD_FIRMWARE APPLICATION_FIRMWARE ATE_FIRMWARE PARAMETER_1_IMAGE PARAMETER_2_IMAGEFILESYSTEM_IMAGE
|
||||
endif
|
||||
$(foreach IMAGE,$(IMAGES),$(eval $(if $($(IMAGE)), IMAGES_DOWNLOADS_DEPENDENCY += $(IMAGE)_DOWNLOAD)))
|
||||
$(foreach IMAGE,$(IMAGES),$(eval $(call BUILD_IMAGE_DOWNLOAD_DEPENDENCY,$(IMAGE))))
|
||||
|
||||
@@ -84,10 +64,8 @@ endif
|
||||
|
||||
ifneq ($(FILESYSTEM_IMAGE),)
|
||||
FILESYSTEM_IMAGE_DOWNLOAD: $(FILESYSTEM_IMAGE_DOWNLOAD_DEPENDENCY)
|
||||
$(QUIET)$(ECHO) Downloading FILESYSTEM_IMAGE to partition: $(FILESYSTEM_IMAGE_PARTITION_TCL)
|
||||
$(call CONV_SLASHES,$(OPENOCD_FULL_NAME)) -f $(OPENOCD_CFG_PATH)interface/$(JTAG).cfg -f $(OPENOCD_CFG_PATH)$(HOST_OPENOCD)/$(HOST_OPENOCD).cfg -f $(MICO_OS_PATH)/sub_build/spi_flash_write/sflash_write.tcl -c "sflash_write_file $(FILE_RESOURCE) $(FILESYSTEM_IMAGE_PARTITION_TCL) 0x0 $(SFLASH_APP_PLATFROM_BUS) 0" -c shutdown $(DOWNLOAD_LOG) 2>&1 && $(ECHO) Download complete && $(ECHO_BLANK_LINE) || $(ECHO) Download failed
|
||||
$(QUIET)$(ECHO) Downloading resources filesystem ... $(FILESYSTEM_IMAGE) at sector $(FILESYSTEM_IMAGE_SECTOR_START) size $(FILESYSTEM_IMAGE_SECTOR_COUNT)...
|
||||
$(call CONV_SLASHES,$(OPENOCD_FULL_NAME)) -s $(SOURCE_ROOT) -f $(OPENOCD_CFG_PATH)interface/$(JTAG).cfg -f $(OPENOCD_CFG_PATH)$(HOST_OPENOCD)/$(HOST_OPENOCD).cfg -f apps/waf/sflash_write/sflash_write.tcl -c "sflash_write_file $(FILESYSTEM_IMAGE) $(FILESYSTEM_IMAGE_SECTOR_ADDRESS) $(SFLASH_APP_PLATFROM_BUS) 0" -c shutdown $(DOWNLOAD_LOG) 2>&1 && $(ECHO) Download complete && $(ECHO_BLANK_LINE) || $(ECHO) Download failed
|
||||
endif
|
||||
|
||||
|
||||
EXT_IMAGE_DOWNLOAD: sflash_write_app $(IMAGES_DOWNLOADS_DEPENDENCY)
|
||||
|
||||
EXT_FILESYSTEM_IMAGE_DOWNLOAD $(FILESYSTEM_IMAGE): sflash_gen_filesystem
|
||||
|
||||
0
mico-os/makefiles/mfg_image.mk
Normal file → Executable file
0
mico-os/makefiles/mfg_image.mk
Normal file → Executable file
33
mico-os/makefiles/mico_flash_download_app.mk
Normal file → Executable file
33
mico-os/makefiles/mico_flash_download_app.mk
Normal file → Executable file
@@ -14,30 +14,6 @@ SFLASH_APP_TARGET := sub_build.spi_flash_write@NoRTOS@$(PLATFORM)
|
||||
SFLASH_APP_PLATFROM_BUS := $(PLATFORM)
|
||||
SFLASH_PREBUILD_APP := $(if $(wildcard $(MICO_OS_PATH)/board/$(PLATFORM)),$(MICO_OS_PATH)/board/$(PLATFORM),$(if $(wildcard $(SOURCE_ROOT)/board/$(PLATFORM)),$(SOURCE_ROOT)/board/$(PLATFORM),))/flash_prog.elf
|
||||
|
||||
FILE_BIN_SCRIPT:= $(MAKEFILES_PATH)/scripts/flash_pack.py
|
||||
FILE_BIN_NUM:= 001
|
||||
FILES_BIN_NAME:= filesystem
|
||||
|
||||
# If do not exist resources folder, error
|
||||
ifeq ($(APP_FULL), bootloader)
|
||||
APP_FILE_RESOURCE :=
|
||||
else
|
||||
ifeq ($(APP_FULL), sub_build/spi_flash_write)
|
||||
APP_FILE_RESOURCE :=
|
||||
else
|
||||
APP_FILE_RESOURCE := $(APP_FULL)/resources
|
||||
endif
|
||||
endif
|
||||
ifeq ($(APP_FILE_RESOURCE),)
|
||||
else
|
||||
ifeq ($(APP_FILE_RESOURCE), $(wildcard $(APP_FILE_RESOURCE)))
|
||||
SFLASH_GEN_FTFS_BIN:= build/$(APP_FULL)@$(PLATFORM)/resources/filesystem.bin
|
||||
else
|
||||
SFLASH_GEN_FTFS_BIN:=
|
||||
#$(warning Do not exist filesystem folder...)
|
||||
endif
|
||||
endif
|
||||
|
||||
clean:
|
||||
$(QUIET)$(RM) -rf $(SFLASH_PREBUILD_APP)
|
||||
|
||||
@@ -49,16 +25,7 @@ $(SFLASH_PREBUILD_APP):
|
||||
$(QUIET)$(ECHO) Finished Building Flash Loader App
|
||||
$(QUIET)$(ECHO_BLANK_LINE)
|
||||
|
||||
$(SFLASH_GEN_FTFS_BIN):
|
||||
$(QUIET)$(ECHO) Generating Filesystem Image...
|
||||
$(QUIET)$(shell $(PYTHON) $(FILE_BIN_SCRIPT) $(FILE_BIN_NUM) $(FILES_BIN_NAME).bin $(APP_FILE_RESOURCE))
|
||||
$(QUIET)$(MV) $(SOURCE_ROOT)$(FILES_BIN_NAME).bin $(SOURCE_ROOT)build/$(CLEANED_BUILD_STRING)/resources
|
||||
$(QUIET)$(ECHO) Finished Generating Filesystem Image
|
||||
$(QUIET)$(ECHO_BLANK_LINE)
|
||||
|
||||
|
||||
sflash_write_app: $(SFLASH_PREBUILD_APP)
|
||||
sflash_gen_filesystem: $(SFLASH_GEN_FTFS_BIN)
|
||||
|
||||
|
||||
|
||||
|
||||
6
mico-os/makefiles/mico_library_build.mk
Normal file → Executable file
6
mico-os/makefiles/mico_library_build.mk
Normal file → Executable file
@@ -83,11 +83,13 @@ $(SOURCE_ROOT)build/$(NAME)/%.o: %.cpp $(MAKEFILES_PATH)/mico_library_makefile.m
|
||||
$(SOURCE_ROOT)build/$(NAME)/%.o: %.S $(MAKEFILES_PATH)/mico_library_makefile.mk
|
||||
$(QUIET)$(call MKDIR, $(dir $@))
|
||||
$(QUIET)$(ECHO) Assembling $<
|
||||
$(QUIET)$(CC) $(CFLAGS) -o $@ $<
|
||||
$(QUIET)$(AS) $(ASMFLAGS) -o $@ $<
|
||||
|
||||
# Standard library defines
|
||||
CFLAGS += -c -MD -ggdb $(CPU_CFLAGS) $(ENDIAN_CFLAGS_LITTLE) -Wall -fsigned-char -ffunction-sections -Werror -fdata-sections -fno-common -std=gnu11
|
||||
|
||||
# MICO pre-built library defines
|
||||
CFLAGS += -DMiCO_PREBUILT_LIBS -DMiCO_SDK_VERSION_MAJOR=3
|
||||
CFLAGS += -DMiCO_PREBUILT_LIBS
|
||||
|
||||
ifdef DEBUG
|
||||
CFLAGS += -DDEBUG
|
||||
|
||||
@@ -18,14 +18,6 @@ BYPASS_LIBRARY_POISON_CHECK=1
|
||||
|
||||
include $(LIB_DIR)/$(LIB_NAME)_src.mk
|
||||
|
||||
SOURCES := $(addprefix $(LIB_DIR)/,$($(NAME)_SOURCES))
|
||||
LIBRARY_OUTPUT_DIR := $(LIB_OUT_DIR)
|
||||
|
||||
# Standard library defines
|
||||
CFLAGS += -c -MD -ggdb $(CPU_CFLAGS) $(ENDIAN_CFLAGS_LITTLE) -Wall -fsigned-char -ffunction-sections -fdata-sections -fno-common -std=gnu11
|
||||
|
||||
CFLAGS += $(addprefix -I,$(GLOBAL_INCLUDES)) $(addprefix -D,$(GLOBAL_DEFINES)) $(addprefix -I$(LIB_DIR)/,$($(NAME)_INCLUDES)) $(addprefix -D,$($(NAME)_DEFINES)) $($(NAME)_CFLAGS)
|
||||
|
||||
CFLAGS += -I$(MICO_OS_PATH)/include \
|
||||
-I$(MICO_OS_PATH)/mico/security \
|
||||
-I$(MICO_OS_PATH)/mico/security/Sodium/inc \
|
||||
@@ -39,5 +31,9 @@ CFLAGS += -I$(MICO_OS_PATH)/include \
|
||||
-I$(MICO_OS_PATH)/platform/$(HOST_ARCH) \
|
||||
-I$(MICO_OS_PATH)/template/includes
|
||||
|
||||
SOURCES := $(addprefix $(LIB_DIR)/,$($(NAME)_SOURCES))
|
||||
LIBRARY_OUTPUT_DIR := $(LIB_OUT_DIR)
|
||||
CFLAGS += $(addprefix -I,$(GLOBAL_INCLUDES)) $(addprefix -D,$(GLOBAL_DEFINES)) $(addprefix -I$(LIB_DIR)/,$($(NAME)_INCLUDES)) $(addprefix -D,$($(NAME)_DEFINES)) $($(NAME)_CFLAGS)
|
||||
|
||||
include $(MICO_OS_PATH)/makefiles/mico_library_build.mk
|
||||
|
||||
|
||||
0
mico-os/makefiles/mico_moc_targets.mk
Normal file → Executable file
0
mico-os/makefiles/mico_moc_targets.mk
Normal file → Executable file
0
mico-os/makefiles/mico_partition.mk
Normal file → Executable file
0
mico-os/makefiles/mico_partition.mk
Normal file → Executable file
0
mico-os/makefiles/mico_resources.mk
Normal file → Executable file
0
mico-os/makefiles/mico_resources.mk
Normal file → Executable file
0
mico-os/makefiles/mico_sflash.mk
Normal file → Executable file
0
mico-os/makefiles/mico_sflash.mk
Normal file → Executable file
0
mico-os/makefiles/mico_standard_targets.mk
Normal file → Executable file
0
mico-os/makefiles/mico_standard_targets.mk
Normal file → Executable file
4
mico-os/makefiles/mico_target_build.mk
Normal file → Executable file
4
mico-os/makefiles/mico_target_build.mk
Normal file → Executable file
@@ -227,9 +227,7 @@ display_map_summary: $(LINK_OUTPUT_FILE) $(MiCO_SDK_CONVERTER_OUTPUT_FILE) $(MiC
|
||||
# $(info $(BIN_OUTPUT_FILE))
|
||||
build_done: $(EXTRA_PRE_BUILD_TARGETS) $(BIN_OUTPUT_FILE) $(HEX_OUTPUT_FILE) display_map_summary
|
||||
|
||||
$(EXTRA_POST_BUILD_TARGETS): build_done
|
||||
|
||||
$(BUILD_STRING): $(if $(EXTRA_POST_BUILD_TARGETS),$(EXTRA_POST_BUILD_TARGETS),build_done)
|
||||
$(BUILD_STRING): build_done $(EXTRA_POST_BUILD_TARGETS)
|
||||
|
||||
# Stack usage target - Currently not working outputs a CSV file showing function stack usage
|
||||
$(OUTPUT_DIR)/stack_usage.csv: $(OUTPUT_DIR)/binary/$(CLEANED_BUILD_STRING)$(LINK_OUTPUT_SUFFIX)
|
||||
|
||||
2
mico-os/makefiles/mico_target_config.mk
Normal file → Executable file
2
mico-os/makefiles/mico_target_config.mk
Normal file → Executable file
@@ -235,7 +235,7 @@ $(eval $(call PROCESS_COMPATIBILITY_CHECK,))
|
||||
# Now we know the target architecture - include all toolchain makefiles and check one of them can handle the architecture
|
||||
CC :=
|
||||
|
||||
ifneq ($(filter $(HOST_ARCH),Cortex-M3 Cortex-M4 Cortex-M4F Cortex-R4 ARM968E-S),)
|
||||
ifneq ($(filter $(HOST_ARCH),Cortex-M3 Cortex-M4 Cortex-M4F Cortex-R4),)
|
||||
|
||||
include $(MAKEFILES_PATH)/micoder_toolchain_arm-none-eabi.mk
|
||||
|
||||
|
||||
1
mico-os/makefiles/micoder_host_cmd.mk
Normal file → Executable file
1
mico-os/makefiles/micoder_host_cmd.mk
Normal file → Executable file
@@ -221,7 +221,6 @@ endif # Win32
|
||||
# Set shortcuts to the compiler and other tools
|
||||
RM := "$(COMMON_TOOLS_PATH)rm$(EXECUTABLE_SUFFIX)" -f
|
||||
CP := "$(COMMON_TOOLS_PATH)cp$(EXECUTABLE_SUFFIX)" -f
|
||||
MV := "$(COMMON_TOOLS_PATH)mv$(EXECUTABLE_SUFFIX)" -f
|
||||
MAKE := "$(COMMON_TOOLS_PATH)make$(EXECUTABLE_SUFFIX)"
|
||||
BIN2C := "$(COMMON_TOOLS_PATH)bin2c$(EXECUTABLE_SUFFIX)"
|
||||
|
||||
|
||||
0
mico-os/makefiles/micoder_toolchain_GCC.mk
Normal file → Executable file
0
mico-os/makefiles/micoder_toolchain_GCC.mk
Normal file → Executable file
11
mico-os/makefiles/micoder_toolchain_arm-none-eabi.mk
Normal file → Executable file
11
mico-os/makefiles/micoder_toolchain_arm-none-eabi.mk
Normal file → Executable file
@@ -7,7 +7,7 @@
|
||||
# permission of MXCHIP Corporation.
|
||||
#
|
||||
|
||||
ARM_GNU_ARCH_LIST := ARM968E-S
|
||||
ARM_GNU_ARCH_LIST :=
|
||||
|
||||
THUMB_GNU_ARCH_LIST := Cortex-M0 \
|
||||
Cortex-M3 \
|
||||
@@ -129,7 +129,7 @@ COMPILER_SPECIFIC_RELEASE_LDFLAGS := -Wl,--gc-sections -Wl,$(COMPILER_SPECIFIC_
|
||||
COMPILER_SPECIFIC_DEPS_FLAG := -MD
|
||||
COMPILER_SPECIFIC_COMP_ONLY_FLAG := -c
|
||||
COMPILER_SPECIFIC_LINK_MAP = -Wl,-Map,$(1)
|
||||
COMPILER_SPECIFIC_LINK_FILES = -Wl,--whole-archive -Wl,--start-group $(1) -Wl,--end-group -Wl,-no-whole-archive
|
||||
COMPILER_SPECIFIC_LINK_FILES = -Wl,--start-group $(1) -Wl,--end-group
|
||||
COMPILER_SPECIFIC_LINK_SCRIPT_DEFINE_OPTION = -Wl$(COMMA)-T
|
||||
COMPILER_SPECIFIC_LINK_SCRIPT = $(addprefix -Wl$(COMMA)-T ,$(1))
|
||||
LINKER := $(CXX) --static -Wl,-static -Wl,--warn-common
|
||||
@@ -185,13 +185,6 @@ CPU_ASMFLAGS := $(CPU_BASE_FLAGS)
|
||||
CPU_LDFLAGS := -mthumb $(CPU_BASE_FLAGS) -Wl,-A,thumb -Wl,-z,max-page-size=0x10 -Wl,-z,common-page-size=0x10
|
||||
endif
|
||||
|
||||
ifeq ($(HOST_ARCH),ARM968E-S)
|
||||
CPU_BASE_FLAGS := -mcpu=arm968e-s -march=armv5te -mthumb -mthumb-interwork -mlittle-endian
|
||||
CPU_CFLAGS := $(CPU_BASE_FLAGS)
|
||||
CPU_CXXFLAGS := $(CPU_BASE_FLAGS)
|
||||
CPU_ASMFLAGS := $(CPU_BASE_FLAGS)
|
||||
CPU_LDFLAGS := $(CPU_BASE_FLAGS)
|
||||
endif
|
||||
|
||||
# $(1) is map file, $(2) is CSV output file
|
||||
COMPILER_SPECIFIC_MAPFILE_TO_CSV = $(PYTHON) $(MAPFILE_PARSER) $(1) > $(2)
|
||||
|
||||
0
mico-os/makefiles/release/release.mk
Normal file → Executable file
0
mico-os/makefiles/release/release.mk
Normal file → Executable file
0
mico-os/makefiles/release/release_test.sh
Normal file → Executable file
0
mico-os/makefiles/release/release_test.sh
Normal file → Executable file
0
mico-os/makefiles/scripts/gen_common_bin_output_file.py
Normal file → Executable file
0
mico-os/makefiles/scripts/gen_common_bin_output_file.py
Normal file → Executable file
0
mico-os/makefiles/scripts/gen_moc_bin_output_file.py
Normal file → Executable file
0
mico-os/makefiles/scripts/gen_moc_bin_output_file.py
Normal file → Executable file
0
mico-os/makefiles/scripts/image_size.py
Normal file → Executable file
0
mico-os/makefiles/scripts/image_size.py
Normal file → Executable file
0
mico-os/makefiles/scripts/kill_openocd.py
Normal file → Executable file
0
mico-os/makefiles/scripts/kill_openocd.py
Normal file → Executable file
0
mico-os/makefiles/scripts/map_parse_gcc.py
Normal file → Executable file
0
mico-os/makefiles/scripts/map_parse_gcc.py
Normal file → Executable file
Reference in New Issue
Block a user