GithubHelp home page GithubHelp logo

platformio / platform-nordicnrf51 Goto Github PK

View Code? Open in Web Editor NEW
20.0 6.0 25.0 261 KB

Nordic nRF51: development platform for PlatformIO

Home Page: https://registry.platformio.org/platforms/platformio/nordicnrf51

License: Apache License 2.0

Python 100.00%
platformio nrf51822 platformio-platform mbed

platform-nordicnrf51's Introduction

PlatformIO Core

CI Build for PlatformIO Core CI Build for Docs CI Build for dev-platform examples CI Build for the Community Projects Latest Version PlatformIO Labs

Quick Links: Homepage | PlatformIO IDE | Registry | Project Examples | Docs | Donate | Contact Us

Social: LinkedIn | Twitter | Facebook | Community Forums

https://raw.githubusercontent.com/platformio/platformio-web/develop/app/images/platformio-ide-laptop.png

PlatformIO: Your Gateway to Embedded Software Development Excellence.

Unlock the true potential of embedded software development with PlatformIO's collaborative ecosystem, embracing declarative principles, test-driven methodologies, and modern toolchains for unrivaled success.

  • Open source, maximum permissive Apache 2.0 license
  • Cross-platform IDE and Unified Debugger
  • Static Code Analyzer and Remote Unit Testing
  • Multi-platform and Multi-architecture Build System
  • Firmware File Explorer and Memory Inspection

Get Started

Solutions

Advanced

Registry

Contributing

See contributing guidelines.

Telemetry / Privacy Policy

Share minimal diagnostics and usage information to help us make PlatformIO better. It is enabled by default. For more information see:

License

Copyright (c) 2014-present PlatformIO <[email protected]>

The PlatformIO is licensed under the permissive Apache 2.0 license, so you can use it in both commercial and personal projects with confidence.

SWUbanner

platform-nordicnrf51's People

Contributors

aldrinleal avatar ivankravets avatar valeros avatar

Stargazers

 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

platform-nordicnrf51's Issues

zephir-ble-eddystone example

hi,
trying to build the zephir-ble-eddystone example, with bbc microbit board, this issue apparead :

