Amazon FreeRTOS Workshop

Logo

Amazon Freertos workshop using the M5 StickC

View the Project on GitHub onsankawai/amazon-freertos-m5stickc-workshop

Flashing Amazon FreeRTOS compiled firmware to your M5STICKC (ESP32)

  1. Download and install Silicon Labs CP2104 drivers

  2. Connect your ESP32 DevKitC board to the laptop using provided USB cable and identify which port it is connected to On Windows it will be COM3 for example, on Mac OS typically it enumerated as /dev/cu.usbserial-XXXXXXXX (check ls /dev/cu.*) and on Linux most likely /dev/ttyUSB0

  3. Install esptool and flash the firware

Windows

Mac/Linux

cd [THE FOLDER WHERE YOU DOWNLOADED THE 3 FILES IN PREVIOUS STEP]
esptool.py --chip esp32 --port /dev/cu.usbserial-XXXXXXXX --baud 115200 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x1000 bootloader.bin 0x20000 aws_demo.bin 0x8000 partition-table.bin
  1. Monitor the flashing process:
bash-3.2$ esptool.py --chip esp32 --port /dev/cu.usbserial-XXXXXXXX --baud 115200 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x1000 bootloader.bin 0x20000 aws_demo.bin 0x8000 partition-table.bin
esptool.py v2.5.1
Serial port /dev/cu.usbserial-XXXXXXXX
Connecting........__
Chip is ESP32D0WDQ5 (revision 1)
Features: WiFi, BT, Dual Core
MAC: 24:0a:c4:23:de:7c
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 115200
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Flash params set to 0x0220
Compressed 21936 bytes to 13046...
Wrote 21936 bytes (13046 compressed) at 0x00001000 in 0.2 seconds (effective 1145.0 kbit/s)...
Hash of data verified.
Compressed 628432 bytes to 398564...
Wrote 628432 bytes (398564 compressed) at 0x00020000 in 5.9 seconds (effective 854.5 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 119...
Wrote 3072 bytes (119 compressed) at 0x00008000 in 0.0 seconds (effective 3255.9 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
  1. Monitor code execution through the serial console

Windows

5.1.1 Install PuTTY

5.1.2 Run Installation wizard

Install PuTTY

5.1.3 Check all options

PuTTY Wizard

5.1.4 Setup the port and speed (Port COM3 and 115200 in our case)

PuTTY setup port

5.1.5 Open console access to ESP32

PuTTY Console

Mac/Linux

5.2.1 Use screen command to see the ESP32 console:

screen /dev/cu.usbserial-XXXXXXXX 115200

5.2.2 In order to exit screen press Ctrl + A and then K

Next Step

BACK