Chrono file note found: Fatal Error

I am seeing a strange issue here with compilation

Working scenario
#include “mbed.h”
#include “psa/crypto.h”
i am able to correctly call all the psa functions ( i have the necessary macros enabled for my target)

Failing Scenario
i move all the cypto functionalities and calls to a separate file - say cryptofunctions.h/.c
Include it in main.cpp

During compilation, i get following error

[Fatal Error] Kernel.h@27,10: ‘chrono’ file not found
[ERROR] In file included from .\cryptofunctions.c:2:
In file included from ./mbed-os\mbed.h:22:
In file included from ./mbed-os/rtos/include\rtos/rtos.h:28:
./mbed-os/rtos/include\rtos/Kernel.h:27:10: fatal error: ‘chrono’ file not found
1 error generated.

What is this error and how to address it?
my target is PSoC6 WIFI BT Kit

I fixed this by including the stdlib file

Thank you

Add stdlib.h where? I have added it in numerous places with no effect.

mbed os’s .c source files should not include mbed.h. Check if one of your own header file duplicates the name of a mbed os header file, making the compiler incorrectly includes your header file instead of the mbed os one.

1 Like