PlatformIO + BL602 Bouffalo Arduino Core Test

PlatformIO + BL602 Bouffalo Arduino Core Test

Description

Uses

Import Project

Prerequisites: Have PlatformIO installed in VSCode.

Import project as normal via cloning this repository and "Open Project" via PIO Home

Use the project environment switcher to switch the newly imported project's "env:pinecone_bl602" environment.

Use the project tasks "Build", "Upload" and "Upload and Monitor" as normal.

The standard platformio.ini options apply, e.g. upload_port = COM3, build_flags, etc.

No special extra options are needed to build or upload this project -- the upload serial port is even detected automatically.

Uploading

The upload happens via a serial connection and an on-board USB-UART chip on many development boards. It may be necessary to put the board into UART download / bootloader mode.

For the Pine64 board e.g., the GPIO8 pin (determines whether to start bootloader mode on powerup or not) is available on header J3 and must be connected to 3.3V (position 1-2), then a reset must be issued via the reset button.

Other boards like the DT-BL10 have the "D8" (=GPIO8) pin directly on a button on the board, akin to the "FLASH" and "RST" button on ESP8266 and ESP32 boards. The reset-into-bootloader-mode prodedure is the same: Hold D8, press RST once (while D8 is being held), release D8.

Media

vscode

Expected Build Output

