This commit is contained in:
pvvx 2017-03-24 18:25:03 +03:00
parent b9bd16cd31
commit 3a88ef3139
12 changed files with 2714 additions and 2728 deletions

View file

@ -932,10 +932,10 @@
<buildTargets> <buildTargets>
<target name="all" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> <target name="all" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>mingw32-make.exe</buildCommand> <buildCommand>mingw32-make.exe</buildCommand>
<buildArguments>-s -j6</buildArguments> <buildArguments>-s -j</buildArguments>
<buildTarget>all</buildTarget> <buildTarget>all</buildTarget>
<stopOnError>true</stopOnError> <stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand> <useDefaultCommand>false</useDefaultCommand>
<runAllBuilders>false</runAllBuilders> <runAllBuilders>false</runAllBuilders>
</target> </target>
<target name="clean" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> <target name="clean" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load diff

View file

@ -5,7 +5,7 @@
#FLASHER = stlink-v2-1 #FLASHER = stlink-v2-1
#FLASHER = stlink-v2 #FLASHER = stlink-v2
FLASHER ?= Jlink FLASHER ?= Jlink
JLINK_PATH ?= D:/MCU/SEGGER/JLink_V610a/ JLINK_PATH ?= D:/MCU/SEGGER/JLink_V612i/
#--------------------------- #---------------------------
# Default # Default
#--------------------------- #---------------------------
@ -66,7 +66,7 @@ NMAPFILE = $(OBJ_DIR)/$(TARGET).nmap
#FLASHER_PATH ?= flasher/ #FLASHER_PATH ?= flasher/
RAM_IMAGE?= $(BIN_DIR)/ram.bin #RAM_IMAGE?= $(BIN_DIR)/ram.bin
RAM1_IMAGE ?= $(BIN_DIR)/ram_1.bin RAM1_IMAGE ?= $(BIN_DIR)/ram_1.bin
RAM1P_IMAGE ?= $(BIN_DIR)/ram_1.p.bin RAM1P_IMAGE ?= $(BIN_DIR)/ram_1.p.bin
@ -91,18 +91,12 @@ TST_IMAGE = $(BIN_DIR)/ram_2.bin
LD_ADDRESS = 0x1000B000 LD_ADDRESS = 0x1000B000
ST_ADDRESS = 0x10006068 ST_ADDRESS = 0x10006068
.PHONY: copybin1 genbin1 genbin23 flashburn reset test readfullflash .PHONY: genbin1 genbin23 flashburn reset test readfullflash
.NOTPARALLEL: all mp copybin1 genbin1 genbin23 flashburn reset test readfullflash _endgenbin .NOTPARALLEL: all mp genbin1 genbin23 flashburn reset test readfullflash _endgenbin
all: $(ELFFILE) $(OTA_IMAGE) $(FLASH_IMAGE) _endgenbin all: $(ELFFILE) $(OTA_IMAGE) $(FLASH_IMAGE) _endgenbin
mp: $(ELFFILE) $(OTA_IMAGE) $(FLASH_IMAGE) _endgenbin mp: $(ELFFILE) $(OTA_IMAGE) $(FLASH_IMAGE) _endgenbin
copybin1:
# cp $(patsubst sdk/%,$(SDK_PATH)%,$(BOOTS))/ram_1.r.bin $(BIN_DIR)/ram_1.r.bin
cp $(patsubst sdk/%,$(SDK_PATH)%,$(BOOTS))/ram_1.p.bin $(BIN_DIR)/ram_1.p.bin
# @chmod 777 $(OBJ_DIR)/ram_1.r.bin
# @$(OBJCOPY) --rename-section .data=.loader.data,contents,alloc,load,readonly,data -I binary -O elf32-littlearm -B arm $(BIN_DIR)/ram_1.r.bin $(OBJ_DIR)/ram_1.r.o
genbin1: $(ELFFILE) $(RAM1P_IMAGE) genbin1: $(ELFFILE) $(RAM1P_IMAGE)
genbin23: $(ELFFILE) $(OTA_IMAGE) $(FLASH_IMAGE) _endgenbin genbin23: $(ELFFILE) $(OTA_IMAGE) $(FLASH_IMAGE) _endgenbin
@ -191,7 +185,7 @@ ifeq ($(RAM1_START_ADDR),$(RAM1_END_ADDR))
ifdef COMPILED_BOOT_BIN ifdef COMPILED_BOOT_BIN
$(OBJCOPY) --change-section-address .boot.head=0x10000ba8 -j .boot.head -j .bootloader -Obinary $(ELFFILE) $(RAM1P_IMAGE) $(OBJCOPY) --change-section-address .boot.head=0x10000ba8 -j .boot.head -j .bootloader -Obinary $(ELFFILE) $(RAM1P_IMAGE)
else else
$(OBJCOPY) -j .rom_ram -Obinary $(ELFFILE) $(RAM_IMAGE) # $(OBJCOPY) -j .rom_ram -Obinary $(ELFFILE) $(RAM_IMAGE)
$(OBJCOPY) -j .ram.start.table -j .ram_image1.text -Obinary $(ELFFILE) $(RAM1R_IMAGE) $(OBJCOPY) -j .ram.start.table -j .ram_image1.text -Obinary $(ELFFILE) $(RAM1R_IMAGE)
$(PICK) 0x$(RAM1_START_ADDR) 0x$(RAM1_END_ADDR) $(RAM1R_IMAGE) $(RAM1P_IMAGE) head+reset_offset 0x0B000 $(PICK) 0x$(RAM1_START_ADDR) 0x$(RAM1_END_ADDR) $(RAM1R_IMAGE) $(RAM1P_IMAGE) head+reset_offset 0x0B000
endif endif

