Before creating a FreeRTOS project, you have to install SDK first.
Download the SDK package SDK_2.4.1_FRDM-K66F.zip, drag and drop it into the “Installed SDKs” view. You will be prompted with a dialog asking you to confirm the import –click OK. The SDK will be automatically installed into MCUXpresso IDE part support repository.
Go to the ‘QuickStart’ Panel in the bottom left of the MCUXpresso IDE window, and click new project.
On the “Board and/or device selection” page, select board frdmk66f. You will see some description relating to the your selection.
You will see the basic project creation and setting page.
The project will be given a default name based on the MCU name. Name the project, select the right device package.
Board files: This field allows the automatic selection of a default set of board support files, else empty board files will be created.
Project type: Selecting ‘C’ will automatically select Redlib libraries, selecting c++ will select NewllibNaro librarires.
Project option: enable semihost will cause the semihost variant of the chosen library to be selected; CMSIS-Core will cause a CMSIS folder containing a variety of support code to be created.
OS: For a FreeRTOS project, make sure FreeRTOS is selected.
Please select the drivers and utilities according to your requirements.
Click ‘next’, you will go to advanced project settings page.
Advanced Project setting
This page will take certain default options based on settings from the first wizard project page.
Set library type: Please use Redlib for C projects, and NewlibNarno for SDK C++ projects.
Next panel allows options to be set related to Input/Output.
Hardware settings: set options such as the type of floating point support available/required.
MCU C compiler: Set various compiler options
Click ‘finish’ will create a simple ‘hello world’ C project for Freedom K66f . Basically does the initialization of the pins, clocks, debug console and peripherals.
/* Init board hardware. */
/* Init FSL debug console. */
/* Force the counter to be placed into memory. */
volatilestaticinti = 0 ;
/* Enter an infinite loop, just incrementing a counter. */
Click the project settings, we can see some basic information of this project, a right click on these nodes provides direct options to edit the associated setting.
Add FreeRTOS task
/*TODO: insert other include files here. */
/* FreeRTOS kernel includes. */
/*TODO: insert other definitions and declarations here. */