Flashing HP15CE with linux
|
11-29-2024, 04:47 PM
(This post was last modified: Yesterday 06:17 AM by Idnarn.)
Post: #41
|
|||
|
|||
RE: Flashing HP15CE with linux
Update: Please see a newer post in this thread for updated steps that I used to flash on Linux using a different fork of BOSSA.
(11-28-2024 05:56 PM)blackjetrock Wrote: Same result, I'm afraid... Can you try the BOSSA tool and see if flashing with it works? * Compile it from source from master branch of: https://github.com/shumatech/BOSSA * Also merge this PR that adds support for SAM4L devices before you compile: https://github.com/shumatech/BOSSA/pull/143 For git commands to get to this tree state, see the commands prefixed with $ below: Code:
With Debian bookworm (such as for a Raspberry Pi 5 user), it'll also need the following patch to bump the wx version dependency: Code:
I confirm that BOSSA properly compiles with the above on Debian bookworm, but I don't have a screwdriver handy right now to connect my HP 15C CE and try it. Update: Please see a newer post in this thread for updated steps that I used to flash on Linux using a different fork of BOSSA. |
|||
11-29-2024, 05:02 PM
Post: #42
|
|||
|
|||
RE: Flashing HP15CE with linux
No, sorry, I've binned the calculators...
|
|||
11-29-2024, 05:06 PM
Post: #43
|
|||
|
|||
RE: Flashing HP15CE with linux
(11-28-2024 06:06 PM)blackjetrock Wrote: I think I'll be divesting myself of the HP15CEs... Don't give up. I'm pretty sure there's at least one developer at Moravia who's using a current Linux distribution to develop firmware for these calculators. If it comes to that, we can try to get a referral at Moravia to help. But meanwhile let's try BOSSA and see if it works, as it appears to be used with SAM microcontrollers widely (from the reports in that git repo). And someone did write this PR to add SAM4L support, so there's hope that it works. |
|||
11-29-2024, 05:07 PM
Post: #44
|
|||
|
|||
RE: Flashing HP15CE with linux | |||
11-29-2024, 05:21 PM
Post: #45
|
|||
|
|||
RE: Flashing HP15CE with linux
(11-29-2024 05:06 PM)Idnarn Wrote: ...SAM4L support, so there's hope that it works. It should should also work with 2015+ HP-12C+'s as well. One can load HP-15C CE firmware into those. Or the opposite. A1 HP-15C (2234A02xxx), HP-16C (2403A02xxx), HP-15C CE (9CJ323-03xxx), HP-20S (2844A16xxx), HP-12C+ (9CJ251) |
|||
11-29-2024, 05:26 PM
Post: #46
|
|||
|
|||
RE: Flashing HP15CE with linux
I'll try BOSSA with one of my calculators, maybe tomorrow.
|
|||
11-29-2024, 05:30 PM
(This post was last modified: 11-29-2024 05:30 PM by AnnoyedOne.)
Post: #47
|
|||
|
|||
RE: Flashing HP15CE with linux
I hope BOSSA works. That'd mean flash programming support for Windows (SAM-BA 2.18) and Linux (BOSSA) users. Perhaps those on MacOS as well
A1 HP-15C (2234A02xxx), HP-16C (2403A02xxx), HP-15C CE (9CJ323-03xxx), HP-20S (2844A16xxx), HP-12C+ (9CJ251) |
|||
11-29-2024, 05:50 PM
(This post was last modified: 11-29-2024 06:11 PM by Idnarn.)
Post: #48
|
|||
|
|||
RE: Flashing HP15CE with linux
FWIW there is a different BOSSA fork here with SAM4L support:
https://sourceforge.net/p/bossa-fork/cod...aster/tree (It is much older code, but hopefully the CLI interface will still compile and work.) Edit: Compiled for me on Debian bookworm after removing -Werror from COMMON_CXXFLAGS, as the compiler warns about use of obsolete C++ features. Edit: This version of BOSSA appears to be better after looking at the changes for SAM4L. It also automatically starts writing from page 32 which probably is location 0x4000 assuming a 512 byte page size, but I will have to check from "info" tomorrow to confirm. |
|||
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 |
|||
Yesterday, 01:23 PM
Post: #50
|
|||
|
|||
RE: Flashing HP15CE with linux
(Yesterday 03:36 AM)Idnarn Wrote:(11-27-2024 07:47 AM)blackjetrock Wrote: Has anyone managed to flash with Linux?Today I did. Congrats. So Windows good. Linux good. MacOS? A1 HP-15C (2234A02xxx), HP-16C (2403A02xxx), HP-15C CE (9CJ323-03xxx), HP-20S (2844A16xxx), HP-12C+ (9CJ251) |
|||
Yesterday, 02:19 PM
Post: #51
|
|||
|
|||
RE: Flashing HP15CE with linux
Hopefully someone will confirm so that everyone knows (not just them).
A1 HP-15C (2234A02xxx), HP-16C (2403A02xxx), HP-15C CE (9CJ323-03xxx), HP-20S (2844A16xxx), HP-12C+ (9CJ251) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 12 Guest(s)