; -------------------------------------------------------------------------------- ; @Title: Flash declaration for Qorvo PAC55xx family internal flash ; @Description: ; Script arguments: ; ; DO pac55xx [PREPAREONLY] [CPU=] [DUALPORT=<0|1>] ; PREPAREONLY only declares flash but does not execute flash programming ; CPU= selects CPU derivative ; DUALPORT=<0|1> use dual port memory access, default 0 ; Example: ; DO ~~/demo/arm/flash/pac55xx PREPAREONLY ; ; List of PAC55xx derivatives and their configuration: ; CPU-Type FLASH RamSize ; [KB] [KB] ; PAC55xx 20000 8000 ; ; @Chip: PAC55* ; @Author: NEZ ; @Copyright: (C) 1989-2024 Lauterbach GmbH, licensed for use with TRACE32(R) only ; -------------------------------------------------------------------------------- ; $Rev: 13495 $ ; $Id: pac55xx.cmm 13495 2024-05-28 15:48:34Z nzouari $ PRIVATE ¶meters ENTRY %LINE ¶meters PRIVATE ¶m_prepareonly ¶m_cpu ¶m_dualport ¶meters=STRing.UPpeR("¶meters") ¶m_prepareonly=(STRing.SCAN("¶meters","PREPAREONLY",0)!=-1) ¶m_cpu=STRing.SCANAndExtract("¶meters","CPU=","") ¶m_dualport=STRing.SCANAndExtract("¶meters","DUALPORT=","0") ; -------------------------------------------------------------------------------- ; Initialize and start the debugger IF !SYStem.Up() ( SYStem.RESet IF "¶m_cpu"!="" SYStem.CPU ¶m_cpu IF !CPUIS(PAC55*) SYStem.CPU PAC5523 SYStem.Option ResBreak OFF SYStem.Option WaitReset 100.MS SYStem.Up ) ; -------------------------------------------------------------------------------- ; Flash declaration FLASH.RESet GOSUB FlashDeclaration "¶m_dualport" ; Flash script ends here if called with parameter PREPAREONLY IF ¶m_prepareonly ENDDO PREPAREDONE ; -------------------------------------------------------------------------------- ; Flash programming example DIALOG.YESNO "Program flash memory?" PRIVATE &progflash ENTRY &progflash IF &progflash ( FLASH.ReProgram ALL /Erase Data.LOAD.auto * FLASH.ReProgram OFF ; Reset device SYStem.Down SYStem.Up ) ENDDO ; -------------------------------------------------------------------------------- ; SUBROUTINES ; -------------------------------------------------------------------------------- ; Flash declaration depending on selected CPU FlashDeclaration: ;(param_dualport) ( PARAMETERS ¶m_dualport PRIVATE &FlashBin &FlashSize &SectorSize &FlashBin="pac5500.bin" &FlashSize=0x20000 &SectorSize=0x400 FLASH.Create 1. 0x00000000++(&FlashSize-1) &SectorSize TARGET Long IF ("¶m_dualport"!="0") ( PRINT %WARNING "Target RAM too small! Dual port mode not supported" ¶m_dualport="0" ) IF ("¶m_dualport"=="0") FLASH.TARGET 0x20000000++0xFFF 0x20001000++0xFFF ~~/demo/arm/flash/long/&FlashBin ELSE FLASH.TARGET E:0x20000000++0xFFFF 0x20001000++0xFFF ~~/demo/arm/flash/long/&FlashBin /DualPort RETURN )