News for hackers. Stuff that matters.
Re:FreeRTOS meets Rust by kartD on Tuesday September 27, 2016 @05:20PM (#12593326)
Little off topic, but does anyone have a good resource or tutorial for FreeRTOS. I find freertos.org sparse and not really illustrative.
Re:FreeRTOS meets Rust by tesseract on Tuesday September 27, 2016 @05:53PM (#12593558)
The PDF manual sold by FreeRTOS, "Using the FreeRTOS Real Time Kernel - A Practical Guide", is worthwhile. I agree that the web documentation is somewhat lacking and suspect that for better or worse, it is that way in order to encourage buying the book.
Re:FreeRTOS meets Rust by ansible on Tuesday September 27, 2016 @06:17PM (#12593696)
I bought the book and looked through some example programs. That was enough for me to get going.

The main things you want to keep in mind is that the queues and such are not for large amounts of data. It is better, for example, to statically allocate three buffers, and then send the buffer number over a queue interface, rather than send the data itself, which involves two copy operations.

The other thing to pay attention to is that you should only be using the ISR specific versions of the API inside an ISR. That, and minimize the code in the ISRs in general, but that is applicable to anything.

Re:FreeRTOS meets Rust by kartD on Tuesday September 27, 2016 @10:27PM (#12594996)
I had heard about the book. Thanks for the info!
Re:FreeRTOS meets Rust by stephen_g on Tuesday September 27, 2016 @08:50PM (#12594600)
The lack of documentation was one of the reasons I ditched FreeRTOS and moved to ChibiOS, which I'm enjoying a lot. It has a much nicer API and cleaner codebase, really good demo projects, and a good discussion forum where the main developer usually answers any questions in a day or two. Unfortunately it still isn't that much better in terms of written documentation though.
Re:FreeRTOS meets Rust by fest on Wednesday September 28, 2016 @04:02AM (#12596114)
The lack of vendor-agnostic hardware abstraction layer (drivers) in FreeRTOS was my main reason to use ChibiOS for my projects.

Although, libopencm3 has progressed nicely, so FreeRTOS + libopencm3 could now be a decent alternative to ChibiOS.

Re:FreeRTOS meets Rust by kbumsik on Tuesday September 27, 2016 @11:33PM (#12595260)
FreeRTOS official documentation is good enough though.
Re:FreeRTOS meets Rust by mrlambchop on Tuesday September 27, 2016 @06:40PM (#12593824)
Whilst not entirely the answer you're after, I highly recommend reading the micrium book for general RTOS understanding (now in its 3rd version!).

https://www.micrium.com/books/ucosiii/

Re:FreeRTOS meets Rust by DCRichards on Wednesday September 28, 2016 @06:45AM (#12596683)
This could be interesting for things like Pebble which is based on FreeRTOS, would be great to do some modifications on that level

https://developer.pebble.com/blog/2014/05/23/FreeRTOS-Modifi...

Re:FreeRTOS meets Rust by ambrop7 on Wednesday September 28, 2016 @02:39AM (#12595840)
The problem with FreeRTOS is that it comes without batteries included, like drivers, networking and filesystem. I see such features as a primary advantage of an RTOS compared to a home-grown solution without threads (i.e. just main and interrupts).

For those who like a full OS, RTEMS is a more complete solution.

Re:FreeRTOS meets Rust by kirrent on Wednesday September 28, 2016 @03:17AM (#12595969)
To be fair, that's by design and they make no secret of the fact that it's not a fully featured OS. FreeRTOS has a lot of that stuff available but I think that part of the reason it's so popular is because of how bare-bones, lightweight, and portable it is. From their FAQ: What is a Real Time Kernel? See the page "what is an RTOS" for a more detailed explanation than provided here.

A Real Time Operating System can provide many resources to application writers - including TCP/IP stacks, files systems, etc. The Kernel is the part of the operating system that is responsible for task management, and intertask communication and synchronisation. FreeRTOS is a real time kernel.

Re:FreeRTOS meets Rust by rkangel on Wednesday September 28, 2016 @07:10AM (#12596778)
For me though, that's an advantage. I just want the basic primitives that deal with the pre-emptive multitasking and then we'll build everything over the top.