Flashing HP15CE with linux
|
Yesterday, 03:36 AM
(This post was last modified: Today 03:20 AM by Idnarn.)
Post: #49
|
|||
|
|||
RE: Flashing HP15CE with linux
(11-27-2024 07:47 AM)blackjetrock Wrote: Has anyone managed to flash with Linux? Today I did. I tried this with a current generation HP 12C "Gold" calculator with the screwed battery door, which shares the hardware with the HP 15C CE. WARNING: The following only documents the steps I used and what happened. This is not a suggestion that you try the same. It may brick your device or do something else unexpected. I will accept no responsibility if these steps lead to any sort of problems with your device. Bricking your device (e.g., erasing all firmware and making USB access with pogo cable not work on this particular model of SoC in the calculator) is possible with the programs used, be warned. If that happens, I am not responsible. A quick intro first. The HP 15C CE calculator has an Atmel ATSAM4LC2CA SoC chip which is in the SAM4L chip series. The chip has flash ROM of 128 kiB (131072 bytes) organized into 256 pages of 512 bytes each (256 * 512 = 131072). The chip has a built-in program called SAM-BA that supports the feature of flashing it over USB. This program resides in the first 16384 bytes (first 32 pages, or between offsets 0 to 0x3fff in hex) of flash ROM on the chip. It must not be overwritten or disturbed. If it is overwritten, one may not be able to connect to the calculator over USB. The chip itself protects this region using a "lock" bit, but it is possible to unlock this region using the programs mentioned below. If you follow the same steps, please understand what commands you're executing. References: (a) page 61 of https://www.mouser.com/datasheet/2/268/A...368710.pdf (b) page 5 of https://ww1.microchip.com/downloads/en/A...T03454.pdf which is actually for a SAM4L8 device (which has double the flash). The firmware is written to the chip's flash ROM. For this, the calculator has to be connected to a computer using a pogo cable. Instructions for connecting the cable and bringing the calculator to a state for flashing are here: https://hpcalcs.com/downloads/apps/1_How..._Cable.pdf An open source program that works on Linux called BOSSA is used below to write the firmware to the calculator. I used this version of BOSSA as from code review it appeared to have the best support for SAM4L devices: https://sourceforge.net/p/bossa-fork/cod...aster/tree This is NOT the upstream/original version of BOSSA. It is different from the version of BOSSA mentioned in earlier posts in this thread. The upstream/original version of BOSSA apparently has no support for SAM4L devices. This verison of BOSSA has to be compiled from source code. It was very simple to do so. I just had to clone the git repository and run make, and install any missing dependencies it complained about. I didn't install the wxWidgets library dependency as I don't need to use a GUI. I use the "bossac" program below which is a command-line program which gets built even when the wxWidgets library is not installed. Here is the console output of running the "bossac" program after connecting the calculator using the pogo cable and pressing ERASE + RESET buttons. All commands were run as root user to avoid possibility of device permission issues. Commands I entered are prefixed with the "#" prompt character. Info: Code:
Backup the existing firmware on the calculator, which in my case is the 12C firmware as it is a 12C calculator I am flashing: Code:
Flash the "0A0Ah" version of the HP 15C CE firmware from Moravia's website: https://hpcalcs.com/downloads/apps/HP_IA...0120ms.bin As was mentioned previously, the first 16384 bytes of flash on the device are occupied by the SAM-BA software. This has to be left intact and not overwritten. The provided firmware from Moravia is 114688 bytes in size. 114688 + 16384 = 131072 which is exactly 128 kiB (the size of flash ROM on the Atmel ATSAM4LC2CA): Code:
NOTE: In this version of the BOSSA software, the "bossac" program claims to detect a SAM4L device and flashes starting from page 32 (offset 16384 or 0x4000) automatically. See the -f, --firstpage=PAGE argument in the CLI arguments of bossac. Code:
That's it. The firmware can be read again to a file (such as in the backup step above) and compared with the Moravia firmware file to verify that the flashing was correctly done. Reset the calculator (press the reset key on the pogo cable, or the reset pin button inside the battery compartment). The checksum can be checked within the calculator by switching it on by holding down g and ENTER keys and pressing ON to turn on the calculator. Result: https://imgur.com/a/K3IuHUv https://imgur.com/a/mUgOtrd Good luck. The firmware update steps above using BOSSA ought to work for BSDs and Mac OS too. Just make sure you compile from source code from the linked repository earlier in this comment, and don't use the upstream version of BOSSA which has no support for the chip family used in the calculator (SAM4L). There are two notes for Mac OS; the second one may have been addressed in Mac OS since as this version of BOSSA code is 10 years old.
Also see this thread for Python scripts to to save and load programs on the HP 15C CE using Linux (VoyagerSave functionality): https://www.hpmuseum.org/forum/thread-22525.html |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 29 Guest(s)