8 years, 9 months ago.

What's different from Keil RTX and mbed RTOS?

I found RL-ARM Users' Guide and RL-ARM Getting Started Guide and examples from Keil's website.

So far I can find one sample project for mbed-rtos.

main.cpp

#include "mbed.h"
#include "rtos.h"

DigitalOut led1(LED1);
InterruptIn sw2(USER_BUTTON);
uint32_t button_pressed;
Thread *thread2;

void sw2_press(void)
{
    thread2->signal_set(0x1);
}

void led_thread(void const *argument)
{
    while (true) {
        led1 = !led1;
        Thread::wait(1000);
    }
}

void button_thread(void const *argument)
{
    while (true) {
        Thread::signal_wait(0x1);
        button_pressed++;
    }
}

int main()
{
    Thread thread(led_thread);
    thread2 = new Thread(button_thread);

    button_pressed = 0;
    sw2.fall(&sw2_press);
    while (true) {
        Thread::wait(5000);
        printf("SW2 was pressed (last 5 seconds): %d \n", button_pressed);
        fflush(stdout);
        button_pressed = 0;
    }
}

But what's different from RTX and mbed RTOS? It seems Keil RTX and mbed RTOS are using different API.

  • task vs Thread
  • event vs signal
  • more

I am still looking for sample projects to support the rest of features of RTOS, including:

  • Semaphone
  • Event
  • Mailbox
  • Mutex

Is there any official documentations about it?

Question relating to:

Official mbed Real Time Operating System based on the RTX implementation of the CMSIS-RTOS API open standard. cmsis, rtos, RTX

2 Answers

8 years, 9 months ago.

Here is the documentation: https://developer.mbed.org/handbook/RTOS

Apparantly mbed-os is going to replace it :( (Sad because I believe mbed OS is way larger than RTOS). RTX and mbed-rtos are identical, as in mbed-rtos is only a shell around RTX.

8 years, 8 months ago.

May I ask, when will the mbed os release the source code?

PLease use search functionality to find an answer.. There were at least 2 comments posted here in the last days, to answer your question.

posted by Martin Kojtal 17 Aug 2015

One more - please don't spam other threads. This is not related to mbedOS, means you answer is not related to the question above. Thanks for understanding

posted by Martin Kojtal 17 Aug 2015