FreeRTOS transplanted to WIN10

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.