mirror of
https://github.com/pvvx/rtl00TstMinAmebaV35a.git
synced 2024-11-24 02:14:16 +00:00
update
This commit is contained in:
parent
c399bf5be0
commit
52466406bf
9 changed files with 57 additions and 31 deletions
18
.cproject
18
.cproject
|
@ -612,6 +612,7 @@
|
|||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets">
|
||||
<buildTargets>
|
||||
<target name="all" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
|
@ -678,14 +679,6 @@
|
|||
<useDefaultCommand>true</useDefaultCommand>
|
||||
<runAllBuilders>false</runAllBuilders>
|
||||
</target>
|
||||
<target name="setup GDB_SERVER=jlink" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>mingw32-make.exe</buildCommand>
|
||||
<buildArguments>-s</buildArguments>
|
||||
<buildTarget>setup GDB_SERVER=jlink</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>true</useDefaultCommand>
|
||||
<runAllBuilders>false</runAllBuilders>
|
||||
</target>
|
||||
<target name="ramdebug" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>mingw32-make.exe</buildCommand>
|
||||
<buildArguments>-s</buildArguments>
|
||||
|
@ -694,7 +687,14 @@
|
|||
<useDefaultCommand>true</useDefaultCommand>
|
||||
<runAllBuilders>true</runAllBuilders>
|
||||
</target>
|
||||
<target name="runram" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>mingw32-make.exe</buildCommand>
|
||||
<buildArguments>-s</buildArguments>
|
||||
<buildTarget>runram</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>true</useDefaultCommand>
|
||||
<runAllBuilders>true</runAllBuilders>
|
||||
</target>
|
||||
</buildTargets>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
|
||||
</cproject>
|
||||
|
|
1
.project
1
.project
|
@ -7,6 +7,7 @@
|
|||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<triggers>clean,full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
|
|
|
@ -6,9 +6,9 @@ echo Build project...
|
|||
mingw32-make.exe -f Makefile all
|
||||
@if not exist build\obj\build.axf goto err
|
||||
:run
|
||||
start JLinkGDBServerCL.exe -device Cortex-M3 -if SWD -ir -endian little -speed 3500
|
||||
start JLinkGDBServer.exe -device Cortex-M3 -if SWD -ir -endian little -speed 3500
|
||||
arm-none-eabi-gdb.exe -x flasher/gdb_run_ram.jlink
|
||||
taskkill /F /IM JLinkGDBServerCL.exe
|
||||
taskkill /F /IM JLinkGDBServer.exe
|
||||
goto end
|
||||
:err
|
||||
echo Error!
|
||||
|
|
21
Makefile
21
Makefile
|
@ -5,30 +5,27 @@ ram_all:
|
|||
@$(MAKE) -f sdkbuild.mk
|
||||
@$(MAKE) -f flasher.mk genbin23
|
||||
|
||||
.PHONY: mp
|
||||
mp:
|
||||
@$(MAKE) -f sdkbuild.mk mp
|
||||
@$(MAKE) -f flasher.mk genbin23
|
||||
|
||||
.PHONY: clean clean_all
|
||||
clean:
|
||||
@$(MAKE) -f sdkbuild.mk clean
|
||||
|
||||
clean_all:
|
||||
@$(MAKE) -f sdkbuild.mk clean_all
|
||||
|
||||
.PHONY: flash debug ramdebug setup
|
||||
setup: toolchain
|
||||
@$(MAKE) -f sdkbuild.mk $(MAKECMDGOALS)
|
||||
|
||||
flashburn:
|
||||
@$(MAKE) -f flasher.mk flashburn
|
||||
|
||||
.PHONY: debug ramdebug
|
||||
debug:
|
||||
@$(MAKE) -f application.mk debug
|
||||
|
||||
ramdebug:
|
||||
@$(MAKE) -f application.mk ramdebug
|
||||
|
||||
.PHONY: flashburn runram reset test readfullflash
|
||||
flashburn:
|
||||
@$(MAKE) -f flasher.mk flashburn
|
||||
|
||||
runram:
|
||||
@$(MAKE) --f flasher.mk runram
|
||||
|
||||
reset:
|
||||
@make -f flasher.mk reset
|
||||
|
||||
|
|
|
@ -391,7 +391,7 @@ int wifi_connect(
|
|||
u8 wep_hex = 0;
|
||||
u8 wep_pwd[14] = {0};
|
||||
|
||||
if(rtw_join_status & JOIN_SIMPLE_CONFIG || rtw_join_status & JOIN_AIRKISS){
|
||||
if((rtw_join_status & JOIN_SIMPLE_CONFIG) || (rtw_join_status & JOIN_AIRKISS)){
|
||||
return RTW_ERROR;
|
||||
}
|
||||
|
||||
|
@ -556,7 +556,7 @@ int wifi_connect_bssid(
|
|||
xSemaphoreHandle join_semaphore;
|
||||
rtw_result_t result = RTW_SUCCESS;
|
||||
|
||||
if(rtw_join_status & JOIN_SIMPLE_CONFIG || rtw_join_status & JOIN_AIRKISS){
|
||||
if((rtw_join_status & JOIN_SIMPLE_CONFIG) || (rtw_join_status & JOIN_AIRKISS)){
|
||||
return RTW_ERROR;
|
||||
}
|
||||
|
||||
|
@ -1265,7 +1265,7 @@ int wifi_scan_networks_with_ssid(int (results_handler)(char*buf, int buflen, cha
|
|||
memcpy(scan_buf.buf+sizeof(int), ssid, ssid_len);
|
||||
|
||||
//Scan channel
|
||||
if(scan_cnt = (wifi_scan(RTW_SCAN_TYPE_ACTIVE, RTW_BSS_TYPE_ANY, &scan_buf)) < 0){
|
||||
if((scan_cnt = (wifi_scan(RTW_SCAN_TYPE_ACTIVE, RTW_BSS_TYPE_ANY, &scan_buf))) < 0){
|
||||
printf("\n\rERROR: wifi scan failed");
|
||||
ret = RTW_ERROR;
|
||||
}else{
|
||||
|
|
13
flasher.mk
13
flasher.mk
|
@ -5,6 +5,7 @@
|
|||
#FLASHER = stlink-v2-1
|
||||
#FLASHER = stlink-v2
|
||||
FLASHER ?= Jlink
|
||||
JLINK_PATH ?= D:/MCU/SEGGER/JLink_V610a/
|
||||
#---------------------------
|
||||
# Default
|
||||
#---------------------------
|
||||
|
@ -38,6 +39,9 @@ CHCKSUM = $(TOOLS_PATH)checksum$(EXE)
|
|||
# openocd tools
|
||||
OPENOCD = $(OPENOCD_PATH)openocd
|
||||
|
||||
JLINK_GDB ?= JLinkGDBServer.exe
|
||||
JLINK_EXE ?= JLink.exe
|
||||
|
||||
ifeq ($(FLASHER), Jlink)
|
||||
# Jlink FLASHER_SPEED ..4000 kHz
|
||||
FLASHER_SPEED = 3500
|
||||
|
@ -98,9 +102,16 @@ _endgenbin:
|
|||
|
||||
flashburn:
|
||||
@$(OPENOCD) -f interface/$(FLASHER).cfg -c "adapter_khz $(FLASHER_SPEED)" -f $(FLASHER_PATH)rtl8710.ocd -c "init" -c "reset halt" -c "rtl8710_flash_auto_erase 1" -c "rtl8710_flash_auto_verify 1" -c "rtl8710_flash_write $(FLASH_IMAGE) 0" -c "rtl8710_reboot" -c "reset run" -c shutdown
|
||||
# @$(JLINK_PATH)$(JLINK_GDB)
|
||||
|
||||
reset:
|
||||
@$(OPENOCD) -f interface/$(FLASHER).cfg -c "adapter_khz $(FLASHER_SPEED)" -f $(FLASHER_PATH)rtl8710.ocd -c "init" -c "reset halt" -c "rtl8710_reboot" -c shutdown
|
||||
@$(JLINK_PATH)$(JLINK_EXE) -Device CORTEX-M3 -If SWD -Speed $(FLASHER_SPEED) flasher/RTLreset.JLinkScript
|
||||
# @$(OPENOCD) -f interface/$(FLASHER).cfg -c "adapter_khz $(FLASHER_SPEED)" -f $(FLASHER_PATH)rtl8710.ocd -c "init" -c "reset halt" -c "rtl8710_reboot" -c shutdown
|
||||
|
||||
runram:
|
||||
@start $(JLINK_PATH)$(JLINK_GDB) -device Cortex-M3 -if SWD -ir -endian little -speed $(FLASHER_SPEED)
|
||||
@$(GDB) -x flasher/gdb_run_ram.jlink
|
||||
@taskkill.exe /F /IM $(JLINK_GDB)
|
||||
|
||||
test:
|
||||
@$(OPENOCD) -f interface/$(FLASHER).cfg -c "adapter_khz $(FLASHER_SPEED)" -f $(FLASHER_PATH)rtl8710.ocd -f $(FLASHER_PATH)cortex.ocd -c "init" -c "reset halt" -c "load_image $(TST_IMAGE) $(LD_ADDRESS) bin" -c "cortex_bootstrap $(ST_ADDRESS)" -c "shutdown"
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#FLASHER = stlink-v2-1
|
||||
#FLASHER = stlink-v2
|
||||
FLASHER ?= Jlink
|
||||
JLINK_PATH ?= D:/MCU/SEGGER/JLink_V610a/
|
||||
#---------------------------
|
||||
# Default
|
||||
#---------------------------
|
||||
|
@ -38,6 +39,9 @@ CHCKSUM = $(TOOLS_PATH)checksum$(EXE)
|
|||
# openocd tools
|
||||
OPENOCD = $(OPENOCD_PATH)openocd
|
||||
|
||||
JLINK_GDB ?= JLinkGDBServerCL.exe
|
||||
JLINK_EXE ?= JLink.exe
|
||||
|
||||
ifeq ($(FLASHER), Jlink)
|
||||
# Jlink FLASHER_SPEED ..4000 kHz
|
||||
FLASHER_SPEED = 3500
|
||||
|
@ -98,9 +102,16 @@ _endgenbin:
|
|||
|
||||
flashburn:
|
||||
@$(OPENOCD) -f interface/$(FLASHER).cfg -c "adapter_khz $(FLASHER_SPEED)" -f $(FLASHER_PATH)rtl8710.ocd -c "init" -c "reset halt" -c "rtl8710_flash_auto_erase 1" -c "rtl8710_flash_auto_verify 1" -c "rtl8710_flash_write $(FLASH_IMAGE) 0" -c "rtl8710_reboot" -c "reset run" -c shutdown
|
||||
# @$(JLINK_PATH)$(JLINK_GDB)
|
||||
|
||||
reset:
|
||||
@$(OPENOCD) -f interface/$(FLASHER).cfg -c "adapter_khz $(FLASHER_SPEED)" -f $(FLASHER_PATH)rtl8710.ocd -c "init" -c "reset halt" -c "rtl8710_reboot" -c shutdown
|
||||
@$(JLINK_PATH)$(JLINK_EXE) -Device CORTEX-M3 -If SWD -Speed $(FLASHER_SPEED) flasher/RTLreset.JLinkScript
|
||||
# @$(OPENOCD) -f interface/$(FLASHER).cfg -c "adapter_khz $(FLASHER_SPEED)" -f $(FLASHER_PATH)rtl8710.ocd -c "init" -c "reset halt" -c "rtl8710_reboot" -c shutdown
|
||||
|
||||
runram:
|
||||
@start $(JLINK_PATH)$(JLINK_GDB) -device Cortex-M3 -if SWD -ir -endian little -speed $(FLASHER_SPEED)
|
||||
@$(GDB) -x flasher/gdb_run_ram.jlink
|
||||
@taskkill.exe /F /IM $(JLINK_GDB)
|
||||
|
||||
test:
|
||||
@$(OPENOCD) -f interface/$(FLASHER).cfg -c "adapter_khz $(FLASHER_SPEED)" -f $(FLASHER_PATH)rtl8710.ocd -f $(FLASHER_PATH)cortex.ocd -c "init" -c "reset halt" -c "load_image $(TST_IMAGE) $(LD_ADDRESS) bin" -c "cortex_bootstrap $(ST_ADDRESS)" -c "shutdown"
|
||||
|
|
5
flasher/RTLreset.JLinkScript
Normal file
5
flasher/RTLreset.JLinkScript
Normal file
|
@ -0,0 +1,5 @@
|
|||
h
|
||||
r
|
||||
w4 0x40000210,0x00211157
|
||||
g
|
||||
q
|
1
paths.mk
1
paths.mk
|
@ -6,6 +6,7 @@
|
|||
#OPENOCD_PATH = d:/MCU/OpenOCD/bin/# + or set in PATH
|
||||
TOOLS_PATH ?= component/soc/realtek/8195a/misc/iar_utility/common/tools/
|
||||
FLASHER_PATH ?= flasher/
|
||||
JLINK_PATH ?= D:/MCU/SEGGER/JLink_V610a/
|
||||
#---------------------------
|
||||
# Default
|
||||
#---------------------------
|
||||
|
|
Loading…
Reference in a new issue