View file

@ -6,7 +6,7 @@ SDK_PATH = ../RTL00MP3/RTL00_SDKV35a/
#OPENOCD_PATH = d:/MCU/OpenOCD/bin/# + or set in PATH #OPENOCD_PATH = d:/MCU/OpenOCD/bin/# + or set in PATH
TOOLS_PATH ?= $(SDK_PATH)component/soc/realtek/8195a/misc/iar_utility/common/tools/ TOOLS_PATH ?= $(SDK_PATH)component/soc/realtek/8195a/misc/iar_utility/common/tools/
FLASHER_PATH ?= flasher/ FLASHER_PATH ?= flasher/
JLINK_PATH ?= D:/MCU/SEGGER/JLink_V610a/ JLINK_PATH ?= D:/MCU/SEGGER/JLink_V612i/
#--------------------------- #---------------------------
# Default # Default
#--------------------------- #---------------------------

View file

@ -45,18 +45,10 @@ build_info:
.PHONY: application .PHONY: application
application: build_info $(SRC_O) $(DRAM_O) $(BOOT_O) application: build_info $(SRC_O) $(DRAM_O) $(BOOT_O)
@echo "==========================================================="
@echo "Make BootLoader (ram_1.p.bin, ram_1.r.bin)"
# @echo "==========================================================="
@mkdir -p $(BIN_DIR) $(OBJ_DIR)
## @cp $(patsubst sdk/%,$(SDK_PATH)%,$(BOOTS))/ram_1.r.bin $(BIN_DIR)/ram_1.r.bin
## @cp $(patsubst sdk/%,$(SDK_PATH)%,$(BOOTS))/ram_1.p.bin $(BIN_DIR)/ram_1.p.bin
# @chmod 777 $(OBJ_DIR)/ram_1.r.bin
## $(OBJCOPY) --rename-section .data=.loader.data,contents,alloc,load,readonly,data -I binary -O elf32-littlearm -B arm $(BIN_DIR)/ram_1.r.bin $(OBJ_DIR)/ram_1.r.o
@echo "===========================================================" @echo "==========================================================="
@echo "Link ($(TARGET))" @echo "Link ($(TARGET))"
# @echo "===========================================================" # @echo "==========================================================="
## @$(LD) $(LFLAGS) -o $(ELFFILE) $(OBJ_LIST) $(OBJ_DIR)/ram_1.r.o $(LIBFLAGS) -T$(LDFILE) @mkdir -p $(BIN_DIR) $(OBJ_DIR)
@$(LD) $(LFLAGS) -o $(ELFFILE) $(OBJ_LIST) $(LIBFLAGS) -T$(LDFILE) @$(LD) $(LFLAGS) -o $(ELFFILE) $(OBJ_LIST) $(LIBFLAGS) -T$(LDFILE)
@$(OBJDUMP) -d $(ELFFILE) > $(OBJ_DIR)/$(TARGET).asm @$(OBJDUMP) -d $(ELFFILE) > $(OBJ_DIR)/$(TARGET).asm
@ -96,7 +88,5 @@ VPATH:=$(OBJ_DIR) $(SDK_PATH)
#.PHONY: clean #.PHONY: clean
clean: clean:
rm -rf $(OBJ_DIR) $(BIN_DIR) $(OBJ_DIR)/$(SDK_PATH) rm -rf $(OBJ_DIR) $(BIN_DIR) $(OBJ_DIR)/$(SDK_PATH)
# @rm -f $(patsubst %.c,%.d,$(SRC_C_LIST))
# @rm -f $(patsubst %.c,%.o,$(SRC_C_LIST))