Git Product home page Git Product logo

platform-kendryte210's Introduction

platform-kendryte210

Build Status

Usage

  1. Install PlatformIO
  2. Create PlatformIO project and configure a platform option in platformio.ini file:

Stable version

[env:stable]
platform = kendryte210
board = ...
...

Development version

[env:development]
platform = https://github.com/sipeed/platform-kendryte210.git
board = ...
...

Configuration

Please navigate to documentation.

platform-kendryte210's People

Contributors

bitsk avatar fefr avatar ivankravets avatar mikljohansson avatar nmaitland avatar valeros avatar xmeow avatar zepan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

platform-kendryte210's Issues

platformio - Problem with maix one dock(k210) in debug using openocd

image
as you see,when i tried to debug this k210 board and cpu halted on “main”,the REGISTER list in the left got all zero,and the logs showed below said “Warn : Got exception 0xffffffff when reading csr0”.

this is my platform.ini

[env:sipeed-maix-one-dock] platform = kendryte210 board = sipeed-maix-one-dock framework = kendryte-standalone-sdk monitor_speed = 115200 debug_tool = sipeed-rv-debugger extra_scripts = post:extra_script.py

@ivankravets has submitted an issue kendryte/kendryte-gnu-toolchain#8 (comment) ,which i thougt was related to this

Problems running the debugger

I cannot use the sipeed-rv-debugger to debug my MaixDock.
It outputs the following in the debug console:

 _  __              _            _     
| |/ /___ _ __   __| |_ __ _   _| |_ ___  
| ' // _ \ '_ \ / _` | '__| | | | __/ _ \ 
| . \  __/ | | | (_| | |  | |_| | ||  __/ 
|_|\_\___|_| |_|\__,_|_|   \__, |\__\___| 
                           |___/          
Kendryte Open On-Chip Debugger For RISC-V v0.2.3 (2019-02-21)
Licensed under GNU GPL v2
ftdi samples TDO on falling edge of TCK
adapter speed: 1000 kHz
riscv.cpu
Info : tcl server disabled
Info : telnet server disabled
Info : clock speed 1000 kHz
Info : JTAG tap: riscv.cpu tap/device found: 0xfe030713 (mfg: 0x389 (Lantiq Deutschland GmbH), part: 0xe030, ver: 0xf)
Warn : JTAG tap: riscv.cpu       UNEXPECTED: 0xfe030713 (mfg: 0x389 (Lantiq Deutschland GmbH), part: 0xe030, ver: 0xf)
Error: JTAG tap: riscv.cpu  expected 1 of 1: 0x04e4796b (mfg: 0x4b5 (<unknown>), part: 0x4e47, ver: 0x0)
Error: Trying to use configured scan chain anyway...
Warn : Bypassing JTAG setup events due to errors
Error: dtmcontrol is 0. Check JTAG connectivity/board power.
Info : accepting 'gdb' connection from pipe
openocd: src/target/riscv/riscv.c:1496: riscv_xlen_of_hart: Assertion `r->xlen[hartid] != -1' failed.
Aborted (core dumped)
.pioinit:13: Error in sourced command file:
Remote connection closed

I checked the connection multiple times they seem to be ok.
platform.ini :

[env:sipeed-maix-one-dock]
platform = https://github.com/sipeed/platform-kendryte210.git
board = sipeed-maix-one-dock
framework = kendryte-freertos-sdk
upload_protocol = kflash
debug_tool = sipeed-rv-debugger

Operating System: Ubuntu 18.10

Sipeed Maix Amigo board support

Seeed Studio is now shipping the Sipeed Maix Amigo devices. These are powered via the Kendryte K210 (like the other Maix devices)

Platform information

  • SoC – Kendryte K210 Dual-core 64-bit RISC-V (RV64GC) processor with FPU @ 400 MHz (overclockable to 500MHz), 8MB SRAM, built-in AI accelerators for video and audio
  • Storage – 16MB Flash, MicroSD card slot up
  • Display – 3.5-inch TFT capacitive touch screen display with 480×320 resolution
  • Camera
    • VGA front-facing camera up to 30 fps (GC0328 sensor)
    • VGA rear camera up to 60 fps (OV7740 sensor)
  • Audio – 6+1 microphone array
  • USB – 1x USB Type-C port for power and programming
  • Expansion
    • 3x Grove ports with I2C, GPIO, etc…
    • 3x 8-pin SP-MOD headers with GPIOs, 3.3V, and GND signals; compatible with ESP-01 ESP8266 WiFi module, PSRAM modules, etc…
  • Sensor – Accelerometer
  • Misc – Reset button, 3x function buttons, 3x LEDs
  • Battery – 520 mAh Lithium battery
  • Power Supply – Via USB-C port
  • Dimensions – 104.3 x 63.3 x 16.5mm

It looks like Sipeed has done "something" here for platformio. Guessing it wasn't upstreamed
https://dl.sipeed.com/MAIX/platformio/dl-packages

Cannot Blink Built-in LED with Basic Example Code

  • Desktop: Ubuntu 19.04
  • IDE: Arduino 1.8.9
  • Kendryte K210 library: ?
  • Board: Sipeed Maixduino

