# MinGW port building issue

**URL:** <https://forums.freertos.org/t/mingw-port-building-issue/1617>\
**Category:** Kernel\
**Created:** [May 3, 2014, 12:47pm UTC](https://forums.freertos.org/t/mingw-port-building-issue/1617 "2014-05-03T12:47:32Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [May 3, 2014, 12:47pm UTC](https://forums.freertos.org/t/mingw-port-building-issue/1617/1 "2014-05-03T12:47:32Z")

</div>

**[tectu66](https://sourceforge.net/u/tectu66/)** wrote on [Saturday, May 03, 2014](https://sourceforge.net/p/freertos/discussion/382005/thread/48f2639f/#3f67):

Hi everyone,

I am currently trying to compile the windows emulator using a Makefile based system. However, the compilation process stops with some “no such instruction” error. The errors thrown show ARM instructions.  
I also tried the Visual Studio Express project which builds fine without any issue. I compared the files and it looks like I include the same file as the visual studio project does.  
I don’t really see where I go wrong and I would be very thankful if someone could help me out there.

I’m using MinGW/Cygwin on a Windows 8.1 64-Bit machine, FreeRTOS 8.0.1

Makefile: [http://pastebin.com/VkU73z8N](http://pastebin.com/VkU73z8N)  
Compiler output: [http://pastebin.com/F8nhMGT0](http://pastebin.com/F8nhMGT0)

Kind regards,  
~ Tectu

---

<div class="post-metadata">

**Author:** ![rtel](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rtel/32/31_2.png) [@rtel](https://forums.freertos.org/u/rtel)\
**Post date:** [May 3, 2014, 5:00pm UTC](https://forums.freertos.org/t/mingw-port-building-issue/1617/2 "2014-05-03T17:00:51Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Saturday, May 03, 2014](https://sourceforge.net/p/freertos/discussion/382005/thread/48f2639f/#36fe):

I just tried a clean 8.0.1 build and did not have any issues. My build output is below.

From the output you provided it looks like the issues is coming from the FreeRTOS+Trace recorder code, and I suspect the trace configuration file in your project is set to an ARM port - hence the inclusion of ARM instructions.

If you build the code exactly as it is provided in the FreeRTOS zip file download, do you get the same problem.

The root of the FreeRTOS distribution contains a FreeRTOS directory and a FreeRTOS-Plus directory. Have you mixed these two directories from two different FreeRTOS versions?

Regards.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [May 4, 2014, 1:23pm UTC](https://forums.freertos.org/t/mingw-port-building-issue/1617/3 "2014-05-04T13:23:15Z")

</div>

**[tectu66](https://sourceforge.net/u/tectu66/)** wrote on [Sunday, May 04, 2014](https://sourceforge.net/p/freertos/discussion/382005/thread/48f2639f/#0ddc):

Thank you very much for your quick reply.

I did not mix up these two directories. Everything comes from the FreeRTOS 8.0.1 zip archive that I have downloaded from the official website. I didn’t change the structure at all as you can see in the Makefile that I have linked in my first post.

You mentioned that you could successfully build it - is that with the Visual Express version or do you use the MinGW port as well?

Kind regards,  
~ Tectu

---

<div class="post-metadata">

**Author:** ![rtel](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rtel/32/31_2.png) [@rtel](https://forums.freertos.org/u/rtel)\
**Post date:** [May 4, 2014, 4:41pm UTC](https://forums.freertos.org/t/mingw-port-building-issue/1617/4 "2014-05-04T16:41:56Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Sunday, May 04, 2014](https://sourceforge.net/p/freertos/discussion/382005/thread/48f2639f/#17c6):

I just tried on a completely new clean machine, installed Eclipse Kepler, installed MingW, downloaded a clean FreeRTOS V8.0.1, imported the \FreeRTOS\Demo\WIN32-MingW project, and everything built without even a warning. Executed ok too.

The trace recorder configuration is in trcConfig.h (within the Trace\_Recorder\_Config directory visible in Eclipse’s project explorer). The setting within that files includes the correct Trace port for the target environment is SELECTED\_PORT, which if the files have not been modified should be set as follows:

```

#define SELECTED_PORT PORT_Win32

```

Regards.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [May 5, 2014, 1:45pm UTC](https://forums.freertos.org/t/mingw-port-building-issue/1617/5 "2014-05-05T13:45:52Z")

</div>

**[tectu66](https://sourceforge.net/u/tectu66/)** wrote on [Monday, May 05, 2014](https://sourceforge.net/p/freertos/discussion/382005/thread/48f2639f/#c236):

I checked and I have the right define as well.

As I really get out of ideas on what is going wrong, I downloaded eclipse.  
However, can you just give me a quick hint how I correctly import the project?  
Do I actually use the import function or do I go with the "New -\> “… existing code…” ?

Best regards,  
~ Tectu

---

<div class="post-metadata">

**Author:** ![rtel](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rtel/32/31_2.png) [@rtel](https://forums.freertos.org/u/rtel)\
**Post date:** [May 5, 2014, 2:03pm UTC](https://forums.freertos.org/t/mingw-port-building-issue/1617/6 "2014-05-05T14:03:56Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Monday, May 05, 2014](https://sourceforge.net/p/freertos/discussion/382005/thread/48f2639f/#239f):

I am using Eclipse Kepler, which is the latest. Make sure you are using the CDT version. Then I just did file-\>Import-\>Existing project into workspace, as per normal, and pointed it at the FreeRTOS/Demo/WIN32-MingW directory - as per the instructions here:  
[http://www.freertos.org/FreeRTOS-Windows-Simulator-Emulator-for-Visual-Studio-and-Eclipse-MingW.html#UsingEclipseMingW](http://www.freertos.org/FreeRTOS-Windows-Simulator-Emulator-for-Visual-Studio-and-Eclipse-MingW.html#UsingEclipseMingW)

CDT Kepler link:  
[http://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers/keplersr2](http://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers/keplersr2)

Regards.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [May 6, 2014, 12:28pm UTC](https://forums.freertos.org/t/mingw-port-building-issue/1617/7 "2014-05-06T12:28:49Z")

</div>

**[tectu66](https://sourceforge.net/u/tectu66/)** wrote on [Tuesday, May 06, 2014](https://sourceforge.net/p/freertos/discussion/382005/thread/48f2639f/#21d3):

I got now both working, the eclipse and the makefile soution.  
I thank you very much for your support.

~ Tectu

---

<div class="post-metadata">

**Author:** ![rtel](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rtel/32/31_2.png) [@rtel](https://forums.freertos.org/u/rtel)\
**Post date:** [May 6, 2014, 12:33pm UTC](https://forums.freertos.org/t/mingw-port-building-issue/1617/8 "2014-05-06T12:33:22Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Tuesday, May 06, 2014](https://sourceforge.net/p/freertos/discussion/382005/thread/48f2639f/#f578):

Please post the solution, so other people with the same problem will know what to do.

Regards.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [May 6, 2014, 12:56pm UTC](https://forums.freertos.org/t/mingw-port-building-issue/1617/9 "2014-05-06T12:56:13Z")

</div>

**[tectu66](https://sourceforge.net/u/tectu66/)** wrote on [Tuesday, May 06, 2014](https://sourceforge.net/p/freertos/discussion/382005/thread/48f2639f/#2cfb):

There was no “solution” as the eclipse project builds out of the box as intended.  
The makefile solution will be posted as soon as I have set everything up for a final step-by-step tutorial.

~ Tectu
