Maix Bit misidentified as Maixduino

I just bought a Maix Bit board, and decided to try programming it with PlatformIO. I tried one of the Blink examples. In the directory platform-kendryte210/examples/arduino-blink, I ran:

pio run -t upload

And the summary at the end of the run is:

Environment           Status    Duration
--------------------  --------  ------------
sipeed-maix-go        FAILED    00:00:17.087
sipeed-maix-one-dock  FAILED    00:00:13.785
sipeed-maix-bit       FAILED    00:00:13.823
sipeed-maixduino      SUCCESS   00:00:05.809
==================== 3 failed, 1 succeeded in 00:00:50.505 ====================

So, in other words, my board failed to be identified as a Maix Bit, but it was successfully identified as a Maixduino, which it is not.

Any idea why this happened? Thanks!

This will try to compile and upload for all available environments. As the README tells you, you can specify an environment using the -e switch. What is the output for pio run -t upload -e sipeed-maixduino?

Sure, but why is it succeeding for sipeed-maixduino and failing for sipeed-maix-bit? I would have expected the exact opposite.

This is the output:

Processing sipeed-maixduino (platform: kendryte210; framework: arduino; board: sipeed-maixduino)
--------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/kendryte210/sipeed-maixduino.html
PLATFORM: Kendryte K210 1.1.1 > Sipeed MAIXDUINO
HARDWARE: K210 400MHz, 6MB RAM, 16MB Flash
DEBUG: Current (iot-bus-jtag) External (iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, sipeed-rv-debugger, tumpa)
PACKAGES: tool-kflash-kendryte210 0.9.1, tool-openocd-kendryte 1.203.1 (2.3), toolchain-kendryte210 8.2.0, framework-maixduino 0.3.9
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 14 compatible libraries
Scanning dependencies...
No dependencies
Checking size .pio/build/sipeed-maixduino/firmware.elf
Memory Usage -> http://bit.ly/pio-memory-usage
DATA:    [          ]   0.5% (used 32424 bytes from 6291456 bytes)
PROGRAM: [          ]   0.4% (used 68255 bytes from 16777216 bytes)
Configuring upload protocol...
AVAILABLE: iot-bus-jtag, jlink, kflash, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, sipeed-rv-debugger, tumpa
CURRENT: upload_protocol = kflash
Looking for upload port...
Auto-detected: /dev/ttyUSB0
Uploading .pio/build/sipeed-maixduino/firmware.bin
[INFO] COM Port Selected Manually:  /dev/ttyUSB0
[INFO] Default baudrate is 115200 , later it may be changed to the value you set.
[INFO] Trying to Enter the ISP Mode...
*
[INFO] Greeting Message Detected, Start Downloading ISP
[INFO] Selected Stage0 Baudrate:  1500000
[INFO] FT2232 mode
Downloading ISP: |=============================================| 100.0% 62kiB/s
[INFO] Booting From 0x80000000
[INFO] Wait For 0.1 second for ISP to Boot
[INFO] Boot to Flashmode Successfully
[INFO] Selected Baudrate:  1500000
[INFO] Baudrate changed, greeting with ISP again ...
[INFO] Boot to Flashmode Successfully
[INFO] Selected Flash:  On-Board
[INFO] Initialization flash Successfully
Programming BIN: |=============================================| 100.0% 55kiB/s
[INFO] Rebooting...
========================= [SUCCESS] Took 5.76 seconds =========================

Environment           Status    Duration
--------------------  --------  ------------
sipeed-maix-go        IGNORED
sipeed-maix-one-dock  IGNORED
sipeed-maix-bit       IGNORED
sipeed-maixduino      SUCCESS   00:00:05.756
========================= 1 succeeded in 00:00:05.756 =========================

Idk, could you post the full log for all these uploads so we can look into them.

So this is actually perfectly fine.

Sure, here is the full log:

