Updating DM-42 on a mac

Post here to share useful tips and tricks, to ask questions about using your DM42 or to report software-related problems
hpgene
Posts: 18
Joined: Mon May 29, 2017 1:02 pm

Updating DM-42 on a mac

Post by hpgene » Fri Jan 12, 2018 4:13 am

Does anyone here update their DM-42 using a mac and **not** within a virtual windows environment running on the mac?

If so, what do you do and how?

toml_12953
Posts: 529
Joined: Wed May 03, 2017 5:46 pm
Location: Malone, NY USA

Re: Updating DM-42 on a mac

Post by toml_12953 » Fri Jan 12, 2018 4:53 am

hpgene wrote:
Fri Jan 12, 2018 4:13 am
Does anyone here update their DM-42 using a mac and **not** within a virtual windows environment running on the mac?

If so, what do you do and how?
Did you read the instructions at

https://www.swissmicros.com/dm42/doc/dm ... bootloader

Use the section headed

Firmware Update

You have to use dfu-util.
Tom L

My father was a man of the cloth. He was a tailor.

DM42 SN: 00025 (Beta)
SN: 00221 (Shipping)

[maven]
Posts: 5
Joined: Thu Dec 28, 2017 8:55 pm

Re: Updating DM-42 on a mac

Post by [maven] » Fri Jan 12, 2018 8:08 am

