platformio / platform-nxplpc

NXP LPC: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/nxplpc
Apache License 2.0
9 stars 12 forks source link

RTOS thread not work on LPC1768 board #5

Closed 32duino closed 6 years ago

32duino commented 7 years ago

RTOS thread not work on LPC1768 board. but same code work fine on stm32f103rb and FRDM K64F

Configuration

Win 7 64bit operate system:

PlatformIO Version: Atom + PlatformIO IDE 2.0.0-beta.8 Core 3.5.0.a4

The content of platformio.ini:

[env:lpc1768]
platform = nxplpc
board = lpc1768
framework = mbed
build_flags = -Wall -lc -DPIO_FRAMEWORK_MBED_RTOS_PRESENT

Source file to reproduce issue:

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

DigitalOut led1(LED1);
DigitalOut led2(LED2);
Thread thread;

void led2_thread() {
while (true) {
led2 = !led2;
Thread::wait(1000);
}
}

int main() {
thread.start(led2_thread);

while (true) {
    led1 = !led1;
    Thread::wait(500);
}
}
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/48623862-rtos-thread-not-work-on-lpc1768-board?utm_campaign=plugin&utm_content=tracker%2F38218499&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F38218499&utm_medium=issues&utm_source=github).
ttsatsanis commented 6 years ago

I think this issue is a blocker. I used also the Freescale K64F and the same problem occurs. The error is thrown from an mbed internal library mbes_wait_api_rtos where the definition of thread::wait for some reason throws an undefined variable error. Even though I removed and reinstalled the framework the error didn't resolved the error. I opened an issue on ARM mbed_os repository because this error blocks the process of build.

ivankravets commented 6 years ago

Do you still have problems with RTOS?

ttsatsanis commented 6 years ago

Sorry for the delay, wasn't logged for long time. I saw that you included a fix. It is working properly know, the issue can be closed.

ivankravets commented 6 years ago

thanks for the report!