Arm Mbed OS support forum

MBED Studio IDE Compiler error

Hello All,
I am using latest MBED OS with LPC1768 and to use %f in snprintf, I enabled

   "minimal-printf-enable-floating-point": {
        "help": "Enable floating point printing when using minimal printf library",
        "value": true
    },

Then started getting compiler

Compile [ 25.6%]: rtx_kernel.c
[Error] rtx_kernel.c@507,1: unknown type name ‘__WEAK’
[ERROR] .\mbed-os\cmsis\CMSIS_5\CMSIS\RTOS2\RTX\Source\rtx_kernel.c:507:1: error: unknown type name ‘__WEAK’
__WEAK void osRtxKernelPreInit (void) {

So changed back option to false and still getting the same error.

Please advice.

Hello,

when you change the setting to true, then back to false and then issue still persist, it not seem to be issue connected to this.
I tried MbedStudio(1.4.1 & AC6), LPC1768, MbedOS6.14 with snprintf and no errors.

    char buffer [100];
    int cx = snprintf ( buffer, 100, "The half of %d is %f", 60, 60/3.6 );

BR, Jan