Upload displays Done Saving, on-board LED blinks during process but no steady blink that occurs when code is running. Still cannot blink built-in LED (pin # 13?). Is there a checklist that I can follow to ensure that I have not omitted any step?

Thanks.

Output pane is hung with:

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: |==============================================================================================================================================================================================================================-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| 50.0% 52kiB/s

Programming BIN: |=============================================================================================================================================================================================================================================================================================================================================================================================================================================================| 100.0% 54kiB/s
[INFO] Rebooting... 

There is nothing visible occurring after the last line is posted in the Output pane.

There should be some documentation somewhere but somehow owing to my inexperience I don't know where to find it. Please help me. I would like to test the Sipeed Maixduino board with beginner's examples.

Kind regards.

Spaces in path causes build errors (kendryte210)

Hi everyone!!!

I'm using Platformio (version 4.0.3) with Vscode for Kendryte210 platform under Windows 10.

I've tried to run a blink example, but it comes to an error. There is a space character in my user folder ("BISMARK COTRIM") and I think that it´s the same problem describe here: https://community.platformio.org/t/spaces-in-path-vscode-platformio/4358/8

That is the output of pio run -v is:

Processing sipeed-maix-go (platform: kendryte210; framework: arduino; board: sipeed-maix-go; monitor_speed: 115200)

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: 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 18 compatible libraries
Scanning dependencies...
No dependencies
riscv64-unknown-elf-g++ -o .pio\build\sipeed-maix-go\firmware.elf -T C:\Users\BISMARK COTRIM.platformio\packages\framework-maixduino\cores\arduino\kendryte-standalone-sdk\lds\kendryte.ld -nostartfiles -static -Wl,--gc-sections -Wl,-static -Wl,--start-group -Wl,--whole-archive -Wl,--no-whole-archive -Wl,--end-group -Wl,-EL -Wl,--no-relax -Wl,--start-group -lc -lgcc -lm -Wl,--end-group .pio\build\sipeed-maix-go\src\Blink.cpp.o -L.pio\build\sipeed-maix-go -Wl,--start-group .pio\build\sipeed-maix-go\libFrameworkArduinoVariant.a .pio\build\sipeed-maix-go\libFrameworkArduino.a -lc -lgcc -lm -Wl,--end-group
riscv64-unknown-elf-g++: error: COTRIM.platformio\packages\framework-maixduino\cores\arduino\kendryte-standalone-sdk\lds\kendryte.ld: No such file or directory
*** [.pio\build\sipeed-maix-go\firmware.elf] Error 1
======================================================= [FAILED] Took 2.40 seconds =======================================================
(base) PS C:\Users\BISMARK COTRIM\Documents\PlatformIO\Projects\191026-171011-arduino-blink>

pio_update
pio_run

Could you help me with this error?

Thank you!

Debugging configuration

I see you added debugging configuration for all boards. Do they really have FTDI + JLink on-board debugging probes?

Maix Bit with Sipeed USB-JTAG/TTL RISC-V Debugger

I've a problem with debugging Maix Bit board using openocd. I'm using PlatformIO with Kendryte Standalone SDK.

OS: Ubuntu 18.04

k210 platform:Sipeed MaiX BiT with Mic
https://docs.platformio.org/en/latest/boards/kendryte210/sipeed-maix-bit-mic.html#board-kendryte210-sipeed-maix-bit-mic

debugger:Sipeed USB-JTAG/TTL RISC-V Debugger

platformio.ini
[env:sipeed-maix-bit-mic]
platform = kendryte210
board = sipeed-maix-bit-mic
framework = kendryte-standalone-sdk
debug_tool = sipeed-rv-debugger
upload_protocol = kflash

After "Started debugging":
`Processing sipeed-maix-bit-mic (platform: kendryte210; board: sipeed-maix-bit-mic; framework: kendryte-standalone-sdk)

Verbose mode can be enabled via -v, --verbose option
CONFIGURATION: https://docs.platformio.org/page/boards/kendryte210/sipeed-maix-bit-mic.html
PLATFORM: Kendryte K210 1.2.1 > Sipeed MAIX BiT with Mic
HARDWARE: K210 400MHz, 6MB RAM, 16MB Flash
DEBUG: Current (sipeed-rv-debugger) 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:

  • framework-kendryte-standalone-sdk 0.5.6
  • toolchain-kendryte210 8.2.0
    LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
    LDF Modes: Finder ~ chain, Compatibility ~ soft
    Found 0 compatible libraries
    Scanning dependencies...
    No dependencies
    Building in debug mode
    Checking size .pio/build/sipeed-maix-bit-mic/firmware.elf
    Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
    RAM: [ ] 0.5% (used 31432 bytes from 6291456 bytes)
    Flash: [ ] 0.5% (used 79094 bytes from 16777216 bytes)
    ========================= [SUCCESS] Took 0.90 seconds =========================
    Reading symbols from /home/user/Documents/PlatformIO/Projects/test-proj/.pio/build/sipeed-maix-bit-mic/firmware.elf...
    done.
    PlatformIO Unified Debugger -> http://bit.ly/pio-debug
    PlatformIO: debug_tool = sipeed-rv-debugger
    PlatformIO: Initializing remote target...

| |/ /___ _ __ | | __ _ | | ___
| ' // _ \ '
\ / _| '__| | | | __/ _ \ | . \ __/ | | | (_| | | | |_| | || __/ |_|\_\___|_| |_|\__,_|_| \__, |\__\___| |___/ Kendryte Open On-Chip Debugger For RISC-V v0.2.3 (2019-02-21) Licensed under GNU GPL v2 ftdi samples TDO on falling edge of TCK adapter speed: 1000 kHz riscv.cpu Info : tcl server disabled Info : telnet server disabled Info : clock speed 1000 kHz Info : TAP riscv.cpu does not have valid IDCODE (idcode=0xa0d746c) Info : TAP auto0.tap does not have valid IDCODE (idcode=0x506ba36) Info : JTAG tap: auto1.tap tap/device found: 0x02835d1b (mfg: 0x68d (<unknown>), part: 0x2835, ver: 0x0) Info : JTAG tap: auto2.tap tap/device found: 0x1c1cda59 (mfg: 0x52c (<unknown>), part: 0xc1cd, ver: 0x1) Info : JTAG tap: auto3.tap tap/device found: 0x881e585b (mfg: 0x42d (Nuvoton), part: 0x81e5, ver: 0x8) Info : TAP auto4.tap does not have valid IDCODE (idcode=0x1d5cd95c) Info : TAP auto5.tap does not have valid IDCODE (idcode=0x8eae6cae) Info : JTAG tap: auto6.tap tap/device found: 0xc7573657 (mfg: 0x32b (Solomon Systech Limited), part: 0x7573, ver: 0xc) Info : TAP auto7.tap does not have valid IDCODE (idcode=0x40a0d746) Info : JTAG tap: auto8.tap tap/device found: 0x20506ba3 (mfg: 0x5d1 (<unknown>), part: 0x0506, ver: 0x2) Info : JTAG tap: auto9.tap tap/device found: 0x63839b4b (mfg: 0x5a5 (<unknown>), part: 0x3839, ver: 0x6) Info : JTAG tap: auto10.tap tap/device found: 0x9103cb0b (mfg: 0x585 (<unknown>), part: 0x103c, ver: 0x9) Info : JTAG tap: auto11.tap tap/device found: 0x63ab9b2b (mfg: 0x595 (<unknown>), part: 0x3ab9, ver: 0x6) Info : JTAG tap: auto12.tap tap/device found: 0x20506ba3 (mfg: 0x5d1 (<unknown>), part: 0x0506, ver: 0x2) Info : JTAG tap: auto13.tap tap/device found: 0x63839b4b (mfg: 0x5a5 (<unknown>), part: 0x3839, ver: 0x6) Info : JTAG tap: auto14.tap tap/device found: 0x9103cb0b (mfg: 0x585 (<unknown>), part: 0x103c, ver: 0x9) Info : JTAG tap: auto15.tap tap/device found: 0x63ab9b2b (mfg: 0x595 (<unknown>), part: 0x3ab9, ver: 0x6) Info : JTAG tap: auto16.tap tap/device found: 0x20506ba3 (mfg: 0x5d1 (<unknown>), part: 0x0506, ver: 0x2) Info : JTAG tap: auto17.tap tap/device found: 0x63839b4b (mfg: 0x5a5 (<unknown>), part: 0x3839, ver: 0x6) Info : JTAG tap: auto18.tap tap/device found: 0x9103cb0b (mfg: 0x585 (<unknown>), part: 0x103c, ver: 0x9) Info : JTAG tap: auto19.tap tap/device found: 0x63ab9b2b (mfg: 0x595 (<unknown>), part: 0x3ab9, ver: 0x6) Warn : Unexpected idcode after end of chain: 517 0x839b4b23 Warn : Unexpected idcode after end of chain: 549 0x03cb0b63 Warn : Unexpected idcode after end of chain: 581 0xab9b2b91 Warn : Unexpected idcode after end of chain: 613 0x506ba363 Error: double-check your JTAG setup (interface, speed, ...) Error: Trying to use configured scan chain anyway... Error: riscv.cpu: IR capture error; saw 0x04 not 0x01 Warn : Bypassing JTAG setup events due to errors Error: Unsupported DTM version 4. (dtmcontrol=0x70736964) Info : accepting 'gdb' connection from pipe openocd: src/target/riscv/riscv.c:1496: riscv_xlen_of_hart: Assertionr->xlen[hartid] != -1' failed.
Aborted (core dumped)
.pioinit:13: Error in sourced command file:
Remote connection closed
`

  1. Hardware connections verified, debugger board <> Maix board using multimeter.
  2. Board is working. Tested with kflash tool.
  3. Additionally, compiled Kendryte Openocd independently, directly from the sources. The same issue. Detailed logs below.
  4. Tried to reduce speed by using "adapter_khz 1000", the same..

More detailed debug from point 3 with debug_level set to 3.
`openocd -f ~/.platformio/packages/tool-openocd-kendryte/share/openocd/scripts/interface/ftdi/sipeed-rv-debugger.cfg -c "adapter_khz 1000" -d


| |/ /___ _ __ | | __ _ | | ___
| ' // _ \ '
\ / _| '__| | | | __/ _ \ | . \ __/ | | | (_| | | | |_| | || __/ |_|\_\___|_| |_|\__,_|_| \__, |\__\___| |___/ Kendryte Open On-Chip Debugger For RISC-V v0.2.3 (2019-02-21) Licensed under GNU GPL v2 User : 13 1 command.c:544 command_print(): debug_level: 3 Debug: 14 1 options.c:188 add_default_dirs(): bindir=/usr/local/bin Debug: 15 1 options.c:189 add_default_dirs(): pkgdatadir=/usr/local/share/openocd Debug: 16 1 options.c:190 add_default_dirs(): exepath=/usr/local/bin Debug: 17 1 options.c:191 add_default_dirs(): bin2data=../share/openocd Debug: 18 1 configuration.c:42 add_script_search_dir(): adding /home/user/.openocd Debug: 19 1 configuration.c:42 add_script_search_dir(): adding /usr/local/bin/../share/openocd/site Debug: 20 1 configuration.c:42 add_script_search_dir(): adding /usr/local/bin/../share/openocd/scripts Debug: 21 1 configuration.c:82 find_file(): found /home/user/.platformio/packages/tool-openocd-kendryte/share/openocd/scripts/interface/ftdi/sipeed-rv-debugger.cfg Debug: 22 1 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_interface ftdi Debug: 23 1 command.c:143 script_debug(): command - interface ocd_interface ftdi Debug: 25 1 command.c:364 register_command_handler(): registering 'ocd_ftdi_device_desc'... Debug: 26 1 command.c:364 register_command_handler(): registering 'ocd_ftdi_serial'... Debug: 27 1 command.c:364 register_command_handler(): registering 'ocd_ftdi_location'... Debug: 28 1 command.c:364 register_command_handler(): registering 'ocd_ftdi_channel'... Debug: 29 1 command.c:364 register_command_handler(): registering 'ocd_ftdi_layout_init'... Debug: 30 1 command.c:364 register_command_handler(): registering 'ocd_ftdi_layout_signal'... Debug: 31 1 command.c:364 register_command_handler(): registering 'ocd_ftdi_set_signal'... Debug: 32 1 command.c:364 register_command_handler(): registering 'ocd_ftdi_get_signal'... Debug: 33 1 command.c:364 register_command_handler(): registering 'ocd_ftdi_vid_pid'... Debug: 34 1 command.c:364 register_command_handler(): registering 'ocd_ftdi_tdo_sample_edge'... Debug: 35 1 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_ftdi_vid_pid 0x0403 0x6010 Debug: 36 1 command.c:143 script_debug(): command - ftdi_vid_pid ocd_ftdi_vid_pid 0x0403 0x6010 Debug: 38 1 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_ftdi_channel 0 Debug: 39 1 command.c:143 script_debug(): command - ftdi_channel ocd_ftdi_channel 0 Debug: 41 1 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_ftdi_layout_init 0x00e8 0x00eb Debug: 42 1 command.c:143 script_debug(): command - ftdi_layout_init ocd_ftdi_layout_init 0x00e8 0x00eb Debug: 44 1 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_transport select jtag Debug: 45 1 command.c:143 script_debug(): command - ocd_transport ocd_transport select jtag Debug: 46 1 command.c:364 register_command_handler(): registering 'ocd_jtag_flush_queue_sleep'... Debug: 47 1 command.c:364 register_command_handler(): registering 'ocd_jtag_rclk'... Debug: 48 1 command.c:364 register_command_handler(): registering 'ocd_jtag_ntrst_delay'... Debug: 49 1 command.c:364 register_command_handler(): registering 'ocd_jtag_ntrst_assert_width'... Debug: 50 1 command.c:364 register_command_handler(): registering 'ocd_scan_chain'... Debug: 51 1 command.c:364 register_command_handler(): registering 'ocd_jtag_reset'... Debug: 52 1 command.c:364 register_command_handler(): registering 'ocd_runtest'... Debug: 53 1 command.c:364 register_command_handler(): registering 'ocd_irscan'... Debug: 54 1 command.c:364 register_command_handler(): registering 'ocd_verify_ircapture'... Debug: 55 1 command.c:364 register_command_handler(): registering 'ocd_verify_jtag'... Debug: 56 1 command.c:364 register_command_handler(): registering 'ocd_tms_sequence'... Debug: 57 1 command.c:364 register_command_handler(): registering 'ocd_wait_srst_deassert'... Debug: 58 1 command.c:364 register_command_handler(): registering 'ocd_jtag'... Debug: 59 1 command.c:364 register_command_handler(): registering 'ocd_jtag'... Debug: 60 1 command.c:364 register_command_handler(): registering 'ocd_jtag'... Debug: 61 1 command.c:364 register_command_handler(): registering 'ocd_jtag'... Debug: 62 1 command.c:364 register_command_handler(): registering 'ocd_jtag'... Debug: 63 1 command.c:364 register_command_handler(): registering 'ocd_jtag'... Debug: 64 1 command.c:364 register_command_handler(): registering 'ocd_jtag'... Debug: 65 1 command.c:364 register_command_handler(): registering 'ocd_jtag'... Debug: 66 1 command.c:364 register_command_handler(): registering 'ocd_jtag'... Debug: 67 1 command.c:364 register_command_handler(): registering 'ocd_jtag'... Debug: 68 1 command.c:364 register_command_handler(): registering 'ocd_jtag'... Debug: 69 1 command.c:364 register_command_handler(): registering 'ocd_jtag'... Debug: 70 1 command.c:364 register_command_handler(): registering 'ocd_jtag'... Debug: 71 1 command.c:364 register_command_handler(): registering 'ocd_svf'... Debug: 72 1 command.c:364 register_command_handler(): registering 'ocd_xsvf'... Debug: 73 1 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_ftdi_tdo_sample_edge falling Debug: 74 1 command.c:143 script_debug(): command - ftdi_tdo_sample_edge ocd_ftdi_tdo_sample_edge falling User : 76 1 command.c:544 command_print(): ftdi samples TDO on falling edge of TCK Debug: 77 1 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_adapter_khz 1000 Debug: 78 2 command.c:143 script_debug(): command - adapter_khz ocd_adapter_khz 1000 Debug: 80 2 core.c:1693 jtag_config_khz(): handle jtag khz Debug: 81 2 core.c:1660 adapter_khz_to_speed(): convert khz to interface specific speed value Debug: 82 2 core.c:1660 adapter_khz_to_speed(): convert khz to interface specific speed value User : 83 2 command.c:544 command_print(): adapter speed: 1000 kHz Info : 84 2 server.c:307 add_service(): Listening on port 6666 for tcl connections Info : 85 2 server.c:307 add_service(): Listening on port 4444 for telnet connections Debug: 86 2 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_init Debug: 87 2 command.c:143 script_debug(): command - init ocd_init Debug: 89 2 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_target init Debug: 90 2 command.c:143 script_debug(): command - ocd_target ocd_target init Debug: 92 2 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_target names Debug: 93 2 command.c:143 script_debug(): command - ocd_target ocd_target names Debug: 94 2 target.c:1334 handle_target_init_command(): Initializing targets... Debug: 95 2 ftdi.c:657 ftdi_initialize(): ftdi interface using shortest path jtag state transitions Debug: 96 11 mpsse.c:422 mpsse_purge(): - Debug: 97 11 mpsse.c:703 mpsse_loopback_config(): off Debug: 98 11 mpsse.c:748 mpsse_set_frequency(): target 1000000 Hz Debug: 99 11 mpsse.c:709 mpsse_set_divisor(): 5 Debug: 100 11 mpsse.c:772 mpsse_set_frequency(): actually 1000000 Hz Debug: 101 11 core.c:1660 adapter_khz_to_speed(): convert khz to interface specific speed value Debug: 102 11 core.c:1663 adapter_khz_to_speed(): have interface set up Debug: 103 11 mpsse.c:748 mpsse_set_frequency(): target 1000000 Hz Debug: 104 11 mpsse.c:709 mpsse_set_divisor(): 5 Debug: 105 11 mpsse.c:772 mpsse_set_frequency(): actually 1000000 Hz Debug: 106 11 core.c:1660 adapter_khz_to_speed(): convert khz to interface specific speed value Debug: 107 11 core.c:1663 adapter_khz_to_speed(): have interface set up Info : 108 11 core.c:1448 adapter_init(): clock speed 1000 kHz Debug: 109 11 openocd.c:149 handle_init_command(): Debug Adapter init complete Debug: 110 11 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_transport init Debug: 111 11 command.c:143 script_debug(): command - ocd_transport ocd_transport init Debug: 113 11 transport.c:239 handle_transport_init(): handle_transport_init Debug: 114 12 core.c:729 jtag_add_reset(): SRST line released Debug: 115 12 core.c:753 jtag_add_reset(): TRST line released Debug: 116 12 core.c:327 jtag_call_event_callbacks(): jtag event: TAP reset Debug: 117 12 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_jtag arp_init Debug: 118 12 command.c:143 script_debug(): command - ocd_jtag ocd_jtag arp_init Debug: 119 12 core.c:1461 jtag_init_inner(): Init JTAG chain Warn : 120 12 core.c:1477 jtag_init_inner(): There are no enabled taps. AUTO PROBING MIGHT NOT WORK!! Debug: 121 12 core.c:327 jtag_call_event_callbacks(): jtag event: TAP reset Debug: 122 12 core.c:1121 jtag_examine_chain(): DR scan interrogation for IDCODE/BYPASS Debug: 123 12 core.c:327 jtag_call_event_callbacks(): jtag event: TAP reset Debug: 124 267 core.c:1366 jtag_tap_init(): Created Tap: auto0.tap @ abs position 0, irlen 0, capture: 0x1 mask: 0x3 Info : 125 267 core.c:1172 jtag_examine_chain(): TAP auto0.tap does not have valid IDCODE (idcode=0xa0d746c) Debug: 126 267 core.c:1366 jtag_tap_init(): Created Tap: auto1.tap @ abs position 1, irlen 0, capture: 0x1 mask: 0x3 Info : 127 267 core.c:1172 jtag_examine_chain(): TAP auto1.tap does not have valid IDCODE (idcode=0x506ba36) Debug: 128 267 core.c:1366 jtag_tap_init(): Created Tap: auto2.tap @ abs position 2, irlen 0, capture: 0x1 mask: 0x3 Info : 129 267 core.c:1020 jtag_examine_chain_display(): JTAG tap: auto2.tap tap/device found: 0x02835d1b (mfg: 0x68d (<unknown>), part: 0x2835, ver: 0x0) Debug: 130 267 core.c:1366 jtag_tap_init(): Created Tap: auto3.tap @ abs position 3, irlen 0, capture: 0x1 mask: 0x3 Info : 131 267 core.c:1020 jtag_examine_chain_display(): JTAG tap: auto3.tap tap/device found: 0x1c1cda59 (mfg: 0x52c (<unknown>), part: 0xc1cd, ver: 0x1) Debug: 132 267 core.c:1366 jtag_tap_init(): Created Tap: auto4.tap @ abs position 4, irlen 0, capture: 0x1 mask: 0x3 Info : 133 267 core.c:1020 jtag_examine_chain_display(): JTAG tap: auto4.tap tap/device found: 0x881e585b (mfg: 0x42d (Nuvoton), part: 0x81e5, ver: 0x8) Debug: 134 267 core.c:1366 jtag_tap_init(): Created Tap: auto5.tap @ abs position 5, irlen 0, capture: 0x1 mask: 0x3 Info : 135 267 core.c:1172 jtag_examine_chain(): TAP auto5.tap does not have valid IDCODE (idcode=0x1d5cd95c) Debug: 136 267 core.c:1366 jtag_tap_init(): Created Tap: auto6.tap @ abs position 6, irlen 0, capture: 0x1 mask: 0x3 Info : 137 267 core.c:1172 jtag_examine_chain(): TAP auto6.tap does not have valid IDCODE (idcode=0x8eae6cae) Debug: 138 267 core.c:1366 jtag_tap_init(): Created Tap: auto7.tap @ abs position 7, irlen 0, capture: 0x1 mask: 0x3 Info : 139 267 core.c:1020 jtag_examine_chain_display(): JTAG tap: auto7.tap tap/device found: 0xc7573657 (mfg: 0x32b (Solomon Systech Limited), part: 0x7573, ver: 0xc) Debug: 140 267 core.c:1366 jtag_tap_init(): Created Tap: auto8.tap @ abs position 8, irlen 0, capture: 0x1 mask: 0x3 Info : 141 267 core.c:1172 jtag_examine_chain(): TAP auto8.tap does not have valid IDCODE (idcode=0x40a0d746) Debug: 142 267 core.c:1366 jtag_tap_init(): Created Tap: auto9.tap @ abs position 9, irlen 0, capture: 0x1 mask: 0x3 Info : 143 267 core.c:1020 jtag_examine_chain_display(): JTAG tap: auto9.tap tap/device found: 0x20506ba3 (mfg: 0x5d1 (<unknown>), part: 0x0506, ver: 0x2) Debug: 144 267 core.c:1366 jtag_tap_init(): Created Tap: auto10.tap @ abs position 10, irlen 0, capture: 0x1 mask: 0x3 Info : 145 267 core.c:1020 jtag_examine_chain_display(): JTAG tap: auto10.tap tap/device found: 0x63839b4b (mfg: 0x5a5 (<unknown>), part: 0x3839, ver: 0x6) Debug: 146 267 core.c:1366 jtag_tap_init(): Created Tap: auto11.tap @ abs position 11, irlen 0, capture: 0x1 mask: 0x3 Info : 147 267 core.c:1020 jtag_examine_chain_display(): JTAG tap: auto11.tap tap/device found: 0x9103cb0b (mfg: 0x585 (<unknown>), part: 0x103c, ver: 0x9) Debug: 148 267 core.c:1366 jtag_tap_init(): Created Tap: auto12.tap @ abs position 12, irlen 0, capture: 0x1 mask: 0x3 Info : 149 267 core.c:1020 jtag_examine_chain_display(): JTAG tap: auto12.tap tap/device found: 0x63ab9b2b (mfg: 0x595 (<unknown>), part: 0x3ab9, ver: 0x6) Debug: 150 267 core.c:1366 jtag_tap_init(): Created Tap: auto13.tap @ abs position 13, irlen 0, capture: 0x1 mask: 0x3 Info : 151 267 core.c:1020 jtag_examine_chain_display(): JTAG tap: auto13.tap tap/device found: 0x20506ba3 (mfg: 0x5d1 (<unknown>), part: 0x0506, ver: 0x2) Debug: 152 267 core.c:1366 jtag_tap_init(): Created Tap: auto14.tap @ abs position 14, irlen 0, capture: 0x1 mask: 0x3 Info : 153 267 core.c:1020 jtag_examine_chain_display(): JTAG tap: auto14.tap tap/device found: 0x63839b4b (mfg: 0x5a5 (<unknown>), part: 0x3839, ver: 0x6) Debug: 154 267 core.c:1366 jtag_tap_init(): Created Tap: auto15.tap @ abs position 15, irlen 0, capture: 0x1 mask: 0x3 Info : 155 267 core.c:1020 jtag_examine_chain_display(): JTAG tap: auto15.tap tap/device found: 0x9103cb0b (mfg: 0x585 (<unknown>), part: 0x103c, ver: 0x9) Debug: 156 267 core.c:1366 jtag_tap_init(): Created Tap: auto16.tap @ abs position 16, irlen 0, capture: 0x1 mask: 0x3 Info : 157 268 core.c:1020 jtag_examine_chain_display(): JTAG tap: auto16.tap tap/device found: 0x63ab9b2b (mfg: 0x595 (<unknown>), part: 0x3ab9, ver: 0x6) Debug: 158 268 core.c:1366 jtag_tap_init(): Created Tap: auto17.tap @ abs position 17, irlen 0, capture: 0x1 mask: 0x3 Info : 159 268 core.c:1020 jtag_examine_chain_display(): JTAG tap: auto17.tap tap/device found: 0x20506ba3 (mfg: 0x5d1 (<unknown>), part: 0x0506, ver: 0x2) Debug: 160 268 core.c:1366 jtag_tap_init(): Created Tap: auto18.tap @ abs position 18, irlen 0, capture: 0x1 mask: 0x3 Info : 161 268 core.c:1020 jtag_examine_chain_display(): JTAG tap: auto18.tap tap/device found: 0x63839b4b (mfg: 0x5a5 (<unknown>), part: 0x3839, ver: 0x6) Debug: 162 268 core.c:1366 jtag_tap_init(): Created Tap: auto19.tap @ abs position 19, irlen 0, capture: 0x1 mask: 0x3 Info : 163 268 core.c:1020 jtag_examine_chain_display(): JTAG tap: auto19.tap tap/device found: 0x9103cb0b (mfg: 0x585 (<unknown>), part: 0x103c, ver: 0x9) Debug: 164 268 core.c:1366 jtag_tap_init(): Created Tap: auto20.tap @ abs position 20, irlen 0, capture: 0x1 mask: 0x3 Info : 165 268 core.c:1020 jtag_examine_chain_display(): JTAG tap: auto20.tap tap/device found: 0x63ab9b2b (mfg: 0x595 (<unknown>), part: 0x3ab9, ver: 0x6) Warn : 166 268 core.c:1058 jtag_examine_chain_end(): Unexpected idcode after end of chain: 517 0x839b4b23 Warn : 167 268 core.c:1058 jtag_examine_chain_end(): Unexpected idcode after end of chain: 549 0x03cb0b63 Warn : 168 268 core.c:1058 jtag_examine_chain_end(): Unexpected idcode after end of chain: 581 0xab9b2b91 Warn : 169 268 core.c:1058 jtag_examine_chain_end(): Unexpected idcode after end of chain: 613 0x506ba363 Error: 170 268 core.c:1197 jtag_examine_chain(): double-check your JTAG setup (interface, speed, ...) Error: 171 268 core.c:1506 jtag_init_inner(): Trying to use configured scan chain anyway... Debug: 172 268 core.c:1252 jtag_validate_ircapture(): IR capture validation scan Warn : 175 1033 core.c:1289 jtag_validate_ircapture(): AUTO auto0.tap - use "jtag newtap auto0 tap -irlen 2 -expected-id 0x00000000" Error: 176 1033 core.c:1304 jtag_validate_ircapture(): auto0.tap: IR capture error; saw 0x0000 not 0x0001 Debug: 177 1033 core.c:327 jtag_call_event_callbacks(): jtag event: TAP reset Warn : 178 1033 core.c:1529 jtag_init_inner(): Bypassing JTAG setup events due to errors Debug: 179 1033 openocd.c:162 handle_init_command(): Examining targets... Debug: 180 1033 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_flash init Debug: 181 1033 command.c:143 script_debug(): command - ocd_flash ocd_flash init Debug: 183 1033 tcl.c:1166 handle_flash_init_command(): Initializing flash devices... Debug: 184 1033 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_mflash init Debug: 185 1033 command.c:143 script_debug(): command - ocd_mflash ocd_mflash init Debug: 187 1033 mflash.c:1377 handle_mflash_init_command(): Initializing mflash devices... Debug: 188 1033 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_nand init Debug: 189 1033 command.c:143 script_debug(): command - ocd_nand ocd_nand init Debug: 191 1033 tcl.c:497 handle_nand_init_command(): Initializing NAND devices... Debug: 192 1033 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_pld init Debug: 193 1033 command.c:143 script_debug(): command - ocd_pld ocd_pld init Debug: 195 1033 pld.c:205 handle_pld_init_command(): Initializing PLDs... Warn : 196 1033 gdb_server.c:3175 gdb_target_add_all(): gdb services need one or more targets defined

I would be so grateful for your support.

Update kendryte-standalone-sdk to v0.5.6

    {
        "sha1": "8ba94f5ff87eec5e13e488d98050b5e53fab2125",
        "system": "*",
        "url": "http://dl.sipeed.com/MAIX/platformio/dl-packages/framework-kendryte-standalone-sdk-0.5.6.tar.gz",
        "version": "0.5.6"
    },

Error in compiling

image
Tried to compile the blink example and received this error. I am using the latest Win10 and the latest PlatformIO.

Topics for repository

It would be great if you add the next topics to this repository:

  • platformio
  • platformio-platform
  • risc-v.

Developers will be able to list open source dev/platforms for PlatformIO. See

You can do that on the main page of the repository via "Manage topics" button. See
Screen Shot 2019-04-25 at 13 47 54

Support for ARM CPUs

There is no ARM support for the K210 toolchain in the PlatformIO repository; to make this work on an ARM device (e.g. a raspberry pi) you need to compile the toolchain from github and remove the entry from platform.json in ~/.platformio/platforms/kendryte210:

before:

 "packages": {
     "toolchain-kendryte210": {
       "type": "toolchain",
       "version": "~8.2.0"
     },
     "framework-maixduino": {
       "type": "framework",
       "optional": true,
       "version": "~0.3.9"
     },

after:

 "packages":
     "framework-maixduino": {
       "type": "framework",
       "optional": true,
       "version": "~0.3.9"
     },

It might be a good idea to specify this in the README or ask PlatformIO to add an ARM release (the toolchain builds perfectly fine so this shouldn't be an issue).

tool-openocd-kendryte not available for linux_armv7l

Per https://community.platformio.org/t/platformio-tool-openocd-kendryte-for-system-linux-armv7l/20420.

When using a Raspberry Pi with Raspbian GNU/Linux 10 (buster) as OS installed (32-bit), one cannot upload to the boards because tool-openocd-kendryte was not uploaded for this configuration.

Processing sipeed-maix-one-dock (platform: kendryte210; board: sipeed-maix-one-dock; framework: kendryte-standalone-sdk)
--------------------------------------------------------------------------------------------------------------------------------------------------
Tool Manager: Installing platformio/tool-openocd-kendryte @ ^1.203.0
Error: Could not find the package with 'platformio/tool-openocd-kendryte @ ^1.203.0' requirements for your system 'linux_armv7l'
The terminal process "platformio 'run', '--target', 'upload', '--environment', 'sipeed-maix-one-dock'" terminated with exit code: 1.

Looking at https://api.registry.platformio.org/v3/packages/platformio/tool/tool-openocd-kendryte, it's only available for x86_64 Windows, Linux and Mac, but not for the ARM32 and ARM64 types.

Please compile and upload the tool-openocd-kendryte for these OSes and architectures.

Add new framework kendryte-freertos-sdk.

"framework-kendryte-freertos-sdk":[
    {
        "sha1": "dd92433fd8ab3caae7b0e244178304a4d82b158d",
        "system": "*",
        "url": "http://dl.sipeed.com/MAIX/platformio/dl-packages/framework-kendryte-freertos-sdk-0.7.0.tar.gz",
        "version": "0.7.0"
    }
],

Update kflash to v0.8.2

There is a serious bug in the kflash v0.8.1 version, and the new version has been fixed.

       {
            "sha1": "afd2123d6574049d2dae6c0f0cbab040ad1fdfc7",
            "system": "*",
            "url": "http://dl.sipeed.com/MAIX/platformio/dl-packages/tool-kflash-kendryte210-v0.8.2.tar.gz",
            "version": "0.8.2"
        },

Support for macOS

Need to prepare packages toolchain-kendryte210 and tool-openocd-kendryte210 packages for macOS.

Please update kflash and maixduino to the new version.

        {
            "sha1": "e35862cf42b83c71c0be1a38d9b5857b6d94cf3e",
            "system": "*",
            "url": "http://dl.sipeed.com/MAIX/platformio/dl-packages/framework-maixduino-0.3.9.tar.gz",
            "version": "0.3.9"
        },
        {
            "sha1": "e559a9d6655ae08990ed846c760c68855b43e2e6",
            "system": "*",
            "url": "http://dl.sipeed.com/MAIX/platformio/dl-packages/tool-kflash-kendryte210-v0.9.1.tar.gz",
            "version": "0.9.1"
        },

Exceptions cause sys_exit in C++

  • BUG REPORT

Background

This bug was discovered trying to use the fft library in the kendryte-freetos-sdk as it requires exceptions to find a spare dma. The example code consistently calls sys_exit when it's run on the MAIX One Dock.

Expected behavior

C++ exception should be caught by the nearest catch statement.

Actual behavior

Throwing an exception causes a fatal error and halt.

Test code

See https://gitlab.com/nemach-embedded/maix-pio-exceptions

main.c:

extern void do_exception_test();
int main(void) 
{
   do_exception_test();
   while (1)

        ;
    return 0;
}

exception_test.cpp:

#include <stdio.h>

void catch_test(bool do_throw)
{
    if (do_throw) { 
        printf("throwing exception\n");
        throw 20;
    }
    printf("not throwing exception\n");
}

extern "C" void do_exception_test()
{
    printf("Starting exception test\n");

    try {
        catch_test(false);
        printf("PASS - no exception thrown\n");
    }
    catch(...) {
        printf("ERROR - exception shouldn't be throw\n");
    }


    bool exception_caught = false;
    try {
        catch_test(true);
    }
    catch(...) {
        printf("PASS - exception should be throw\n");
        exception_caught = true;
    }

    if (!exception_caught) {
        printf("ERROR - exception should have been throw\n");
    }
}

Workaround

The problem can be fixed by manually moving crtend.o and crtn.o to the very end of the link command. I'm not sure how to make this the default though, or whether it could also be fixed in the kendryte.ld file.

Automatically generated command producing failing elf:

c:\Users\me\.platformio\packages\toolchain-kendryte210\bin\riscv64-unknown-elf-g++ -o .pio\build\sipeed-maix-one-dock\firmware.elf -T C:\Users\me\.platformio\packages\framework-kendryte-freertos-sdk\lds\kendryte.ld -nostartfiles -static -Wl,--gc-sections -Wl,-static -Wl,--start-group -Wl,--whole-archive -Wl,--no-whole-archive -Wl,--end-group -Wl,-EL -Wl,--no-relax -Wl,--start-group -lc -lgcc -lm -Wl,--end-group C:\Users\me\.platformio\packages\toolchain-kendryte210\lib\gcc\riscv64-unknown-elf\8.2.0\crti.o C:\Users\me\.platformio\packages\toolchain-kendryte210\lib\gcc\riscv64-unknown-elf\8.2.0\crtbegin.o C:\Users\me\.platformio\packages\toolchain-kendryte210\lib\gcc\riscv64-unknown-elf\8.2.0\crtend.o C:\Users\me\.platformio\packages\toolchain-kendryte210\lib\gcc\riscv64-unknown-elf\8.2.0\crtn.o .pio\build\sipeed-maix-one-dock\src\exception_test.o .pio\build\sipeed-maix-one-dock\src\main.o -L.pio\build\sipeed-maix-one-dock -Wl,--start-group .pio\build\sipeed-maix-one-dock\libsdk-bsp.a .pio\build\sipeed-maix-one-dock\libsdk-drivers.a .pio\build\sipeed-maix-one-dock\libsdk-freertos.a .pio\build\sipeed-maix-one-dock\libsdk-hal.a .pio\build\sipeed-maix-one-dock\libsdk-posix.a .pio\build\sipeed-maix-one-dock\libthird_party-fatfs.a .pio\build\sipeed-maix-one-dock\libthird_party-lwipcore.a .pio\build\sipeed-maix-one-dock\libthird_party-lwipapi.a .pio\build\sipeed-maix-one-dock\libthird_party-lwiparch.a .pio\build\sipeed-maix-one-dock\libthird_party-lwipnetif.a -lc -lgcc -lm -lstdc++ -latomic -Wl,--end-group

Modified command producing working elf:

c:\Users\me\.platformio\packages\toolchain-kendryte210\bin\riscv64-unknown-elf-g++ -o .pio\build\sipeed-maix-one-dock\firmware.elf -T C:\Users\me\.platformio\packages\framework-kendryte-freertos-sdk\lds\kendryte.ld -nostartfiles -static -Wl,--gc-sections -Wl,-static -Wl,--start-group -Wl,--whole-archive -Wl,--no-whole-archive -Wl,--end-group -Wl,-EL -Wl,--no-relax -Wl,--start-group -lc -lgcc -lm -Wl,--end-group C:\Users\me\.platformio\packages\toolchain-kendryte210\lib\gcc\riscv64-unknown-elf\8.2.0\crti.o C:\Users\me\.platformio\packages\toolchain-kendryte210\lib\gcc\riscv64-unknown-elf\8.2.0\crtbegin.o .pio\build\sipeed-maix-one-dock\src\exception_test.o .pio\build\sipeed-maix-one-dock\src\main.o -L.pio\build\sipeed-maix-one-dock -Wl,--start-group .pio\build\sipeed-maix-one-dock\libsdk-bsp.a .pio\build\sipeed-maix-one-dock\libsdk-drivers.a .pio\build\sipeed-maix-one-dock\libsdk-freertos.a .pio\build\sipeed-maix-one-dock\libsdk-hal.a .pio\build\sipeed-maix-one-dock\libsdk-posix.a .pio\build\sipeed-maix-one-dock\libthird_party-fatfs.a .pio\build\sipeed-maix-one-dock\libthird_party-lwipcore.a .pio\build\sipeed-maix-one-dock\libthird_party-lwipapi.a .pio\build\sipeed-maix-one-dock\libthird_party-lwiparch.a .pio\build\sipeed-maix-one-dock\libthird_party-lwipnetif.a -lc -lgcc -lm -lstdc++ -latomic -Wl,--end-group c:\Users\me\.platformio\packages\toolchain-kendryte210\lib\gcc\riscv64-unknown-elf\8.2.0\crtend.o C:\Users\me\.platformio\packages\toolchain-kendryte210\lib\gcc\riscv64-unknown-elf\8.2.0\crtn.o

Tool/ Library Versions

CONFIGURATION: https://docs.platformio.org/page/boards/kendryte210/sipeed-maix-one-dock.html
PLATFORM: Kendryte K210 (1.2.2) > Sipeed MAIX ONE DOCK
HARDWARE: K210 400MHz, 6MB RAM, 16MB Flash

  • framework-kendryte-freertos-sdk 0.7.0
  • tool-kflash-kendryte210 0.9.1
  • tool-openocd-kendryte 1.203.1 (2.3)
  • toolchain-kendryte210 8.2.0

Target Hardware

MAIX One Dock

Host System

Windows 10 64-bit
VS Code 1.49.1

Upload fails - no attribute IntFlag

Upload firmware with platform.io fails. Upload with kflash_gui is working.

Platform.io version: Core 4.3.4, Home 3.2.3
Kendryte K210 platform version: 1.2.2

platform.ini

[env:sipeed-maix-go]
platform = kendryte210
board = sipeed-maix-go
framework = arduino

; serial monitor baudrate
monitor_speed = 115200

upload_port = /dev/ttyUSB1

Upload - Error:

Use manually specified: /dev/ttyUSB1
Uploading .pio/build/sipeed-maix-go/firmware.bin
Traceback (most recent call last):
  File ".platformio/packages/tool-kflash-kendryte210/kflash.py", line 13, in <module>
    import argparse
  File "/usr/lib/python3.8/argparse.py", line 88, in <module>
    import re as _re
  File ".platformio/penv/lib/python3.8/re.py", line 143, in <module>
    class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
*** [upload] Error 1
======================================= [FAILED] Took 3.11 seconds =======================================
The terminal process "platformio 'run', '--target', 'upload'" terminated with exit code: 1.

无法下载例程

[ERROR] enum34 must be installed, run pip install enum34
*** [upload] Error 1
我已经安装过enum34了,是安装位置有问题还是什么其他情况吗
编译过程没有问题,例程选择的是kendryte-standalone-sdk的HelloWord

Rename "kendryte210-standalone-sdk" to "kendryte-standalone-sdk"

Rename title to "Kendryte K210"

Can we rename a title of dev/platform to "Kendryte K210"? I really respect your efforts but keeping platforms in a simple form will ake them to look generic. The "this platform is ported by Sipeed." will be kept in the description. So, developers can find it by "Sipeed" word.

What do you think?

See https://platformio.org/platforms

Platformio outdated platform

Hello I am trying to test using Platformio CLI and platform kendryte210 and I'm having issues that are already fixed in github master, like this one:
camera.setRotaion instead of camera.setRotation

In fact camera doesn't work in Maix Bit with mic, everything is allright with Maixpy

Thanks

Board: sipeed-maixduino, framework=arduino

Platformio Build works fine.
But I'm getting this error when trying to Upload to a Maxiduino board.

File "/Users/username/.platformio/packages/tool-kflash-kendryte210/kflash.py", line 13, in
import argparse
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/argparse.py", line 87, in
import re as _re
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/re.py", line 143, in
class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
*** [upload] Error 1

This enum error only seems to affect when uploading to Sipeed/Kendryte boards.

PIO uploading to ESP8266 and ESP32 boards work fine. Only when uploading to Kendryte platform do I get this error.

Debugging MaixGo on PlatformIO using Kendryte standalone SDK

I have a problem on my Sipeed MaixGo board, while trying to use it with the Kendryte standalone SDK, I can't debug using it's internal link to see registers and instructions.

My platformio.ini is this:

[env:sipeed-maix-go]
platform = kendryte210
framework = kendryte-standalone-sdk
board = sipeed-maix-go
monitor_speed = 115200
debug_tool = jlink

Here is the error I get first:

Reading symbols from /Users/cdepaula/repos/maix-go/kendryte-blink/.pioenvs/sipeed-maix-go/firmware.elf...
done.
PlatformIO Unified Debugger > http://bit.ly/pio-debug
PlatformIO: Initializing remote target...
 _  __              _            _
| |/ /___ _ __   __| |_ __ _   _| |_ ___
| ' // _ \ '_ \ / _` | '__| | | | __/ _ \
| . \  __/ | | | (_| | |  | |_| | ||  __/
|_|\_\___|_| |_|\__,_|_|   \__, |\__\___|
                           |___/
Kendryte Open On-Chip Debugger For RISC-V v0.2.2 (2019-01-17)
Licensed under GNU GPL v2
embedded:startup.tcl:60: Error: Can't find kendryte_jlink.cfg
in procedure 'script'
at file "embedded:startup.tcl", line 60
.pioinit:10: Error in sourced command file:
Remote connection closed

Then, I changed sipeed-maix-go.json to have the absolute path for the cfg and get this error:

Reading symbols from /Users/cdepaula/repos/maix-go/kendryte-blink/.pioenvs/sipeed-maix-go/firmware.elf...
done.
PlatformIO Unified Debugger > http://bit.ly/pio-debug
PlatformIO: Initializing remote target...
 _  __              _            _
| |/ /___ _ __   __| |_ __ _   _| |_ ___
| ' // _ \ '_ \ / _` | '__| | | | __/ _ \
| . \  __/ | | | (_| | |  | |_| | ||  __/
|_|\_\___|_| |_|\__,_|_|   \__, |\__\___|
                           |___/
Kendryte Open On-Chip Debugger For RISC-V v0.2.2 (2019-01-17)
Licensed under GNU GPL v2
adapter speed: 3000 kHz
Error: No J-Link device found.

.pioinit:10: Error in sourced command file:
Remote connection closed

If I try to debug over FTDI using the kendryte_ftdi.cfg I got on the OpenOCD:

interface ftdi

ftdi_vid_pid 0x0403 0x6010

#func   io  dir val
#TCK    0   1   0
#TDI    1   1   0
#TDO    2   1   0
#TMS    3   0   1
#RST    4   1   1

#       val dir
#ftdi_layout_init 0x0028 0x002b
#只有jtagio分配
ftdi_layout_init 0x0008 0x000b

#ftdi_layout_init 0x0808 0x0a1b
#ftdi_layout_signal nSRST -oe 0x0200
#ftdi_layout_signal nTRST -data 0x0100 -oe 0x0100
#ftdi_layout_signal LED -data 0x0800

adapter_khz 500

gdb_port 3333
telnet_port 4444

set _CHIPNAME riscv

jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x04e4796b

set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME riscv -chain-position $_TARGETNAME

if {[ info exists pulse_srst]} {
  ftdi_set_signal nSRST 0
  ftdi_set_signal nSRST z
}

init
halt

I get this error:

Reading symbols from /Users/cdepaula/repos/maix-go/kendryte-blink/.pioenvs/sipeed-maix-go/firmware.elf...
done.
PlatformIO Unified Debugger > http://bit.ly/pio-debug
PlatformIO: Initializing remote target...
 _  __              _            _
| |/ /___ _ __   __| |_ __ _   _| |_ ___
| ' // _ \ '_ \ / _` | '__| | | | __/ _ \
| . \  __/ | | | (_| | |  | |_| | ||  __/
|_|\_\___|_| |_|\__,_|_|   \__, |\__\___|
                           |___/
Kendryte Open On-Chip Debugger For RISC-V v0.2.2 (2019-01-17)
Licensed under GNU GPL v2
adapter speed: 500 kHz
Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
Info : clock speed 500 kHz
Info : TAP riscv.cpu does not have valid IDCODE (idcode=0xfa82fa)
Info : JTAG tap: auto0.tap tap/device found: 0x007d417d (mfg: 0x0be (Seiko Epson), part: 0x07d4, ver: 0x0)
Info : JTAG tap: auto1.tap tap/device found: 0x007d007d (mfg: 0x03e (Oracle Corporation), part: 0x07d0, ver: 0x0)
Info : JTAG tap: auto2.tap tap/device found: 0x3cb5807d (mfg: 0x03e (Oracle Corporation), part: 0xcb58, ver: 0x3)
Info : TAP auto3.tap does not have valid IDCODE (idcode=0xffff8272)
Info : JTAG tap: auto4.tap tap/device found: 0xffffc139 (mfg: 0x09c (Eon Silicon Devices), part: 0xfffc, ver: 0xf)
Warn : AUTO auto0.tap - use "jtag newtap auto0 tap -irlen 2 -expected-id 0x007d417d"
Error: auto0.tap: IR capture error; saw 0x0003 not 0x0001
Warn : Bypassing JTAG setup events due to errors
Error: dtmcontrol is 0. Check JTAG connectivity/board power.
Info : Listening on port 3333 for gdb connections
Error: Target not examined yet

.pioinit:10: Error in sourced command file:
Remote connection closed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.