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: 36
Joined: Mon May 29, 2017 3:02 pm

Updating DM-42 on a mac

Post by hpgene »

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: 795
Joined: Wed May 03, 2017 7:46 pm
Location: Malone, NY USA

Re: Updating DM-42 on a mac

Post by toml_12953 »

hpgene wrote:
Fri Jan 12, 2018 5: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

Some people call me inept but I'm as ept as anybody!
DM10L SN: 059/100
DM41X SN: 00023 (Beta)
DM41X SN: 00506 (Shipping)
DM42 SN: 00025 (Beta)
DM42 SN: 00221 (Shipping)
WP43 SN: 00025 (Prototype)
[maven]
Posts: 5
Joined: Thu Dec 28, 2017 9:55 pm

Re: Updating DM-42 on a mac

Post by [maven] »

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: 1100
Joined: Tue May 02, 2017 5:48 pm
Location: Netherlands
Contact:

Re: Updating DM-42 on a mac

Post by Thomas Okken »

[maven] wrote:
Fri Jan 12, 2018 9: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: 186
Joined: Sat Dec 30, 2017 10:09 am
Location: Ragusa, Sicily
Contact:

Re: Updating DM-42 on a mac

Post by salvomic »

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

Salvo
∫aL√0mic (IT9CLU) :: DM42 (SN: 00881), DM41X (SN 00523), DM16, HP Prime, 50g, 41CX, 42s, 71b, 15C, 12C, 35s, WP34s -- Free42
Thomas Okken
Posts: 1100
Joined: Tue May 02, 2017 5:48 pm
Location: Netherlands
Contact:

Re: Updating DM-42 on a mac

Post by Thomas Okken »

salvomic wrote:
Fri Jan 12, 2018 2: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: 186
Joined: Sat Dec 30, 2017 10:09 am
Location: Ragusa, Sicily
Contact:

Re: Updating DM-42 on a mac

Post by salvomic »

Thomas Okken wrote:
Fri Jan 12, 2018 5:01 pm
salvomic wrote:
Fri Jan 12, 2018 2: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), DM41X (SN 00523), DM16, HP Prime, 50g, 41CX, 42s, 71b, 15C, 12C, 35s, WP34s -- Free42
rprosperi
Posts: 1703
Joined: Mon Apr 24, 2017 7:48 pm
Location: New York

Re: Updating DM-42 on a mac

Post by rprosperi »

[maven] wrote:
Fri Jan 12, 2018 9: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, DM41X: β00071 & 00656, DM10L: 071/100
Thomas Okken
Posts: 1100
Joined: Tue May 02, 2017 5:48 pm
Location: Netherlands
Contact:

Re: Updating DM-42 on a mac

Post by Thomas Okken »

rprosperi wrote:
Fri Jan 12, 2018 5:19 pm
[maven] wrote:
Fri Jan 12, 2018 9: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: 169
Joined: Tue May 02, 2017 12:12 pm
Location: Québec/Canada

Re: Updating DM-42 on a mac

Post by pcscote »

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 1:50 am, edited 5 times in total.
[DM1x/DM1xL/DM41/DM41L/DM41X/DM42]
Post Reply