Re: undefined reference to `_legacy_sleep'
You should not include legacy.h directly, just include zephyr.h
legacy.h will be dropped for 1.8 and you should be using new APIs, not a legacy API like task_sleep.
From: zephyr-devel-bounces@... [mailto:zephyr-devel-bounces@...] On Behalf Of kk
Sent: Wednesday, March 29, 2017 12:34 PM
Subject: [Zephyr-devel] undefined reference to `_legacy_sleep'
When I use the "task_sleep" function, I include the file legacy.h, but the compiler tells:
I search the source code in zephyr, its definition in ./kernel/legacy_timer.c, how can I solve this problem?