Flashing on macOS

Post Reply
MisterBiro
Posts: 11
Joined: Mon Jul 09, 2018 1:17 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Flashing on macOS

Post by MisterBiro »

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.

User avatar
odroid
Site Admin
Posts: 41864
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 3433 times
Been thanked: 1920 times
Contact:

Re: Flashing on macOS

Post by odroid »

Thank you for sharing a nice guide for Mac users.

I've added it to the WiKi page.
https://wiki.odroid.com/odroid_go/emula ... ate#mac_os

MisterBiro
Posts: 11
Joined: Mon Jul 09, 2018 1:17 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: Flashing on macOS

Post by MisterBiro »

I'll try and keep this updated for newer firmware versions, and have added a Go-Play section too.

TimeWaster
Posts: 4
Joined: Fri Aug 03, 2018 6:38 pm
languages_spoken: english
ODROIDs: Odroid Go
Has thanked: 0
Been thanked: 0
Contact:

Re: Flashing on macOS

Post by TimeWaster »

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

Mambes
Posts: 3
Joined: Tue Aug 07, 2018 6:18 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: Flashing on macOS

Post by Mambes »

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?

MisterBiro
Posts: 11
Joined: Mon Jul 09, 2018 1:17 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: Flashing on macOS

Post by MisterBiro »

Have you done 'pip install esptool' ?

Edit: if you have, try 'pip3 install esptool'

d97
Posts: 8
Joined: Sat Jul 07, 2018 11:55 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: Flashing on macOS

Post by d97 »

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.

crashoverride
Posts: 5841
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 640 times
Contact:

Re: Flashing on macOS

Post by crashoverride »

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.

d97
Posts: 8
Joined: Sat Jul 07, 2018 11:55 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: Flashing on macOS

Post by d97 »

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

hotbodhotrod69
Posts: 6
Joined: Sun Sep 30, 2018 6:21 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: Flashing on macOS

Post by hotbodhotrod69 »

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.

MisterBiro
Posts: 11
Joined: Mon Jul 09, 2018 1:17 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: Flashing on macOS

Post by MisterBiro »

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.

hotbodhotrod69
Posts: 6
Joined: Sun Sep 30, 2018 6:21 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: Flashing on macOS

Post by hotbodhotrod69 »

Thanks so much for making those changes. Will take another stab at it today.

beck423
Posts: 3
Joined: Fri Oct 05, 2018 5:58 am
languages_spoken: english
ODROIDs: ODROID-GO
Has thanked: 0
Been thanked: 0
Contact:

Re: Flashing on macOS

Post by beck423 »

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!

MisterBiro
Posts: 11
Joined: Mon Jul 09, 2018 1:17 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: Flashing on macOS

Post by MisterBiro »

What version of Mac OSX are you using and what version of Python?

beck423
Posts: 3
Joined: Fri Oct 05, 2018 5:58 am
languages_spoken: english
ODROIDs: ODROID-GO
Has thanked: 0
Been thanked: 0
Contact:

Re: Flashing on macOS

Post by beck423 »

I am using Mac OS 10.12.6 and Python 3.7.0

MisterBiro
Posts: 11
Joined: Mon Jul 09, 2018 1:17 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: Flashing on macOS

Post by MisterBiro »

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

beck423
Posts: 3
Joined: Fri Oct 05, 2018 5:58 am
languages_spoken: english
ODROIDs: ODROID-GO
Has thanked: 0
Been thanked: 0
Contact:

Re: Flashing on macOS

Post by beck423 »

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

hot22shot
Posts: 2
Joined: Fri Jul 20, 2018 7:44 pm
languages_spoken: english
ODROIDs: Odroid-go
Has thanked: 0
Been thanked: 0
Contact:

Re: Flashing on macOS

Post by hot22shot »

Thank you for this guide, I was able to complete flashing my Go from my MacBook Pro 2018 on OSX 10.14.3.

Cheers !

basso88
Posts: 2
Joined: Tue Apr 02, 2019 1:22 am
languages_spoken: english
ODROIDs: Odroid Go
Has thanked: 0
Been thanked: 0
Contact:

Re: Flashing on macOS

Post by basso88 »

Hi, I was wandering if anyone could do a walk through video of this. Ive never done any development in my life and reading through these messages is terrifyingly difficult to understand.
And with the amount of comments saying they are struggling to sort it out im wondering if i shouldn't do it?

Dom

MisterBiro
Posts: 11
Joined: Mon Jul 09, 2018 1:17 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: Flashing on macOS

Post by MisterBiro »

