Issue to upload "BatteryMonitor" example to Arduino Nano 33 BLE

Hi,

I am using Arduino Nano 33 BLE. I also followed the instruction from this link (https://docs.arduino.cc/tutorials/nano-33-ble-sense/ble-device-to-device) to install libraries. When I connect Arduino to my Laptop, I can see the green LED on the board is on and the yellow LED is flashing. However, when I upload one of the Arduino example (BatteryMonitor) to the board, I get this error:

Arduino: 1.8.19 (Windows Store 1.8.57.0) (Windows 10), Board: "Arduino Nano 33 BLE"

In file included from c:\users\atefi\onedrive - atefi\documents\arduinodata\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\c++\7.2.1\stdlib.h:36:0,

             from C:\Users\atefi\OneDrive - atefi\Documents\Arduino\libraries\ArduinoBLE\src\utility\BLEUuid.cpp:20:

c:\users\atefi\onedrive - atefi\documents\arduinodata\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\c++\7.2.1\cstdlib:41:10: fatal error: bits/c++config.h: No such file or directory

#include <bits/c++config.h>

      ^~~~~~~~~~~~~~~~~~

compilation terminated.

exit status 1

Error compiling for board Arduino Nano 33 BLE.

How can I solve this issue?
Thank you for your help in advance.

Abbas

You shouldn't install software on a cloud volume. Install the IDE locally and try again.

I suspect that something is out of date.

Go to Tools->Board:->Board Manager... and check that you have V2.6.1 of Arduino Mbed OS Nano Boards

Go to Tools->Manage Libraries... and make sure you have V1.2.1 of ArduinoBLE

Thank you for your useful comment!

I installed IDE on another computer (not on the cloud). I could verify the code without any error, however when I upload it to the Arduino board, I get the message below:

Sketch uses 315784 bytes (32%) of program storage space. Maximum is 983040 bytes.
Global variables use 69296 bytes (26%) of dynamic memory, leaving 192848 bytes for local variables. Maximum is 262144 bytes.
Device : nRF52840-QIAA
Version : Arduino Bootloader (SAM-BA extended) 2.0 [Arduino:IKXYZ]
Address : 0x0
Pages : 256
Page Size : 4096 bytes
Total Size : 1024KB
Planes : 1
Lock Regions : 0
Locked : none
Security : false
Erase flash

Done in 0.000 seconds
Write 315792 bytes to flash (78 pages)
[==============================] 100% (78/78 pages)
Done in 12.302 seconds

Moreover, the serial monitor is not working and when I press its icon, I get this message (the port of the board is COM6):

Board at COM5 is not available

Also, I could not find the BLE service using LightBlue app on my iphone13.

Any suggestion to solve this issue?

Thank you!

Thank you for your suggestion!

It seems I should not install the software on cloud. As you suggested, I also installed the newest version for Arduino Mbed OS Nano Boards and ArduinoBLE.