91 lines
2.2 KiB
Plaintext
91 lines
2.2 KiB
Plaintext
; --------------------------------------------------------------------------------
|
|
; @Title: Example script for programming of OKI ML67Q4002 internal flash.
|
|
;
|
|
; @Description:
|
|
; Script arguments:
|
|
;
|
|
; DO ml67q4002 [PREPAREONLY]
|
|
; PREPAREONLY only declares flash but does not execute flash programming
|
|
;
|
|
; Example:
|
|
;
|
|
; DO ~~/demo/arm/flash/ml67q4002 PREPAREONLY
|
|
;
|
|
; 256 kByte internal Flash. The adress mapping is depending on
|
|
; - register RMPCON bits RMPM[3:0]
|
|
; - register ROMSEL bit RSEL
|
|
; - BSEL[1:0] pins
|
|
; The internal flash can be mapped to one of following address ranges
|
|
; - 0x00000000--0x0003ffff
|
|
; - 0x04000000--0x0403ffff
|
|
; - 0xc8000000--0xc803ffff
|
|
; - 0xcc000000--0xcc03ffff
|
|
;
|
|
; 32 kByte internal RAM at 0x10000000--0x10007fff
|
|
;
|
|
; @Chip: ML67Q4002
|
|
; @Author: WRD
|
|
; @Copyright: (C) 1989-2022 Lauterbach GmbH, licensed for use with TRACE32(R) only
|
|
; --------------------------------------------------------------------------------
|
|
; $Rev: 10516 $
|
|
; $Id: ml67q4002.cmm 10516 2022-02-02 11:39:30Z bschroefel $
|
|
;
|
|
; wrd - 03.12.2004
|
|
;
|
|
|
|
|
|
LOCAL ¶meters
|
|
ENTRY %LINE ¶meters
|
|
|
|
LOCAL ¶m_prepareonly
|
|
¶m_prepareonly=(STRing.SCAN(STRing.UPpeR("¶meters"),"PREPAREONLY",0)!=-1)
|
|
|
|
&ramaddr=0x10000000
|
|
&flashaddr=0xc8000000
|
|
|
|
; --------------------------------------------------------------------------------
|
|
; Select target controlled flash programming or Trace32 tool based
|
|
; flash method:
|
|
; &flashtarget="yes" | "no"
|
|
;
|
|
&flashtarget="yes"
|
|
|
|
; --------------------------------------------------------------------------------
|
|
; Flash declaration
|
|
;
|
|
|
|
FLASH.RESet
|
|
|
|
IF "&flashtarget"=="no"
|
|
(
|
|
FLASH.Create 1. &flashaddr++0x3ffff 0x800 AT49F100 Word
|
|
)
|
|
ELSE
|
|
(
|
|
FLASH.Create 1. &flashaddr++0x3ffff 0x800 TARGET Word
|
|
FLASH.TARGET &ramaddr &ramaddr+0x1000 0x1000 ~~/demo/arm/flash/word/at49f100.bin
|
|
)
|
|
|
|
; Flash script ends here if called with parameter PREPAREONLY
|
|
IF ¶m_prepareonly
|
|
ENDDO PREPAREDONE
|
|
|
|
; --------------------------------------------------------------------------------
|
|
; Example downloading a application to internal flash.
|
|
|
|
DIALOG.YESNO "Program flash memory?"
|
|
ENTRY &progflash
|
|
|
|
IF &progflash
|
|
(
|
|
; Erase flash
|
|
FLASH.Erase ALL
|
|
|
|
; Program flash
|
|
FLASH.Program.ALL
|
|
Data.LOAD.auto * /Word
|
|
FLASH.Program.off
|
|
)
|
|
|
|
ENDDO
|