basso88 wrote:
Tue Apr 02, 2019 1:27 am
Hi, I was wandering if anyone could do a walk through video of this. Ive never done any development in my life and reading through these messages is terrifyingly difficult to understand.
And with the amount of comments saying they are struggling to sort it out im wondering if i shouldn't do it?

Dom
If you follow the steps one by one you shouldn't have any issues. It really is pretty straight forward :)

Give it a go and see how you get on, and if you have any issues, we can help!

basso88
Posts: 2
Joined: Tue Apr 02, 2019 1:22 am
languages_spoken: english
ODROIDs: Odroid Go
Has thanked: 0
Been thanked: 0
Contact:

Re: Flashing on macOS

Post by basso88 »

Thank you!
All I really want to do is reduce screen tearing on some of the emulators. Im wondering if i just need to to the Go-Play firmware update to do that to be honest.
What do you think?

D

wirewire
Posts: 7
Joined: Wed Sep 11, 2019 1:32 pm
languages_spoken: english
ODROIDs: Odroid-Go
Has thanked: 0
Been thanked: 0
Contact:

Re: Flashing on macOS

Post by wirewire »

I followed your instruction step by step even with TimsWaster's advice to erase flash before flashing the new firmware after step testing port (python3 -m esptool --port /dev/cu.SLAB_USBtoUART flash_id). Every steps ran smoothly same as your outcome until final step --'flashing new firmware'! It kept trying to connect like "Connecting.....____....._____........______......______" and the LCD display kept blinking then failed. I got error message "A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header". I just couldn't figure out why the step that test port showed it connected ESP32 but unable to flash new firmware. Any clue? Thanks.

wirewire

crashoverride
Posts: 5841
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 640 times
Contact:

Re: Flashing on macOS

Post by crashoverride »

wirewire wrote:
Wed Sep 11, 2019 11:09 pm
It kept trying to connect like "Connecting.....____....._____........______......______" and the LCD display kept blinking then failed.
Try holding down the "Volume" button on the ODROID-GO until it connects (while the "....._____......." is being displayed). This button forces "bootloader" mode during power on or reset.

wirewire
Posts: 7
Joined: Wed Sep 11, 2019 1:32 pm
languages_spoken: english
ODROIDs: Odroid-Go
Has thanked: 0
Been thanked: 0
Contact:

Re: Flashing on macOS

Post by wirewire »

Bad luck! I've tried your suggestion by holding down "Volume' while Connecting ...._____....____ being displayed, but it is still couldn't connect to Go. I've attached a screenshot and hope somebody can help me to solve this issue. Thanks.
Screen Shot 2019-09-11 at 10.40.51 AM.png
Screen Shot 2019-09-11 at 10.40.51 AM.png (414.74 KiB) Viewed 18728 times
wirewire

crashoverride
Posts: 5841
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 640 times
Contact:

Re: Flashing on macOS

Post by crashoverride »

If the "Volume" button does not force the device to enter flashing mode, you will need to disconnect the battery and try the procedure again. Once successfully flashed, the battery can be reconnected.

wirewire
Posts: 7
Joined: Wed Sep 11, 2019 1:32 pm
languages_spoken: english
ODROIDs: Odroid-Go
Has thanked: 0
Been thanked: 0
Contact:

Re: Flashing on macOS

Post by wirewire »

Thanks for the tip. Unfortunately, it is still not working. Is it something wrong with firmware file or the setting such as 'flash_freq'? I used firmware odroid-go-firmware-20181001.img' and my flash_freq set as 40m. Thanks. Since I was unable to use python 3, since I got error message "No module named esptool". But I used python without such problem.

firewire

crashoverride
Posts: 5841
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 640 times
Contact:

Re: Flashing on macOS

Post by crashoverride »

The last suggestion I have is to try a slower baud rate. Replace "--baud 921600" with "--baud 115200".

The log shown indicates successful communication with the ODROID-GO (flash id). Since this process involved uploading a firmware stub, it eliminates many potential issues (the device appears to function properly).

The "......._______........" indicates the esptool attempting to reset the ESP32 processor and establish communications. Pressing the "Volume" button during reset is a guaranteed hardware method to establish flash mode since its physically connected to the processors bootstrap pin. The contents of the .img file do not matter. It will flash whatever the file contains without any regard to its contents.

The expected flash procedure is:
1) Turn the ODROID-GO off with the power switch.
2) Connect the USB cable.
3) Turn the ODROID-GO on with the power switch.
4) Issue the flash command (NOTE: DO NOT use the "flash_id" command prior to beginning this.) :

Code: Select all

