73 lines
1.9 KiB
Plaintext
73 lines
1.9 KiB
Plaintext
; --------------------------------------------------------------------------------
|
|
; @Title: Example for flash declaration of Analog Devices ADuCM301 internal flash.
|
|
;
|
|
; @Description:
|
|
; DO aducm301 [PREPAREONLY]
|
|
;
|
|
; PREPAREONLY only declares flash but does not execute flash programming
|
|
;
|
|
; Example:
|
|
;
|
|
; DO ~~/demo/arm/flash/aducm301 PREPAREONLY
|
|
;
|
|
; Memory location:
|
|
;
|
|
; Program flash starting at 0x00000000
|
|
; SRAM starting at 0x20000000
|
|
;
|
|
; @Author: WRD
|
|
; @Copyright: (C) 1989-2022 Lauterbach GmbH, licensed for use with TRACE32(R) only
|
|
; @Chip: ADuCM301
|
|
; --------------------------------------------------------------------------------
|
|
; $Rev: 10516 $
|
|
; $Id: aducm301.cmm 10516 2022-02-02 11:39:30Z bschroefel $
|
|
|
|
LOCAL ¶meters
|
|
ENTRY %LINE ¶meters
|
|
|
|
LOCAL ¶m_prepareonly
|
|
¶m_prepareonly=(STRing.SCAN(STRing.UPpeR("¶meters"),"PREPAREONLY",0)!=-1)
|
|
|
|
; --------------------------------------------------------------------------------
|
|
; Start debugging
|
|
|
|
IF SYStem.MODE()<5
|
|
(
|
|
SYStem.RESet
|
|
SYStem.CPU ADUCM301
|
|
SYStem.Option.ResBreak OFF
|
|
SYStem.CONFIG.DEBUGPORTTYPE SWD
|
|
SYStem.JtagClock 1MHz
|
|
SYStem.Up
|
|
)
|
|
|
|
; --------------------------------------------------------------------------------
|
|
; Flash declaration
|
|
|
|
FLASH.RESet
|
|
FLASH.Create 1. 0x00000000--0x0001FFFF 0x200 TARGET Long /KEEP 0x1FFEC--0x1FFFF
|
|
FLASH.TARGET 0x20000000 0x20000800 0x400 ~~/demo/arm/flash/long/aducm360.bin
|
|
|
|
; Flash script ends here if called with parameter PREPAREONLY
|
|
IF ¶m_prepareonly
|
|
ENDDO PREPAREDONE
|
|
|
|
; --------------------------------------------------------------------------------
|
|
; Flash programming example
|
|
|
|
DIALOG.YESNO "Program flash memory?"
|
|
LOCAL &progflash
|
|
ENTRY &progflash
|
|
IF &progflash
|
|
(
|
|
FLASH.ReProgram.ALL /Erase
|
|
Data.LOAD.auto *
|
|
FLASH.ReProgram.off
|
|
|
|
; Reset device
|
|
SYStem.Down
|
|
SYStem.Up
|
|
)
|
|
|
|
ENDDO
|