![]() */ #ifdef _NVIC_PRIO_BITS /* _BVIC_PRIO_BITS will be specified when CMSIS is being used. */ #define configUSE_IDLE_HOOK ( 0 ) #define configUSE_TICK_HOOK ( 0 ) #define configCHECK_FOR_STACK_OVERFLOW ( 0 ) #define configUSE_MALLOC_FAILED_HOOK ( 0 ) #define configUSE_DAEMON_TASK_STARTUP_HOOK ( 0 ) /* Optional functions */ #define INCLUDE_vTaskDelay ( 1 ) /* Cortex-M specific definitions. */ #define configUSE_CO_ROUTINES ( 0 ) #define configMAX_CO_ROUTINE_PRIORITIES ( 2 ) /* Hook function related definitions. #ifndef FREERTOS_CONFIG_H #define FREERTOS_CONFIG_H #include #include "stm32f4xx.h" extern uint32_t SystemCoreClock /* Scheduler settings */ #define configUSE_PREEMPTION ( 1 ) #define configCPU_CLOCK_HZ ( SystemCoreClock ) #define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) #define configUSE_16_BIT_TICKS ( 0 ) /* use 32-bit */ /* Task settings */ #define configMAX_PRIORITIES ( 5 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 130 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 75 * 1024 ) ) #define configMAX_TASK_NAME_LEN ( 10 ) /* Co-routine definitions. Here is a typical FreeRTOSConfig.h definition, followed by an explanation of each parameter: It is therefore specific to the application, not the RTOS, and should be located in an application directory, not in one of the RTOS kernel source code directories. FreeRTOSConfig.h tailors the RTOS kernel to the application being built. Every FreeRTOS application must have a FreeRTOSConfig.h header file in its pre-processor include path. Configuration #įreeRTOS is customised using a configuration file called FreeRTOSConfig.h. We will cover all above categories in other guides later. The FreeRTOS API Reference are listed in the below categories: h │ └─── portable ├─── Common │ mpu_wrappers. Here are the files that are necessary for integrate FreeRTOS:įreeRTOS │ croutine. Each RTOS port also has its own web page that details the directory in which the demo application for that port can be found, such as Demos targeting ST Microelectronics products. The directories are named to indicate the port to which they relate. The FreeRTOS/Demo subdirectories contain pre-configured projects used to build individual demo applications. The FreeRTOS download also contains a demo application for every processor architecture and compiler port. The various sample heap_x.c files are located in the FreeRTOS/Source/portable/MemMang directory. This is the RTOS portable layer, and it is located in the FreeRTOS/Source/Portable// subdirectories, where and are the compiler used to create the port, and the architecture on which the port runs, respectively.įor the reasons stated on the memory management page, the sample heap allocation schemes are also located in the portable layer. The same directory contains two optional files called timers.c and croutine.c which implement software timer and co-routine functionality respectively.Įach supported processor architecture requires a small amount of architecture specific RTOS code. These three files are in the FreeRTOS/Source directory. The core RTOS code is contained in three files, which are called tasks.c, queue.c and list.c. The FreeRTOS/Include directory contains the kernel header files. | | | // Select files from here to include to your project | | + include // Kernel header files | | + portable // Target specific immplementation | | + MemMang // Memory Management methods | | + GCC // Compiler | | + ARM - CM4F // Target MCU | + Demo // Contains the demo application projects | // Use demo config files as a base for your project +- FreeRTOS - Plus // Contains FreeRTOS+ components and demo projects. +- FreeRTOS // Contains the FreeRTOS real time kernel source files and demo projects | + Source // Contains the real time kernel source code. From the top, the download is split into two sub directories FreeRTOS, and FreeRTOS-Plus. ![]() The FreeRTOS download includes source code for every processor port, and every demo application. At the writing time, it is at the version 202112.00 which includes the FreeRTOS Kernel version 10.4.6.Įxtract the source code, then you should understand the source code structure to select files and folder to include into your project. Schematic of the Green LED on STM32 Nucleo-64 board FreeRTOS source files #ĭownload FreeRTOS from the official page. The Green LED is connected to the pin PA5 of the MCU. I choose to use a Nucleo-64 board with STM32F411RE. Refer to different types listed in Development boards and choose one suit for you. You can use any STM32 board because this is just a very simple project. Use RTOS delay function to not consume CPU.Create the second task to print out a counter value to SWV.Create the first task to Blink a LED at 10 Hz. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |