⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 openocd_flash_lpc2378.script

📁 arm nxp project development
💻 SCRIPT
字号:
# 
# The following command wills be executed on
# reset (because of run_and_init in the config-file)
# - wait for target halt
# - erase memory
# - flash content of file main.bin into target-memory
# - shutdown openocd
#
#  still PRELIMINARY - 3nd test for LPC2378
#
#
# Martin Thomas 
# http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects
# based on information from Dominic Rath 
#

halt
wait_halt

# ignore my comments - setup works without the following.
# disable PLL and switch to external clock
# hmm - should not be needed since IRC is default source after Reset...
# any interaction with the ISP startup??
#mww 0xE01FC080 0x00000000   # PLLCON  = 0
#mww 0xE01FC08C 0x000000AA   # PLLFEED = 0xAA
#mww 0xE01FC08C 0x00000055   # PLLFEED = 0x55
#sleep 100
#mww 0xE01FC1A0 0x00000020   # OSCEN
#sleep 100
#mww 0xE01FC10C 0x00000001   # clock-source ext.
#sleep 100
#mww 0xE01FC000 0x00000000   # MAMCR
#mww 0xE01FC004 0x00000007   # MAMTIM
#mww 0xE01FC000 0x00000002   # MAMCR
#mww 0xE01FC040 0x00000001   # MEMMAP
#mdw 0x00000000
#sleep 100

flash probe 0

arm7_9 dcc_downloads enable

# erase complete flash:
flash erase 0 0 26
# just erase the 6 first sectors of bank 0
#flash erase 0 0 5
sleep 100

flash write 0 main.bin 0x0
sleep 100

reset run
sleep 100

shutdown

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -