http://gdansk.bradley.edu/olekma ... es/index_rtos1.html
不知道是否能转给 keil c51 使用?
Basic setup of FreeRTOS and Inter-process Communication
FreeRTOS is (C) by Richard Barry. Visit
http://www.freertos.org/ for details.
The provided examples are based on FreeRTOS V5.0.4 port for Cygnal that has been altered to run with SDCC 2.8.0 through 3.2.0 on SiLabs 80C51F120 board. An effort was made to remove all code related to FreeRTOS ports to other systems and compilers. You can compile it using make utility or SiLabs IDE. Remember to adjust the SiLabs IDE configuration file to the file location on your hard drive.
The recent port of FreeRTOS V7.4.0 was successfully modified to run with SDCC 2.8.0. Later versions of the compiler cause malfunction of message queue library - data in queue becomes corrupt except one every so many data items SENT.
R01 FreeRTOS simplified environment and original demo application
large-stack-auto library that is needed to compile FreeRTOS programs:
SDCC v. 3.20
SDCC v. 3.10
SDCC v. 3.00
SDCC v. 2.80
Download the ZIPped file and unpack the library to C:Program FilesSDCCliblarge-stack-auto or to the appropriate place depending on the location of your SDCC compiler.
Simple FreeRTOS Examples
The following examples are add-ons to the environment set up by the first example. Make sure to use rebuild command when switching between examples. Rebuild once, read the stack parameter from main.mem, adjust the corresponding constant in FreeRTOSconfig.h, and rebuild again. Silicon Labs IDE frequently does not recognize need to build modules when a header file used in such module is edited. Using Rebuild alleviates this problem.
Source folder (to be unpacked in parallel with any of the following projects)
R02 Passing information between two processes using a queue
Priority exercises: inverse priorities of the tasks and remove sleep in reading task
R03 Coordination of passing information among processes using a binary or mutex semaphore and shared variables
R03 Synchronization of passing Passing information among processes using a binary semaphore and shared variables
R04 Passing information between a process and an interrupt using a queue
R05 Passing information between a process and an interrupt using a semaphore and shared variables
R05 Partially incorrect Passing information between a process and an interrupt using a semaphore and shared variables
R06 Passing information between a process and an interrupt using critical section and shared variables
R10 Serial communication using buffers (with an interrupt handler)
R11 Serial comm with timeout and a real time worker task to generate PWM Revisited later in device drivers lecture(s)
R12 Control interrupt-generated PWM using push buttons (up and down)
R30 Co-routines, all working in one stack space
一周热门 更多>