Flashing on macOS

Moderators: odroid, mdrjr

Flashing on macOS

Unread postby MisterBiro » Mon Jul 16, 2018 11:58 am

As there isn't an official guide, I thought this might be useful for those of us using macOS.

Disclaimer: This works for me on my portable dev box which is a MBA 2010, running OS X 10.11.6, but it should work for other set-ups too.

Download and install the USB <-> UART drivers from here: https://www.silabs.com/documents/public ... Driver.zip
Download the latest .img Odroid-Go firmware from here: https://github.com/OtherCrashOverride/o ... e/releases (this doesn't need to be mounted or extracted, it's the firmware image to be written directly to the Go).

Install brew from here: https://brew.sh

Then type the following terminal commands:

Code: Select all
mba2010:~ misterbiro$ brew install python3
mba2010:~ misterbiro$ sudo easy_install pip
mba2010:~ misterbiro$ sudo pip install esptool


As I can't get python3 to replace python on my system, I need to type python3 instead of python, but YMMV.

After ESP Tool is installed connect your Odroid-Go to your computer via the supplied (or a known compatible) USB cable and power it on.
(I have a number of cables that work fine with RPi's, etc, but which will refuse to allow me to flash any ESP* devices.)

Assuming you installed the SI Labs drivers earlier, the ODGo should appear as /dev/cu.SLAB_USBtoUART. If it doesn't appear as this, it may be available as /dev/tty.SLAB_USBtoUART.

You can check with the following command:
Code: Select all
mba2010:~ misterbiro$ ls /dev/cu.*


If you see /dev/cu.SLAB_USBtoUART listed, great! If not, try with /dev/tty.* and if you see /dev/tty.SLAB_USBtoUART, also great! If you don't see either of these, try a different cable, and failing that following the troubleshooting section on the wiki (TL;DR is, power on while continuing to hold the menu button until you're successfully flashed).

Before flashing any of the ESP devices, I find it's useful to test if it's detected (correctly):
Code: Select all
mba2010:~ misterbiro$ python3 -m esptool  --port /dev/cu.SLAB_USBtoUART flash_id


This should give an output like the below:

esptool.py v2.3.2-dev
Connecting....
Detecting chip type... ESP32
Chip is ESP32D0WDQ6 (revision (unknown 0xe))
Features: WiFi, BT, Dual Core, VRef calibration in efuse
Uploading stub...
Running stub...
Stub running...
Manufacturer: c8
Device: 6018
Detected flash size: 16MB
Hard resetting via RTS pin...


Once the device is detected, change the directory containing the firmware, for example:

Code: Select all
mba2010:~ misterbiro$ cd ~/Downloads/odroid-go


Then type the following: (Note: This is current as of release 20180915)

Code: Select all
mba2010:odroid-go-firmware-bin misterbiro$ python3 -m esptool --chip esp32 --port /dev/cu.SLAB_USBtoUART --baud 921600 write_flash --flash_mode dio --flash_freq 40m --flash_size detect 0 odroid-go-firmware-20180915.img


This should give an output like the below...