python -m esptool --chip esp32 --port /dev/cu.SLAB_USBtoUART --baud 115200 write_flash --flash_mode dio --flash_freq 40m --flash_size detect 0 odroid-go-firmware-20181001.img
5) The device should flash and reset on its own.

If the above procedure fails, it could be a python library/version issue.

wirewire
Posts: 7
Joined: Wed Sep 11, 2019 1:32 pm
languages_spoken: english
ODROIDs: Odroid-Go
Has thanked: 0
Been thanked: 0
Contact:

Re: Flashing on macOS

Post by wirewire »

Hi, Crashoverride:
Thanks for the detail explanation and keep helping me one after one for my problem. Finally, I've got through. Without your help, I am not sure how much longer I would take to flash back the firmware to original state. BTW, I've awared there were two steps you taught are different from those time I failed. one is not to use the "flash_id" prior to final flashing process. Another is low the baud rate to "115200". Which one do you think is cause of my failure?

WireWire

crashoverride
Posts: 5841
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 640 times
Contact:

Re: Flashing on macOS

Post by crashoverride »

wirewire wrote:
Fri Sep 13, 2019 11:52 am
Which one do you think is cause of my failure?
My guess is that its a software issue on the computer. Older programs/libraries/drivers may lack the functionality to establish high speed baud rates.

wirewire
Posts: 7
Joined: Wed Sep 11, 2019 1:32 pm
languages_spoken: english
ODROIDs: Odroid-Go
Has thanked: 0
Been thanked: 0
Contact:

Re: Flashing on macOS

Post by wirewire »

Thanks CrashOverride, wish you have a great day.

WireWire

wirewire
Posts: 7
Joined: Wed Sep 11, 2019 1:32 pm
languages_spoken: english
ODROIDs: Odroid-Go
Has thanked: 0
Been thanked: 0
Contact:

Re: Flashing on macOS

Post by wirewire »

I've tried to upload some codes from Arduino Sketch and same problem happened again. I followed your last instruction and it works. After couple trying, I found an interesting outcome! The steps of turn off unit and disconnect USB from my mac is the key point! If I just turn off power without disconnecting and re-connecting, connection still failed. With these key steps, "lower baud rate" or "erase flash before flashing new firmware" seems not necessary to me. I am just curious about why without disconnect and re-connect after power turn cause connection failed? Thanks.

Paspartout
Posts: 48
Joined: Fri Dec 28, 2018 2:13 am
languages_spoken: english, german
ODROIDs: Odroid go
Has thanked: 11 times
Been thanked: 16 times
Contact:

Re: Flashing on macOS

Post by Paspartout »

I got a very similar problem on linux, where I have to frequently reconnect the odroid-go to my computer after flashing.
When trying to flash it gets stuck on the connecting part with the lcd of the go flashing, or when starting the monitor it wont display log messages at all until reconnection.
Lowering the baudrate makes the problem less frequent but not go away completely. I know I am not the only one experiencing this on linux.
It's a bit annoying when developing and flashing a lot but I kinda got used to it now.
Haven't tried if that also happens on windows. Maybe the linux/osx serial handling is different than that of windows.
Anyone developing on windows having a similar problem?

EDIT: Just tested it on windows and there it works without a problem. Most likely to be a linux issue for me then.

ducalex
Posts: 448
Joined: Sun May 19, 2019 3:29 am
languages_spoken: english, french
Has thanked: 82 times
Been thanked: 451 times
Contact:

Re: Flashing on macOS

Post by ducalex »

Paspartout wrote:
Sat Sep 14, 2019 5:33 pm
EDIT: Just tested it on windows and there it works without a problem. Most likely to be a linux issue for me then.
It happens on Windows as well. It is not frequent but it is consistent, once every ~10 uploads. Turning the GO on and off doesn't fix the issue but reconnecting the USB does. This suggests a design flaw in the GO related to the usb-serial chip is at least partially to blame for the screen flashing/upload failed issue we're all experiencing.

crashoverride
Posts: 5841
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 640 times
Contact:

Re: Flashing on macOS

Post by crashoverride »

ducalex wrote:
Sun Sep 15, 2019 3:46 am
Turning the GO on and off doesn't fix the issue but reconnecting the USB does.
The USB-UART chip is powered by the USB VBUS (host computer), not the ODROID-GO. Turning the GO on and off is not expected to alter or change USB UART operation. This is by design. Otherwise, the USB UART would needlessly drain the battery of the GO when its not connected to a computer.
ducalex wrote:
Sun Sep 15, 2019 3:46 am
This suggests a design flaw in the GO related to the usb-serial chip is at least partially to blame for the screen flashing/upload failed issue we're all experiencing.
The USB-UART design is the same circuit used in the official Espressif DEVKIT-C and many other ESP32 based devices. This design includes the use of UART DTS/RTS control pins to reset and set the flash mode bootstrap pin. The LCD display is also connected to this RESET circuit so it enters reset whenever the ESP32 does by design. The LCD backlight control pin (PWM/GPIO) also changes state during a reset of the ESP32. This combination produces the visual artifacts described and is expected operation.

