Background
The title is not accurate, the main idea is to transplant to WIN10 pc, Intel I5.
Recently because the project contacted FreeRTOS real-time operating system, want to have a more in-depth understanding of the operating system, so decided to download the source code to see, the following link to the book with the source code.
FreeRTOS Source Download Link:
Http://freertos.org/Documentation/RTOS_book.html
Open the source code, see its portable/directory for the "Msvc-mingw", should be compiled on the PC through.
Development environment
Codeblocks vs volume is too big, just use the bar. You need to download the version with "MinGW" from Codeblocks official website, for example: Codeblocks-16.01mingw-setup.exe
Download page:
Http://www.codeblocks.org/downloads/26
Installation, the new project will not be detailed, copy freertos the entire directory to the Codeblocks project directory, add the following files to the Codeblocks project, I only add a demo to the project.
Resolution of compile and link problems
Compile may be prompted to find the file "FreeRTOS.h", don't worry, it should be that the file is not added to the search path, open "Project build Options" and then add the following file to "search directories".
Header file problem solved, but there are other problems, such as this function timegetdevcaps () is invalid reference, Google found that this function is used by the Windows platform, then
The workaround is to add the header file "Windows.h". later found not to add, because it is a LD error, not a compilation error, so just add winmm.dll to the link option can be
But again compile,ld error, still is this function, how to do? According to Google just now, this function its library files and dynamic connection files are "Winmm.lib" and "Winmm.dll", then add this file in the project settings, as follows:
In the compilation, you may also encounter port.c in a macro stack_size_param_is_a_reservation unnamed situation, it's OK, directly delete it.
Run results
After the above toss, finally able to run, the results are as follows:
Statement
Welcome reprint, please specify the source and author, while retaining the statement.
LinTeX9527
Source: https://home.cnblogs.com/u/LinTeX9527/
This blog article without special instructions, are original, reproduced please indicate the source. If the statement is to be retained without the consent of the author, and the original text connected in the obvious position of the article page, the right to hold the legal liability is retained.
FreeRTOS transplanted to WIN10