I did change some header file within the MbedOS source tree by means of applying some patch. In particular
~/.arduino15/packages/arduino/hardware/mbed_giga/4.2.1/cores/arduino/mbed/connectivity/drivers/emac/COMPONENT_WHD/interface/WhdSTAInterface.h
Obviously, the Arduino IDE does not detect this change and therefore does not rebuild MbedOS when compiling the sketch.
So how can I trigger the rebuild of MbedOS then? Perhaps executing some make within one of the MbedOS source directories?
One way is probably also a complete reinstallation of the IDE, but that's not very nice....
No, that wouldn't accomplish anything. Mbed OS is not built from source when you install Arduino IDE, nor is it done automatically at any other time on your system.
The Arduino developers precompile Mbed OS and distribute the precompiled binaries as part of the "Arduino Mbed OS Giga Boards" platform installation.
An attempt to build Mbed-OS for instance with
./mbed-os-to-arduino ARDUINO_NANO33BLE:ARDUINO_NANO33BLE
is failing in the same way (just to test some other configuration).
The mbed-os-to-arduino script is furthermore providing the following warning in an early stage:
Compiling Mbed Application...[mbed] WARNING: Missing Python modules were not auto-installed.
The Mbed OS tools in this program require the following Python modules: urllib3, pyyaml, future, requests, cryptography
You can install all missing modules by running "pip install -r requirements.txt" in "/tmp/mbed-os-program/mbed-os"
On Posix systems (Linux, etc) you might have to switch to superuser account or use "sudo"
I did execute the given command line in the given directory as root, which did install something indeed. However, the issue remains the same.
It seemed intuitive for me to not just replace the libmbed.a file, but the whole GIGA subdirectory in ~/.arduino15/packages/arduino/hardware/mbed_giga/4.2.1/variants
with the GIGA subdirectory found in the build-directory under the variants subdirectory.
I did re-build the sketch resp. the Arduino application through the IDE. An - voila - the issue of the Mbed-OS I was faced with is gone