Processing sipeed-maix-go (platform: kendryte210; framework: arduino; board: sipeed-maix-go)
--------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/kendryte210/sipeed-maix-go.html
PLATFORM: Kendryte K210 1.1.1 > Sipeed MAIX GO
HARDWARE: K210 400MHz, 6MB RAM, 16MB Flash
DEBUG: Current (iot-bus-jtag) External (iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, sipeed-rv-debugger, tumpa)
PACKAGES: tool-kflash-kendryte210 0.9.1, tool-openocd-kendryte 1.203.1 (2.3), toolchain-kendryte210 8.2.0, framework-maixduino 0.3.9
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 14 compatible libraries
Scanning dependencies...
No dependencies
Checking size .pio/build/sipeed-maix-go/firmware.elf
Memory Usage -> http://bit.ly/pio-memory-usage
DATA:    [          ]   0.5% (used 32456 bytes from 6291456 bytes)
PROGRAM: [          ]   0.4% (used 68247 bytes from 16777216 bytes)
Configuring upload protocol...
AVAILABLE: iot-bus-jtag, jlink, kflash, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, sipeed-rv-debugger, tumpa
CURRENT: upload_protocol = kflash
Looking for upload port...
Auto-detected: /dev/ttyUSB0
Uploading .pio/build/sipeed-maix-go/firmware.bin
[INFO] COM Port Auto Detected, Selected  /dev/ttyUSB1
[INFO] Default baudrate is 115200 , later it may be changed to the value you set.
[INFO] Trying to Enter the ISP Mode...
***************
Greeting fail, check serial port ([ERROR] No vaild Kendryte K210 found in Auto Detect, Check Your Connection or Specify One by`-p /dev/ttyUSB0`  )
*** [upload] Error 1
========================= [FAILED] Took 13.85 seconds =========================

Processing sipeed-maix-one-dock (platform: kendryte210; framework: arduino; board: sipeed-maix-one-dock)
--------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/kendryte210/sipeed-maix-one-dock.html
PLATFORM: Kendryte K210 1.1.1 > Sipeed MAIX ONE DOCK
HARDWARE: K210 400MHz, 6MB RAM, 16MB Flash
DEBUG: Current (iot-bus-jtag) External (iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, sipeed-rv-debugger, tumpa)
PACKAGES: tool-kflash-kendryte210 0.9.1, tool-openocd-kendryte 1.203.1 (2.3), toolchain-kendryte210 8.2.0, framework-maixduino 0.3.9
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 14 compatible libraries
Scanning dependencies...
No dependencies
Checking size .pio/build/sipeed-maix-one-dock/firmware.elf
Memory Usage -> http://bit.ly/pio-memory-usage
DATA:    [          ]   0.5% (used 32456 bytes from 6291456 bytes)
PROGRAM: [          ]   0.4% (used 68247 bytes from 16777216 bytes)
Configuring upload protocol...
AVAILABLE: iot-bus-jtag, jlink, kflash, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, sipeed-rv-debugger, tumpa
CURRENT: upload_protocol = kflash
Looking for upload port...
Auto-detected: /dev/ttyUSB0
Uploading .pio/build/sipeed-maix-one-dock/firmware.bin
[INFO] COM Port Selected Manually:  /dev/ttyUSB0
[INFO] Default baudrate is 115200 , later it may be changed to the value you set.
[INFO] Trying to Enter the ISP Mode...
...............
Greeting fail, check serial port ([ERROR] No vaild Kendryte K210 found in Auto Detect, Check Your Connection or Specify One by`-p /dev/ttyUSB0`  )
*** [upload] Error 1
========================= [FAILED] Took 13.83 seconds =========================

