I use ATSAM4LC2A ARM microcontroller that drives 3xUSART, GPIOs, DMA. timers with the use of interrupts and all the remaining logic of my application.. The project is functional but with out a RTOS yet. This is my first attempt and I want to port my code logic with the help of FreeRTOS but I am afraid to use because theadsafety is all new to me.
Is there a software checker that evaluates my code as thread-safe? Or is there a set of written rules that I can use as a ckecklist for every single function I use?
The only rules I can think of are:
- No use of global variables inside functions.
- Use mutex if global variables are used..
Also is it better to check for thead-safe or reentrant for my embedded application?