Project Inspect" RAM: [=== ] 27.2% (used 89224 bytes from 327680 bytes) Flash: [ ] 3.3% (used 42786 bytes from 1310720 bytes) Building .pio\build\pinecone_bl602\firmware.hex ========================= [SUCCESS] Took 5.73 seconds ========================= ">
Processing pinecone_bl602 (platform: https://github.com/maxgerhardt/platform-sifive.git; board: pinecone; framework: arduino)
--------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/sifive/pinecone.html
PLATFORM: SiFive (4.1.0+sha.ed37f76) > PineCone (BL602)
HARDWARE: SIVIFE_E24 192MHz, 320KB RAM, 1.25MB Flash
DEBUG: Current (qemu) On-board (qemu) External (ftdi, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
 - framework-arduinobouffalo 5.1.210913+sha.b5fe9fd
 - framework-bl-iot-sdk-arduino 5.1.210913+sha.012b766
 - toolchain-riscv 1.80300.190927 (8.3.0)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 2 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
WARNING: You are using pip version 21.1.3; however, version 21.2.4 is available.
You should consider upgrading via the 'c:\users\max\appdata\local\programs\python\python38\python.exe -m pip install --upgrade pip' command.
Compiling .pio\build\pinecone_bl602\src\main.cpp.o
Compiling .pio\build\pinecone_bl602\FrameworkArduino\HardwareSerial.cpp.o
Compiling .pio\build\pinecone_bl602\FrameworkArduino\Print.cpp.o
Compiling .pio\build\pinecone_bl602\FrameworkArduino\Stream.cpp.o
Compiling .pio\build\pinecone_bl602\FrameworkArduino\StreamString.cpp.o
Compiling .pio\build\pinecone_bl602\FrameworkArduino\WString.cpp.o     
Compiling .pio\build\pinecone_bl602\FrameworkArduino\bl602-hal-gpio.c.o
Compiling .pio\build\pinecone_bl602\FrameworkArduino\bl602-hal-misc.c.o
C:\Users\Max\.platformio\packages\framework-arduinobouffalo\cores\bl602\bl602-hal-gpio.c: In function 'digitalRead':
C:\Users\Max\.platformio\packages\framework-arduinobouffalo\cores\bl602\bl602-hal-gpio.c:25:34: warning: passing argument 2 of 'bl_gpio_input_get' from incompatible pointer type [-Wincompatible-pointer-types]
     ret = bl_gpio_input_get(pin, &val);
                                  ^~~~
In file included from C:\Users\Max\.platformio\packages\framework-arduinobouffalo\cores\bl602\bl602-hal-gpio.c:5:
C:\Users\Max\.platformio\packages\framework-bl-iot-sdk-arduino\include\hal_drv\bl602_hal/bl_gpio.h:47:45: note: expected 'uint8_t *' {aka 'unsigned char *'} but argument is of type 'int *'
 int bl_gpio_input_get(uint8_t pin, uint8_t *value);
                                    ~~~~~~~~~^~~~~
Compiling .pio\build\pinecone_bl602\FrameworkArduino\bl602-hal-pwm.c.o
Compiling .pio\build\pinecone_bl602\FrameworkArduino\main.cpp.o
Compiling .pio\build\pinecone_bl602\FrameworkArduino\stdlib_noniso.c.o
C:\Users\Max\.platformio\packages\framework-arduinobouffalo\cores\bl602\bl602-hal-pwm.c: In function 'analogWrite':
C:\Users\Max\.platformio\packages\framework-arduinobouffalo\cores\bl602\bl602-hal-pwm.c:43:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
C:/Users/Max/.platformio/packages/framework-arduinobouffalo/cores/bl602/Print.cpp: In member function 'size_t Print::printf(const char*, ...)':
C:/Users/Max/.platformio/packages/framework-arduinobouffalo/cores/bl602/Print.cpp:61:12: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
     if(len >= sizeof(loc_buf)){
        ~~~~^~~~~~~~~~~~~~~~~~
Archiving .pio\build\pinecone_bl602\libFrameworkArduino.a
Indexing .pio\build\pinecone_bl602\libFrameworkArduino.a
Linking .pio\build\pinecone_bl602\firmware.elf
Checking size .pio\build\pinecone_bl602\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [===       ]  27.2% (used 89224 bytes from 327680 bytes)
Flash: [          ]   3.3% (used 42786 bytes from 1310720 bytes)
Building .pio\build\pinecone_bl602\firmware.hex
========================= [SUCCESS] Took 5.73 seconds =========================

Expected Upload Output

Make sure your board is in bootoader mode before uploading, as described before.

"Verbose Upload":


   
    (["upload"], [".pio\build\pinecone_bl602\firmware.bin"])
AVAILABLE: bl60x-flash, ftdi, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa
CURRENT: upload_protocol = bl60x-flash
MethodWrapper(["upload"], [".pio\build\pinecone_bl602\firmware.bin"])
Auto-detected: COM15
"c:\users\max\appdata\local\programs\python\python38\python.exe" "C:\Users\Max\.platformio\packages\tool-bl60x-flash\bl602-flasher.py" "COM15" ".pio\build\pinecone_bl602\firmware.bin"
Loading helper binary
21872 bytes @ 0x22010000

  0%|          | 0.00/21.9k [00:00
   
Owner
Maximilian Gerhardt
Firmware developer and security specialist.
Maximilian Gerhardt
Similar Resources

Upp11 - C++11 lightweight single header unit test framework

upp11 Lightweight C++11 single header unit test framework To use framework: Copy upp11.h in you project dir. Create unit test source files or modify e

Apr 4, 2019

Project basicly find the test that fails some code.

Stress Test project Overview many and many times in competitve programming when you have a solution got WA(wrong answer) and you do not know why and c

Feb 15, 2022

bl_mcu_sdk is MCU software development kit provided by Bouffalo Lab Team for BL602/BL604, BL702/BL704/BL706 and other series of RISC-V based chips in the future.

bl_mcu_sdk is MCU software development kit provided by Bouffalo Lab Team for BL602/BL604, BL702/BL704/BL706 and other series of  RISC-V based chips in the future.

bl mcu sdk is an MCU software development kit provided by the Bouffalo Lab Team for BL602/BL604, BL702/BL704/BL706 and other series of chips in the future

Jun 10, 2022

ESP32/8266 Arduino/PlatformIO library that painlessly enables incredibly fast re-connect to the previous wireless network after deep sleep.

WiFiQuick ESP32/8266 Platformio/Arduino library that painlessly enables incredibly fast re-connect to the previous wireless network after deep sleep.

Apr 3, 2022

Boilerplate to create a project with: STM32 + Ethernet + micro-ROS + FreeRTOS + Arduino + PlatformIO

Boilerplate to create a project with:  STM32 + Ethernet + micro-ROS + FreeRTOS + Arduino + PlatformIO

micro_ros_stm32_template Boilerplate to create a project with: STM32 + Ethernet + micro-ROS + FreeRTOS + Arduino + PlatformIO Default config STM32F407

May 7, 2022

Arduino core for GD32 devices, community developed, based on original GigaDevice's core

Arduino core for GD32 devices, community developed, based on original GigaDevice's core

GD32 Arduino Core (New) This is a Arduino core is based off of the original GigaDevice core that was provided by the company in early June 2021 (see h

Jun 14, 2022

debug esp32-c3 Ai-thinker board in platformio

debug esp32-c3 Ai-thinker board in platformio

Platformio Ai-thinker esp32-c3 project template with ability to debug using builtin USB JTAG. To be able to view periph regs while debugging, you need

Mar 4, 2022

TTGO GPS lock fix with platformio

TTGO_T-beam_GPS-reset converted for easy upload with platformio Based on Fork by ErikThevking https://github.com/eriktheV-king/TTGO_T-beam_GPS-reset T

May 11, 2022

CMake project for BL602 RISC-V processor

CMake project for BL602 RISC-V processor

bl602_cmake_base CMake project for BL602 RISC-V processor How to build NOTE : This project uses a pre-compiled version of the Buffalo SDK (bl_iot_sdk)

Jan 6, 2022

LoRaWAN Driver for BL602 and BL604

LoRaWAN Driver for BL602 and BL604

LoRaWAN Driver for BL602 and BL604 Read the articles... "LoRaWAN on PineDio Stack BL604 RISC-V Board" "PineCone BL602 Talks LoRaWAN" "The Things Netwo

Jan 4, 2022

LoRa Driver for Semtech SX1262 on Linux (PineDio USB Adapter) and BL602 (PineDio Stack BL604)

LoRa Driver for Semtech SX1262 on Linux (PineDio USB Adapter) and BL602 (PineDio Stack BL604)

LoRa Driver for Semtech SX1262 on Linux (PineDio USB Adapter) and BL602 (PineDio Stack BL604) Read the articles... "Build a Linux Driver for PineDio L

Mar 15, 2022

The PULP Ara is a 64-bit Vector Unit, compatible with the RISC-V Vector Extension Version 0.9, working as a coprocessor to CORE-V's CVA6 core

Ara Ara is a vector unit working as a coprocessor for the CVA6 core. It supports the RISC-V Vector Extension, version 0.9. Dependencies Check DEPENDEN

Jun 13, 2022

An EDA toolchain for integrated core-memory interval thermal simulations of 2D, 2.5, and 3D multi-/many-core processors

CoMeT: An Integrated Interval Thermal Simulation Toolchain for 2D, 2.5D, and 3D Processor-Memory Systems With the growing power density in both cores

Jun 1, 2022

TestFrame - This is a test framework that uses Raylib and ImGui together to help test and develop concepts

TestFrame - This is a test framework that uses Raylib and ImGui together to help test and develop concepts

This is a test framework that uses Raylib and ImGui together to help test and develop concepts. It is made using C++ because it uses classes for windows and views.

May 13, 2022

Raspberry Pi Pico Arduino core, for all RP2040 boards

Raspberry Pi Pico Arduino core, for all RP2040 boards

Arduino-Pico Raspberry Pi Pico Arduino core, for all RP2040 boards This is a port of the RP2040 (Raspberry Pi Pico processor) to the Arduino ecosystem

Jun 22, 2022

Arduino Core for Deneyap DevKits

Arduino Core for Deneyap DevKits

Deneyap Kart Arduino Core FOR TURKISH VERSION Deneyap Kart, designed and manufactured in Turkey, is a powerful development board with its strong MCU,

May 15, 2022

Voltage Controlled Digital Core Multimode Oscillator using Mozzi library on Arduino

Arduino-VDCO Voltage Controlled Digital Core Multimode Oscillator using Mozzi library on Arduino Its a digital Oscillator/Voice for the Eurorack Stand

May 26, 2022
5G core testing solution

CoreScope CoreScope combines gNodeB and UE components without any radio transmission. It behaves like a UE and exposes an IP interface, but to the cor

Jun 9, 2022
A modern, C++-native, header-only, test framework for unit-tests, TDD and BDD - using C++11, C++14, C++17 and later (or C++03 on the Catch1.x branch)
A modern, C++-native, header-only, test framework for unit-tests, TDD and BDD - using C++11, C++14, C++17 and later (or C++03 on the Catch1.x branch)

Catch2 v3 is being developed! You are on the devel branch, where the next major version, v3, of Catch2 is being developed. As it is a significant rewo

Jun 23, 2022
A dynamic mock tool for C/C++ unit test on Linux&MacOS X86_64

lmock 接口 替换一个函数,修改机器指令,用新函数替换旧函数,支持全局函数(包括第三方和系统函数)、成员函数(包括静态和虚函数)

Jun 13, 2022
A test showing a flipped bit in a file encrypted on two different machines

ChaCha ASM Test I have observed that the ChaCha cipher may have very rarely divergent code paths for AVX vs. SSE. I have seen this in earlier CryptoPP

Dec 6, 2021
A tool to test if a shared library is dlopen'ble

A tool to test if a shared library is dlopen'ble

Oct 17, 2021
End to end test framework designed for Juce applications

JUCE End to End test framework What is it? This package provides a mechanism to end-to-end test a JUCE application Prerequisites CMake. Must be 3.18 o

May 29, 2022
Various Framework to do Unit Test in C++
Various Framework to do Unit Test in C++

Unit Test in C++ There are many frameworks to performs unit test in C++, we will present the most popular ones and show how to use them. The testing f

Nov 18, 2021
An area to test reading in ATLAS xAOD format and writing out to Parquet

xaod_to_parquet An area to test reading in ATLAS xAOD format and writing out to Parquet Getting the Code Clone the repository with the --recursive fla

Nov 19, 2021
Handy C++ test framework

C++ Voyager Test Framework Voyager is a simple and handy C++ Unit Test framework. It is designed to be beautiful and expressive both. Try it to feel i

Mar 16, 2022
Network utility tool which enables to prototype or test network things.

netsck netsck is a network utility tool which is developed to prototype or test network things. It provides a shell inside which runs javascript engin

May 29, 2022