Processing sipeed-maix-bit (platform: kendryte210; framework: arduino; board: sipeed-maix-bit)
--------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/kendryte210/sipeed-maix-bit.html
PLATFORM: Kendryte K210 1.1.1 > Sipeed MAIX BiT
HARDWARE: K210 400MHz, 6MB RAM, 16MB Flash
DEBUG: Current (iot-bus-jtag) External (iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, sipeed-rv-debugger, tumpa)
PACKAGES: tool-kflash-kendryte210 0.9.1, tool-openocd-kendryte 1.203.1 (2.3), toolchain-kendryte210 8.2.0, framework-maixduino 0.3.9
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 14 compatible libraries
Scanning dependencies...
No dependencies
Checking size .pio/build/sipeed-maix-bit/firmware.elf
Memory Usage -> http://bit.ly/pio-memory-usage
DATA:    [          ]   0.5% (used 32456 bytes from 6291456 bytes)
PROGRAM: [          ]   0.4% (used 68247 bytes from 16777216 bytes)
Configuring upload protocol...
AVAILABLE: iot-bus-jtag, jlink, kflash, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, sipeed-rv-debugger, tumpa
CURRENT: upload_protocol = kflash
Looking for upload port...
Auto-detected: /dev/ttyUSB0
Uploading .pio/build/sipeed-maix-bit/firmware.bin
[INFO] COM Port Selected Manually:  /dev/ttyUSB0
[INFO] Default baudrate is 115200 , later it may be changed to the value you set.
[INFO] Trying to Enter the ISP Mode...
...............
Greeting fail, check serial port ([ERROR] No vaild Kendryte K210 found in Auto Detect, Check Your Connection or Specify One by`-p /dev/ttyUSB0`  )
*** [upload] Error 1
========================= [FAILED] Took 13.77 seconds =========================

Processing sipeed-maixduino (platform: kendryte210; framework: arduino; board: sipeed-maixduino)
--------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/kendryte210/sipeed-maixduino.html
PLATFORM: Kendryte K210 1.1.1 > Sipeed MAIXDUINO
HARDWARE: K210 400MHz, 6MB RAM, 16MB Flash
DEBUG: Current (iot-bus-jtag) External (iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, sipeed-rv-debugger, tumpa)
PACKAGES: tool-kflash-kendryte210 0.9.1, tool-openocd-kendryte 1.203.1 (2.3), toolchain-kendryte210 8.2.0, framework-maixduino 0.3.9
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 14 compatible libraries
Scanning dependencies...
No dependencies
Checking size .pio/build/sipeed-maixduino/firmware.elf
Memory Usage -> http://bit.ly/pio-memory-usage
DATA:    [          ]   0.5% (used 32424 bytes from 6291456 bytes)
PROGRAM: [          ]   0.4% (used 68255 bytes from 16777216 bytes)
Configuring upload protocol...
AVAILABLE: iot-bus-jtag, jlink, kflash, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, sipeed-rv-debugger, tumpa
CURRENT: upload_protocol = kflash
Looking for upload port...
Auto-detected: /dev/ttyUSB0
Uploading .pio/build/sipeed-maixduino/firmware.bin
[INFO] COM Port Selected Manually:  /dev/ttyUSB0
[INFO] Default baudrate is 115200 , later it may be changed to the value you set.
[INFO] Trying to Enter the ISP Mode...
*
[INFO] Greeting Message Detected, Start Downloading ISP
[INFO] Selected Stage0 Baudrate:  1500000
[INFO] FT2232 mode
Downloading ISP: |=============================================| 100.0% 61kiB/s
[INFO] Booting From 0x80000000
[INFO] Wait For 0.1 second for ISP to Boot
[INFO] Boot to Flashmode Successfully
[INFO] Selected Baudrate:  1500000
[INFO] Baudrate changed, greeting with ISP again ...
[INFO] Boot to Flashmode Successfully
[INFO] Selected Flash:  On-Board
[INFO] Initialization flash Successfully
Programming BIN: |=============================================| 100.0% 55kiB/s
[INFO] Rebooting...
========================= [SUCCESS] Took 5.83 seconds =========================

Environment           Status    Duration
--------------------  --------  ------------
sipeed-maix-go        FAILED    00:00:13.848
sipeed-maix-one-dock  FAILED    00:00:13.830
sipeed-maix-bit       FAILED    00:00:13.775
sipeed-maixduino      SUCCESS   00:00:05.830
==================== 3 failed, 1 succeeded in 00:00:47.282 ====================

