st20c2simaddr.cfg

来自「flash programming STI 5.5.1.4 DCU3」· CFG 代码 · 共 55 行

CFG
55
字号
if (!(clsymbol C2SIMADDR)) {
  C2SIMADDR=1

  ## addresses of onchip C2 simulator devices

  Devices.index=0

  Devices.EMIindex=Devices.index++
  Devices[Devices.EMIindex].symname = "EMIAddr"
  Devices[Devices.EMIindex].addr = 0x20002000

  Devices.DCU2index=Devices.index++
  Devices[Devices.DCU2index].symname = "DCU2Addr"
  if ( (clsymbol "DCU_base") == 0 ) { 
    DCU_base = 0x3000
  }
  Devices[Devices.DCU2index].addr = (DCU_base)

  Devices.INTCTRLindex=Devices.index++
  Devices[Devices.INTCTRLindex].symname = "InterruptControllerAddr"
  Devices[Devices.INTCTRLindex].addr = 0x20000000

  Devices.INTCTRLLEVELSindex=Devices.index++
  Devices[Devices.INTCTRLLEVELSindex].symname = "InterruptControllerLevels"
  Devices[Devices.INTCTRLLEVELSindex].addr = 8
}

proc c2simmemorydefs exAddr {

  exAddr = mknum $1 

  memory INTERNAL 0x80000000 (4*K) RAM 
  memory SYSTEM   0x80000000 (0x140) RESERVED
  memory EXTERNAL (exAddr)   (2*M) RAM
  memory ROM1     0x7FF80000 (512*K) ROM
  memory DCU            (DCU_base) 0x1000 DEVICE       ## can be word accessed via DCU 
  memory INT_CONTROLLER 0x20000000 0x1000 PERIPHERAL   ## cannot be accessed via DCU
  memory EMI            0x20002000 0x1000 PERIPHERAL   ## cannot be accessed via DCU
}

proc c2simmemory exAddr {
  exAddr = 0x40000000 
   
  if ($#!=0) {
    if ((mknum $1)==0) {
      exAddr = 0x40000000
    } else if ((mknum $1)==1) {
      exAddr = 0x50000000
    }
  }
  c2simmemorydefs (exAddr)
}


⌨️ 快捷键说明

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