jah
September 17, 2018, 5:14pm
1
Hi all,
i wanted to do some development for my Nordic nRF52840 Dongle.
So i downloaded latest platform io (Home 1.0.2·Core 3.6.1a4) and created a new project with the following platformio.ini:
[env:nrf52840_dk]
platform = nordicnrf52
board = nrf52840_dk
framework = mbed
The very simple blinky code fails with:
Processing nrf52840_dk (platform: nordicnrf52; board: nrf52840_dk; framework: mbed)
Verbose mode can be enabled via -v, --verbose
option
PLATFORM: Nordic nRF52 > Nordic nRF52840-DK
SYSTEM: NRF52840 64MHz 256KB RAM (1MB Flash)
DEBUG: CURRENT(cmsis-dap) ON-BOARD(cmsis-dap, jlink) EXTERNAL(blackmagic, stlink)
Library Dependency Finder → Library Dependency Finder (LDF) — PlatformIO latest documentation
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 25 compatible libraries
Scanning dependencies…
Dependency Graph
|--
| |--
Compiling .pioenvs/nrf52840_dk/FrameworkMbedCore/drivers/AnalogIn.o
Compiling .pioenvs/nrf52840_dk/FrameworkMbedCore/drivers/BusIn.o
Compiling .pioenvs/nrf52840_dk/FrameworkMbedCore/drivers/BusInOut.o
Compiling .pioenvs/nrf52840_dk/FrameworkMbedCore/drivers/BusOut.o
Compiling .pioenvs/nrf52840_dk/FrameworkMbedCore/drivers/CAN.o
Compiling .pioenvs/nrf52840_dk/FrameworkMbedCore/drivers/Ethernet.o
Compiling .pioenvs/nrf52840_dk/FrameworkMbedCore/drivers/FlashIAP.o
In file included from /Users/jah/.platformio/packages/framework-mbed/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/TARGET_NRF52840_DK/device.
h:36:0,
from /Users/jah/.platformio/packages/framework-mbed/platform/platform.h:29,
from /Users/jah/.platformio/packages/framework-mbed/drivers/AnalogIn.h:19,
from /Users/jah/.platformio/packages/framework-mbed/drivers/AnalogIn.cpp:17:
/Users/jah/.platformio/packages/framework-mbed/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/objects.h:58:10: fatal error: objects_cryptocell.h: No such file or
directory
Looking for objects_cryptocell.h dependency? Check our library registry!
The missing cryptocell.h error is repeated several times.
Is there a misconfiguration ? How could i dig deeper ?
I am new to platformio so i dont know where to look further
Kind regards
Hendrik
For some reason the Library Depenecy Finder (LDF) thinks mbedtls is included which in turn includes this crypto cell 320 library for the True Random Number Generator (TRNG) (this here )
Ignoring mbedtls is half the solution, the build flags for this board target include -DFEATURE_CRYPTOCELL310=1
which in turn causes in object.h
this not-found header to be included
#include "objects_cryptocell.h"
#else
struct trng_s {
uint32_t placeholder;
};
#endif
You can add these two lines to your platformio.ini
:
lib_ignore = mbed-mbedtls
build_unflags = -DFEATURE_CRYPTOCELL310=1
Then the blink example should compile.
@ivankravets : Possible bug in the board JSON file for this target, -DFEATURE_CRYPTOCELL310=1
should not be there? Does the chip support this thing?
jah
September 17, 2018, 7:01pm
3
Hi,
though not an expert i know that chip supports cryptocell. this is what distinguishes it from nRF52 Board.
so i think uncommenting is not the solution ?
i checked
.platformio/packages/framework-mbed/platformio/variants/NRF52840_DK/NRF52840_DK.json
and recognized that a pretty old version (s140_nrf52840_5.0.0-2.alpha_softdevice.hex) of the nordic softdevice is used.
Maybe this is causing the issue?
Latest version is 6.1, see:
https://www.nordicsemi.com/eng/nordic/Products/nRF52840/S140-SD-v6/60624
Kind regards
@valeros do you have any ideas?
valeros
September 19, 2018, 5:29pm
5
I’m not sure whether nrf52840_dk
board is supported in the current version of the mbed framework since I can’t find it in the official board list here . So I think we were a bit hasty in adding this board to our registry.
jah
September 19, 2018, 5:44pm
6
Though you cannot find it in the search page, you can find it via google
https://os.mbed.com/platforms/Nordic-nRF52840-DK/
Also the nordic product page states “arm mBed enabled”
https://www.nordicsemi.com/eng/Products/nRF52840-DK
So i guess its offiacally supported
valeros
September 19, 2018, 6:09pm
7
Have you tried to use this board directly in the mbed online IDE? Are you able to compile a simple project there?
jah
September 22, 2018, 1:06pm
8
yes, i have done that. It works
valeros
September 22, 2018, 9:53pm
9
Hmm, just tried to build a simple blink project and got the next error:
Error: Cannot open source input file "device.h": No such file or directory in "extras/mbed/platform/platform.h", Line: 29, Col: 21
jah
September 23, 2018, 9:33am
10
with mbed online compiler or pio ?
valeros
September 24, 2018, 5:52pm
11
with the mbed online compiler