I want to use some arduino libraries in my mbed project. I have found this article, author managed to use arduino core from mbed. Unfortunately, I can’t run his example because one of the dependent library commit was removed, so I am trying to do it on my own. First, I created an empty mbed os 6 project, then I added ArduinoCore-mbed and ArduinoCore-API libraries. I use Windows, so I enabled the case sensitivity for the project directory (the author of the article mentioned, that case insensitivity could lead to build errors). When I am specifying the target and starting the build, I am getting this error:
[Fatal Error] arm_hal_random.c@1,10: 'mbed_config.h' file not found
[ERROR] .\arduinocore-mbed\cores\arduino\arm_hal_random.c:1:10: fatal error: 'mbed_config.h' file not found
#include "mbed_config.h"
^~~~~~~~~~~~~~~
1 error generated.
But mbed_config.h is being generated in “BUILD/NUCLEO_F103RB/ARMC6” directory…
Here is the content of my mbed_app.json file:
{
"target_overrides": {
"*": {
"target.macros_remove": [ "SERIAL_CDC" ],
"target.source_dir": [
"ArduinoCore-mbed/cores/arduino",
"ArduinoCore-mbed/variants/ARDUINO_NANO33BLE",
"ArduinoCore-API/api"
],
"target.include_dir": [
"ArduinoCore-mbed/cores/arduino",
"ArduinoCore-mbed/variants/ARDUINO_NANO33BLE",
"ArduinoCore-API/api"
]
}
}
}