📄 c200.cfg
字号:
##
## The c200 emulator ip address can be changed from the default by
## defining the cl symbol c200_emul_ip_addr on the st20run command line.
## Similarly the JEI tckdiv can be changed by defining the cl symbol
## tckdiv. For example:
## st20run -t c200_emul -define tckdiv=256 -define c200_emul_ip_addr=100 hello.lku
##
c200_rom_addr = 0x40000000
c200_rom_size = (512*K)
c200_external_addr = (c200_rom_addr + c200_rom_size)
c200_external_size = ((4*M) - c200_rom_size)
proc c200_emul_map {
## define memory segment FLASH as ROM to linker, but as RAM to
## st20run/st20sim so they can write romimage into FLASH
##
if ((clsymbol alias) == 3) {
## only the linker has alias built in
rom_type = "ROM"
} else {
rom_type = "RAM"
}
memory FLASH (c200_rom_addr) (c200_rom_size) (rom_type)
memory EXTERNAL (c200_external_addr) (c200_external_size) RAM
## For the emulator the top of memory ROM is mapped into FLASH as only the
## bits 0x003fffff are significant in an address.
## Do not use ROM1 segment as it is only intended as a placeholder
##
memory ROM1 (0x80000000 - c200_rom_size) (c200_rom_size) RESERVED
}
proc c200_emul_hw onlyInternal {
if ($#==1) {
onlyInternal = $1
}
chip ST20C2_C200
if (onlyInternal==0) {
c200_emul_map
startstate (c200_external_addr - 2)
}
}
proc c200_emul {
c200_emul_hw
PlaceDebugTrapHandler EXTERNAL
stack EXTERNAL
heap EXTERNAL
st20ccoptions "-DST_CACHE_FAMILY=4 -DC200"
}
proc c200_emulinternal {
c200_emul_hw (1)
PlaceDebugTrapHandler INTERNAL
stack INTERNAL
heap INTERNAL
st20ccoptions "-DST_CACHE_FAMILY=4 -DC200"
}
proc c200_emul_rom {
c200_emul
place def_code FLASH
place def_const FLASH
}
## Create st20sim target with a DCU3 model. Not supported.
proc mkc200 name=$1 {
## create st20sim target (name)_spawn"
##
mkdcu3spawn (name)
## create emulator targets
## Note, the C200 emulator sometimes has devid of 0x0 so set the cl variable
## HKNoDeviceCheck to avoid a test of devid, eg:
## HKNoDeviceCheck=1 ## C200 emulator has devid of 0x0 so suppress devid error
##
if ( (clsymbol c200_emul_ip_addr) == 0 ) {
c200_emul_ip_addr="164.129.91.81"
## c200_emul_ip_addr="164.129.91.84"
}
if ( (clsymbol tckdiv) == 0 ) tckdiv = "256"
tckdiv_opt=" tckdiv="+(tckdiv)
if( ! ( clsymbol peektime ) ) peektime = "500"
peektime_opt=" peektime=" + peektime
c200_emul_connect_param="jei_soc " + c200_emul_ip_addr + peektime_opt + tckdiv_opt
target (name) tap (c200_emul_connect_param) "reset; c200_emul"
target (name+"internal") tap (c200_emul_connect_param) "reset; c200_emulinternal"
target (name+"_nr") tap (c200_emul_connect_param) "c200_emul"
target (name+"_raw") tap (c200_emul_connect_param) ""
## Create st20sim target without a DCU3 model.
## Not supported with Osprey 1.8.1, use target c200_emul_sim_181 instead
##
target c200_emul_sim st20sim "st20sim -q -p c200_emul" "reset; _ST_target_st20sim=1; c200_emul"
## Create a Osprey 1.8.1 st20sim target without a DCU3 model.
## Workaround for bug INSbl12414 "using st20run simkrnl interface, st20sim loads incorrect DCU3 handlers"
## is to setup st20sim to use DCU2 address space for informs.
##
target c200_emul_sim_181 st20sim "st20sim -q -p c200_emul;DCUBase[0]=0x3000" "reset; c200_emul"
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -