Artemis Nano Not Compiling BLE Code

Workflow:

  1. Uninstall Arduino IDE.

  2. Remove all files in documents → Arduino

  3. Remove all files in Arduino15 folder.

  4. Re-install and launch Arduino IDE.

  5. Go to preferences → Additional Boards Manager URL

  6. Input https://raw.githubusercontent.com/spark … index.json

Note that, according to this guide https://learn.sparkfun.com/tutorials/in … rd-manager the additional boards manager should be:

https://raw.githubusercontent.com/spark … index.json

However if you look at the JSON, the latest Apollo3 package is 1.2.1. In order to get 2.2.1 you need to use the first link above.

  1. Install Apollo3 boards and select Artemis Nano.

  2. Install ArduinoBLE library and load any Arduino BLE example sketch.

  3. Error below:

c:\Users\YMB\Documents\Arduino\libraries\ArduinoBLE\src\utility\HCICordioTransport.cpp: In function 'void bleLoop()':
c:\Users\YMB\Documents\Arduino\libraries\ArduinoBLE\src\utility\HCICordioTransport.cpp:123:68: warning: 'us_timestamp_t mbed::TimerBase::read_high_resolution_us() const' is deprecated: Use the Chrono-based elapsed_time method.  If integer microseconds are needed, you can use `elapsed_time().count()` [since mbed-os-6.0.0] [-Wdeprecated-declarations]
         last_update_us += (uint64_t) timer.read_high_resolution_us();
                                                                    ^
In file included from C:\Users\YMB\AppData\Local\Arduino15\packages\SparkFun\hardware\apollo3\2.2.1/cores/mbed-os/mbed.h:80,
                 from C:\Users\YMB\AppData\Local\Arduino15\packages\SparkFun\hardware\apollo3\2.2.1/cores/arduino/mbed-bridge/Arduino.h:14,
                 from C:\Users\YMB\AppData\Local\Arduino15\packages\SparkFun\hardware\apollo3\2.2.1/cores/arduino/sdk/ArduinoSDK.h:9,
                 from <command-line>:
C:\Users\YMB\AppData\Local\Arduino15\packages\SparkFun\hardware\apollo3\2.2.1/cores/mbed-os/drivers/Timer.h:104:20: note: declared here
     us_timestamp_t read_high_resolution_us() const;
                    ^~~~~~~~~~~~~~~~~~~~~~~
c:\Users\YMB\Documents\Arduino\libraries\ArduinoBLE\src\utility\HCICordioTransport.cpp:145:72: warning: 'us_timestamp_t mbed::TimerBase::read_high_resolution_us() const' is deprecated: Use the Chrono-based elapsed_time method.  If integer microseconds are needed, you can use `elapsed_time().count()` [since mbed-os-6.0.0] [-Wdeprecated-declarations]
         uint64_t time_spent = (uint64_t) timer.read_high_resolution_us();
                                                                        ^
In file included from C:\Users\YMB\AppData\Local\Arduino15\packages\SparkFun\hardware\apollo3\2.2.1/cores/mbed-os/mbed.h:80,
                 from C:\Users\YMB\AppData\Local\Arduino15\packages\SparkFun\hardware\apollo3\2.2.1/cores/arduino/mbed-bridge/Arduino.h:14,
                 from C:\Users\YMB\AppData\Local\Arduino15\packages\SparkFun\hardware\apollo3\2.2.1/cores/arduino/sdk/ArduinoSDK.h:9,
                 from <command-line>:
C:\Users\YMB\AppData\Local\Arduino15\packages\SparkFun\hardware\apollo3\2.2.1/cores/mbed-os/drivers/Timer.h:104:20: note: declared here
     us_timestamp_t read_high_resolution_us() const;
                    ^~~~~~~~~~~~~~~~~~~~~~~
