Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
12 years, 9 months ago.
Wrong links in "Import this library into a program"
Perhaps, the mistakes are on my side:
When "mbed RTOS" is selected, the link "Import this library into a program" actually import CMSIS rtos library.
When "CMSIS RTOS" is selected, the link "Import this library into a program" actually import mbed rtos library.
Question relating to:
2 Answers
12 years, 9 months ago.
Hi:
If you are in the page http://mbed.org/handbook/RTOS, the sample program
#include "mbed.h"
#include "rtos.h"
DigitalOut led1(LED1);
DigitalOut led2(LED2);
void led2_thread(void const *args) {
while (true) {
led2 = !led2;
Thread::wait(1000);
}
}
int main() {
Thread thread(led2_thread);
while (true) {
led1 = !led1;
Thread::wait(500);
}
}
could not be compiled if you import the library via the "» Import this library into a program" link. As the links import CMSIS RTOS only.
Of course if you import the whole program, it will import the mbed-rtos library.