During the course of development for go-play, I have flashed, re-flashed, and reset many ODROID-GOs countless times. I have never encountered any issues with the USB-UART on "metal" (non-virtualized). My development environments have included many different PCs that all run Ubuntu 16.04/18.04. When using a virtual machine, it is often necessary to use the "Volume" button to force flash mode. This appears to be due to a timing problem in esptool (software). I am not aware of any design changes or substitutions that would present a hardware related issue. The most likely cause of a baud rate issue is software: USB UART drivers/python/etc.

ducalex
Posts: 448
Joined: Sun May 19, 2019 3:29 am
languages_spoken: english, french
Has thanked: 82 times
Been thanked: 451 times
Contact:

Re: Flashing on macOS

Post by ducalex »

Thank you for the detailed explanation!

I think we can eliminate driver issues, the issue is present on (at least) three different OSes. We can also eliminate baudrate and software, the "make flash" command will use the same software and baud rate and parameters for all successful and failed attempts on a same machine.

The cp2104 seems to enter an invalid state (maybe caused by software or USB host incompatibility or chip bug) where it responds to control lines commands (reset), but RX/TX go unanswered until it is power cycled.

I have not had that issue on other boards using the same usb-serial and esp32 combo, but I can't say that I have done as much development on them as on the GO.

crashoverride
Posts: 5841
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 640 times
Contact:

Re: Flashing on macOS

Post by crashoverride »

The first place to look is "esptool" itself. Make sure a recent or current version is in use:
https://github.com/espressif/esptool

At the time of this writing, it has this to say about baud rate:

Code: Select all

Baud rate

The default esptool.py baud rate is 115200bps. Different rates may be set using -b 921600 (or another baudrate of your choice). A default baud rate can also be specified using the ESPTOOL_BAUD environment variable. This can speed up write_flash and read_flash operations.

The baud rate is limited to 115200 when esptool.py establishes the initial connection, higher speeds are only used for data transfers.

Most hardware configurations will work with -b 230400, some with -b 460800, -b 921600 and/or -b 1500000 or higher.

If you have connectivity problems then you can also set baud rates below 115200. You can also choose 74880, which is the usual baud rate used by the ESP8266 to output boot log information.
Since I have not seen any UART issues, I can not reproduce the issue for analysis. My guess is that its somehow timing related. Either the host computer does not delay long enough after changing baud rate, attempts to change baud rate while still transmitting (RX/TX FIFO), or is not allowing enough time for the ESP32 to recover from RESET.

[Edit]
Its important to note that the ESP32 module (WROVER) used in ODROID-GO has a larger flash than is found in other ESP32 modules. Additionally, it has PSRAM. This makes the module electrically different and may (or may not) result in slightly different performance characteristics (a capacitor may take longer or less time to charge/discharge due to the IO voltage difference). I am not stating this is an issue, rather that its something that anyone doing an analysis should be aware of.

wirewire
Posts: 7
Joined: Wed Sep 11, 2019 1:32 pm
languages_spoken: english
ODROIDs: Odroid-Go
Has thanked: 0
Been thanked: 0
Contact:

Re: Flashing on macOS

Post by wirewire »

Does the firmware 'MicroPhthon.fw' that under /odroid/firmware of SD card provide interface for user write codes from Odroid-Go directly? If so, I guess I have problem with my Odroid-Go. After flashing Odroid-Go firmware, the LCD display show 2 items (Go-Play & MicroPython) for me to choose. I have no problem with Go-Play. But, if I select the 'MicroPhthon', the process same as choosing 'Go-Play' at the beginning, but the display & unit complete shutdown at the end of process. I turned off power and turned it on again. LCD just on (with backlight) and nothing showed. Is it normal? Thanks.

WireWire

crashoverride
Posts: 5841
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 640 times
Contact:

Re: Flashing on macOS

Post by crashoverride »

wirewire wrote:
Mon Sep 16, 2019 12:31 pm
LCD just on (with backlight) and nothing showed. Is it normal?
It is normal for micropython to have a black screen unless you execute a program designed to use the LCD display. Access to micropython is performed via the USB cable.
https://wiki.odroid.com/odroid_go/micro ... epl_prompt

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 2 guests