Skip to content

Commit d587906

Browse files
authored
Adding description how to modify mbed-os-to-arduino in order to build mbed libraries with debug flags enabled
1 parent 9d22ddf commit d587906

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,20 @@ Open Arduino IDE; you should now see three new targets under `MBED boards` label
2727
Adding a target is a mostly automatic procedure that involves running https://github.com/bcmi-labs/ArduinoCore-mbed/blob/master/mbed-os-to-arduino after setting `BOARDNAME` and `ARDUINOCORE` env variables.
2828
Actions marked as TODO must be executed manually.
2929

30+
### How to build a debug version of the Arduino mbed libraries
31+
* Modify `mbed-os-to-arduino `
32+
```diff
33+
mbed_compile () {
34+
- PROFILE_FLAG=""
35+
if [ x"$PROFILE" != x ]; then
36+
PROFILE_FLAG=--profile="$ARDUINOVARIANT"/conf/profile/$PROFILE.json
37+
export PROFILE=-${PROFILE^^}
38+
+ else
39+
+ export PROFILE="-DEBUG"
40+
+ PROFILE_FLAG="--profile=debug"
41+
fi
42+
```
43+
3044
## Using this core as an mbed library
3145

3246
You can use this core as a standard mbed library; all APIs are under `arduino` namespace (so they must be called like `arduino::digitalWrite()` )

0 commit comments

Comments
 (0)