~/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: region `SRAM' overflowed by 572 bytes (103 %)

Just a issue with zephyr , or with duo zephyr-pio ?
thanks

nrf51822 : support for mbed framework broken

Hi,
I have 2 issues :

  1. trying to build&upload the nrf51 examples, I run into the following problem.
    Build is successful, but the build script's last step is to merge 'firmware.hex' and 'userfirmware.hex', but firmware.hex doesn't exist in the build directory. This gives an error on the upload step (see output log below). I can't figure out where 'firmware.hex' is supposed to come from.
    userfirmware.hex is built from firmware.elf; I can upload this file to the target with openocd, and it works correctly, but it requires the correct nordic SoftDevice to be already present in flash.
  2. all the nrf51822.ld files in framework-mbed offset the user app in flash & ram, using offsets for a nordic SoftDevice, even when building with mbed BLE, like the mbed-ble-thermometer example. This causes the device to run out of RAM ( issue #18 ), and wastes ~90k of flash space on a double BLE stack. Is there a way to configure a build with or without nordic softdevice?
    Thanks for your help,
    Stefaan

[build step - end]

Compiling .pioenvs/nrf51_mkit/src/main.o
Generating LD script .pioenvs/nrf51_mkit/NRF51822.ld.link_script.ld
Linking .pioenvs/nrf51_mkit/firmware.elf
Checking size .pioenvs/nrf51_mkit/firmware.elf
Building .pioenvs/nrf51_mkit/userfirmware.hex
Memory Usage -> http://bit.ly/pio-memory-usage
DATA:    [=         ]   5.9% (used 960 bytes from 16384 bytes)
PROGRAM: [=         ]   9.4% (used 12340 bytes from 131072 bytes)
merge_firmwares([".pioenvs/nrf51_mkit/firmware.hex"], [".pioenvs/nrf51_mkit/userfirmware.hex"])

[upload step ->error ]

Uploading .pioenvs/nrf51_mkit/firmware.hex
GNU MCU Eclipse 64-bits Open On-Chip Debugger 0.10.0+dev-00392-gbe9ef0b0 (2018-01-12-14:56)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
0x4000
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 1000 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : clock speed 950 kHz
Info : STLINK v2 JTAG v27 API v2 SWIM v6 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 3.227369
Info : nrf51.cpu: hardware has 4 breakpoints, 2 watchpoints
Info : Listening on port 3333 for gdb connections
target halted due to debug-request, current mode: Thread
xPSR: 0xc1000000 pc: 0x000006d0 msp: 0x000007c0
** Programming Started **
auto erase enabled
Error: couldn't open .pioenvs/nrf51_mkit/firmware.hex
embedded:startup.tcl:476: Error: ** Programming Failed **
in procedure 'program'
in procedure 'program_error' called at file "embedded:startup.tcl", line 532
at file "embedded:startup.tcl", line 476
*** [upload] Error 1

I'm using the platformio extension in vscode on ubuntu, with github latest platform-nordicnrf51 (which pulls framework-mbed version 5.51104.190214)

Broken nrf51_dongle

I created a project and tried to build it with
platformio init -b nrf51_dongle
platformio run

But all I get is this error
http://pastebin.com/VeEiRxg4

If I use e.g. the nrf51_dk board everything compiles without any errors.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/40554365-broken-nrf51_dongle?utm_campaign=plugin&utm_content=tracker%2F38217987&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F38217987&utm_medium=issues&utm_source=github).

BLE library is broken for nrf51xx

A simple program fails to compile (Red Bear BleNano):

#include "mbed.h"
#include "ble/BLE.h"
#include "DFUService.h"

void main() {
}

I've installed the following library:
pio lib install 296

And I'm getting the following errors:

[Thu Jan 12 08:23:46 2017] Processing redBearLabBLENano (platform: nordicnrf51, board: redBearLabBLENano, framework: mbed)
--------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
Collected 8 compatible libraries
Looking for dependencies...
Library Dependency Graph
|-- <ble> v2.7.0

Compiling .pioenvs/redBearLabBLENano/src/main.o
Compiling .pioenvs/redBearLabBLENano/lib/ble_ID296/BLE.o
Compiling .pioenvs/redBearLabBLENano/lib/ble_ID296/BLEInstanceBase.o
Compiling .pioenvs/redBearLabBLENano/lib/ble_ID296/DiscoveredCharacteristic.o
Compiling .pioenvs/redBearLabBLENano/lib/ble_ID296/GapScanningParams.o
Compiling .pioenvs/redBearLabBLENano/lib/ble_ID296/services/DFUService.o
Compiling .pioenvs/redBearLabBLENano/lib/ble_ID296/services/UARTService.o
Compiling .pioenvs/redBearLabBLENano/lib/ble_ID296/services/URIBeaconConfigService.o
src/main.cpp:3:24: fatal error: DFUService.h: No such file or directory
#include "DFUService.h"
^
compilation terminated.
In file included from .piolibdeps/ble_ID296/source/services/DFUService.cpp:19:0:
.piolibdeps/ble_ID296/ble/services/DFUService.h:26:29: fatal error: dfu_app_handler.h: No such file or directory
#include "dfu_app_handler.h"
^
compilation terminated.
*** [.pioenvs/redBearLabBLENano/src/main.o] Error 1
*** [.pioenvs/redBearLabBLENano/lib/ble_ID296/services/DFUService.o] Error 1
========================== [ERROR] Took 3.72 seconds ==========================


OS: MacOS Sierra 10.12.1
IDE: 1.7.1
Core: 3.2.1

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/40857370-ble-library-is-broken-for-nrf51xx?utm_campaign=plugin&utm_content=tracker%2F38217987&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F38217987&utm_medium=issues&utm_source=github).

LoRaWAN compilation fails

I know it is an old release but for some reasons (hw compatibility) I cannot go higher. Do you happen to have an idea how to fix this error?

In file included from /home/danman/.platformio/packages/[email protected]/features/lorawan/lorastack/mac/LoRaMac.h:52:0,
                 from /home/danman/.platformio/packages/[email protected]/features/lorawan/LoRaWANStack.h:49,
                 from /home/danman/.platformio/packages/[email protected]/features/lorawan/LoRaWANInterface.h:23,
                 from /home/danman/.platformio/packages/[email protected]/features/lorawan/LoRaWANInterface.cpp:22:
/home/danman/.platformio/packages/[email protected]/features/lorawan/lorastack/mac/LoRaMacCrypto.h:33:10: fatal error: mbedtls/aes.h: No such file or directory
 #include "mbedtls/aes.h"
          ^~~~~~~~~~~~~~~
compilation terminated.
Dependency Graph
|-- <mbed-mbedtls>
|-- <mbed-lorawan>
|   |-- <mbed-mbed-trace>
|   |   |-- <mbed-nanostack-libservice>
|-- <mbed-events>
|-- <mbed-semtech-lora-rf-drivers>
|   |-- <mbed-lorawan>
|   |   |-- <mbed-mbed-trace>
|   |   |   |-- <mbed-nanostack-libservice>
|-- <mbed-FEATURE_BLE>

Plateform.json should include framework-zephyr-hal-st to allows ST sensors drivers to work

Bug

In order to use the magnetometer sensor of the BBC:Microbit v1.5 we need to compile the LIS2MDL driver.

To compile, this driver need a file named "lis2dh_reg.h" who is part of the zephyr-hal-st. This HAL is not releated to STM32 mcu but only to ST sensors (https://github.com/zephyrproject-rtos/hal_st)

Platformio should allows download of this module for the nordic platform.

Solution proposal

Updating the platform.json by adding the following line :

"framework-zephyr-hal-st": {
      "optional": true,
      "version": "0.0.0-alpha+sha.5b3ec3e182"
}

Project to reproduce

src/main.c

/*
 * Copyright (c) 2018, Yannis Damigos
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#include <zephyr.h>
#include <device.h>
#include <drivers/sensor.h>
#include <stdio.h>
#include <sys/util.h>

static s32_t read_sensor(struct device *sensor, enum sensor_channel channel)
{
	struct sensor_value val[3];
	s32_t ret = 0;

	ret = sensor_sample_fetch(sensor);
	if (ret < 0 && ret != -EBADMSG) {
		printf("Sensor sample update error\n");
		goto end;
	}

	ret = sensor_channel_get(sensor, channel, val);
	if (ret < 0) {
		printf("Cannot read sensor channels\n");
		goto end;
	}

	printf("( x y z ) = ( %f  %f  %f )\n", sensor_value_to_double(&val[0]),
					       sensor_value_to_double(&val[1]),
					       sensor_value_to_double(&val[2]));

end:
	return ret;
}

void main(void)
{
	struct device *accelerometer = device_get_binding(
						DT_LABEL(DT_INST(0, st_lis2dh)));
	struct device *magnetometer = device_get_binding(
						DT_LABEL(DT_INST(0, st_lis2mdl)));

	if (accelerometer == NULL) {
		printf("Could not get %s device\n",
				DT_LABEL(DT_INST(0, st_lis2dh)));
		return;
	}

	if (magnetometer == NULL) {
		printf("Could not get %s device\n",
				DT_LABEL(DT_INST(0, st_lis2mdl)));
		return;
	}

	while (1) {
		printf("Magnetometer data:\n");
		if (read_sensor(magnetometer, SENSOR_CHAN_MAGN_XYZ) < 0) {
			printf("Failed to read magnetometer data\n");
		}

		printf("Accelerometer data:\n");
		if (read_sensor(accelerometer, SENSOR_CHAN_ACCEL_XYZ) < 0) {
			printf("Failed to read accelerometer data\n");
		}

		k_sleep(K_MSEC(2000));
	}
}

zephyr/CMakeLists.txt

set(ZEPHYR_EXTRA_MODULES "/Users/username/.platformio/packages/framework-zephyr-hal-st")

cmake_minimum_required(VERSION 3.13.1)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(peripheral)

target_sources(app PRIVATE
  ../src/main.c
)

zephyr/prj.conf

CONFIG_STDOUT_CONSOLE=y
CONFIG_I2C=y
CONFIG_SENSOR=y
CONFIG_LIS2DH=y
CONFIG_LIS2MDL=y

zephyr/bbc_microbit.overlay

&i2c0 {
	status = "okay";
	clock-frequency = <I2C_BITRATE_FAST>;
	sda-pin = <30>;
	scl-pin = <0>;

	/* See https://tech.microbit.org/hardware/i2c/ for board variants */

	/* v1.3 MMA8653FC (= FXOS8700) + MAG3110 */
	mma8653fc@1d {
		compatible = "nxp,fxos8700", "nxp,mma8653fc";
		status = "okay";
		reg = <0x1d>;
		label = "MMA8653FC";
		int1-gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
		int2-gpios = <&gpio0 27 GPIO_ACTIVE_LOW>;
	};

	/* v1.5 variant 1 LSM303AGR */
	lsm303agr-magn@1e {
		compatible = "st,lis2mdl", "st,lsm303agr-magn";
		status = "okay";
		reg = <0x1e>;
		label = "LSM303AGR-MAGN";
		irq-gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>;	/* A3 */
	};

	lsm303agr-accel@19 {
		compatible = "st,lis2dh", "st,lsm303agr-accel";
		status = "okay";
		reg = <0x19>;
		label = "LSM303AGR-ACCEL";
		irq-gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
	};
};

mbed-ble-thermometer example fails to link with redBearLabBLENano board

...
Generating LD script .pioenvs/ble_nano/NRF51822.ld.link_script.ld
Linking .pioenvs/ble_nano/firmware.elf
.pioenvs/ble_nano/NRF51822.ld.link_script.ld:78 cannot move location counter backwards (from 0000000020004650 to 0000000020003800)
collect2: error: ld returned 1 exit status
*** [.pioenvs/ble_nano/firmware.elf] Error 1

The same example works with nrf51_dk.

Whitespace in windows user name crashes build

Hello,

With my username on windows, I have a white space in-between my name and surname which causes the PlatformIO Build task to crash as it doesn't find the correct paths. I had to make a couple modifications to add double quotes for the builder python files so that it works correctly.

in builder/main.py line 77 - 79 I modified to look like:

'"' + join(platform.get_package_dir("tool-sreccat") or "",
"srec_cat") + '"',
'"$SOFTDEVICEHEX"',

in builder/frameworks/arduino/nrf5.py line 164 i added:

ldscript_path = '"' + ldscript_path + '"'

if this can be added, that'll be great so I don't need to keep changing it when there's an update. It shouldn't affect anyone else.

Thanks

Support Redbearlab BLE Nano with Arduino

The current platformIO uses the mbed framework like mbed web IDE. The Arduino version is not supported and may not able to use those Arduino libraries. Also, please make sure it can support these Arduino libraries for nrf5x:
Arduino nrf5
BLEPeripheral

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/41887654-support-redbearlab-ble-nano-with-arduino?utm_campaign=plugin&utm_content=tracker%2F38217987&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F38217987&utm_medium=issues&utm_source=github).

platform-nordicnrf51 is missing the generic.json nRF51 variant for Generic_nRF51822

The nRF51 variant json file for Generic_nRF51822 is missing in /.platformio/platforms/nordicnrf51/boards.

I have verified that the following generic.json works fine with nRF51822 (and nRF51802) boards.

{
  "build": {
    "arduino":{
      "ldscript": "nrf51_xxaa.ld"
    },
    "core": "nRF5",
    "cpu": "cortex-m0",
    "extra_flags": "-DARDUINO_BBC_MICROBIT -DUSE_LFRC",
    "f_cpu": "16000000L",
    "mcu": "nrf51822",
    "variant": "Generic",
    "zephyr": {
       "variant": "generic_nrf51"
    }
  },
  "connectivity": [
    "bluetooth"
  ],
  "debug": {
    "onboard_tools": [
      "jlink"
    ],
    "svd_path": "nrf51.svd",
    "jlink_device": "nRF51822_xxAA"
  },
  "frameworks": [
    "arduino",
    "mbed",
    "zephyr"
  ],
  "name": "Generic nRF51",
  "upload": {
    "maximum_ram_size": 16384,
    "maximum_size": 262144,
    "protocol": "jlink",
    "protocols": [
      "cmsis-dap",
      "mbed",
      "jlink"
    ]
  },
  "url": "https://www.nordicsemi.com/Products/nRF51822",
  "vendor": "Nordic"
}

Please review and update the repo.

Support for Waveshare NRF51822 Eval Kit

Moved from platformio/platformio-core#655

/cc @digitalstreamio @sabas1080

Any thoughts on what it would take to support this nRF51822 based board?

http://www.waveshare.com/product/modules/wireless/bluetooth/nrf51822-eval-kit.htm
http://www.waveshare.com/wiki/NRF51822_Eval_Kit

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/39567455-support-for-waveshare-nrf51822-eval-kit?utm_campaign=plugin&utm_content=tracker%2F38217987&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F38217987&utm_medium=issues&utm_source=github).

Change address and advertisement

Hello guys, I have been trying to change the address of the device, it compiles properly but somehow i am not able to change it, i also want to advertise custom data but no luck yet.

#include <SPI.h>
#include <BLEUtil.h>
#include <BLEPeripheral.h>
#include <utility/RFduino/ble_gap.h>
#include <utility/RFduino/ble_gatt.h>
#include <Arduino.h>

BLEPeripheral *advertiser;
iBeacon beacon;
void setup(){
	  // Changing Bluetooth Address
  ble_gap_addr_t gap_address;
  gap_address.addr_type = BLE_GAP_ADDR_TYPE_RANDOM_STATIC;
  gap_address.addr[0] = 0xac;  // Least significant byte
  gap_address.addr[1] = 0x06;
  gap_address.addr[2] = 0x50;
  gap_address.addr[3] = 0x97;
  gap_address.addr[4] = 0xa5;
  gap_address.addr[5] = 0xf9;  // Most significant byte

  sd_ble_gap_address_set(BLE_GAP_ADDR_CYCLE_MODE_NONE, &gap_address);
  
	advertiser=new(BLEPeripheral);
  	advertiser->setConnectable(false);
	uint8_t custom_payload[] = {0xFF,0x4c, 0x00, 0x12, 0x19, 0x00,
  0xf8, 0x6d, 0xa4, 0xbc, 0x43, 0x65, 0x99, 0x62,
  0x0f, 0x53, 0x52, 0x01, 0x3e, 0x1f, 0x94, 0xb4,
  0x3f, 0x91, 0x00, 0x92, 0x54, 0x26,
  0x2, 0x00}; // Example payload
  advertiser->setManufacturerData(custom_payload, sizeof(custom_payload));

  advertiser->begin();
}

In theory i should be able to change the address and avertise but it doesnt happen :(

BBC MicroBit with S130 SoftDevice

From @wilstam on October 27, 2016 3:39

Configuration

Operating system:
macOS Sierra 10.12.1

PlatformIO Version (platformio --version):
PlatformIO, version 3.1.0

Description of problem

There seems no setup for BBC MicroBit with S130 SoftDevice

Steps to Reproduce

  1. Run 'pio run -v' on a MicroBit project. ie [env:bbcmicrobit]
  2. The linker script and the tool-sreccat will use S110 soft device by default.
  3. There seems no way to config the build to use S130 soft device.
  4. There has 'RF51_MICROBIT_B' setup under framework-mbed/hal/targets.json but there has no env has setup for it.

I have tried to change the following line to 'platforms/nordicnrf51/builder/frameworks/mbed/mbed.py:78

"bbcmicrobit": "NRF51_MICROBIT_B"

The projecct is build with S130 and using correct linker script at 'packages/framework-mbed/hal/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_
ARM/TARGET_MCU_NRF51_16K_S130/NRF51822.ld'

Wonder what is the best way to add a support for this?

Thanks,
Wilson

Copied from original issue: platformio/platformio-core#815

core51822 not running with arduino

I've just opened two blink examples, arduino and zephyr. Set as ble400, upload_protocol = stlink, pin to 21. Both flashed without any problems. After reset zephyr works like a charm, arduino no signs of life.

Issue with missing board ID for RFduino

Hello, am attempting to program an RFduino using PlatformIO with ST-link as the programmer. As you may know, RFduino is based on nrf51822, although this particular board has been discontinued by RFdigital. However, I understand that support for RFduino was already added as a board, as documented on this link: platformio/platformio-core#319
However, I am unable to call upon RFduino within PIO on VScode. This is what I've modified inside my project's platformio.ini:

[env:nrf51_dk]
platform = nordicnrf51
framework = arduino
board = rfduino
upload_protocol = stlink
debug_tool = stlink

And when attempting to Build a very simple LED blink example for my RFduino, this is the error I get:

Processing nrf51_dk (platform: nordicnrf51; framework: arduino; board: rfduino)

Error: Unknown board ID 'rfduino'
The terminal process "%username%.platformio\penv\Scripts\platformio.exe 'run'" terminated with exit code: 1.

Infact, I also checked %username%.platformio\platforms\nordicnrf51\boards and I do not see RFduino listed in there. I thought this board was already added in as a feature earlier or has it been removed since? Is there some additional board declaration or json file I might be missing??

Reboots my macbook m1

I'm programming a Xiao Sense.
Uploading sketches is fine most of the time.
However, it's the second time in 10min that uploading a sketch hard crashed my macbook (see error below)

platformio.ini

[env:xiao_ble_sense]

platform = nordicnrf52
board = xiao_ble_sense
framework = arduino
monitor_speed = 115200

error:

panic(cpu 2 caller 0xfffffe0027575f88): Kernel data abort. at pc 0xfffffe002893ddcc, lr 0xebc87e002893de08 (saved state: 0xfffffe8414da7420)
	  x0:  0x0000000000000000 x1:  0xfffffe002a4cc040  x2:  0xfffffe1b32e36080  x3:  0x00000000000000e0
	  x4:  0xfffffe1b32e36100 x5:  0x0000000000000000  x6:  0xfffffe002632e690  x7:  0xffffffffffffffff
	  x8:  0x0000000000000000 x9:  0xfffffe20000e2fb0  x10: 0x0000000000000b60  x11: 0x0000000000004001
	  x12: 0x0000002000000000 x13: 0xfffffe002a4c2000  x14: 0x0000000000000020  x15: 0xfffffe002a4c2000
	  x16: 0xfffffe002632e0c8 x17: 0x1ba6fe002632e0c8  x18: 0x0000000000000000  x19: 0xfffffe24ce2f2060
	  x20: 0xfffffe8414da7838 x21: 0xfffffe24ce2f2060  x22: 0x0000000000000000  x23: 0x0000000000000001
	  x24: 0xd78b7e00288d0cf4 x25: 0x0000000000000000  x26: 0xfffffe8414da78ee  x27: 0xfffffe1667839950
	  x28: 0xfffffe1fffe33a88 fp:  0xfffffe8414da77f0  lr:  0xebc87e002893de08  sp:  0xfffffe8414da7770
	  pc:  0xfffffe002893ddcc cpsr: 0x80401208         esr: 0x96000005          far: 0x0000000000000000

Debugger message: panic
Memory ID: 0x1
OS release type: User
OS version: 23E224
Kernel version: Darwin Kernel Version 23.4.0: Fri Mar 15 00:10:42 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6000
Fileset Kernelcache UUID: 9EC7FBEFD78CA9C9BCFBF3637BA3DB70
Kernel UUID: 52F71D8C-FEDF-3A4B-9B6B-8463C5251B20
Boot session UUID: 2527621C-6B75-45B6-AE08-DB29703694E3
iBoot version: iBoot-10151.101.3
secure boot?: YES
roots installed: 0
Paniclog version: 14
KernelCache slide: 0x000000001e7b4000
KernelCache base:  0xfffffe00257b8000
Kernel slide:      0x000000001e7bc000
Kernel text base:  0xfffffe00257c0000
Kernel text exec slide: 0x000000001fcec000
Kernel text exec base:  0xfffffe0026cf0000
mach_absolute_time: 0xa3151e97d
Epoch Time:        sec       usec
  Boot    : 0x6657be06 0x0005fa87
  Sleep   : 0x6657c162 0x0001d0a0
  Wake    : 0x6657c365 0x00001c72
  Calendar: 0x6657c722 0x000a7c19

Zone info:
  Zone map: 0xfffffe10006e4000 - 0xfffffe30006e4000
  . VM    : 0xfffffe10006e4000 - 0xfffffe14cd3b0000
  . RO    : 0xfffffe14cd3b0000 - 0xfffffe1666d48000
  . GEN0  : 0xfffffe1666d48000 - 0xfffffe1b33a14000
  . GEN1  : 0xfffffe1b33a14000 - 0xfffffe20006e0000
  . GEN2  : 0xfffffe20006e0000 - 0xfffffe24cd3ac000
  . GEN3  : 0xfffffe24cd3ac000 - 0xfffffe299a078000
  . DATA  : 0xfffffe299a078000 - 0xfffffe30006e4000
  Metadata: 0xfffffe30366f4000 - 0xfffffe303e6f4000
  Bitmaps : 0xfffffe303e6f4000 - 0xfffffe30443dc000
  Extra   : 0 - 0

TPIDRx_ELy = {1: 0xfffffe29990c8800  0: 0x0000000000001002  0ro: 0x00000003063900e0 }
CORE 0 PVH locks held: None
CORE 1 PVH locks held: None
CORE 2 PVH locks held: None
CORE 3 PVH locks held: None
CORE 4 PVH locks held: None
CORE 5 PVH locks held: None
CORE 6 PVH locks held: None
CORE 7 PVH locks held: None
CORE 8 PVH locks held: None
CORE 9 PVH locks held: None
CORE 0: PC=0xfffffe00273cc6cc, LR=0xfffffe00273cc618, FP=0xfffffe8413b03600
CORE 1: PC=0xfffffe0026dc485c, LR=0xfffffe0026dc42c8, FP=0xfffffe8413deb890
CORE 2 is the one that panicked. Check the full backtrace for details.
CORE 3: PC=0xfffffe0026d858bc, LR=0xfffffe0026d858bc, FP=0xfffffe8414ac7ef0
CORE 4: PC=0xfffffe0026d858bc, LR=0xfffffe0026d858bc, FP=0xfffffe8414d3bef0
CORE 5: PC=0xfffffe0026d858bc, LR=0xfffffe0026d858bc, FP=0xfffffe8415187ef0
CORE 6: PC=0xfffffe0026d858bc, LR=0xfffffe0026d858bc, FP=0xfffffe8414b1bef0
CORE 7: PC=0xfffffe0026d858bc, LR=0xfffffe0026d858bc, FP=0xfffffe841519fef0
CORE 8: PC=0xfffffe0026d858bc, LR=0xfffffe0026d858bc, FP=0xfffffe84150d3ef0
CORE 9: PC=0xfffffe0026d858bc, LR=0xfffffe0026d858bc, FP=0xfffffe841455fef0
Compressor Info: 0% of compressed pages limit (OK) and 0% of segments limit (OK) with 0 swapfiles and OK swap space
Panicked task 0xfffffe24cba7e678: 16145 pages, 4 threads: pid 2921: python3
Panicked thread: 0xfffffe29990c8800, backtrace: 0xfffffe8414da6bb0, tid: 37832
		  lr: 0xfffffe0026d49f70  fp: 0xfffffe8414da6c40
		  lr: 0xfffffe0026e977d4  fp: 0xfffffe8414da6cb0
		  lr: 0xfffffe0026e95b48  fp: 0xfffffe8414da6d70
		  lr: 0xfffffe0026cf7ba8  fp: 0xfffffe8414da6d80
		  lr: 0xfffffe0026d4984c  fp: 0xfffffe8414da7130
		  lr: 0xfffffe002756b36c  fp: 0xfffffe8414da7150
		  lr: 0xfffffe0027575f88  fp: 0xfffffe8414da72d0
		  lr: 0xfffffe0026e975fc  fp: 0xfffffe8414da7340
		  lr: 0xfffffe0026e95d04  fp: 0xfffffe8414da7400
		  lr: 0xfffffe0026cf7ba8  fp: 0xfffffe8414da7410
		  lr: 0xfffffe002893de08  fp: 0xfffffe8414da77f0
		  lr: 0xfffffe00288d0d6c  fp: 0xfffffe8414da7860
		  lr: 0xfffffe002746a314  fp: 0xfffffe8414da78d0
		  lr: 0xfffffe00288d0ca0  fp: 0xfffffe8414da7900
		  lr: 0xfffffe002898f6e0  fp: 0xfffffe8414da7930
		  lr: 0xfffffe002956afac  fp: 0xfffffe8414da7970
		  lr: 0xfffffe0029566a64  fp: 0xfffffe8414da7a20
		  lr: 0xfffffe0026f746a8  fp: 0xfffffe8414da7a80
		  lr: 0xfffffe0026f658d8  fp: 0xfffffe8414da7ca0
		  lr: 0xfffffe0027217304  fp: 0xfffffe8414da7ce0
		  lr: 0xfffffe00272825c0  fp: 0xfffffe8414da7df0
		  lr: 0xfffffe002737dc30  fp: 0xfffffe8414da7e50
		  lr: 0xfffffe0026e95cb8  fp: 0xfffffe8414da7f10
		  lr: 0xfffffe0026cf7ba8  fp: 0xfffffe8414da7f20
		  lr: 0xfffffe0026cf7b70  fp: 0x0000000000000000
      Kernel Extensions in backtrace:
         com.apple.iokit.IOSerialFamily(11.0)[0398B8E1-C573-3238-B224-6A2A033A4A5B]@0xfffffe0029565810->0xfffffe002956da3f
         com.apple.driver.usb.cdc(5.0)[1EA780CE-A04B-36F9-9106-21E2797CFD0A]@0xfffffe002893c0e0->0xfffffe002893e4c3
            dependency: com.apple.driver.usb.AppleUSBHostCompositeDevice(1.2)[4E3D8BB0-E1FD-3D1A-A75B-62E6FFB9615A]@0xfffffe0029a0bac0->0xfffffe0029a0ffdb
            dependency: com.apple.driver.usb.networking(5.0.0)[F179BBBC-5AC2-37C4-ADED-95C68D59B1CB]@0xfffffe0028984370->0xfffffe0028986557
            dependency: com.apple.iokit.IOUSBHostFamily(1.2)[8E73FA69-C43E-38F7-811C-6D60B50D213B]@0xfffffe0029894040->0xfffffe002994644f
         com.apple.driver.usb.serial(6.0)[48C689E4-3887-3AF6-8A01-B2502BEFBC1F]@0xfffffe002898b6a0->0xfffffe0028991063
            dependency: com.apple.iokit.IOSerialFamily(11)[0398B8E1-C573-3238-B224-6A2A033A4A5B]@0xfffffe0029565810->0xfffffe002956da3f
            dependency: com.apple.iokit.IOUSBHostFamily(1.2)[8E73FA69-C43E-38F7-811C-6D60B50D213B]@0xfffffe0029894040->0xfffffe002994644f
         com.apple.driver.usb.cdc.acm(5.0)[A367A0C1-19FC-37D6-9B83-28AF9074A598]@0xfffffe00288cf440->0xfffffe00288d2203
            dependency: com.apple.driver.usb.AppleUSBHostCompositeDevice(1.2)[4E3D8BB0-E1FD-3D1A-A75B-62E6FFB9615A]@0xfffffe0029a0bac0->0xfffffe0029a0ffdb
            dependency: com.apple.driver.usb.cdc(5.0.0)[1EA780CE-A04B-36F9-9106-21E2797CFD0A]@0xfffffe002893c0e0->0xfffffe002893e4c3
            dependency: com.apple.driver.usb.networking(5.0.0)[F179BBBC-5AC2-37C4-ADED-95C68D59B1CB]@0xfffffe0028984370->0xfffffe0028986557
            dependency: com.apple.driver.usb.serial(6.0.0)[48C689E4-3887-3AF6-8A01-B2502BEFBC1F]@0xfffffe002898b6a0->0xfffffe0028991063
            dependency: com.apple.iokit.IOSerialFamily(11)[0398B8E1-C573-3238-B224-6A2A033A4A5B]@0xfffffe0029565810->0xfffffe002956da3f
            dependency: com.apple.iokit.IOUSBHostFamily(1.2)[8E73FA69-C43E-38F7-811C-6D60B50D213B]@0xfffffe0029894040->0xfffffe002994644f

last started kext at 941597297: com.apple.filesystems.autofs	3.0 (addr 0xfffffe00261b35e0, size 6069)
loaded kexts:
com.apple.filesystems.autofs	3.0
com.apple.iokit.SCSITaskUserClient	495
com.apple.driver.AppleUSBMassStorageInterfaceNub	556
com.apple.driver.usb.AppleUSBHostBillboardDevice	1.0
com.apple.driver.AppleTopCaseHIDEventDriver	7440.8
com.apple.driver.AppleBiometricServices	1
com.apple.driver.CoreKDL	1
com.apple.driver.DiskImages.ReadWriteDiskImage	493.0.0
com.apple.driver.DiskImages.UDIFDiskImage	493.0.0
com.apple.driver.DiskImages.RAMBackingStore	493.0.0
com.apple.driver.DiskImages.FileBackingStore	493.0.0
com.apple.driver.BCMWLANFirmware4387.Hashstore	1
com.apple.driver.SEPHibernation	1
com.apple.driver.AppleUSBDeviceNCM	5.0.0
com.apple.driver.AppleFileSystemDriver	3.0.1
com.apple.nke.l2tp	1.9
com.apple.filesystems.tmpfs	1
com.apple.filesystems.nfs	1
com.apple.filesystems.lifs	1
com.apple.filesystems.apfs	2236.101.1
com.apple.IOTextEncryptionFamily	1.0.0
com.apple.filesystems.hfs.kext	650.0.2
com.apple.security.BootPolicy	1
com.apple.BootCache	40
com.apple.AppleFSCompression.AppleFSCompressionTypeZlib	1.0.0
com.apple.AppleFSCompression.AppleFSCompressionTypeDataless	1.0.0d1
com.apple.driver.AppleSmartBatteryManager	161.0.0
com.apple.driver.AppleThunderboltIP	4.0.3
com.apple.driver.AppleALSColorSensor	1.0.0d1
com.apple.driver.AppleAOPVoiceTrigger	340.42
com.apple.driver.ApplePMP	1
com.apple.driver.AppleSmartIO2	1
com.apple.driver.AppleCS42L84Audio	740.41
com.apple.AppleEmbeddedSimpleSPINORFlasher	1
com.apple.driver.AppleSN012776Amp	740.41
com.apple.driver.AppleT6000SOCTuner	1
com.apple.driver.AppleT6000CLPCv3	1
com.apple.driver.ApplePMPFirmware	1
com.apple.driver.AppleDPDisplayTCON	1
com.apple.driver.AppleInterruptControllerV2	1.0.0d1
com.apple.driver.AppleProResHW	350.47.0
com.apple.driver.AppleJPEGDriver	6.6.2
com.apple.driver.AppleAVE2	760.23.1
com.apple.driver.AppleAVD	740
com.apple.AGXG13X	280.3.9
com.apple.driver.AppleMCDP29XXUpdateSupport	1
com.apple.driver.usb.AppleSynopsysUSB40XHCI	1
com.apple.driver.AppleEventLogHandler	1
com.apple.driver.AppleT6001PMGR	1
com.apple.driver.AppleS5L8960XNCO	1
com.apple.driver.AppleS8000DWI	1.0.0d1
com.apple.driver.AppleS8000AES	1
com.apple.driver.AppleSamsungSerial	1.0.0d1
com.apple.driver.AppleSerialShim	1
com.apple.driver.AppleMobileDispT600X-DCP	140.0
com.apple.driver.AppleT8110DART	1
com.apple.driver.AppleBluetoothModule	1
com.apple.driver.AppleBCMWLANBusInterfacePCIe	1
com.apple.driver.AppleS5L8920XPWM	1.0.0d1
com.apple.driver.AudioDMAController-T600x	340.58
com.apple.driver.AppleT6000DART	1
com.apple.driver.AppleSPIMC	1
com.apple.driver.AppleS5L8940XI2C	1.0.0d2
com.apple.driver.AppleT6000	1
com.apple.driver.AppleSDXC	3.5.1
com.apple.driver.AppleM68Buttons	1.0.0d1
com.apple.iokit.IOUserEthernet	1.0.1
com.apple.driver.usb.AppleUSBUserHCI	1
com.apple.iokit.IOKitRegistryCompatibility	1
com.apple.iokit.EndpointSecurity	1
com.apple.driver.AppleUIO	1
com.apple.driver.AppleDiskImages2	276.100.16
com.apple.AppleSystemPolicy	2.0.0
com.apple.nke.applicationfirewall	404
com.apple.kec.InvalidateHmac	1
com.apple.kec.AppleEncryptedArchive	1
com.apple.driver.driverkit.serial	6.0.0
com.apple.driver.usb.cdc.ncm	5.0.0
com.apple.driver.usb.cdc.ecm	5.0.0
com.apple.driver.usb.cdc.acm	5.0.0
com.apple.driver.usb.serial	6.0.0
com.apple.iokit.IOAVBFamily	1220.1
com.apple.driver.usb.IOUSBHostHIDDevice	1.2
com.apple.driver.usb.cdc	5.0.0
com.apple.driver.AppleUSBAudio	640.12
com.apple.iokit.IOAudioFamily	540.3
com.apple.vecLib.kext	1.2.0
com.apple.driver.AppleHIDKeyboard	7440.3
com.apple.driver.AppleHSBluetoothDriver	7440.8
com.apple.driver.IOBluetoothHIDDriver	9.0.0
com.apple.driver.AppleActuatorDriver	7440.9
com.apple.driver.AppleMultitouchDriver	7440.9
com.apple.driver.AppleMesaSEPDriver	100.99
com.apple.iokit.IOBiometricFamily	1
com.apple.driver.DiskImages.KernelBacked	493.0.0
com.apple.driver.AppleXsanScheme	3
com.apple.driver.AppleUVDMDriver	1.0.0
com.apple.driver.AppleUVDM	1.0.0
com.apple.driver.AppleSEPHDCPManager	1.0.1
com.apple.driver.AppleTrustedAccessory	1
com.apple.iokit.AppleSEPGenericTransfer	1
com.apple.driver.usb.networking	5.0.0
com.apple.nke.ppp	1.9
com.apple.driver.AppleBSDKextStarter	3
com.apple.kext.triggers	1.0
com.apple.filesystems.hfs.encodings.kext	1
com.apple.driver.AppleSyntheticGameController	11.4.11
com.apple.driver.AppleConvergedIPCOLYBTControl	1
com.apple.driver.AppleConvergedPCI	1
com.apple.driver.AppleBluetoothDebug	1
com.apple.driver.AppleBTM	1.0.1
com.apple.driver.IOHIDPowerSource	1
com.apple.driver.AppleCallbackPowerSource	1
com.apple.driver.AppleThunderboltPCIDownAdapter	4.1.1
com.apple.driver.AppleThunderboltUSBDownAdapter	1.0.4
com.apple.driver.AppleThunderboltDPInAdapter	8.5.1
com.apple.driver.AppleThunderboltDPAdapterFamily	8.5.1
com.apple.driver.AppleHIDTransportSPI	7440.1
com.apple.driver.AppleHIDTransport	7440.1
com.apple.driver.AppleInputDeviceSupport	7440.1
com.apple.driver.AppleAOPAudio	340.4
com.apple.plugin.IOgPTPPlugin	1240.15
com.apple.driver.AppleDCPDPTXProxy	1.0.0
com.apple.driver.DCPDPFamilyProxy	1
com.apple.driver.AppleCSEmbeddedAudio	740.41
com.apple.driver.AppleDiagnosticDataAccessReadOnly	1.0.0
com.apple.driver.AppleEmbeddedAudio	740.41
com.apple.iokit.AppleARMIISAudio	340.16
com.apple.driver.IISAudioIsolatedStreamECProxy	340.16
com.apple.driver.ExclavesAudioKext	1
com.apple.driver.ApplePassthroughPPM	3.0
com.apple.AGXFirmwareKextG13XRTBuddy	280.3.9
com.apple.AGXFirmwareKextRTBuddy64	280.3.9
com.apple.driver.AppleStockholmControl	1.0.0
com.apple.iokit.IONVMeFamily	2.1.0
com.apple.driver.AppleNANDConfigAccess	1.0.0
com.apple.driver.AppleSPMIPMU	1.0.1
com.apple.driver.AppleDialogPMU	1.0.1
com.apple.driver.AppleSPU	1
com.apple.driver.DCPAVFamilyProxy	1
com.apple.iokit.IOGPUFamily	93.40.3
com.apple.driver.AppleHPM	3.4.4
com.apple.driver.AppleUSBXDCIARM	1.0
com.apple.driver.AppleUSBXDCI	1.0
com.apple.iokit.IOUSBDeviceFamily	2.0.0
com.apple.driver.usb.AppleSynopsysUSBXHCI	1
com.apple.driver.usb.AppleUSBXHCI	1.2
com.apple.driver.AppleEmbeddedUSBHost	1
com.apple.driver.usb.AppleUSBHub	1.2
com.apple.driver.usb.AppleUSBHostCompositeDevice	1.2
com.apple.driver.AppleSART	1
com.apple.driver.AppleT6000TypeCPhy	1
com.apple.driver.AppleT8103TypeCPhy	1
com.apple.driver.AppleSPMI	1.0.1
com.apple.driver.ApplePMGR	1
com.apple.driver.AppleARMWatchdogTimer	1
com.apple.iokit.IOMobileGraphicsFamily-DCP	343.0.0
com.apple.iokit.IOMobileGraphicsFamily	343.0.0
com.apple.driver.AppleM2ScalerCSCDriver	265.0.0
com.apple.driver.AppleDCP	1
com.apple.driver.AppleFirmwareKit	1
com.apple.driver.AppleA7IOP-ASCWrap-v4	1.0.2
com.apple.driver.AppleA7IOP-M3Wrap-v2	1.0.2
com.apple.driver.AppleDisplayCrossbar	1.0.0
com.apple.iokit.IODisplayPortFamily	1.0.0
com.apple.driver.AppleTypeCPhy	1
com.apple.driver.AppleMobileApNonce	1
com.apple.driver.AppleThunderboltNHI	7.2.81
com.apple.driver.AppleT6000PCIeC	1
com.apple.iokit.IOThunderboltFamily	9.3.3
com.apple.iokit.IOPortFamily	1.0
com.apple.driver.ApplePIODMA	1
com.apple.driver.AppleT600xPCIe	1
com.apple.driver.AppleMultiFunctionManager	1
com.apple.driver.AppleBluetoothDebugService	1
com.apple.driver.AppleBCMWLANCore	1.0.0
com.apple.iokit.IO80211Family	1200.13.0
com.apple.driver.IOImageLoader	1.0.0
com.apple.driver.AppleOLYHAL	1
com.apple.driver.corecapture	1.0.4
com.apple.driver.AppleMCA2-T600x	840.3
com.apple.driver.AppleEmbeddedAudioLibs	340.8
com.apple.driver.AppleFirmwareUpdateKext	1
com.apple.driver.AppleH13CameraInterface	8.500.0
com.apple.driver.AppleGPIOICController	1.0.2
com.apple.driver.AppleFireStormErrorHandler	1
com.apple.driver.AppleEmbeddedPCIE	1
com.apple.driver.usb.AppleUSBHostPacketFilter	1.0
com.apple.iokit.IOTimeSyncFamily	1240.15
com.apple.driver.DiskImages	493.0.0
com.apple.iokit.IOGraphicsFamily	598
com.apple.iokit.IOBluetoothFamily	9.0.0
com.apple.driver.AppleSSE	1.0
com.apple.driver.AppleSEPKeyStore	2
com.apple.driver.AppleUSBTDM	556
com.apple.iokit.IOUSBMassStorageDriver	245
com.apple.iokit.IOPCIFamily	2.9
com.apple.iokit.IOUSBHostFamily	1.2
com.apple.driver.AppleUSBHostMergeProperties	1.2
com.apple.driver.usb.AppleUSBCommon	1.0
com.apple.driver.AppleSMC	3.1.9
com.apple.driver.RTBuddy	1.0.0
com.apple.driver.AppleEmbeddedTempSensor	1.0.0
com.apple.driver.AppleARMPMU	1.0
com.apple.iokit.IOAccessoryManager	1.0.0
com.apple.driver.AppleOnboardSerial	1.0
com.apple.iokit.IOSerialFamily	11
com.apple.iokit.IOSCSIBlockCommandsDevice	495
com.apple.iokit.IOSCSIArchitectureModelFamily	495
com.apple.driver.AppleRSMChannel	1
com.apple.iokit.IORSMFamily	1
com.apple.driver.AppleLockdownMode	1
com.apple.driver.AppleIPAppender	1.0
com.apple.iokit.IOSkywalkFamily	1.0
com.apple.driver.mDNSOffloadUserClient	1.0.1b8
com.apple.iokit.IONetworkingFamily	3.4
com.apple.driver.AppleFDEKeyStore	28.30
com.apple.driver.AppleEffaceableStorage	1.0
com.apple.driver.AppleCredentialManager	1.0
com.apple.driver.AppleSEPManager	1.0.1
com.apple.driver.AppleA7IOP	1.0.2
com.apple.driver.IOSlaveProcessor	1
com.apple.driver.AppleBiometricSensor	2
com.apple.iokit.IOHIDFamily	2.0.0
com.apple.driver.AppleANELoadBalancer	7.400.0
com.apple.driver.AppleH11ANEInterface	7.400.0
com.apple.driver.IODARTFamily	1
com.apple.AUC	1.0
com.apple.iokit.IOSurface	352.41.7
com.apple.iokit.IOAVFamily	1.0.0
com.apple.iokit.IOHDCPFamily	1.0.0
com.apple.iokit.IOCECFamily	1
com.apple.iokit.IOAudio2Family	1.0
com.apple.driver.AppleIISController	340.1
com.apple.driver.AppleAudioClockLibs	340.8
com.apple.driver.FairPlayIOKit	71.10.0
com.apple.driver.AppleARMPlatform	1.0.2
com.apple.iokit.IOSlowAdaptiveClockingFamily	1.0.0
com.apple.iokit.IOReportFamily	47
com.apple.security.quarantine	4
com.apple.security.sandbox	300.0
com.apple.iokit.IOStorageFamily	2.1
com.apple.kext.AppleMatch	1.0.0d1
com.apple.driver.AppleMobileFileIntegrity	1.0.5
com.apple.iokit.CoreAnalyticsFamily	1
com.apple.security.AppleImage4	6.3.0
com.apple.kext.CoreTrust	1
com.apple.iokit.IOCryptoAcceleratorFamily	1.0.1
com.apple.kec.pthread	1
com.apple.kec.Libm	1
com.apple.kec.Compression	1.0
com.apple.kec.corecrypto	14.0



** Stackshot Succeeded ** Bytes Traced 565788 (Uncompressed 1451904) **

unable to specify custom board json in project_dir

following instructions here,
http://docs.platformio.org/en/latest/platforms/creating_board.html
trying to create a project-specific custom board json, e.g
boards/rcqr01.json

{
  "build": {
    "cpu": "cortex-m0", 
    "f_cpu": "16000000L", 
    "mcu": "nrf51822"
  },
  "connectivity": [
    "bluetooth"
  ],
  "frameworks": [
    "mbed"
  ], 
  "name": "rcqr01", 
  "upload": {
    "maximum_ram_size": 16384, 
    "maximum_size": 262144
  }, 
  "url": "", 
  "vendor": "Turning Technologies"
}

however, this alone simply does not appear to be enough. Seems mbed framework may require more than this, as I get this when building:

> Executing task: platformio run <

[Tue Aug  1 23:28:48 2017] Processing nrf51_rcqr01 (platform: nordicnrf51; lib_deps: ble-nrf51822; extra_scripts: custom_uploader.py; board: rcqr01; framework: mbed)
----------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
Cannot find the configuration file for your board! Please read instructions here /Users/jens/.platformio/packages/framework-mbed/platformio/README.txt
============================================================ [ERROR] Took 0.37 seconds ============================================================
The terminal process terminated with exit code: 1

Terminal will be reused by tasks, press any key to close it.

I can use the bbcmicrobit (as it has same 16k memory as my board), but I wanted to customize to my board, and be able to keep it with the project dir in the repo.
Looking into .platformio/packages/framework-mbed/platformio/, i see there are a ton of VARIANTS which seem to have some mbed specific configuration, e.g. microbit:
NRF51_MICROBIT/mbed_config.h & NRF51_MICROBIT/NRF51_MICROBIT.json

maybe this is some microbit limitation? is there any way to "extend" an existing board definition, or any way to expose the lower-level mbed configuration at project-level control (again, so it can be captured and distributed with repo)


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

readBearLabBLENano board fails to compile when including mbed.h on macOS

Using the following settings in platformio.ini:

[platformio]
env_default = redBearLabBLENano

[env:redBearLabBLENano]
; platform = nordicnrf51 -- does not matter whether stable or git
platform = https://github.com/platformio/platform-nordicnrf51.git
framework = mbed
board = redBearLabBLENano

and the following sample code:

#include "mbed.h"

int main()
{
	return 0;
}

running platformio run fails with the following error:

[Tue Jan 30 10:38:10 2018] Processing redBearLabBLENano (platform: https://github.com/platformio/platform-nordicnrf51.git; board: redBearLabBLENano; framework: mbed)
----------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
Collected 14 compatible libraries
Scanning dependencies...
No dependencies
Compiling .pioenvs/redBearLabBLENano/src/main.o
In file included from /Users/agatti/.platformio/packages/framework-mbed/mbed.h:54:0,
from src/main.c:1:
/Users/agatti/.platformio/packages/framework-mbed/platform/platform.h:22:19: fatal error: cstddef: No such file or directory
#include <cstddef>
^
compilation terminated.
*** [.pioenvs/redBearLabBLENano/src/main.o] Error 1
============================================= [ERROR] Took 1.47 seconds =============================================

Not including mbed.h does compile and everything, but it is a bit of a problem if I cannot even include the framework basic include file. Is there anything else I should check for troubleshooting the issue or to see if I did anything wrong here?

Thank you for your time,
Alessandro

Build for FOTA upload

Hi guys,

how do I compile/build for FOTA upload?
https://developer.mbed.org/forum/team-63-Bluetooth-Low-Energy-community/topic/5169/

Mbed platform allows you to choose this, e.g. compile as standalone firmware, or compile for FOTA (includes bootloader).

Thanks

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/40858211-build-for-fota-upload?utm_campaign=plugin&utm_content=tracker%2F38217987&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F38217987&utm_medium=issues&utm_source=github).

Request for Simblee nrf51822 board support

Simblee Arduino library : Board Manager URL.
The library is not in github but you can get the files after installation in Arduino.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/39697829-request-for-simblee-nrf51822-board-support?utm_campaign=plugin&utm_content=tracker%2F38217987&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F38217987&utm_medium=issues&utm_source=github).

arduino-ble-led example doesn't run

Hi all,

I'm trying to run the arduino-ble-led example. I'm using the waveshare_ble400 board. The only modification that I made to the project is to select an stlink tool:

platform = nordicnrf51
framework = arduino
board = waveshare_ble400
lib_deps = ${common.lib_deps}
build_flags = ${common.build_flags}
debug_tool = stlink
upload_protocol = stlink

The project builds fine and flashing seems to work, but the device doesn't really do anything (no serial output, no LEDs etc.). If I try to debug and pause, the device is always at 0x00000596, maybe that indicates that the softdevice is incorrectly flashed?

The standard blink example works fine, but as soon as I add the softdevice with build_flags = -DNRF51_S130, I get the same behaviour: No blinking LED on the board anymore, and debugging always pauses at 0x00000596.

Any help is appreciated.

Attached my (full) build folder.
buildresult.zip

And the log for uploading:

Checking size .pio\build\waveshare_ble400\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [          ]   3.3% (used 1076 bytes from 32768 bytes)
Flash: [=         ]   6.2% (used 16336 bytes from 262144 bytes)
Building .pio\build\waveshare_ble400\firmware.hex
Configuring upload protocol...
AVAILABLE: blackmagic, jlink, nrfjprog, stlink
CURRENT: upload_protocol = stlink
Uploading .pio\build\waveshare_ble400\firmware.hex
xPack OpenOCD x86_64 Open On-Chip Debugger 0.11.0+dev (2021-10-16-21:19)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
debug_level: 1

0x4000
target halted due to debug-request, current mode: Thread 
xPSR: 0xc1000000 pc: 0x000006d0 msp: 0x000007c0
** Programming Started **
Warn : Adding extra erase range, 0x000007c0 .. 0x000007ff
Warn : Adding extra erase range, 0x0001efd0 .. 0x0001efff
** Programming Finished **
** Verify Started **
** Verified OK **
** Resetting Target **
shutdown command invoked
=============================================================================== [SUCCESS] Took 9.59 seconds ===============================================================================

Environment       Status    Duration
----------------  --------  ------------
waveshare_ble400  SUCCESS   00:00:09.589
=============================================================================== 1 succeeded in 00:00:09.589 ===============================================================================
 *  Terminal will be reused by tasks, press any key to close it.

Dependencies not detected correctly

I want to use mbed (2) without rtos but I'm getting following error:

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/nordicnrf51/bbcmicrobit.html
PLATFORM: Nordic nRF51 > BBC micro:bit
HARDWARE: NRF51822 16MHz 16KB RAM (256KB Flash)
DEBUG: CURRENT(cmsis-dap) ON-BOARD(cmsis-dap) EXTERNAL(jlink)
Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 4 compatible libraries
Scanning dependencies...
No dependencies
Warning! Unknown upload protocol stlink
Compiling .pioenvs/bbcmicrobit/src/main.o
src/main.cpp:20:10: fatal error: ble/BLE.h: No such file or directory
#include "ble/BLE.h"
^~~~~~~~~~~
compilation terminated.
*** [.pioenvs/bbcmicrobit/src/main.o] Error 1

but the header should be available as a "feature":

./packages/framework-mbed/features/FEATURE_BLE/ble/BLE.h

How do I enable it?

Device not running

Hi, I developed an app on MBED that runs on this kind of device:
http://www.wireless-tag.com/wireless_module/BLE/WT51822-S4AT.html

Even if MBED doesn't have a specific board for it, I use a RedBearLab BLE Nano board, and everything works fine.

I tried to port the project to Platformio but no way to make it work.
It compiles fine, it downloads fine, but it doesn't either run.

I suspected the size of the RAM (since the above mentioned board has only 16K), so I created a custom board following this:
http://docs.platformio.org/en/latest/platforms/creating_board.html

but no luck
Any help will be appreciated

nrf51-dk mbed framework compile error - basic blink example

I get a compilation error for basic example code provided by platformio itself.
I also tried to switch IDE between ATOM and VSCode but same error still exist.

Any ideas ?

Compile result :


### ERROR STILL EXIST
/Users/attilaakinci/.platformio/packages/framework-mbed/cmsis/core_cm0.h:597:0: note: this is the location of the previous definition
#define NVIC_USER_IRQ_OFFSET          16

.piolibdeps/cmsis-core_ID1237/source/cmsis_nvic.c:65:2: error: #error The target should define yotta config cmsis-nvic.has-vtor, or cmsis-nvic.has-custom-vtor + implement NVIC_SetVector/NVIC_GetVector
#error The target should define yotta config cmsis-nvic.has-vtor, or cmsis-nvic.has-custom-vtor + implement NVIC_SetVector/NVIC_GetVector
^~~~~
*** [.pioenvs/nrf51_dk/lib/cmsis-core_ID1237/cmsis_nvic.o] Error 1



### SOLVED PART
> In file included from .piolibdeps/core-util_ID1236/core-util/ExtendablePoolAllocator.h:22:0,
> from .piolibdeps/core-util_ID1236/source/ExtendablePoolAllocator.cpp:18:
> .piolibdeps/core-util_ID1236/core-util/PoolAllocator.h:49:43: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11
> PoolAllocator(const PoolAllocator&) = delete;
> ^~~~~~
> .piolibdeps/core-util_ID1236/core-util/PoolAllocator.h:50:32: error: expected ',' or '...' before '&&' token
> PoolAllocator(PoolAllocator&&) = delete;
> ^~
> .piolibdeps/core-util_ID1236/core-util/PoolAllocator.h:50:38: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11
> PoolAllocator(PoolAllocator&&) = delete;
> ^~~~~~
> .piolibdeps/core-util_ID1236/core-util/PoolAllocator.h:50:38: error: invalid constructor; you probably meant 'mbed::util::PoolAllocator (const mbed::util::PoolAllocator&)'
> .piolibdeps/core-util_ID1236/core-util/PoolAllocator.h:51:55: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11
> PoolAllocator& operator =(const PoolAllocator&) = delete;
> ^~~~~~
> .piolibdeps/core-util_ID1236/core-util/PoolAllocator.h:52:44: error: expected ',' or '...' before '&&' token
> PoolAllocator& operator =(PoolAllocator&&) = delete;
> ^~
> .piolibdeps/core-util_ID1236/core-util/PoolAllocator.h:52:50: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11
> PoolAllocator& operator =(PoolAllocator&&) = delete;
> ^~~~~~
> In file included from .piolibdeps/core-util_ID1236/source/ExtendablePoolAllocator.cpp:18:0:
> .piolibdeps/core-util_ID1236/core-util/ExtendablePoolAllocator.h:45:63: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11
> ExtendablePoolAllocator(const ExtendablePoolAllocator&) = delete;
> ^~~~~~
> .piolibdeps/core-util_ID1236/core-util/ExtendablePoolAllocator.h:46:52: error: expected ',' or '...' before '&&' token
> ExtendablePoolAllocator(ExtendablePoolAllocator&&) = delete;
> ^~
> .piolibdeps/core-util_ID1236/core-util/ExtendablePoolAllocator.h:46:58: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11
> ExtendablePoolAllocator(ExtendablePoolAllocator&&) = delete;
> ^~~~~~
> .piolibdeps/core-util_ID1236/core-util/ExtendablePoolAllocator.h:46:58: error: invalid constructor; you probably meant 'mbed::util::ExtendablePoolAllocator (const mbed::util::ExtendablePoolAllocator&)'
> .piolibdeps/core-util_ID1236/core-util/ExtendablePoolAllocator.h:47:75: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11
> ExtendablePoolAllocator& operator =(const ExtendablePoolAllocator&) = delete;
> ^~~~~~
> .piolibdeps/core-util_ID1236/core-util/ExtendablePoolAllocator.h:48:64: error: expected ',' or '...' before '&&' token
> ExtendablePoolAllocator& operator =(ExtendablePoolAllocator&&) = delete;
> ^~
> .piolibdeps/core-util_ID1236/core-util/ExtendablePoolAllocator.h:48:70: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11
> ExtendablePoolAllocator& operator =(ExtendablePoolAllocator&&) = delete;
> ^~~~~~
> *** [.pioenvs/nrf51_dk/lib/core-util_ID1236/ExtendablePoolAllocator.o] Error 1
> =========================================================== [ERROR] Took 6.35 seconds ===========================================================
> The terminal process terminated with exit code: 1
> 
> Terminal will be reused by tasks, press any key to close it.

platformio.ini :

[env:nrf51_dk]
platform = nordicnrf51
board = nrf51_dk
framework = mbed

lib_deps =
    1237
    1236
    1235
    1004

main.cpp :

#include "mbed.h"
 
DigitalOut myled(LED1);
 
int main() {
    while(1) {
        myled = 1;
        wait(1);
        myled = 0;
        wait(1);
    }
}

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

NRF51822 with S130 does not work after update to v4.3

Hello,

I have some code working on a BLE Nano v1.5 (NRF51822) with nrf framework v4.2
However, when I update the platform to v4.3, it doesn't work anymore.

Here is the relevant log messages :

Processing redBearLabBLENano (platform: nordicnrf51; board: redBearLabBLENano; framework: arduino)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PLATFORM: Nordic nRF51 > RedBearLab BLE Nano 1.5
HARDWARE: NRF51822 16MHz 32KB RAM (256KB Flash)
DEBUG: CURRENT(cmsis-dap) ON-BOARD(cmsis-dap) EXTERNAL(blackmagic, jlink, stlink)
Warning! Cannot find an appropriate softdevice binary!

I am pretty sure that the issue is related to this warning above (Cannot find an appropriate softdevice binary).

I use the softdevice S130, here is the relevant platformio.ini config :

[env:redBearLabBLENano]
platform = nordicnrf51
board = redBearLabBLENano
framework = arduino
build_flags = -DNRF51_S130

nRF51822 and mbed lib in PlatformIO

Hello,
I'm developing code for board with nRF51822 chip. First I was writing it in mbed editor and everything was working fine.
Now I want to try PlatformIO integrated with VS Code. After installing everything, I created new project, added mbed and nrf51822 libs to it. Everything was fine, because simple blink code compile without error and after upload to board it works.

Then I wanted to test BLE and then I found problem. My code below:

#include "mbed.h"
#include "ble/BLE.h"
#include "BatteryService.h"

const static char DEVICE_NAME[] = "Button";
static const uint16_t uuid16_list[] = { GattService::UUID_BATTERY_SERVICE };

#define LED_BLINK_INTERVAL_S 0.1
#define LED_PIN P0_18
#define BUTTON_PIN P0_19

BLEDevice ble;
DigitalOut statusLed(LED_PIN);
Ticker statusLedTicker;
BatteryService *batteryServicePtr;

void statusLedCallback()
{
    statusLed = !statusLed;
}

void bleInitComplete(BLE::InitializationCompleteCallbackContext *params)
{
    BLE &ble          = params->ble;
    ble_error_t error = params->error;
 
    if (error != BLE_ERROR_NONE) 
    {
        return;
    }
 
    BatteryService batteryService(ble, false);
    batteryServicePtr = &batteryService;
 
    /* Setup advertising. */
    ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::BREDR_NOT_SUPPORTED | GapAdvertisingData::LE_GENERAL_DISCOVERABLE);
    ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::COMPLETE_LIST_16BIT_SERVICE_IDS, (uint8_t *)uuid16_list, sizeof(uuid16_list));
    ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::COMPLETE_LOCAL_NAME, (uint8_t *)DEVICE_NAME, sizeof(DEVICE_NAME));
    ble.gap().setAdvertisingType(GapAdvertisingParams::ADV_CONNECTABLE_UNDIRECTED);
    ble.gap().setAdvertisingInterval(1000); /* 1000ms */
    ble.gap().startAdvertising();
}

int main() 
{
    statusLedTicker.attach(statusLedCallback, LED_BLINK_INTERVAL_S);
    BLE& ble = BLE::Instance(BLE::DEFAULT_INSTANCE);
    ble.init(bleInitComplete);
    
    while (ble.hasInitialized()  == false) { /* spin loop */ }

    while (true) 
    { 
        ble.waitForEvent();
    }
}

Code compile without error, but after upload to device nothing happen. When I comment line:

BLEDevice ble;
led blink, but bleInitComplete don't run and I don't see my device on phone.
There is any way to debug step by step through constructor of BLEDevice to check what could happen?


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Firmware upload via st-link broken

Platformio version: 4.1.0 (mac os)

Platform Nordic nRF51:

Updating nordicnrf51                     @ 5.0.0          [Up-to-date]
Updating toolchain-gccarmnoneeabi        @ 1.70201.0      [Up-to-date]
Updating framework-arduinonordicnrf5     @ 1.600.190830   [Up-to-date]
Updating framework-mbed                  @ 5.51105.190312 [Up-to-date]
Updating tool-sreccat                    @ 1.164.0        [Up-to-date]
Updating tool-openocd                    @ 2.1000.190707  [Up-to-date]
Updating tool-nrfjprog                   @ 1.90702.1      [Up-to-date]
$ pio run -v -t upload
[compiling messages skipped]
CURRENT: upload_protocol = stlink
openocd -d2 -f scripts/interface/stlink.cfg -c "transport select hla_swd; set WORKAREASIZE 0x4000" -f scripts/target/nrf51.cfg -c "program {.pio/build/redBearLab/firmware.hex}  verify reset; shutdown;"
xPack OpenOCD, 64-bit Open On-Chip Debugger 0.10.0+dev (2019-07-17-15:21)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
debug_level: 2

embedded:startup.tcl:26: Error: Can't find scripts/interface/stlink.cfg
in procedure 'script' 
at file "embedded:startup.tcl", line 26
*** [upload] Error 1

When run openocd via command line - all OK (and firmware worked):

$ ~/.platformio/packages/tool-openocd/bin/openocd -s ~/.platformio/packages/tool-openocd -f scripts/interface/stlink.cfg -c "transport select hla_swd; set WORKAREASIZE 0x4000" -f scripts/target/nrf51.cfg -c "program {.pio/build/redBearLab/firmware.hex}  verify reset; shutdown"
xPack OpenOCD, 64-bit Open On-Chip Debugger 0.10.0+dev (2019-07-17-15:21)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
0x4000
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
Info : clock speed 1000 kHz
Info : STLINK V2J29S7 (API v2) VID:PID 0483:3748
Info : Target voltage: 3.273594
Info : nrf51.cpu: hardware has 4 breakpoints, 2 watchpoints
Info : Listening on port 3333 for gdb connections
target halted due to debug-request, current mode: Thread 
xPSR: 0xc1000000 pc: 0x000006d0 msp: 0x000007c0
** Programming Started **
Info : nRF51822-QFAA(build code: G3) 256kB Flash
Warn : using fast async flash loader. This is currently supported
Warn : only with ST-Link and CMSIS-DAP. If you have issues, add
Warn : "set WORKAREASIZE 0" before sourcing nrf51.cfg/nrf52.cfg to disable it
** Programming Finished **
** Verify Started **
** Verified OK **
** Resetting Target **
shutdown command invoked

platformio.ini

[env:redBearLab]
platform = nordicnrf51
board = redBearLab
board_build.variant = RedBearLab_nRF51822_devboard
framework = arduino

upload_protocol = stlink
debug_tool = stlink

build_flags =
  -Wl,-u,_printf_float,-u,_scanf_float
  -DNRF51_S130

monitor_port = /dev/cu.SLAB_USBtoUART
monitor_speed = 115200

lib_deps =
  # pio lib install "BLEPeripheral"
  259

Waveshare BLE400 missing mbed

PLATFORM: Nordic nRF51 > Waveshare BLE400
SYSTEM: NRF51822 32MHz 32KB RAM (256KB Flash)
DEBUG: CURRENT(blackmagic) EXTERNAL(blackmagic, jlink, stlink)
Error: This board doesn't support mbed framework!

Compiled code with mbed for NRF51 doesn't run

I'm relatively new to PlatformIO and I've been trying to run a simple example program for the NRF51. Had no trouble using mbed online with several examples but none of the examples in the PlatformIO seem to work on NRF51, can't even run a single blink led program.
The only suspicious thing I get is "arm-none-eabi-g++: error: CreateProcess: No such file or directory" in my "main.cpp" file when saving the project.
Everything seems up to date and the code for other platforms like Nucleo and KLK46Z works fine.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Error "BLE_API.h: No such file or directory" upon building BLE central test example

I've imported BLE_CentralTest example from Arduino and tried to build it for nRF51822 with PlatformIO, but got stuck on "BLE_API.h: No such file or directory" error.
I've tried to select Platformio or Arduino as a library manager upon project import, but no luck.
Also. there is no such error if to build the same sketch using Arduino IDE.

How can this dependencies be fixed in PlatformIO?

Build task output is the following:

Processing nrf51 (platform: nordicnrf51; board: seeedTinyBLE; framework: arduino)
---------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via -v, --verbose option
CONFIGURATION: https://docs.platformio.org/page/boards/nordicnrf51/seeedTinyBLE.html
PLATFORM: Nordic nRF51 (6.0.1) > Seeed Tiny BLE
HARDWARE: NRF51822 16MHz, 16KB RAM, 256KB Flash
DEBUG: Current (cmsis-dap) On-board (cmsis-dap) External (blackmagic, jlink, stlink)
PACKAGES:

  • framework-arduinonordicnrf5 1.600.190830 (6.0)
  • tool-sreccat 1.164.0 (1.64)
  • toolchain-gccarmnoneeabi 1.70201.0 (7.2.1)
    Converting arduino-central-test.ino
    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
    Compiling .pio\build\nrf51\src\arduino-central-test.ino.cpp.o
    Compiling .pio\build\nrf51\FrameworkArduinoVariant\variant.cpp.o
    Compiling .pio\build\nrf51\FrameworkArduino\IPAddress.cpp.o
    Compiling .pio\build\nrf51\FrameworkArduino\Print.cpp.o
    E:/nRF51/projects/arduino-central-test/src/arduino-central-test.ino:21:10: fatal error: BLE_API.h: No such file or directory


#include <BLE_API.h>
^~~~~~~~~~~
compilation terminated.
*** [.pio\build\nrf51\src\arduino-central-test.ino.cpp.o] Error 1
================================================== [FAILED] Took 2.25 seconds ==================================================
The terminal process "C:\Users\LJ.platformio\penv\Scripts\pio.exe 'run'" terminated with exit code: 1.

bbcmicrobit+mbed error

Hi, I'm new to platformio. I've been trying several tests with the mbed framework on the bbcmicrobit (with and without BLE support) and have been experiencing several problems. It looks like they may be related to the microbit scheduler or task management/timers. Any suggestions will be greatly appreciated.

The specific error dumped out to the terminal is:

++ MbedOS Error Info ++
Error Status: 0x80FF0144 Code: 324 Module: 255
Error Message: Assertion failed: !are_interrupts_enabled()
Location: 0x191B7
File: /Users/bsiever/.platformio/packages/framework-mbed/hal/mbed_critical_section_api.c+54
Error Value: 0x0
For more info, visit: https://armmbed.github.io/mbedos-error/?error=0x80FF0144
-- MbedOS Error Info --

Stack trace info from running in Debug mode:

ticker_read_us@0x00019576 (/Users/bsiever/.platformio/packages/framework-mbed/hal/mbed_ticker_api.c:424)
ticker_read@0x00019590 (/Users/bsiever/.platformio/packages/framework-mbed/hal/mbed_ticker_api.c:414)
wait_us@0x00019dfe (/Users/bsiever/.platformio/packages/framework-mbed/platform/mbed_wait_api_no_rtos.c:39)
mbed_die@0x0001962e (/Users/bsiever/.platformio/packages/framework-mbed/platform/mbed_board.c:37)
mbed_halt_system@0x0001999c (/Users/bsiever/.platformio/packages/framework-mbed/platform/mbed_error.c:107)
mbed_error@0x00019a14 (/Users/bsiever/.platformio/packages/framework-mbed/platform/mbed_error.c:305)
mbed_assert_internal@0x00019600 (/Users/bsiever/.platformio/packages/framework-mbed/platform/mbed_assert.c:27)
hal_critical_section_exit@0x00018ea6 (/Users/bsiever/.platformio/packages/framework-mbed/hal/mbed_critical_section_api.c:54)
core_util_critical_section_exit@0x00019792 (/Users/bsiever/.platformio/packages/framework-mbed/platform/mbed_critical.c:99)
ticker_irq_handler@0x000194dc (/Users/bsiever/.platformio/packages/framework-mbed/hal/mbed_ticker_api.c:326)
us_ticker_irq_handler@0x000195aa (/Users/bsiever/.platformio/packages/framework-mbed/hal/mbed_us_ticker_api.c:56)
invokeCallback@0x0001ad80 (/Users/bsiever/.platformio/packages/framework-mbed/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/us_ticker.c:113)
us_ticker_handler@0x0001ad80 (/Users/bsiever/.platformio/packages/framework-mbed/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/us_ticker.c:204)
RTC1_IRQHandler@0x0001b04e (/Users/bsiever/.platformio/packages/framework-mbed/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/us_ticker.c:390)

Concern: It looks like there may be different critical section code that should be used when the SoftDevice is present (it was in this run), but that isn't being used.

Misc. relevant build info:

PACKAGES: 
 - framework-mbed 5.51105.190312 (5.11.5) 
 - tool-sreccat 1.164.0 (1.64) 
 - toolchain-gccarmnoneeabi 1.70201.0 (7.2.1)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 9 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <microbit> 2.0.0-rc4
|   |-- <microbit-dal> 2.0.0-rc4.build7
|   |   |-- <ble> 2.5.0 #bbc2dc5
|   |   |   |-- <nrf51-sdk> 2.2.0 #56e69c3
|   |   |-- <ble-nrf51822> 2.5.0 #1418fe9
|   |   |   |-- <ble> 2.5.0 #bbc2dc5
|   |   |   |   |-- <nrf51-sdk> 2.2.0 #56e69c3
|   |   |   |-- <nrf51-sdk> 2.2.0 #56e69c3
|   |   |-- <nrf51-sdk> 2.2.0 #56e69c3
|   |-- <nrf51-sdk> 2.2.0 #56e69c3
Building in release mode

Thanks again for any suggestions or info,
Bill

No upload error, but uploading failed on RedBear BLE Nano (mbed)

I build and upload the "mbed-blink" example to my RedBear BLE Nano v1.5. (https://github.com/platformio/platform-nordicnrf51/tree/master/examples/mbed-blink)
There are no error as follows.
But It looks BLE Nano doesn't run new program.
What the matter ?

PlatformIO: 3.6.4
Nordic nRF51: 4.0.0

Processing redBearLabBLENano (platform: nordicnrf51; board: redBearLabBLENano; framework: mbed)

Verbose mode can be enabled via -v, --verbose option
CONFIGURATION: https://docs.platformio.org/page/boards/nordicnrf51/redBearLabBLENano.html
PLATFORM: Nordic nRF51 > RedBearLab BLE Nano 1.5
HARDWARE: NRF51822 16MHz 32KB RAM (256KB Flash)
DEBUG: CURRENT(cmsis-dap) ON-BOARD(cmsis-dap) EXTERNAL(blackmagic, jlink, stlink)
Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 4 compatible libraries
Scanning dependencies...
No dependencies
Compiling .pioenvs\redBearLabBLENano\src\main.o
Linking .pioenvs\redBearLabBLENano\firmware.elf
Checking size .pioenvs\redBearLabBLENano\firmware.elf
Building .pioenvs\redBearLabBLENano\userfirmware.hex
Memory Usage -> http://bit.ly/pio-memory-usage
DATA: [ ] 2.9% (used 960 bytes from 32768 bytes)
PROGRAM: [ ] 4.7% (used 12240 bytes from 262144 bytes)
merge_firmwares([".pioenvs\redBearLabBLENano\firmware.hex"], [".pioenvs\redBearLabBLENano\userfirmware.hex"])
Configuring upload protocol...
AVAILABLE: blackmagic, cmsis-dap, jlink, mbed, nrfjprog, stlink
CURRENT: upload_protocol = mbed
Looking for upload disk...
Auto-detected: E:
Uploading .pioenvs\redBearLabBLENano\firmware.hex
Firmware has been successfully uploaded.
(Some boards may require manual hard reset)

Pinout config on bbc:microbit is wrong

Hello! I'm using platformIO, IDE 1.7.2 | Core 3.2.1
I'm doing a project initialization as follows (using the microbit-hello-world example):

[env:bbcmicrobit]
platform = nordicnrf51
board = bbcmicrobit
framework = mbed
lib_deps =
   microbit@~2.0.0-rc4

The example code is this:

#define MICROBIT_DBG 1
#include <MicroBit.h>

MicroBit uBit;

int main() {
    // Initialise the micro:bit runtime.
    uBit.init();

    // Insert your code here!
    // while(1){
      uBit.display.scroll("HELLO WORLD! :)");
    // }

    // If main exits, there may still be other fibers running or registered event handlers etc.
    // Simply release this fiber, which will mean we enter the scheduler. Worse case, we then
    // sit in the idle task forever, in a power efficient sleep.
    release_fiber();
    return 0;
}

The example compiles fine and uploads to the microbit. But the pinout configuration seems to be somewhat off, as the led matrix doesn't display any sensible text. I've tried to use the equivalent example in the mbed-online-compiler, and the display scrolls HELLO WORLD as expected.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

support for nordic sdk as framework

We have support for arduino and mbed frameworks, but would like to investigate support for using nordics nrf5 sdk (hals/drivers, etc).

I think I understand about 80% of what needs to be done, but may need some help on polishing, patching, and packaging.

Curious how many folks would be interested in such an effort?

Related question would be if it is possible for a user/board to specify a certain revision of the framework (sdk). Reason being is that nrf51 devices support maximum of nrf5 sdk 12.3.0, whereas nrf52 support latest versions. (nrf5 sdk version also dictates which softdevice is used, if ble softdevice is required, but i think this can be tied to and encapsulated into the framework logic?)

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.