; -------------------------------------------------------------------------------- ; @Title: Flash declaration for Qorvo PAC52xx family internal flash ; @Description: ; Script arguments: ; ; DO pac52xx [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/pac52xx PREPAREONLY ; ; List of PAC52xx derivatives and their configuration: ; CPU-Type EFLASH RamSize ; [KB] [KB] ; PAC52xx [8000] [2000] ; ; @Chip: PAC52* ; @Author: NEZ ; @Copyright: (C) 1989-2024 Lauterbach GmbH, licensed for use with TRACE32(R) only ; -------------------------------------------------------------------------------- ; $Rev: 13494 $ ; $Id: pac52xx.cmm 13494 2024-05-28 15:25:58Z 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(PAC52*) SYStem.CPU PAC5285 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="pac5200.bin" &FlashSize=0x8000 &SectorSize=0x400 FLASH.Create 1. 0x00000000++(&FlashSize-1) &SectorSize TARGET Word 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/word/&FlashBin ELSE FLASH.TARGET E:0x20000000++0xFFF 0x20001000++0xFFF ~~/demo/arm/flash/word/&FlashBin /DualPort RETURN )