public class Flash
extends java.lang.Object
// Create Environment and open a debug session
ScriptingEnvironment env = new ScriptingEnvironment();
DebugServer myServer = (DebugServer) env.getServer("DebugServer.1");
DebugSession mySession = myServer.openSession("*", "*");
...
// set which sectors to erase and then execute the erase operation
// note: SECTORA, SECTORB, etc. are just examples, look up the exact string for your device using the mySession.flash.options.printOptions() API
mySession.flash.options.setBoolean(SECTORA, true);
mySession.flash.options.setBoolean(SECTORB, false);
mySession.flash.options.setBoolean(SECTORC, true);
mySession.flash.options.setBoolean(SECTORD, true);
mySession.flash.options.setBoolean(SECTORE, false);
mySession.flash.erase();
| Constructor and Description |
|---|
Flash(ScriptingEnvironment environment,
DebugSession session,
java.lang.String variantName,
Options opt) |
| Modifier and Type | Method and Description |
|---|---|
void |
calculateChecksum()
Calculates the checksum on flash.
|
void |
depletionRecovery()
Performs the Depletion Recovery operation.
|
void |
endFrequencyTest()
Ends the frequency test and halts the target.
|
void |
erase()
Erases the selected sectors in flash.
|
int |
getFlashChecksum()
Returns the calculated checksum on flash.
|
int |
getOTPChecksum()
Returns the calculated OTP checksum on flash.
|
boolean |
isFlashSupported()
Determines if Flash programming is supported for the current device.
|
void |
listSupportedOperations()
Outputs the supported flash opCodes that the current target supports.
|
void |
lock()
Locks the flash based on the password that was programmed.
|
void |
multiloadEnd()
Needs to be called to finish the multi-load operation.
|
void |
multiloadStart()
Needs to be called before using the Multi-load feature to only erase the Flash on the first program load.
|
void |
performOperation(java.lang.String opCode)
Performs the Flash operation associated with the opCode.
|
void |
programPassword()
Programs the given password to flash.
|
void |
startFrequencyTest()
Start the frequency test to test the frequency on the target (using an oscilloscope).
|
void |
unlock()
Unlocks the flash if the user input password matches the one that was programmed
Relevant properties for 28xx devices: FlashKey0, FlashKey1, etc. |
public Options options
public Flash(ScriptingEnvironment environment, DebugSession session, java.lang.String variantName, Options opt) throws ScriptingException
ScriptingExceptionpublic void calculateChecksum()
throws ScriptingException
ScriptingExceptionpublic void depletionRecovery()
throws ScriptingException
ScriptingExceptionpublic void endFrequencyTest()
throws ScriptingException
ScriptingExceptionpublic void erase()
throws ScriptingException
ScriptingExceptionpublic int getFlashChecksum()
throws ScriptingException
ScriptingExceptionpublic int getOTPChecksum()
throws ScriptingException
ScriptingExceptionpublic boolean isFlashSupported()
public void listSupportedOperations()
throws ScriptingException
ScriptingExceptionpublic void lock()
throws ScriptingException
ScriptingExceptionpublic void multiloadEnd()
throws ScriptingException
ScriptingExceptionpublic void multiloadStart()
throws ScriptingException
ScriptingExceptionpublic void performOperation(java.lang.String opCode)
throws ScriptingException
opCode - String operation code for the flash operationScriptingExceptionpublic void programPassword()
throws ScriptingException
ScriptingExceptionpublic void startFrequencyTest()
throws ScriptingException
ScriptingExceptionpublic void unlock()
throws ScriptingException
ScriptingException