Enabling debug messages for modules in Arduino 101


I'm new to the Arduino developer community.

I am trying to enable debug messages for the modules in corelibs-arduino101.

I have modified the file "log_modules" in "%LOCALAPPDATA%\Arduino15\packages\Intel\hardware\arc32\1.0.7\system\libarc32_arduino101\framework\include" and enabled (third argument set to "1") the modules I want to use for the debug messages.

As per the ReadMe instructions at GitHub - arduino/ArduinoCore-arc32 I've also put the "-DCONFIGURE_DEBUG_CORELIB_ENABLED" switches on the appropriate lines in platforms.txt and configured the log level in the file log.c ("%LOCALAPPDATA%\Arduino15\packages\Intel\hardware\arc32\1.0.7\system\libarc32_arduino101\framework\src\infra\log.c")

However, it seems that the output is always from the same modules no matter what I do -- my changes on log_modules and log.c are ignored.

My guess is that I somehow need to trigger a re-compile of the files in "system\libarc32_arduino101" which would then would create a new system variant library in "variants\arduino_101\libarc32drv_arduino101.a"

Is this correct? Is there a way to do or trigger this via the Arduino IDE?

Hi ShadowNate,
you should indeed recompile libarc32drv_arduino101 if you are modifying one of its files.
The Makefile in system/libarc32_arduino101 does this automatically but you need to add the compiler bin folder to the PATH before launching it.
The platform.txt modification is needed to call log_init automatically at startup