About couple years ago, I've faced neccessity to add Auto-update functionality to my software. There were several restrictions, to which this tool should comply.
- Freeware, open source.
- Intuitive programming interface.
- Final binary should be independent of any external libraries.
- Easy to integrate with a product
Below is an example of simple ESS script which loads any file as binary, an converts any byte, which has most signficant bit set, into C hex-escaped character. Other bytes get copied to output stream without changes.
It means, that if we feed non-BOM utf-8 file to this script, an output will be fully single-byte-compatible.
An ESS code snippet demonstrating changes introduced in esscript engine included in upcoming release of esframework version 1.23
The following example shows scripting FTDI MPSSE usage to interface OPT3001 lighting sensor on I2C bus. As usual, paste the script into console, compile, and run, providing you have proper HW config ready, and have proper OPT3001 I2C address in script code.
Following a release of updated ES Scripting console, which is built upon updated ES Framework ver. 1.21, an expample script is available, to demonstrate how easy stepper motor is controlled directly from scripting console. Demo uses FT232H breakout board and 28BYJ-48 + interface board. Though I2C MPSSE interface object is used, the same GPIO functionality is included in SPI interface as well.
NXP LPC MCU ISP firmware loader example using ESS scripting language