esptool.py v2.3.1
Connecting........_
Chip is ESP32D0WDQ6 (revision (unknown 0xe))
Features: WiFi, BT, Dual Core, VRef calibration in efuse
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Auto-detected Flash size: 16MB
Compressed 301904 bytes to 146444...
Wrote 301904 bytes (146444 compressed) at 0x00000000 in 3.1 seconds (effective 772.7 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...


And that's it... The firmware should be updated to the latest.

Once the firmware is updated, when the Go restarts you will be dropped into the firmware update screen and can see that you're now on version 20180915. Choose the Go Play firmware, Doom or whatever you like.


Go-Play firmware
If you want to flash the latest Go-Play firmware:
Downloaded the latest release from here: https://github.com/OtherCrashOverride/go-play/releases

Make sure you have turned off the Odroid-Go after flashing the firmware above (or if you're just updating this, make sure the device is turned off)

Take the SD card out of the Odroid-Go and use either a USB adapter or micro->full size SD card adapter to connect it to your Mac.

Copy the downloaded 'Go-Play.fw' to the /odroid/firmware/ directory in the root of the SD card, and then eject either by dragging to the Trash or pressing the 'eject' icon.

Put the SD card back into the Odroid-Go and hold down the 'B' button.

While continuing to keep 'B' held down, power on the Odroid-Go, and ensure you keep 'B' held until the firmware update screen is displayed. As per @CrashOverride, this will take 5 seconds.

When prompted select the firmware you want to flash (in this case Go Play), press 'Start' and the previously copied Go-Play firmware will be flashed to the Odroid-Go.
Last edited by MisterBiro on Sat Oct 06, 2018 1:23 am, edited 8 times in total.
MisterBiro
 
Posts: 10
Joined: Mon Jul 09, 2018 1:17 pm
languages_spoken: english

Re: Flashing on macOS

Unread postby odroid » Mon Jul 16, 2018 12:07 pm

Thank you for sharing a nice guide for Mac users.

I've added it to the WiKi page.
https://wiki.odroid.com/odroid_go/emulator/firmware_update#mac_os
User avatar
odroid
Site Admin
 
Posts: 29098
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Flashing on macOS

Unread postby MisterBiro » Fri Jul 20, 2018 1:57 am

I'll try and keep this updated for newer firmware versions, and have added a Go-Play section too.
MisterBiro
 
Posts: 10
Joined: Mon Jul 09, 2018 1:17 pm
languages_spoken: english

Re: Flashing on macOS

Unread postby TimeWaster » Fri Aug 03, 2018 6:43 pm

I read in a tutorial somewhere that you need to erase flash before flashing the new firmware, so here is the command for doing that:

Code: Select all
python3 -m esptool --chip esp32 --port /dev/cu.SLAB_USBtoUART --baud 921600 --before default_reset --after hard_reset erase_flash
TimeWaster
 
Posts: 1
Joined: Fri Aug 03, 2018 6:38 pm
languages_spoken: english
ODROIDs: Odroid Go

Re: Flashing on macOS

Unread postby Mambes » Mon Aug 13, 2018 9:56 pm

When I type command
Code: Select all
python3 -m esptool  --port /dev/cu.SLAB_USBtoUART flash_id

it back me
Code: Select all
/usr/local/opt/python/bin/python3.7: No module named esptool

What Iam doing wrong?
Mambes
 
Posts: 3
Joined: Tue Aug 07, 2018 6:18 am
languages_spoken: english

Re: Flashing on macOS

Unread postby MisterBiro » Tue Aug 14, 2018 1:45 pm

Have you done 'pip install esptool' ?

Edit: if you have, try 'pip3 install esptool'
MisterBiro
 
Posts: 10
Joined: Mon Jul 09, 2018 1:17 pm
languages_spoken: english

Re: Flashing on macOS

Unread postby d97 » Mon Sep 03, 2018 12:09 am

I'm just posting this for reference - there might be a problem with what I'm doing because I can't get the emulator menu to fire properly. However, I did - I think - get the correct OSX command to flash the new firmware (2018-08-06)

(EDIT - I figured this out ... I just re-downloaded the "SkeletonFile", wiped my SD Card and copied the file over. I now have the ColecoVision and SMS emulators.)

----------
Just adding a little bit here ... with the changes in the firmware file structure, I had to change to the firmware directory (cd ..) and use the following command to flash the new firmware.

python3 -m esptool --chip esp32 --port /dev/cu.SLAB_USBtoUART --baud 921600 write_flash --flash_mode dio --flash_freq 80m --flash_size detect 0 odroid-go.img

I also had to use the "pip3 install esptool" command as MisterBiro mentions in order to get the esptools file installed and, for what it's worth, I was unable to install pip via brew I had to do that directly. (I'm not an expert at this sort of stuff but looking around the brew forums, it seems as though other people have had this problem, too.)

I have hit a snag when it comes to installing the latest emulator files, though. I boot up by holding the "b" button and select the file and it goes through the install / verification process but then it boots to a red sd card image with an x in the middle of it. Still tracking this one down.
Last edited by d97 on Mon Sep 03, 2018 12:18 am, edited 1 time in total.
d97
 
Posts: 8
Joined: Sat Jul 07, 2018 11:55 am
languages_spoken: english

Re: Flashing on macOS

Unread postby crashoverride » Mon Sep 03, 2018 12:16 am

d97 wrote:it boots to a red sd card image with an x in the middle of it. Still tracking this one down.

Ensure you have "/odroid/data/col" and "/roms/col" folders created on the SD card.
crashoverride
 
Posts: 4140
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Flashing on macOS

Unread postby d97 » Mon Sep 03, 2018 12:19 am

Thanks for the reply - I just did a quick post ... turns out that a new version of the Skeleton File was all I needed. Updated my original post
d97
 
Posts: 8
Joined: Sat Jul 07, 2018 11:55 am
languages_spoken: english

Re: Flashing on macOS

Unread postby hotbodhotrod69 » Sun Sep 30, 2018 11:53 am

Thanks for this, got me almost all the way there, but I notice the latest firmware updates are in .img files rather than the previous compressed tgz files. I can't get .img files to mount on my mac, so I can't get to the final step of extracting the files and directing terminal to the .bin file. Or is there a completely different method with the .img file? I see the firmware updates have command lines noted for flashing, but I'm too programming-dumb to adapt it to these instructions.
hotbodhotrod69
 
Posts: 6
Joined: Sun Sep 30, 2018 6:21 am
languages_spoken: english

Re: Flashing on macOS

Unread postby MisterBiro » Sun Sep 30, 2018 1:16 pm

hotbodhotrod69 wrote:Thanks for this, got me almost all the way there, but I notice the latest firmware updates are in .img files rather than the previous compressed tgz files. I can't get .img files to mount on my mac, so I can't get to the final step of extracting the files and directing terminal to the .bin file. Or is there a completely different method with the .img file? I see the firmware updates have command lines noted for flashing, but I'm too programming-dumb to adapt it to these instructions.

I've updated the guide to reflect the flashing of the 20180915 firmware release, the command is pretty much the same, except you only have a single offset (0) and the filename ends in .img rather than .bin.

You don't need to mount or extract the .img file, this is the firmware image to be written directly to the Go.
MisterBiro
 
Posts: 10
Joined: Mon Jul 09, 2018 1:17 pm
languages_spoken: english

Re: Flashing on macOS

Unread postby hotbodhotrod69 » Mon Oct 01, 2018 2:54 am

Thanks so much for making those changes. Will take another stab at it today.
hotbodhotrod69
 
Posts: 6
Joined: Sun Sep 30, 2018 6:21 am
languages_spoken: english

Re: Flashing on macOS

Unread postby beck423 » Fri Oct 05, 2018 6:03 am

Thanks for posting this guide. I am getting stuck at the "sudo easy_install pip" line. I get the following error:

Code: Select all
Searching for pip
Reading https://pypi.python.org/simple/pip/
Download error on https://pypi.python.org/simple/pip/: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) -- Some packages may not be found!
Couldn't find index page for 'pip' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) -- Some packages may not be found!
No local packages or download links found for pip
error: Could not find suitable distribution for Requirement.parse('pip')


Not sure what's going on. What am I doing wrong? Any help would be much appreciated!
beck423
 
Posts: 3
Joined: Fri Oct 05, 2018 5:58 am
languages_spoken: english
ODROIDs: ODROID-GO

Re: Flashing on macOS

Unread postby MisterBiro » Fri Oct 05, 2018 2:21 pm

What version of Mac OSX are you using and what version of Python?
MisterBiro
 
Posts: 10
Joined: Mon Jul 09, 2018 1:17 pm
languages_spoken: english

Re: Flashing on macOS

Unread postby beck423 » Sat Oct 06, 2018 12:28 am

I am using Mac OS 10.12.6 and Python 3.7.0
beck423
 
Posts: 3
Joined: Fri Oct 05, 2018 5:58 am
languages_spoken: english
ODROIDs: ODROID-GO

Re: Flashing on macOS

Unread postby MisterBiro » Sat Oct 06, 2018 1:22 am

Interesting... I don't have that problem on my 10.12.6 installation at work, so I'm not really sure.

However, this might help: https://stackoverflow.com/questions/497 ... ol-version
MisterBiro
 
Posts: 10
Joined: Mon Jul 09, 2018 1:17 pm
languages_spoken: english

Re: Flashing on macOS

Unread postby beck423 » Sat Oct 06, 2018 1:46 am

Thanks for sending that thread. Found the solution there. I had to run this line to get pip installed:
Code: Select all
curl https://bootstrap.pypa.io/get-pip.py | sudo python
beck423
 
Posts: 3
Joined: Fri Oct 05, 2018 5:58 am
languages_spoken: english
ODROIDs: ODROID-GO


Return to General Chat

Who is online

Users browsing this forum: No registered users and 1 guest