wojstod
wojstod

Registered on 2年前

Answers
5
Articles
2
Follower
0

No board has come so far. I'm great dissapointed

I've got mine PICO board and followed succesfully tutorial: https://rt-thread.medium.com/getting-started-with-raspberry-pi-pico-in-rt-thread-studio-ide-5bb08c01363f. But for me it would be wonderful run an IDE RT-Thread-Studion on a greater brother of PICO - the Raspberry PI4 under Linux but there is no Linux version yet. I also consider porting my old code written in Arduino to RT-Thread.
So simplest Arduino code:
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_PIN, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_PIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_PIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
should be translated into RT-Thread version:
while (1)

{
    rt_pin_write(LED_PIN, 1);
    rt_thread_mdelay(1000);
    rt_pin_write(LED_PIN, 0);
    rt_thread_mdelay(1000);
}

Also original PICO Raspberry SDK example from [http://github.com/raspberrypi/pico-examples/blob/master/blink/blink.c] (http://github.com/raspberrypi/pico-examples/blob/master/blink/blink.c) can be easily ported:

include "pico/stdlib.h"

int main() {

ifndef PICO_DEFAULT_LED_PIN

warning blink example requires a board with a regular LED

else

const uint LED_PIN = PICO_DEFAULT_LED_PIN;
gpio_init(LED_PIN);
gpio_set_dir(LED_PIN, GPIO_OUT);
while (true) {
    gpio_put(LED_PIN, 1);
    sleep_ms(250);
    gpio_put(LED_PIN, 0);
    sleep_ms(250);
}

endif

}

I consider to write a simple script or Python code to automatic translate of Arduio code

The whole month passed and nothing was sent to me!

I've used FreeRTOS and Micrium RTOS in several projects. I'm considering other options as “BadAlloc” vulnerability was discovered this year: https://us-cert.cisa.gov/ics/advisories/icsa-21-119-04 .
Many RTOSes are affected (i.e. FreeRTOS, Micrium) but RTThread is not mentioned. Does it mean RTThread is not affected or it was not tested? I also found that among other RTOSes https://pvs-studio.com/en/blog/inspections RTThread has been statically checked in 2018 by independent tool: https://pvs-studio.com/en/blog/posts/cpp/0561 and several errors found. Are these errors corrected now?

Create
Post