Arduino And Mbed Framework On Ble Sense - PlatformIO Community Home » Arduino Nano 33 Ble Mbed Os » Arduino And Mbed Framework On Ble Sense - PlatformIO Community Maybe your like Arduino Nano 33 Ble Ota Arduino Nano 33 Ble Pwm Arduino Nano 33 Ble Pwm Frequency Arduino Nano 33 Ble Pwm Pins Arduino Nano 33 Ble Rc Car Arduino and mbed framework on ble sense sherry November 27, 2020, 7:41pm 1 hello i tried loading the blinker example from mbed and i have ble 33 nano sense board from arduino. I get the following message mbed framework is not supported on this board when i searched i found that arduino supports mbed ? is it possible to run rtos with mbed on this board? thank you maxgerhardt November 27, 2020, 7:50pm 2 This is partly explained it Is there a functional difference between Platformio's "framework-arduinoadafruitnrf52" firmware and arduino's official firmware - #4 by maxgerhardt. The Arduino core for this board is framework-arduino-nrf52-mbedos which is actually an implementation of the Arduino core API on top of a specific mbed-os. The mbed-os part of it is still fully functional. Have a look at GitHub - arduino/ArduinoCore-nRF528x-mbedos: [Archived] Arduino core supporting mbed-enabled boards. sherry November 27, 2020, 10:31pm 3 thank you for your reply, i am aware of ArduinoCore-nRF528x-mbedos but i still don’t know how can i use it from platformio, how can i use a special framework? maxgerhardt November 27, 2020, 10:35pm 4 sherry: but i still don’t know how can i use it from platformio framework = arduino must be selected for that. It’s an Arduino core on top of mbed-os, after all. sherry November 27, 2020, 10:49pm 5 thats great but should i replace the arduino framework or is it a new framework with a new definition? sherry November 28, 2020, 7:48am 6 i noticed there is a framework called as follows in the packages folder .platformio/packages/framework-arduino-nrf52-mbedos is it the same framework you mentioned? how can i use it what is the environment name? maxgerhardt November 28, 2020, 9:36am 7 sherry: thats great but should i replace the arduino framework or is it a new framework with a new definition? There is nothing to replace. By specifying framework = arduino PlatformIO will automatically select the corerct Arduino core for you. Example: platformio.ini [env:nano33ble] platform = nordicnrf52 framework = arduino board = nano33ble src/main.cpp #include <Arduino.h> /* use mbedos object for build in LED */ mbed::DigitalOut led(P0_13); void setup(void) { Serial.begin(115200); /* arduino function */ Serial.println("Hello world"); } void loop(void) { led = 1; /* mbedos function */ delay(500); /* arduino function */ led = 0; /* mbedos function */ delay(500); /* arduino function */ } in the compilation output you will see the used packages. Processing nano33ble (platform: nordicnrf52; framework: arduino; board: nano33ble) ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option CONFIGURATION: https://docs.platformio.org/page/boards/nordicnrf52/nano33ble.html PLATFORM: Nordic nRF52 (5.0.0) > Arduino Nano 33 BLE HARDWARE: NRF52840 64MHz, 256KB RAM, 960KB Flash DEBUG: Current (blackmagic) External (blackmagic, cmsis-dap, jlink) PACKAGES: - framework-arduino-nrf52-mbedos 1.3.0 - tool-sreccat 1.164.0 (1.64) - toolchain-gccarmnoneeabi 1.80201.190214 (8.2.1) .. Linking .pio\build\nano33ble\firmware.elf Building .pio\build\nano33ble\firmware.bin Checking size .pio\build\nano33ble\firmware.elf Advanced Memory Usage is available via "PlatformIO Home > Project Inspect" RAM: [== ] 16.6% (used 43496 bytes from 262144 bytes) Flash: [= ] 7.8% (used 77116 bytes from 983040 bytes) ============================= [SUCCESS] Took 5.95 seconds ============================= sherry November 28, 2020, 10:54am 8 Excellent thank you. Here is another sample for people who like to work with the mbed main function, the same program but written using threading. Summary: To recap, as soon as the mbed object is called, it will compile using mbed rtos although the framework in the setup is arduino. #include <Arduino.h> /* use mbedos object for build in LED */ #define WAIT_TIME_MS 3000 mbed::DigitalOut led(P0_13); int main() { printf("This is the bare metal blinky example running on Mbed OS %d.%d.%d.\n", MBED_MAJOR_VERSION, MBED_MINOR_VERSION, MBED_PATCH_VERSION); while (true) { led = !led; thread_sleep_for(WAIT_TIME_MS); } } sherry November 28, 2020, 11:02am 9 The only still problem is: 1- although it compiles and flashes well, but i get under problems, thread_sleep_for is undefined, and P0_13 is undefined it seems there is a missing header ? maxgerhardt November 28, 2020, 11:07am 10 sherry: 1- although it compiles and flashes well, but i get under problems, thread_sleep_for is undefined, and P0_13 is undefined Is that a compile error when using the Build button or an IntelliSense error? The IntelliSense won’t be able to find that framework files if you haven’t built it at least once, because then it will download the framework. Also when in doubt, use the project task “Rebuild IntelliSense” after a build. I can compile perfectly fine and the IntelliSense works. grafik1001×865 69.3 KB sherry November 28, 2020, 11:51am 11 i don’t know where the problems come from, i clicked ignore and it vanished. Screen Shot 2020-11-28 at 12.47.091280×800 208 KB I will check it, the next time i create this project and test this issue. My second step would to be able to debug the program while running, could you please help me with it also? thank you maxgerhardt November 28, 2020, 12:02pm 12 sherry: My second step would to be able to debug the program while running, could you please help me with it also? Like the documentation says, the board doesn’t have an on-board debugging device. You need an external SWD debugger device like a ST-Link (or general CMSIS-DAP), JLink or Black Magic Probe and connect it to the board’s SWD pins (SWDIO+SWCLK+GND,RST,3V3 ofc), which are on the back of the board image700×261 98.1 KB from Arduino Nano 33 BLE — Arduino Official Store and pinout from https://medium.com/@manuel.bl/arduino-in-circuit-debugging-with-platformio-9f699da57ddc. (<-- this article link uses a slightly different board! but the pinout is the same, I have checked with the brd file in the Arduino page). Tag » Arduino Nano 33 Ble Mbed Os Installing Mbed OS Nano Boards - Arduino Documentation Why We Chose To Build The Arduino Nano 33 BLE Core On Mbed OS Arduino BLE Sense And Mbed Studio Code With Mbed Studio For Arduino Nano 33 BLE - Question Issues Running The Blinky Example On Arduino Nano 33 BLE How To Use Mbed RTOS Features On The Arduino Nano 33 BLE Arduino Nano 33 BLE Stops Execution After 8.5 Minutes ... - GitHub NeilBaner/nano-33-ble-mbed: Some Example Projects ... - GitHub New Arduino Nano Boards Run Arm's Mbed OS Mbed - Arduino Library List Mbed OS On Arduino Nano 33 BLE - Djynet Arduino Nano 33 BLE [ABX00030] › Customer Reviews Why We Chose To Build The Arduino Nano 33 BLE Core On Mbed OS New Mbed Directory For Arduino Nano 33 BLE Sense - Report Bugs