Skip to content

Instantly share code, notes, and snippets.

@up-n-atom
Last active April 22, 2023 02:23
Show Gist options
  • Select an option

  • Save up-n-atom/f9a5f3ee5e1e39b89d7f1cdd52d97996 to your computer and use it in GitHub Desktop.

Select an option

Save up-n-atom/f9a5f3ee5e1e39b89d7f1cdd52d97996 to your computer and use it in GitHub Desktop.

Compile MicroPython for the WEMOS W600-PICO on Fedora Workstation 37

micropython/micropython#4679

toolbox create
toolbox enter
sudo dnf install arm-none-eabi-gcc arm-none-eabi-newlib make gcc
mkdir w600 && cd $_
wget http://winnermicro.com/upload/1/editor/1584693446529.zip
unzip 1584693446529.zip -d ./sdk
rm 1584693446529.zip
export WMSDK_PATH=$PWD/sdk
mkdir -p $WMSDK_PATH/Src/Wlan && touch $_/empty
git clone --single-branch --branch w60x https://github.com/robert-hh/micropython.git
cd micropython/ports/w60x
make submodules
ln -fs ../../../lib/micropython-lib/micropython/drivers/storage/sdcard/sdcard.py scripts/sdcard.py
make
exit

Fix pyboard.py and subsequently mpremote error

Error: could not enter raw repl

diff --git a/tools/pyboard.py b/tools/pyboard.py
index 9e0b0f18e..ccc52cafe 100755
--- a/tools/pyboard.py
+++ b/tools/pyboard.py
@@ -342,7 +342,11 @@ class Pyboard:
         return data
 
     def enter_raw_repl(self, soft_reset=True):
-        self.serial.write(b"\r\x03\x03")  # ctrl-C twice: interrupt any running program
+        # ctrl-C twice: interrupt any running program
+        self.serial.write(b"\rx03")
+        time.sleep(0.1)
+        self.serial.write(b'\x03')
+        time.sleep(0.1)
 
         # flush input (without relying on serial.flushInput())
         n = self.serial.inWaiting()
git apply raw_repl.patch

Stop Running Container

toolbox list
# podman ps
podman stop <container-name>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment