48 lines
1.3 KiB
Plaintext
48 lines
1.3 KiB
Plaintext
; --------------------------------------------------------------------------------
|
|
; @Title: Microsemi SmartFusion2 Starter Kit Flash Programming
|
|
; @Description:
|
|
; Load a simple sieve demo into the FLASH of the Microsemi SmartFusion2.
|
|
; Prerequisites:
|
|
; * JP2 JTAG SEL - Short Pin 1-2 (please see readme.txt)
|
|
; * FPGA Design loaded which clocks the Cortex-M
|
|
; * debugger is connected to P3 connector
|
|
; @Author: AME
|
|
; @Board: SmartFusion2
|
|
; @Chip: M2S*
|
|
; @Copyright: (C) 1989-2022 Lauterbach GmbH, licensed for use with TRACE32(R) only
|
|
; --------------------------------------------------------------------------------
|
|
; $Id: flash-demo.cmm 22664 2024-04-18 09:47:55Z gmehdi $
|
|
|
|
; Reviewed by GME, 2024-04-18
|
|
|
|
|
|
RESet
|
|
SYStem.RESet
|
|
SYStem.CPU M2S010
|
|
SYStem.CONFIG CONNECTOR MIPI20T
|
|
SYStem.CONFIG DEBUGPORTTYPE SWD
|
|
SYStem.Option ResBreak OFF
|
|
SYStem.Option WaitReset 1ms
|
|
SYStem.Option DUALPORT ON
|
|
SYStem.MemAccess DAP
|
|
SYStem.Up
|
|
|
|
DO ~~/demo/arm/flash/m2s PREPAREONLY
|
|
|
|
; LOAD Elf/Binary file into flash
|
|
FLASH.ReProgram ALL
|
|
Data.LOAD.Elf ~~~~/sieve_thumb_ii_v7_flash.elf /RelPATH
|
|
FLASH.ReProgram OFF
|
|
|
|
; Reload SP & PC from Vector Table either by RESeting the CORE
|
|
SYStem.Up
|
|
|
|
; boot till main
|
|
Go.direct main
|
|
WAIT !STATE.RUN()
|
|
|
|
Mode.Hll
|
|
List.auto
|
|
|
|
ENDDO
|