For the record, the instructions worked fine for me (after installing dfu-util with homebrew (http://brew.sh)) for updating to both 3.1 and 3.2.

The actual command I ended up using (but this may depend on USB port and so on, so do not blindly copy this!) was

Code: Select all

dfu-util -d 0483:df11 -D DM42_flash_3.2.bin -a "@Internal Flash  /0x08000000/512*0002Kg" -s 0x8000000

Thomas Okken
Posts: 619
Joined: Tue May 02, 2017 3:48 pm
Contact:

Re: Updating DM-42 on a mac

Post by Thomas Okken » Fri Jan 12, 2018 12:40 pm

[maven] wrote:
Fri Jan 12, 2018 8:08 am
For the record, the instructions worked fine for me (after installing dfu-util with homebrew (http://brew.sh)) for updating to both 3.1 and 3.2.

The actual command I ended up using (but this may depend on USB port and so on, so do not blindly copy this!) was

Code: Select all

dfu-util -d 0483:df11 -D DM42_flash_3.2.bin -a "@Internal Flash  /0x08000000/512*0002Kg" -s 0x8000000
Same here. I'd just like to add that you can also install dfu-util using MacPorts, if you prefer.

User avatar
salvomic
Posts: 58
Joined: Sat Dec 30, 2017 9:09 am
Location: Ragusa, Sicily
Contact:

Re: Updating DM-42 on a mac

Post by salvomic » Fri Jan 12, 2018 1:35 pm

I wonder if it is possible to install dfu-utils via Homebrew (brew), thank you.

Salvo
∫aL√0mic (IT9CLU) - DM42 (SN: 00881), DM16, HP Prime, 50g, 41CX, 42s, 71b, 15C, 12C, HP 35s, WP34s :: Free42

Thomas Okken
Posts: 619
Joined: Tue May 02, 2017 3:48 pm
Contact:

Re: Updating DM-42 on a mac

Post by Thomas Okken » Fri Jan 12, 2018 4:01 pm

salvomic wrote:
Fri Jan 12, 2018 1:35 pm
I wonder if it is possible to install dfu-utils via Homebrew (brew), thank you.
That question was answered in this thread, two posts before yours.

User avatar
salvomic
Posts: 58
Joined: Sat Dec 30, 2017 9:09 am
Location: Ragusa, Sicily
Contact:

Re: Updating DM-42 on a mac

Post by salvomic » Fri Jan 12, 2018 4:08 pm

Thomas Okken wrote:
Fri Jan 12, 2018 4:01 pm
salvomic wrote:
Fri Jan 12, 2018 1:35 pm
I wonder if it is possible to install dfu-utils via Homebrew (brew), thank you.
That question was answered in this thread, two posts before yours.
sorry, I apologise: I wrote with our read!
Thank you

salvo
∫aL√0mic (IT9CLU) - DM42 (SN: 00881), DM16, HP Prime, 50g, 41CX, 42s, 71b, 15C, 12C, HP 35s, WP34s :: Free42

rprosperi
Posts: 501
Joined: Mon Apr 24, 2017 5:48 pm
Location: New York

Re: Updating DM-42 on a mac

Post by rprosperi » Fri Jan 12, 2018 4:19 pm

[maven] wrote:
Fri Jan 12, 2018 8:08 am
For the record, the instructions worked fine for me (after installing dfu-util with homebrew (http://brew.sh)) for updating to both 3.1 and 3.2.

The actual command I ended up using (but this may depend on USB port and so on, so do not blindly copy this!) was

Code: Select all

dfu-util -d 0483:df11 -D DM42_flash_3.2.bin -a "@Internal Flash  /0x08000000/512*0002Kg" -s 0x8000000
Oh, the joy and simplicity of easy-to-use Macs.... typically only Linux users have the fun of experimenting in order to find such an intuitive command.

[Ducking and seeking cover...]
--bob p

DM42: β00071 & 00282

Thomas Okken
Posts: 619
Joined: Tue May 02, 2017 3:48 pm
Contact:

Re: Updating DM-42 on a mac

Post by Thomas Okken » Fri Jan 12, 2018 5:12 pm

rprosperi wrote:
Fri Jan 12, 2018 4:19 pm
[maven] wrote:
Fri Jan 12, 2018 8:08 am
For the record, the instructions worked fine for me (after installing dfu-util with homebrew (http://brew.sh)) for updating to both 3.1 and 3.2.

The actual command I ended up using (but this may depend on USB port and so on, so do not blindly copy this!) was

Code: Select all

dfu-util -d 0483:df11 -D DM42_flash_3.2.bin -a "@Internal Flash  /0x08000000/512*0002Kg" -s 0x8000000
Oh, the joy and simplicity of easy-to-use Macs.... typically only Linux users have the fun of experimenting in order to find such an intuitive command.

[Ducking and seeking cover...]
Meh. I don't use Macs because of their "simplicity or ease of use," that argument ceased to have meaning somewhere between Windows 98 and XP, anyway. I use them because I need them for MacOS and iOS development. And Apple laptop hardware is nice.
Nowadays, all desktop OSes are mostly "just works," and they're also all "if it doesn't just work, things get hairy very quickly." :mrgreen:

User avatar
pcscote
Posts: 51
Joined: Tue May 02, 2017 10:12 am
Location: Near Montreal, Québec, Canada

Re: Updating DM-42 on a mac

Post by pcscote » Sat Jan 13, 2018 2:52 am

I have created these BASH scripts to update my DM-42 with my MacBook Pro

Application updater: upload_dm42_app.sh

Code: Select all

#!/bin/bash
if [ $# -eq 0 ]; then # if no parameter has been provided, then show mini-help
   echo "Usage: $0 application_filename"
   echo "Ex #1: $0 DM42_flash_3.0.bin"
   echo "Ex #2: $0 DMflash.bin"
elif [ $# -gt 1 ]; then  # if to many parameters (>1) has been provided, then say it to the user
   echo "ERROR: too many parameters" 
elif [ ! -e "$1" ]; then # does this file exist ?
   echo "ERROR: file $1 is missing"
elif [ ! -f "$1" ]; then # is this a file ?
   echo "ERROR: $1 is not a file"
else
   dfu-util -D $1 -d 0483:df11 -a "@Internal Flash  /0x08000000/512*0002Kg" -s 0x8000000
   echo "Press RESET button after dfu-util finishes the flashing."
fi
QSPI updater: upload_dm42_qspi.sh

Code: Select all

#!/bin/bash
if [ $# -eq 0 ]; then # if no parameter has been provided, then show mini-help
   echo "Usage: $0 qspi_filename"
   echo "Ex   : $0 DM42_qspi_3.0.bin"
elif [ $# -gt 1 ]; then  # if to many parameters (>1) has been provided, then say it to the user
   echo "ERROR: too many parameters" 
elif [ ! -e "$1" ]; then # does this file exist ?
   echo "ERROR: file $1 is missing"
elif [ ! -f "$1" ]; then # is this a file ?
   echo "ERROR: $1 is not a file"
else
   dfu-util -D $1 -d 0483:df11 -a "@QSPI Flash   /0x90000000/512*04Kg" -s 0x90000000
   echo "Press F (top right key) to switch the calculator back to bootloader mode."
fi
Sylvain

edit 1: typo
edit 2: sudo removed from scripts
edit 3: swapped scripts position (Application updater is now first & QSPI updater is now second)
edit 4: update edit log
edit 5: typo
Last edited by pcscote on Sun Jan 14, 2018 12:50 am, edited 5 times in total.
[DM1x/DM1xL/DM41/DM41L/DM42]

Post Reply