You are on page 1of 13

VikiLABS

Installing and Setting-Up Eclipse IDE to


run Your First FreeRTOS Project (on a
Windows PC)
www.vikipedialabs.com

July 8, 2017

1 Installations
1. Download the latest version of FreeRTOS from http://www.freertos.
org or directly from https://sourceforge.net/projects/freertos/
files/latest/download?source=files which is available as both
a standard zip file (.zip), and as a self extracting zip file (.exe).

2. Download Eclipse IDE for C/C++ Developers from https://eclipse.


org/downloads/eclipse-packages/. Extract the zip file. Save
the extracted folder in an easily accessible location such as the
Desktop.

3. Eclipse requires Java to function. If Java has not been installed or


updated on your computer, you have to download and install with
the latest Java update from the https://java.com/en/download/
manual.jsp. Close all web browsers while installing Java.

1
4. Make sure Java is included in Path of your Windows PC. This is
accessed by typing System Variables in the search box on the Start
Menu. Choose “Edit the System Environment Variables”. Click
“Environment Variables” In System Variable, Choose Path and in-
clude the location of the java installation, e.g. “ C:\ProgramFiles\
Java\jdk1.xx_xx\bin” as shown in Fig. 1. Restart your computer
after installing or updating Java.

5. Obtaining the Compiler: The compilation tools are not included


as part of the Eclipse distribution and must be downloaded and
installed separately. The installation requires internet access. To
install CDT, Open Eclipse IDE by navigating to the location of
the extracted Eclipse folder and opening eclipse.exe to launch the
Eclipse IDE. Navigate to Help =⇒ Install New Software as shown
in Fig. 2.

6. Click the “Add” tab and choose “CDT ....” Tick “CDT Main
Features” and “Uncategorised” box as seen in Fig. 3. Click “Next”.

7. Installation details will now appear as shown in Fig. 4, click “Next”

8. Accept License agreement. Click “Finish”. CDT will begin to


install as shown in Fig. 5.

9. After completion of installation, you would be prompted to restart


Eclipse. Choose “Yes”

10. The last installation will be the MingW compilation tools. Down-
load MingW from https://sourceforge.net/projects/mingw/
files/ and install as shown in Fig. 6.

11. After set up installation, the window in Fig. 7 will appear, mark
“mingw-developer-tool”, “mingw32-base”, “mingw32-gcc-g++” and
“msys-base” for installation as shown.

12. Then Click on “Installation =⇒ Apply Changes”. The window in


Fig. 8 will appear, click “Apply”.

13. Installation will commence as shown in Fig. 9.

2
14. After installation is completed, close all MingW installation boxes.
The MingW files are found in the “ C:\MinGW” directory. Add this
to Windows System Variables Path by following the same procedure
when Java JDK was added to path (Fig. 10).

15. The Eclipse project for the FreeRTOS application is located in the
“ FreeRTOS/Demo/WIN32-MingW” folder. It’s now time to import
it into the Eclipse IDE.

Figure 1

Figure 2

3
Figure 3

Figure 4

4
Figure 5

Figure 6

5
Figure 7

Figure 8

6
(a) (b)

Figure 9

Figure 10

7
2 Importing the FreeRTOS simulator project
into an Eclipse IDE
To import the FreeRTOS simulator project into Eclipse,

1. Launch the Eclipse IDE if closed.

2. Select “Import” from the Eclipse “File” menu. A dialogue box will
appear as shown in Fig 11.

3. In the dialogue box, select “General =⇒ Existing Projects into


Workspace”. Click “Next”. Another dialogue box will appear that
allows you to navigate to and select a root directory. Navigate
to the location where the FreeRTOS folder is, Select “ FreeRTOS/
Demo/WIN32-MingW” as the directory - this will reveal a project
called RTOSDemo which is the project that should be imported
(Fig. 12).

4. Click Finish. To view the RTOSDemo project, Close the Welcome


window and open the Project Explorer Window as shown in Fig.
13.

5. Finally, build the project, it should give no errors. Then Run. To


display the console so that the output can be seen while running,
navigate to “Window =⇒ Show View =⇒ Console” (Fig. 14).

6. To stop running, click on Terminate (Fig. 15).

3 Unresolved Inclusion Error


If “unresolved inclusion” errors appears next to the include statements,
do the following:

1. Navigate to Properties =⇒ C/C++ Build =⇒ Text Chain Editor.


Ensure that “Current toolchain” is set to “MinGW GCC” and
“Current builder” is “CDT Internal Builder” (Fig. 16).

8
Figure 11

9
Figure 12

10
Figure 13

Figure 14

11
Figure 15

2. Then navigate to Properties =⇒ C/C++ General =⇒ Paths and


Symbols. In the “Includes” Tab, select “GNU C” . Click on “Add”
(Fig 17). Add the following to the directory:

• C:\MinGW\lib\gcc\mingw32\5.3.0\include
• C:\MinGW\include
• C:\MinGW\lib\gcc\mingw32\5.3.0\include-fixed

12
Figure 16

Figure 17

13

You might also like