Target-controlled FLASH programming algorithms run on the CPU itself. If execution of the FLASH algorithm is interrupted, TRACE32 displays the error message "FLASH algorithm did not execute completely".
This can have several causes:
Watchdog reset: The FLASH algorithm may be interrupted by a watchdog reset if the watchdog is enabled. TRACE32 demo scripts often contain command sequences to disable the watchdog. Otherwise, refer to the documentation for the target processor or board for information on how to disable the watchdog.
Data cache enabled: An enabled data cache can also cause this problem. If the data cache is enabled, disable it in the FLASH programming script.
FLASH algorithm overwritten: The loaded object file may contain data sections mapped to the same memory range in which the FLASH algorithm is loaded. In this case, the FLASH algorithm is overwritten when the object file is downloaded to the target.
You can check the memory load map of the object file with:
Data.LOAD.auto <object-file> /NoCODE sYmbol.List.MAPIf this is the case, exclude the RAM from the object file download by specifying the FLASH memory range in the
Data.LOADcommand, for example:Data.LOAD.auto <object-file> <FLASH-memory-range>The RAM used by the FLASH algorithm is not initialized.
;Initialize RAM address range reserved for the CODE FLASH algorithm Data.Set FLASH.TARGET.CODERANGE() %Long 0x0 ;Initialize RAM address range reserved for the DATA FLASH algorithm Data.Set FLASH.TARGET.DATARANGE() %Long 0x0Incorrect FLASH binary: Check that the correct FLASH programming binary is being used.
Contact support@lauterbach.com for more details.
Please refer for more information to the document Tips to Solve NOR FLASH Programming Problems.
Add a comment