Asserting Operation Results

TYPE

DIRECTIVE

OPTIONAL

ARGUMENTS

Operation

assert

Yes

pass | fail

The assert directive is used to change the behavior of the batchisp program.

When an operation fails and was previously asserted fail, batchisp displays a PASS* result.

By inserting the assert directive when necessary, you can use batchisp as a test program.

An operation expected to be fail will have a PASS* status; this makes the batchisp results easier to read and interpret.

Example of use :

> batchisp -device at89c51rd2 -operation erase F loadbuffer "C:\isp\test.hex" program verify ssl2 assert fail read program

In the above example, we erase the target memory; then, after programming and verifying the device, we set the security level to 2. We verify that the device is now Read/Write protected by performing the read and program operations again.

Note that the last read and program directives are preceded by an assert fail one.