Is it? I assume that the Maix Bit and Maixduino have slightly different hardware, so if I use sipeed-maixduino to develop for my Maix Bit, presumably I’ll run into failures on some peripherals? Even on the blink example, it is not blinking the LED on my board. (Presumably because the Maix Bit has the built-in LED on a different pin than the Maixduino.)

Oh sorry I mixed up the boards. Actually I want to see why the Maix Bit upload fails, not the maixduino. What does just pio run -t upload -e sipeed-maix-bit output?

Here is the output for sipeed-maix-bit:

Processing sipeed-maix-bit (platform: kendryte210; framework: arduino; board: sipeed-maix-bit)
--------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/kendryte210/sipeed-maix-bit.html
PLATFORM: Kendryte K210 1.1.1 > Sipeed MAIX BiT
HARDWARE: K210 400MHz, 6MB RAM, 16MB Flash
DEBUG: Current (iot-bus-jtag) External (iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, sipeed-rv-debugger, tumpa)
PACKAGES: tool-kflash-kendryte210 0.9.1, tool-openocd-kendryte 1.203.1 (2.3), toolchain-kendryte210 8.2.0, framework-maixduino 0.3.9
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 14 compatible libraries
Scanning dependencies...
No dependencies
Checking size .pio/build/sipeed-maix-bit/firmware.elf
Memory Usage -> http://bit.ly/pio-memory-usage
DATA:    [          ]   0.5% (used 32456 bytes from 6291456 bytes)
PROGRAM: [          ]   0.4% (used 68247 bytes from 16777216 bytes)
Configuring upload protocol...
AVAILABLE: iot-bus-jtag, jlink, kflash, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, sipeed-rv-debugger, tumpa
CURRENT: upload_protocol = kflash
Looking for upload port...
Auto-detected: /dev/ttyUSB0
Uploading .pio/build/sipeed-maix-bit/firmware.bin
[INFO] COM Port Selected Manually:  /dev/ttyUSB0
[INFO] Default baudrate is 115200 , later it may be changed to the value you set.
[INFO] Trying to Enter the ISP Mode...
...............
Greeting fail, check serial port ([ERROR] No vaild Kendryte K210 found in Auto Detect, Check Your Connection or Specify One by`-p /dev/ttyUSB0`  )
*** [upload] Error 1
========================= [FAILED] Took 13.86 seconds =========================

Environment           Status    Duration
--------------------  --------  ------------
sipeed-maix-go        IGNORED
sipeed-maix-one-dock  IGNORED
sipeed-maix-bit       FAILED    00:00:13.859
sipeed-maixduino      IGNORED
==================== 1 failed, 0 succeeded in 00:00:13.859 ====================

Suspicious.

The burn_tool is used for telling the flasher tool which type of dev board to flash.

Now the tool says

  -B BOARD, --Board BOARD
                        Select dev board, e.g. kd233, dan, bit, goD, goE or
                        trainer

Then why has the sipeed-maix-bit.json set dan as the board type and not bit?

Can you go into your PIO home folder (that is ~/.platformio/), then open the file \platforms\kendryte210\boards\sipeed-maix-bit.json and edit the burn_tool entry to bit and retry uploading using pio run -t upload -e sipeed-maix-bit?

Also are you perfectly sure you have a Maix Bit or a Maix Bit with a microphone? Because if you have one with a mic, it’s the same as the Maixduino and would totally explain why flashing works…

So if you bought it from https://www.seeedstudio.com/Sipeed-MAix-BiT-for-RISC-V-AI-IoT-p-2872.html you actually have to use board = sipeed-maix-bit-mic!

1 Like

Yes, that explains everything! Thank you!

If I set the board to sipeed-maix-bit-mic, it uploads successfully. And now the LED is blinking properly, as well. (Versus using sipeed-maixduino, where it uploaded successfully, but didn’t blink.)

1 Like