diff --git a/.cproject b/.cproject
index 8f85a2c..7761f3a 100644
--- a/.cproject
+++ b/.cproject
@@ -667,11 +667,11 @@
false
- make
- -s
+ mingw32-make.exe
+
reset
true
- true
+ false
false
diff --git a/DAPLink-RTL00Console.bat b/DAPLink-RTL00Console.bat
new file mode 100644
index 0000000..bc0d13c
--- /dev/null
+++ b/DAPLink-RTL00Console.bat
@@ -0,0 +1,7 @@
+@echo off
+call paths.bat
+cd flasher
+openocd -f interface/cmsis-dap.cfg -c "adapter_khz 1000" -f rtl8710.ocd -f cortex.ocd -c "init" -c "reset halt" -c "load_ram_binary RTL00Console_ROM.bin 0x10000BA8" -c "exit"
+rem -c "shutdown"
+
+
diff --git a/DAPLink-RdFullFlash.bat b/DAPLink-RdFullFlash.bat
new file mode 100644
index 0000000..dfd0c9e
--- /dev/null
+++ b/DAPLink-RdFullFlash.bat
@@ -0,0 +1,7 @@
+@echo off
+call paths.bat
+cd flasher
+openocd -f interface/cmsis-dap.cfg -c "adapter_khz 1000" -f rtl8710.ocd -f cortex.ocd -c "init" -c "reset halt" -c "rtl8710_flash_read_id" -c "adapter_khz 1000" -c "rtl8710_flash_read ../fullflash.bin 0 2097152" -c "shutdown"
+echo flash read fullflash.bin
+pause
+
diff --git a/DAPLink-Reset.bat b/DAPLink-Reset.bat
new file mode 100644
index 0000000..aceee70
--- /dev/null
+++ b/DAPLink-Reset.bat
@@ -0,0 +1,6 @@
+@echo off
+call paths.bat
+@cd flasher
+openocd -f interface/cmsis-dap.cfg -c "adapter_khz 1000" -f rtl8710.ocd -f cortex.ocd -c "init" -c "reset halt" -c "restart_from_falsh" -c "shutdown"
+rem
+
diff --git a/DAPLink_WrFullFlash.bat b/DAPLink_WrFullFlash.bat
new file mode 100644
index 0000000..bd1cf72
--- /dev/null
+++ b/DAPLink_WrFullFlash.bat
@@ -0,0 +1,6 @@
+@echo off
+call paths.bat
+cd flasher
+openocd -f interface/cmsis-dap.cfg -c "adapter_khz 3500" -f rtl8710.ocd -f cortex.ocd -c "init" -c "reset halt" -c "rtl8710_flash_read_id" -c "rtl8710_flash_auto_erase 1" -c "rtl8710_flash_auto_verify 1" -c "rtl8710_flash_write fullflash.bin 0" -c "shutdown"
+pause
+
diff --git a/ExampleHTM/dygraph/ws_test_adc.html b/ExampleHTM/dygraph/ws_test_adc.html
index 95f7a3b..fa0c19d 100644
--- a/ExampleHTM/dygraph/ws_test_adc.html
+++ b/ExampleHTM/dygraph/ws_test_adc.html
@@ -6,12 +6,15 @@
-Read ADC RTL8711AM
+Read ADC RTL8711AM/RTL8195AM
diff --git a/USDK/flasher.mk b/USDK/flasher.mk
index c58c047..9a33190 100644
--- a/USDK/flasher.mk
+++ b/USDK/flasher.mk
@@ -38,21 +38,21 @@ PADDING = $(TOOLS_PATH)padding$(EXE)
CHCKSUM = $(TOOLS_PATH)checksum$(EXE)
# openocd tools
-OPENOCD = $(OPENOCD_PATH)openocd
+OPENOCD = $(OPENOCD_PATH)openocd.exe
JLINK_GDB ?= JLinkGDBServer.exe
JLINK_EXE ?= JLink.exe
ifeq ($(FLASHER), Jlink)
# Jlink FLASHER_SPEED ..4000 kHz
-FLASHER_SPEED = 3500
+FLASHER_SPEED ?= 3500
else
ifeq ($(FLASHER),stlink-v2)
# stlink-v2 FLASHER_SPEED ..1800 kHz
-FLASHER_SPEED = 1800
+FLASHER_SPEED ?= 1800
else
-# over FLASHER_SPEED ..500 kHz ?
-FLASHER_SPEED = 500
+# over FLASHER_SPEED ..1000 kHz ?
+FLASHER_SPEED ?= 1000
endif
endif
@@ -164,48 +164,53 @@ flash_OTA:
#@taskkill /F /IM $(JLINK_GDBSRV)
else
+ifeq ($(FLASHER_TYPE),cmsis-dap)
+FLASHER:=cmsis-dap
flashburn:
- @$(OPENOCD) -f interface/$(FLASHER).cfg -c "transport select swd" -f $(FLASHER_PATH)rtl8710.ocd -c "init" -c "adapter_khz $(FLASHER_SPEED)" -c "reset halt" \
- -c "rtl8710_flash_auto_erase 1" -c "rtl8710_flash_auto_verify 1" \
- -c "rtl8710_flash_write $(RAM1P_IMAGE) 0" \
- -c "rtl8710_flash_write $(RAM2P_IMAGE) 0xb000" \
- -c "rtl8710_reboot" -c "reset run" -c shutdown
+ @$(OPENOCD) -f interface/$(FLASHER).cfg -c 'transport select swd' -c 'adapter_khz 1000' \
+ -f $(FLASHER_PATH)rtl8710.ocd -c 'init' -c 'reset halt' -c 'adapter_khz $(FLASHER_SPEED)' \
+ -c 'rtl8710_flash_auto_erase 1' -c 'rtl8710_flash_auto_verify 1' \
+ -c 'rtl8710_flash_write $(RAM1P_IMAGE) 0' \
+ -c 'rtl8710_flash_write $(RAM2P_IMAGE) 0xb000' \
+ -c 'rtl8710_reboot' -c 'reset run' -c shutdown
flashimage2p:
- @$(OPENOCD) -f interface/$(FLASHER).cfg -c "transport select swd" -f $(FLASHER_PATH)rtl8710.ocd -c "init" -c "adapter_khz $(FLASHER_SPEED)" -c "reset halt" \
- -c "rtl8710_flash_auto_erase 1" -c "rtl8710_flash_auto_verify 1" \
- -c "rtl8710_flash_write $(RAM2P_IMAGE) 0xb000" \
- -c "rtl8710_reboot" -c "reset run" -c shutdown
+ @$(OPENOCD) -f interface/$(FLASHER).cfg -c 'transport select swd' -c 'adapter_khz 1000' \
+ -f $(FLASHER_PATH)rtl8710.ocd -c 'init' -c 'reset halt' -c 'adapter_khz $(FLASHER_SPEED)' \
+ -c 'rtl8710_flash_auto_erase 1' -c 'rtl8710_flash_auto_verify 1' \
+ -c 'rtl8710_flash_write $(RAM2P_IMAGE) 0xb000' \
+ -c 'rtl8710_reboot' -c 'reset run' -c shutdown
flashwebfs:
- @$(OPENOCD) -f interface/$(FLASHER).cfg -c "transport select swd" -f $(FLASHER_PATH)rtl8710.ocd -c "init" -c "adapter_khz $(FLASHER_SPEED)" -c "reset halt" \
- -c "rtl8710_flash_auto_erase 1" -c "rtl8710_flash_auto_verify 1" \
- -c "rtl8710_flash_write $(BIN_DIR)/WEBFiles.bin 0xd0000" \
- -c "rtl8710_reboot" -c "reset run" -c shutdown
+ @$(OPENOCD) -f interface/$(FLASHER).cfg -c 'transport select swd' -c 'adapter_khz 1000' \
+ -f $(FLASHER_PATH)rtl8710.ocd -c 'init' -c 'reset halt' -c 'adapter_khz $(FLASHER_SPEED)' \
+ -c 'rtl8710_flash_auto_erase 1' -c 'rtl8710_flash_auto_verify 1' \
+ -c 'rtl8710_flash_write $(BIN_DIR)/WEBFiles.bin 0xd0000' \
+ -c 'rtl8710_reboot' -c 'reset run' -c shutdown
flashespfs:
- @$(OPENOCD) -f interface/$(FLASHER).cfg -c "transport select swd" -f $(FLASHER_PATH)rtl8710.ocd -c "init" -c "adapter_khz $(FLASHER_SPEED)" -c "reset halt" \
- -c "rtl8710_flash_auto_erase 1" -c "rtl8710_flash_auto_verify 1" \
- -c "rtl8710_flash_write $(BIN_DIR)/webpages.espfs 0xd0000" \
- -c "rtl8710_reboot" -c "reset run" -c shutdown
+ @$(OPENOCD) -f interface/$(FLASHER).cfg -c 'transport select swd' -c 'adapter_khz 1000' \
+ -f $(FLASHER_PATH)rtl8710.ocd -c 'init' -c 'reset halt' -c 'adapter_khz $(FLASHER_SPEED)' \
+ -c 'rtl8710_flash_auto_erase 1' -c 'rtl8710_flash_auto_verify 1' \
+ -c 'rtl8710_flash_write $(BIN_DIR)/webpages.espfs 0xd0000' \
+ -c 'rtl8710_reboot' -c 'reset run' -c shutdown
reset:
-# @$(JLINK_PATH)$(JLINK_EXE) -Device CORTEX-M3 -If SWD -Speed $(FLASHER_SPEED) flasher/RTLreset.JLinkScript
- @$(OPENOCD) -f interface/$(FLASHER).cfg -c "transport select swd" -f $(FLASHER_PATH)rtl8710.ocd -c "init" -c "adapter_khz $(FLASHER_SPEED)" -c "reset halt" \
- -c "rtl8710_reboot" -c shutdown
-
+ @$(OPENOCD) -f interface/$(FLASHER).cfg -c 'transport select swd' -c 'adapter_khz 1000' \
+ -f $(FLASHER_PATH)rtl8710.ocd -c 'init' -c 'reset halt' -c 'adapter_khz $(FLASHER_SPEED)' \
+ -c 'mww 0x40000210 0x111157' -c 'rtl8710_reboot' -c shutdown
+
runram:
-# @$(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)
- @$(OPENOCD) -f interface/$(FLASHER).cfg -c "transport select swd" -f $(FLASHER_PATH)rtl8710.ocd -c "init" -c "adapter_khz $(FLASHER_SPEED)" -c "reset halt" \
- -c "load_image $(RAM1R_IMAGE) 0x10000bc8 bin" \
- -c "load_image $(RAM2_IMAGE) 0x10006000 bin" \
- -c "mww 0x40000210 0x20200113" \
- -c "reset run" -c shutdown
+ @$(OPENOCD) -f interface/$(FLASHER).cfg -c 'transport select swd' -c 'adapter_khz 1000' \
+ -f $(FLASHER_PATH)rtl8710.ocd -c 'init' -c 'reset halt' -c 'adapter_khz $(FLASHER_SPEED)' \
+ -c 'load_image $(RAM1R_IMAGE) 0x10000bc8 bin' \
+ -c 'load_image $(RAM2_IMAGE) 0x10006000 bin' \
+ -c 'mww 0x40000210 0x20200113' \
+ -c 'reset run' -c shutdown
endif
+endif
$(NMAPFILE): $(ELFFILE)
@echo "==========================================================="
diff --git a/USDK/paths.mk b/USDK/paths.mk
index 4d5a574..596887c 100644
--- a/USDK/paths.mk
+++ b/USDK/paths.mk
@@ -3,7 +3,7 @@
#---------------------------
SDK_PATH ?= ../SDKRTLA/USDK/
#GCC_PATH = d:/MCU/GNU_Tools_ARM_Embedded/6.2017-q1-update/bin/# + or set in PATH
-#OPENOCD_PATH = d:/MCU/OpenOCD/bin/# + or set in PATH
+OPENOCD_PATH = d:/MCU/OpenOCD/bin/
TOOLS_PATH ?= $(SDK_PATH)component/soc/realtek/8195a/misc/iar_utility/common/tools/
FLASHER_TYPE ?= Jlink
#FLASHER_TYPE ?= OCD
diff --git a/paths.bat b/paths.bat
index 79d9116..724383c 100644
--- a/paths.bat
+++ b/paths.bat
@@ -1 +1 @@
-PATH=D:\MCU\GNU_Tools_ARM_Embedded\6.2017-q1-update\bin;D:\MCU\SEGGER\JLink_V612i;%PATH%
\ No newline at end of file
+PATH=D:\MCU\GNU_Tools_ARM_Embedded\6.2017-q1-update\bin;D:\MCU\SEGGER\JLink_V612i;D:\MCU\OpenOCD\bin;%PATH%
\ No newline at end of file
diff --git a/project.mk b/project.mk
index 83062cd..7bc95d3 100644
--- a/project.mk
+++ b/project.mk
@@ -2,8 +2,8 @@
# SDK CONFIG
#=============================================
#WEB_INA219_DRV = 1
-#WEB_ADC_DRV = 1
-USE_SDCARD = 1
+WEB_ADC_DRV = 1
+#USE_SDCARD = 1
#USE_AT = 1
#USE_FATFS = 1
#USE_SDIOH = 1
diff --git a/project/inc/platform_autoconf.h b/project/inc/platform_autoconf.h
index cb64cae..8907c51 100644
--- a/project/inc/platform_autoconf.h
+++ b/project/inc/platform_autoconf.h
@@ -4,7 +4,7 @@
#define AUTOCONF_INCLUDED
#define RTL8710AF
-//#define RTL8711AM
+#define RTL8711AM
/* Image1 on project */
#define PRESENT_IMAGE1
/* Image2 on project */
@@ -31,7 +31,7 @@
#define RTL8195A 1
/* 0 - 166666666 Hz, 1 - 83333333 Hz, 2 - 41666666 Hz, 3 - 20833333 Hz, 4 - 10416666 Hz, 5 - 4000000? Hz,
6 - 200000000 Hz, 7 - 10000000 Hz, 8 - 50000000 Hz, 9 - 25000000 Hz, 10 - 12500000 Hz, 11 - 4000000? Hz */
-#define CONFIG_CPU_CLK 1
+#define CONFIG_CPU_CLK 0
//166.6MHZ - RUN/IDLE/SLP ~63/21/6.4 mA
//83.3MHZ - RUN/IDLE/SLP ~55/15/6.4 mA
//41.6MHZ - RUN/IDLE ~51/11 mA
diff --git a/userset.mk b/userset.mk
index c9e71fb..c71a79e 100644
--- a/userset.mk
+++ b/userset.mk
@@ -4,10 +4,11 @@
#SDK_PATH = ../RTL00MP3/RTL00_SDKV35a/
SDK_PATH = USDK/
#GCC_PATH = d:/MCU/GNU_Tools_ARM_Embedded/6.2017-q1-update/bin/# + or set in PATH
-#OPENOCD_PATH = d:/MCU/OpenOCD/bin/# + or set in PATH
+OPENOCD_PATH = D:/MCU/OpenOCD/bin/
TOOLS_PATH ?= $(SDK_PATH)component/soc/realtek/8195a/misc/iar_utility/common/tools/
-FLASHER_TYPE ?= Jlink
-#FLASHER_TYPE ?= OCD
+#FLASHER_TYPE = Jlink
+FLASHER_TYPE = cmsis-dap
+FLASHER_SPEED = 3500
FLASHER_PATH = flasher/
JLINK_PATH ?= D:/MCU/SEGGER/JLink_V612i/
JLINK_GDBSRV ?= JLinkGDBServer.exe