83 lines
2.8 KiB
Plaintext
83 lines
2.8 KiB
Plaintext
; --------------------------------------------------------------------------------
|
|
; @Title: Script for flashing Motorola MAC72x1 internal flash
|
|
;
|
|
; @Description:
|
|
; Motorola MAC72x1 internal flash. Core is ARM7TDMI-S.
|
|
; - MAC7201
|
|
; - MAC7211
|
|
; - MAC7241
|
|
;
|
|
; 512 kByte Program Flash address is depending on Operation mode.
|
|
; Single Chip: 0x00000000--0x0007ffff
|
|
; others: 0x20000000--0x2007ffff
|
|
; 32 kByte Shadow Flash address is also depending on Operation mode.
|
|
; Single Chip: 0x00f00000--0x00f07fff
|
|
; Expanded, Lockout: 0x20f00000--0x20f07fff
|
|
; Bootload: 0x00000000--0x00007fff or 0x20f00000--0x20f07fff
|
|
; 32 kByte SRAM at 0x40000000--0x40007fff
|
|
;
|
|
; MAC72x1 is requiring flash algorithm Version h7fb_v30x.bin or higher.
|
|
; h7fb.bin contains latest version of flash algorithm.
|
|
;
|
|
; @Author: WRD
|
|
; @Copyright: (C) 1989-2022 Lauterbach GmbH, licensed for use with TRACE32(R) only
|
|
; @Chip: MAC72?1
|
|
; --------------------------------------------------------------------------------
|
|
; $Id: mac72x1.cmm 10516 2022-02-02 11:39:30Z bschroefel $
|
|
; wrd - 22.11.2006
|
|
;
|
|
|
|
; Select program flash base address for programming, one of above.
|
|
&flashbase=0x20000000
|
|
&shadowflashbase=0x20f00000
|
|
&flashdriver="~~/demo/arm/flash/quad_be/h7fb.bin"
|
|
|
|
; Set RAM address
|
|
&rambase=0x40000000
|
|
|
|
; --------------------------------------------------------------------------------
|
|
; Setup CPU
|
|
IF SYStem.MODE()<5
|
|
(
|
|
SYStem.RESet
|
|
SYStem.Down
|
|
SYStem.JtagClock 1MHz
|
|
SYStem.CPU MAC72XX
|
|
IF hardware.POWERNEXUS()
|
|
(
|
|
SYStem.Option nexus mdo8
|
|
SYStem.Option stall ON
|
|
)
|
|
SYStem.Option BigEndian ON
|
|
SYStem.Option EnReset OFF
|
|
|
|
SYStem.Up
|
|
)
|
|
|
|
; initialize internal RAM
|
|
Data.Set D:&rambase++0x7fff %Long 0x0
|
|
|
|
; --------------------------------------------------------------------------------
|
|
; Flash declaration
|
|
;
|
|
FLASH.RESet
|
|
; Program Flash declaration
|
|
FLASH.Create 1. (&flashbase+0x00000000)++0x0ffff TARGET Quad 8. ; LAS8
|
|
FLASH.Create 1. (&flashbase+0x00010000)++0x0ffff TARGET Quad 9. ; LAS9
|
|
FLASH.Create 1. (&flashbase+0x00020000)++0x03fff TARGET Quad 0. ; LAS0
|
|
FLASH.Create 1. (&flashbase+0x00024000)++0x03fff TARGET Quad 1. ; LAS1
|
|
FLASH.Create 1. (&flashbase+0x00028000)++0x03fff TARGET Quad 2. ; LAS2
|
|
FLASH.Create 1. (&flashbase+0x0002c000)++0x03fff TARGET Quad 3. ; LAS3
|
|
FLASH.Create 1. (&flashbase+0x00030000)++0x03fff TARGET Quad 4. ; LAS4
|
|
FLASH.Create 1. (&flashbase+0x00034000)++0x03fff TARGET Quad 5. ; LAS5
|
|
FLASH.Create 1. (&flashbase+0x00038000)++0x03fff TARGET Quad 6. ; LAS6
|
|
FLASH.Create 1. (&flashbase+0x0003c000)++0x03fff TARGET Quad 7. ; LAS7
|
|
FLASH.Create 2. (&flashbase+0x00040000)++0x1ffff TARGET Quad 1. ; MAS1
|
|
FLASH.Create 2. (&flashbase+0x00060000)++0x1ffff TARGET Quad 0. ; MAS0
|
|
; Shadow Flash declaration
|
|
FLASH.Create 3. (&shadowflashbase)++0x7fff TARGET Quad 0x100
|
|
|
|
FLASH.TARGET &rambase &rambase+0x2000 0x1000 &flashdriver
|
|
|
|
ENDDO
|