11 years, 1 month 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

11 years, 1 month ago.

CMSIS RTOS and mbed RTOS have been merged into the same library.

HM Yoong
poster
11 years, 1 month 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.

It compiles for me if I import the program or if I copy and paste the source you've listed and click "Import this library into a program". I have checked using LPC1768 and LPC11U24 as the target. Can you list the steps you are taking to make a new program.

posted by Stephen Paulger 04 Feb 2013