c:\Users\YMB\Documents\Arduino\libraries\ArduinoBLE\src\utility\HCICordioTransport.cpp:156:55: warning: 'void rtos::ThisThread::sleep_for(uint32_t)' is deprecated: Pass a chrono duration, not an integer millisecond count. For example use `5s` rather than `5000`. [since mbed-os-6.0.0] [-Wdeprecated-declarations]
               rtos::ThisThread::sleep_for(wait_time_ms);
                                                       ^
In file included from C:\Users\YMB\AppData\Local\Arduino15\packages\SparkFun\hardware\apollo3\2.2.1/cores/mbed-os/rtos/rtos.h:30,
                 from C:\Users\YMB\AppData\Local\Arduino15\packages\SparkFun\hardware\apollo3\2.2.1/cores/mbed-os/mbed.h:22,
                 from C:\Users\YMB\AppData\Local\Arduino15\packages\SparkFun\hardware\apollo3\2.2.1/cores/arduino/mbed-bridge/Arduino.h:14,
                 from C:\Users\YMB\AppData\Local\Arduino15\packages\SparkFun\hardware\apollo3\2.2.1/cores/arduino/sdk/ArduinoSDK.h:9,
                 from <command-line>:
C:\Users\YMB\AppData\Local\Arduino15\packages\SparkFun\hardware\apollo3\2.2.1/cores/mbed-os/rtos/ThisThread.h:216:6: note: declared here
 void sleep_for(uint32_t millisec);
      ^~~~~~~~~
c:\Users\YMB\Documents\Arduino\libraries\ArduinoBLE\src\utility\HCICordioTransport.cpp:156:55: warning: 'void rtos::ThisThread::sleep_for(uint32_t)' is deprecated: Pass a chrono duration, not an integer millisecond count. For example use `5s` rather than `5000`. [since mbed-os-6.0.0] [-Wdeprecated-declarations]
               rtos::ThisThread::sleep_for(wait_time_ms);
                                                       ^
In file included from C:\Users\YMB\AppData\Local\Arduino15\packages\SparkFun\hardware\apollo3\2.2.1/cores/mbed-os/rtos/rtos.h:30,
                 from C:\Users\YMB\AppData\Local\Arduino15\packages\SparkFun\hardware\apollo3\2.2.1/cores/mbed-os/mbed.h:22,
                 from C:\Users\YMB\AppData\Local\Arduino15\packages\SparkFun\hardware\apollo3\2.2.1/cores/arduino/mbed-bridge/Arduino.h:14,
                 from C:\Users\YMB\AppData\Local\Arduino15\packages\SparkFun\hardware\apollo3\2.2.1/cores/arduino/sdk/ArduinoSDK.h:9,
                 from <command-line>:
C:\Users\YMB\AppData\Local\Arduino15\packages\SparkFun\hardware\apollo3\2.2.1/cores/mbed-os/rtos/ThisThread.h:216:6: note: declared here
 void sleep_for(uint32_t millisec);
      ^~~~~~~~~

This looks like it might be the same issue as viewtopic.php?t=57779 :-/

Try to apply the workaround mentioned (but substitute the folder names) and see if that works?

Doesn’t look like the same issue at all - and to be honest, I have no idea where to start. Plus I do have an Arduino Nano BLE, that thread suggests the workaround would break the Arduino Nano BLE compile.

Is there evidence of anyone successfully compiling BLE on the Artemis Nano? Haven’t seen any such case in my research thus far.

This is a known issue and does not harm (yet). The code is compiling (these are just warnings) and the code does work as it is.

As ArduinoBLE is NOT a Sparkfun product, all the issues and bugs are handled by Arduino. There are a number of problems outstanding. This problem can be found at https://github.com/arduino-libraries/Ar … issues/164. Also there I posted the changes to apply if you do not want to see these warnings.

Thanks Paul, I’ll try out the code when I get home.

I do find it strange the Arduino IDE shows these warnings as big, bad red code rather than say, blue or something.