Locally-Built Firmware: Pre-Requisites
Locally-Built Firmware: Pre-Requisites
Pre-requisites
The following packages support the build process. Some of these packages are often installed with the
base image.
sudo apt install git cmake build-essential xz-utils python3 python3-serial wget zip
./BUILD.sh
The option to use multiple threads was skipped inadvertently. The option is -jN where N is the number
of threads.
Flash the firmware
Flash the firmware to the board from the current working directory with the following command:
./kflash.py -p /dev/ttyUSB0 -b 2000000 -t MaixPy.bin
The flash operation failed because the K210 was not detected. Two USB ports are detected as shown
below. Two different USB Type-C cables were used. Both cables work with Pixel 2XL with the same
desktop environment.
The motherboard is ASUS Prime H370M-PLUS CSM that has a USB 3.1 Gen 1 TypeC port. The
ASUS user manual states that this is a 24-pin USB port for Type C devices. The Maixduino has been
connected directly to this port as well as through a USB 2.0 port with a TypeC pin at one end.
https://dlcdnets.asus.com/pub/ASUS/mb/LGA1151/PRIME_H370M-PLUS/E13887_PRIME_H370M-
PLUS_UM_WEB.PDF
The OS is Ubuntu 19.04 with all update/upgrade completed prior to building the firmware locally.
reza@BeUlta:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 19.04
Release: 19.04
Codename: disco
reza@BeUlta:~$ uname -a
Linux BeUlta 5.0.0-25-generic #26-Ubuntu SMP Thu Aug 1 12:04:58 UTC 2019 x86_64
x86_64 x86_64 GNU/Linux
reza@BeUlta:~$
reza@BeUlta:~$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 007: ID 0c45:0133 Microdia
Bus 001 Device 016: ID 2341:0043 Arduino SA Uno R3 (CDC ACM)
Bus 001 Device 020: ID 0403:6010 Future Technology Devices International, Ltd
FT2232C/D/H Dual UART/FIFO IC
Bus 001 Device 015: ID 2341:0043 Arduino SA Uno R3 (CDC ACM)
Bus 001 Device 014: ID 046d:0990 Logitech, Inc. QuickCam Pro 9000
Bus 001 Device 013: ID 05e3:0607 Genesys Logic, Inc. Logitech G110 Hub
Bus 001 Device 012: ID 2341:0043 Arduino SA Uno R3 (CDC ACM)
Bus 001 Device 011: ID 2341:804e Arduino SA
Bus 001 Device 010: ID 0483:374b STMicroelectronics ST-LINK/V2.1
Bus 001 Device 009: ID 05e3:0607 Genesys Logic, Inc. Logitech G110 Hub
Bus 001 Device 008: ID 04d9:a09f Holtek Semiconductor, Inc. E-Signal LUOM G10
Mechanical Gaming Mouse
Bus 001 Device 021: ID 18d1:4ee1 Google Inc. Nexus Device (MTP)
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
reza@BeUlta:~$
Bus 001 Device 022: ID 0403:6010 Future Technology Devices International, Ltd
FT2232C/D/H Dual UART/FIFO IC
Bus 001 Device 022: ID 0403:6010 Future Technology Devices International, Ltd
FT2232C/D/H Dual UART/FIFO IC
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x0403 Future Technology Devices International, Ltd
idProduct 0x6010 FT2232C/D/H Dual UART/FIFO IC
bcdDevice 5.00
iManufacturer 1 Kongou Hikari
iProduct 2 Sipeed-Debug
iSerial 3 01525E7649
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0037
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x04 EP 4 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Device Status: 0x0000
(Bus Powered)