mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-16 23:18:24 +08:00
修改了Web后台的部分界面,增加了HAmqtt中的总电量传感器,后台新增mqtt上报频率设置
This commit is contained in:
24
mico-os/makefiles/OpenOCD/stm32f1x/stm32f1x-flash-app.cfg
Normal file
24
mico-os/makefiles/OpenOCD/stm32f1x/stm32f1x-flash-app.cfg
Normal file
@@ -0,0 +1,24 @@
|
||||
#
|
||||
# UNPUBLISHED PROPRIETARY SOURCE CODE
|
||||
# Copyright (c) 2016 MXCHIP Inc.
|
||||
#
|
||||
# The contents of this file may not be disclosed to third parties, copied or
|
||||
# duplicated in any form, in whole or in part, without the prior written
|
||||
# permission of MXCHIP Corporation.
|
||||
#
|
||||
init
|
||||
|
||||
#jtag_khz 100
|
||||
reset halt
|
||||
|
||||
poll off
|
||||
#jtag_khz 1000
|
||||
|
||||
# setup STM32 pll
|
||||
mww 0x40022000 0x32
|
||||
mww 0x40021004 0x3c0400
|
||||
mww 0x40021000 0x01000883
|
||||
sleep 10
|
||||
mww 0x40021004 0x3c0402
|
||||
sleep 10
|
||||
jtag_khz 6000
|
||||
92
mico-os/makefiles/OpenOCD/stm32f1x/stm32f1x.cfg
Normal file
92
mico-os/makefiles/OpenOCD/stm32f1x/stm32f1x.cfg
Normal file
@@ -0,0 +1,92 @@
|
||||
#
|
||||
# UNPUBLISHED PROPRIETARY SOURCE CODE
|
||||
# Copyright (c) 2016 MXCHIP Inc.
|
||||
#
|
||||
# The contents of this file may not be disclosed to third parties, copied or
|
||||
# duplicated in any form, in whole or in part, without the prior written
|
||||
# permission of MXCHIP Corporation.
|
||||
#
|
||||
# script for stm32
|
||||
|
||||
source [find mico-os/makefiles/OpenOCD/interface/swj-dp.tcl]
|
||||
source [find mico-os/makefiles/OpenOCD/mem_helper.tcl]
|
||||
|
||||
set CHIP_FLASH_START 0x08000000
|
||||
set CHIP_RAM_START 0x20000000
|
||||
|
||||
if { [info exists CHIPNAME] } {
|
||||
set _CHIPNAME $CHIPNAME
|
||||
} else {
|
||||
set _CHIPNAME stm32
|
||||
}
|
||||
|
||||
if { [info exists ENDIAN] } {
|
||||
set _ENDIAN $ENDIAN
|
||||
} else {
|
||||
set _ENDIAN little
|
||||
}
|
||||
|
||||
# Work-area is a space in RAM used for flash programming
|
||||
# By default use 16kB
|
||||
if { [info exists WORKAREASIZE] } {
|
||||
set _WORKAREASIZE $WORKAREASIZE
|
||||
} else {
|
||||
set _WORKAREASIZE 0x4000
|
||||
}
|
||||
|
||||
# JTAG speed should be <= F_CPU/6. F_CPU after reset is 8MHz, so use F_JTAG = 1MHz
|
||||
adapter_khz 1000
|
||||
|
||||
adapter_nsrst_delay 100
|
||||
jtag_ntrst_delay 100
|
||||
|
||||
#jtag scan chain
|
||||
if { [info exists CPUTAPID ] } {
|
||||
set _CPUTAPID $CPUTAPID
|
||||
} else {
|
||||
# See STM Document RM0008
|
||||
# Section 26.6.3
|
||||
set _CPUTAPID 0x3ba00477
|
||||
}
|
||||
jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
|
||||
|
||||
if { [info exists BSTAPID ] } {
|
||||
# FIXME this never gets used to override defaults...
|
||||
set _BSTAPID $BSTAPID
|
||||
} else {
|
||||
# See STM Document RM0008
|
||||
# Section 29.6.2
|
||||
# Low density devices, Rev A
|
||||
set _BSTAPID1 0x06412041
|
||||
# Medium density devices, Rev A
|
||||
set _BSTAPID2 0x06410041
|
||||
# Medium density devices, Rev B and Rev Z
|
||||
set _BSTAPID3 0x16410041
|
||||
set _BSTAPID4 0x06420041
|
||||
# High density devices, Rev A
|
||||
set _BSTAPID5 0x06414041
|
||||
# Connectivity line devices, Rev A and Rev Z
|
||||
set _BSTAPID6 0x06418041
|
||||
# XL line devices, Rev A
|
||||
set _BSTAPID7 0x06430041
|
||||
}
|
||||
jtag newtap $_CHIPNAME bs -irlen 5 -expected-id $_BSTAPID1 \
|
||||
-expected-id $_BSTAPID2 -expected-id $_BSTAPID3 \
|
||||
-expected-id $_BSTAPID4 -expected-id $_BSTAPID5 \
|
||||
-expected-id $_BSTAPID6 -expected-id $_BSTAPID7
|
||||
|
||||
set _TARGETNAME $_CHIPNAME.cpu
|
||||
target create $_TARGETNAME cortex_m3 -endian $_ENDIAN -chain-position $_TARGETNAME
|
||||
|
||||
$_TARGETNAME configure -work-area-phys $CHIP_RAM_START -work-area-size $_WORKAREASIZE -work-area-backup 0 -rtos auto
|
||||
|
||||
#shutdown OpenOCD daemon when gdb detaches
|
||||
$_TARGETNAME configure -event gdb-detach { soft_reset_halt; sleep 5; resume; shutdown }
|
||||
|
||||
# flash size will be probed
|
||||
set _FLASHNAME $_CHIPNAME.flash
|
||||
flash bank $_FLASHNAME stm32f1x 0x08000000 0 0 0 $_TARGETNAME
|
||||
|
||||
# if srst is not fitted use SYSRESETREQ to
|
||||
# perform a soft reset
|
||||
cortex_m3 reset_config srst
|
||||
36
mico-os/makefiles/OpenOCD/stm32f1x/stm32f1x_gdb_jtag.cfg
Normal file
36
mico-os/makefiles/OpenOCD/stm32f1x/stm32f1x_gdb_jtag.cfg
Normal file
@@ -0,0 +1,36 @@
|
||||
#
|
||||
# UNPUBLISHED PROPRIETARY SOURCE CODE
|
||||
# Copyright (c) 2016 MXCHIP Inc.
|
||||
#
|
||||
# The contents of this file may not be disclosed to third parties, copied or
|
||||
# duplicated in any form, in whole or in part, without the prior written
|
||||
# permission of MXCHIP Corporation.
|
||||
#
|
||||
# default ports
|
||||
telnet_port 4444
|
||||
#gdb_port pipe
|
||||
gdb_port 3333
|
||||
#tcl_port 6666
|
||||
|
||||
#swj_mode 2
|
||||
gdb_memory_map enable
|
||||
|
||||
init
|
||||
#jtag_khz 1000
|
||||
reset halt
|
||||
#halt
|
||||
|
||||
#setup STM32 pll
|
||||
mww 0x40022000 0x32
|
||||
mww 0x40021004 0x3c0400
|
||||
mww 0x40021000 0x01000883
|
||||
sleep 10
|
||||
mww 0x40021004 0x3c0402
|
||||
sleep 10
|
||||
jtag_khz 6000
|
||||
|
||||
#clear RAM so that the rtos awareness does not detect threads left in memory from previous run
|
||||
mww 0x20000000 0x00000000 0x4000
|
||||
|
||||
#jtag_khz 1000
|
||||
#verify_ircapture disable
|
||||
Reference in New Issue
Block a user