Flashing HP15CE with linux
|
11-27-2024, 06:06 PM
(This post was last modified: 11-27-2024 06:07 PM by AnnoyedOne.)
Post: #21
|
|||
|
|||
RE: Flashing HP15CE with linux
(11-27-2024 05:52 PM)Idnarn Wrote: The fact that it found the chip ID 0xab0a07e1 (Atmel ATSAM4LC2CA) suggests that USB communication is working fine. It looks that way. From the ATSAM4LC2CA datasheet (PDF) the ChipID value looks ok. A1 HP-15C (2234A02xxx), HP-16C (2403A02xxx), HP-15C CE (9CJ323-03xxx), HP-20S (2844A16xxx), HP-12C+ (9CJ251) |
|||
11-27-2024, 07:35 PM
Post: #22
|
|||
|
|||
RE: Flashing HP15CE with linux
(11-27-2024 05:52 PM)Idnarn Wrote:(11-27-2024 04:09 PM)blackjetrock Wrote: -I- Found chip : at91sam4l_1 (Chip ID : 0xffffffffab0a07e1) Code:
|
|||
11-27-2024, 09:13 PM
(This post was last modified: 11-27-2024 09:14 PM by Sylvain Cote.)
Post: #23
|
|||
|
|||
RE: Flashing HP15CE with linux
(11-27-2024 07:35 PM)blackjetrock Wrote:Just a reminder, in Unix/Linux almost everything is seen as a file, including a terminal (tty). The ENOTTY (Error Not a typewriter) message is normally happening when a program is trying to configure a terminal (tty) properties but has opened a normal file. So in summary, it looks like the program is trying to configure the serial port but it is talking to the applet-flash-sam4l4.bin file instead, thus the ENOTTY error. Could you give us the command line that you typed ? Sylvain Côté |
|||
11-27-2024, 09:21 PM
Post: #24
|
|||
|
|||
RE: Flashing HP15CE with linux
(11-27-2024 09:13 PM)Sylvain Cote Wrote:(11-27-2024 07:35 PM)blackjetrock Wrote:Just a reminder, in Unix/Linux almost everything is seen as a file, including a terminal (tty). The command line was sudo sam-ba_64 which then brought up the GUI. I selected /dev/ttyACM1 as the communication port and the sam4l board. Pressing the CONNECT button then resulted in that trace (when running strace). |
|||
11-27-2024, 09:29 PM
(This post was last modified: 11-27-2024 09:33 PM by Sylvain Cote.)
Post: #25
|
|||
|
|||
RE: Flashing HP15CE with linux
(11-27-2024 09:21 PM)blackjetrock Wrote:ok ... let me think ... an invalid file permission could also produce this type of error.(11-27-2024 09:13 PM)Sylvain Cote Wrote: Just a reminder, in Unix/Linux almost everything is seen as a file, including a terminal (tty).The command line was type: Code: ls -la /home/menadue/tree/hp15ce_programming/sam-ba_cdc_linux/tcl_lib/at91sam4l-ek/applet-flash-sam4l4.bin edit: added command line Sylvain Côté |
|||
11-27-2024, 09:41 PM
Post: #26
|
|||
|
|||
RE: Flashing HP15CE with linux
-rw-r--r-- 1 menadue menadue 2652 Nov 28 2017 /home/menadue/tree/hp15ce_programming/sam-ba_cdc_linux/tcl_lib/at91sam4l-ek/applet-flash-sam4l4.bin
|
|||
11-27-2024, 09:55 PM
Post: #27
|
|||
|
|||
RE: Flashing HP15CE with linux
(11-27-2024 09:41 PM)blackjetrock Wrote: -rw-r--r-- 1 menadue menadue 2652 Nov 28 2017 /home/menadue/tree/hp15ce_programming/sam-ba_cdc_linux/tcl_lib/at91sam4l-ek/applet-flash-sam4l4.binsince the user menadue has rw access, sudo should also been able to access it in rw mode. I am on macOS right now, later tonight, I will load samba on one of my Linux machine to update one my 15CE calculator and see how it goes. I will post my results here when it is done. Sylvain Sylvain Côté |
|||
11-27-2024, 10:47 PM
Post: #28
|
|||
|
|||
RE: Flashing HP15CE with linux
There is a gotcha I vaguely remember from when setting up PyILPer in Linux. You need to add the user to the dialup or tty group to be able to use serial ports with your username. This may be what is happening here (or not), you should be able to find those instructions floating around in the web
Juan |
|||
11-28-2024, 01:18 AM
Post: #29
|
|||
|
|||
RE: Flashing HP15CE with linux
(11-27-2024 07:35 PM)blackjetrock Wrote:(11-27-2024 05:52 PM)Idnarn Wrote: The fact that it found the chip ID 0xab0a07e1 (Atmel ATSAM4LC2CA) suggests that USB communication is working fine. Can you strace the process and see where it's blocking? What is fd=5 in the strace output? is it the opened USB device? It appears that a read() on it is blocking after several writes(). Perhaps something has changed in the USB driver in recent kernel versions, that's causing the change in behavior. |
|||
11-28-2024, 04:13 AM
Post: #30
|
|||
|
|||
RE: Flashing HP15CE with linux | |||
11-28-2024, 01:24 PM
(This post was last modified: 11-28-2024 01:35 PM by Sylvain Cote.)
Post: #31
|
|||
|
|||
RE: Flashing HP15CE with linux
I have tried several things last night, all unsuccessful, they all stuck at the read instruction
Notes:
Sylvain Côté |
|||
11-28-2024, 02:13 PM
(This post was last modified: 11-28-2024 04:04 PM by AnnoyedOne.)
Post: #32
|
|||
|
|||
RE: Flashing HP15CE with linux
(11-28-2024 01:24 PM)Sylvain Cote Wrote: I have tried several things last night, all unsuccessful... I don't know Linux but (11-27-2024 04:09 PM)blackjetrock Wrote: -I- Loading applet applet-flash-sam4l4.bin at address 0x20002000 looks wrong. The Windows version of SAM-BA 2.18 uses 0x20004000 (assigned when selecting the "board"?). The ATSAM4LC2CA starts its flash at 0x20000000 but the first 16KB is the write-protected bootloader so trying to write to 0x20002000 will fail. Can the offset be changed from 0x2000 to 0x4000 as in the Windows version? A1 PS: The AT91SAM7L128 had a 8KB bootloader so an offset of 0x2000 was correct for it. HP-15C (2234A02xxx), HP-16C (2403A02xxx), HP-15C CE (9CJ323-03xxx), HP-20S (2844A16xxx), HP-12C+ (9CJ251) |
|||
11-28-2024, 03:19 PM
(This post was last modified: 11-28-2024 03:23 PM by Sylvain Cote.)
Post: #33
|
|||
|
|||
RE: Flashing HP15CE with linux
(11-28-2024 02:13 PM)AnnoyedOne Wrote:I had assumed that the given configuration/addresses were correct.(11-27-2024 04:09 PM)blackjetrock Wrote: -I- Loading applet applet-flash-sam4l4.bin at address 0x20002000looks wrong. I do not have any free time for the coming days, but I will look at the manual to figure out the upgrade process at the MCU level (memory map, boot loading sequence, etc.), then I will look at the TCL scripts used by sam-ba on the Linux side to see which one matches what is needed, and if none, then create one that do. Sylvain Côté |
|||
11-28-2024, 03:56 PM
(This post was last modified: 11-28-2024 04:24 PM by AnnoyedOne.)
Post: #34
|
|||
|
|||
RE: Flashing HP15CE with linux
From the HP-15C CE firmware programming instructions (PDF p3).
Quote:Put “0x04000” in the “Address” field, to place the pointer at the start of the user firmware and after the booting firmware of the Atmel processor. This is required to avoid overwriting the bootloader firmware at the beginning of the Atmel memory space. A1 PS: From "Atmel SAM-BA for SAM4L (AN AT03454)" p4 of the PDF. HP-15C (2234A02xxx), HP-16C (2403A02xxx), HP-15C CE (9CJ323-03xxx), HP-20S (2844A16xxx), HP-12C+ (9CJ251) |
|||
11-28-2024, 04:40 PM
Post: #35
|
|||
|
|||
RE: Flashing HP15CE with linux
I had a go with the slightly different address, this still locked up.
Code:
|
|||
11-28-2024, 04:55 PM
Post: #36
|
|||
|
|||
RE: Flashing HP15CE with linux
My mistake. The datasheet says that flash starts at 0x00000000 and RAM is at 0x20000000.
Try 0x4000. A1 PS: Some chips remap stuff in bootloader mode. It seems that this one doesn't. HP-15C (2234A02xxx), HP-16C (2403A02xxx), HP-15C CE (9CJ323-03xxx), HP-20S (2844A16xxx), HP-12C+ (9CJ251) |
|||
11-28-2024, 05:56 PM
Post: #37
|
|||
|
|||
RE: Flashing HP15CE with linux
Same result, I'm afraid...
Code:
|
|||
11-28-2024, 06:04 PM
Post: #38
|
|||
|
|||
RE: Flashing HP15CE with linux
(11-28-2024 05:56 PM)blackjetrock Wrote: Same result, I'm afraid... I'm out of ideas. I tried... It could be some obscure Linux issue. I've used SAM-BA 2.18 Windows in WinXP and Win7 virtual machines and it worked fine. A1 HP-15C (2234A02xxx), HP-16C (2403A02xxx), HP-15C CE (9CJ323-03xxx), HP-20S (2844A16xxx), HP-12C+ (9CJ251) |
|||
11-28-2024, 06:06 PM
Post: #39
|
|||
|
|||
RE: Flashing HP15CE with linux
I'm not too surprised. I started using PICs in about 1987, and carried on until about 8 years ago. The tools just sort of stopped working. I moved to other microcontrollers.
I think I'll be divesting myself of the HP15CEs... Thanks for your help. |
|||
11-28-2024, 06:10 PM
Post: #40
|
|||
|
|||
RE: Flashing HP15CE with linux
(11-28-2024 06:06 PM)blackjetrock Wrote: I started using PIC... Don't get me started on PIC's. Or 8051's (and variants). 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: 13 Guest(s)