Switch from GPLv2 to GPLv2+ Signed-off-by: Keith Packard <keithp@keithp.com>
ao-tools: Clean up ao-stmload and ao-usbload options. Add --raw ao-stmload only uses stlink, ao-usbload only uses self-flashing, so clear up the options in the two programs. The new --raw option skips the serial and radio cal rewriting when flashing the boot loader. Signed-off-by: Keith Packard <keithp@keithp.com>
ao-tools: Add ao-flash-stm and ao-flash-lpc scripts These use openocd to download boot loaders to the arm-based products Signed-off-by: Keith Packard <keithp@keithp.com>
ao-tools: Split out USB loader to ao-usbload Leave ao-stmload using just stlinkv2 Signed-off-by: Keith Packard <keithp@keithp.com>
ao-tools: Split out altos symbol editing from ao-stmload to be shared with ao-usbload Signed-off-by: Keith Packard <keithp@keithp.com>
ao-tools: move 16/32-bit readers from ao-stmload to lib
ao-tools: Move ao-selfload into library This needs to be shared between ao-stmload and ao-usbload Signed-off-by: Keith Packard <keithp@keithp.com>
ao-tools: Add ao-elftohex and .ihx symbol support ao-elftohex converts an elf file into a hex file so that we can load it with java. Signed-off-by: Keith Packard <keithp@keithp.com>
ao-tools: Create general elf and hex library routines Pulls the elf stuff out of ao-stmload, change the hex stuff into ao_ routines. Signed-off-by: Keith Packard <keithp@keithp.com>
ao-tools/ao-stmload: Add --verbose flag This dumps out the serial communication so you can see where things go wrong. Signed-off-by: Keith Packard <keithp@keithp.com>
ao-tools/ao-stmload: application base moved to 0x08001000 And, use a symbolic name so it can be easily moved in the future Signed-off-by: Keith Packard <keithp@keithp.com>
ao-tools: reboot to loader now uses 'X' instead of 'L' 'L' is used by lots of other commands; switch to 'X' which is free. Sigh. Someday we'll have words for commands instead of just letters Signed-off-by: Keith Packard <keithp@keithp.com>
ao-tools/ao-stmload: Remove IRC dregs in source code oops. Signed-off-by: Keith Packard <keithp@keithp.com>
ao-tools/ao-stmload: Fix ELF, add IHX, add self-flashing This splits loading into ELF and IHX paths, and splits flashing into stlink and self-flashing paths. Signed-off-by: Keith Packard <keithp@keithp.com>
ao-tools/ao-stmload: Be smarter about ELF parsing. Retry open on failure. Figuring out what goes where is tricky; turns out we want to pull all of the sections that map inside any program area that is supposed to be loaded from the file. So, we walk the program headers, then walk all of the section headers looking for those that suck data from the same portion of the file. Compute where in ROM each relevant section goes and build a full ROM image in memory using that. This patch also adds code to close and re-open the device if the first open failed to do what we want. Much nicer to have the computer figure out when the open succeeded rather than having people re-run the app. Signed-off-by: Keith Packard <keithp@keithp.com>
ao-stmload: Always round up load amount to 4 byte boundary The flashing code doesn't deal with partial writes. Signed-off-by: Keith Packard <keithp@keithp.com>
Add ao-stmload tool This loads an ELF image through the STlink programming interface using the stlink utility library Signed-off-by: Keith Packard <keithp@keithp.com>