I bought dev board for evaluation purpose (currently run on ESP32)
chip: nrf52832
board:E104-BT5032A-TB (http://www.ebyte.com/en/product-view-news.aspx?id=956)
framework: Arduino
IDE: Platformio
upload: Stlink v2
and tried simple blink to upload w/ STlink v2 in Platformio:
/* * Blink * Turns on an LED on for one second, * then off for one second, repeatedly. */ #include <Arduino.h> void setup() { // initialize LED digital pin as an output. pinMode(LED_BUILTIN, OUTPUT); } void loop() { // turn the LED on (HIGH is the voltage level) digitalWrite(LED_BUILTIN, HIGH); // wait for a second delay(100); // turn the LED off by making the voltage LOW digitalWrite(LED_BUILTIN, LOW); // wait for a second delay(100); }
w/ platformio.ini file:
[env:nrf52_dk] platform = nordicnrf52 board = nrf52_dk board_build.variant = generic framework = arduino upload_protocol = stlink
but end w/ error:
> Executing task in folder nrf-blink: C:\Users\max\.platformio\penv\Scripts\platformio.exe run --target upload <
Processing nrf52_dk (platform: nordicnrf52; board: nrf52_dk; framework: arduino)
----------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: docs.platformio.org/.../nrf52_dk.html
PLATFORM: Nordic nRF52 (4.4.1) > Nordic nRF52-DK
HARDWARE: NRF52832 64MHz, 64KB RAM, 512KB Flash
DEBUG: Current (jlink) On-board (cmsis-dap, jlink) External (blackmagic, stlink)
PACKAGES:
- framework-arduinonordicnrf5 1.600.190830 (6.0)
- tool-bossac-nordicnrf52 1.10866.191129 (1.8.66)
- tool-jlink 1.65200.0 (6.52.0)
- tool-openocd 2.1000.200630 (10.0)
- tool-sreccat 1.164.0 (1.64)
- toolchain-gccarmnoneeabi 1.70201.0 (7.2.1)
LDF: Library Dependency Finder -> bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 2 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Checking size .pio\build\nrf52_dk\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [ ] 0.2% (used 140 bytes from 65536 bytes)
Flash: [ ] 0.5% (used 2536 bytes from 524288 bytes)
Configuring upload protocol...
AVAILABLE: blackmagic, cmsis-dap, jlink, mbed, nrfjprog, stlink
CURRENT: upload_protocol = stlink
Uploading .pio\build\nrf52_dk\firmware.hex
xPack OpenOCD, x86_64 Open On-Chip Debugger 0.10.0+dev-00378-ge5be992df (2020-06-26-09:29)
Licensed under GNU GPL v2
For bug reports, read
openocd.org/.../bugs.html
debug_level: 1
0x4000
nRF52 device has a CTRL-AP dedicated to recover the device from AP lock.
A high level adapter (like a ST-Link) you are currently using cannot access
the CTRL-AP so 'nrf52_recover' command will not work.
Do not enable UICR APPROTECT.
Error: timed out while waiting for target halted
embedded:startup.tcl:521: Error: ** Unable to reset target **
in procedure 'program'
in procedure 'program_error' called at file "embedded:startup.tcl", line 558
at file "embedded:startup.tcl", line 521
*** [upload] Error 1
============================================================ [FAILED] Took 2.21 seconds ============================================================
The terminal process "C:\Users\max\.platformio\penv\Scripts\platformio.exe 'run', '--target', 'upload'" terminated with exit code: 1.
Terminal will be reused by tasks, press any key to close it.
Is anybody can success example?