It's not difficult code and the Python library mentioned may be a great starting point. I'd post the code, but it's part of a large package written in C# and disentangling the relevant parts is too much effort. Be aware that frequent re-writing can 'wear' the flash memory - don't do this daily. Note a major recoding is likely to force a lot of re-writing. At the end of the function, return the array of unsigned chars. But these day all OS default text editors store files in UTF-8 by default. Tested with PaleMoon 25.2.1, Chromium 46. A simple text file was usually in ASCII format. Any argument that starts with the charactes +, - or / is regarded as a comand line parameter (which may take an additional command line argument) any other. In my case, BLOCKSIZE was 16 or 32 words (same as the write Blocksize for the code words) and K depended on how much expansion of the just-complete block I expected, usually 1 or 2. Then it's simple to build the value: C++ outputByteValue (GetHexValue (firstHexChar) << 4) GetHexValue (secondHexChar) Put that into the output array, and move on or the next. Create arbitrary file from hexadecimal code (javascript, client-side only). I put N words of all 1s between modules, setting N = K * BLOCKSIZE - currentAddress % BLOCKSIZE (K >= 1). The bin-diff program reported the count of changed words, so it was easy to tell if a lot was changed. You can call this a bootloader my mine was not used that way (initial writing was done with a programmer).To gain much from this approach, it's helpful to have empty space between modules so that the insertion of a single instruction doesn't change all words after the insertion.
The code that does the changes must be itself not changed by the upgrade or bad juju will occur. A utility to transmit the differences so the node can reprogram the changed words.This could be two programs (diff and bin2hex), but I used just one. Check out the new Windows and Windows Phone apps Download from the Windows Store Download from the Windows Phone Store. A bin-diff program which emits a hex file corresponding to the differences.A 'hex2bin' equivalent which is run on the old and new hex files.Like 1and0, I developed my own which consisted of three components: