# trying a build with STR912 CPU

**URL:** <https://forums.freertos.org/t/trying-a-build-with-str912-cpu/3436>\
**Category:** Kernel\
**Created:** [November 1, 2013, 7:24pm UTC](https://forums.freertos.org/t/trying-a-build-with-str912-cpu/3436 "2013-11-01T19:24:35Z")\
**Posts on this page:** 5\
**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:** [November 1, 2013, 7:24pm UTC](https://forums.freertos.org/t/trying-a-build-with-str912-cpu/3436/1 "2013-11-01T19:24:35Z")

</div>

**[gorlash3](https://sourceforge.net/u/gorlash3/)** wrote on [Friday, November 01, 2013](https://sourceforge.net/p/freertos/discussion/382005/thread/9a8f0590/#a502):

```
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">

```

 We've been working on a project for several years now, which using the STR912 CPU.  
 We've been using the Yagarto toolchain, which is a GCC package.  
 The linker command using an argument **-mcpu=arm966e-s** which is correct for this chip.  
 Our project currently comprises about 70,000 lines of code, coded directly on the CPU (no OS), and works well.  
  
 Now I'm trying to study FreeRTOS, with an eye toward eventually porting the whole software package to this RTOS.  
 There are no examples with the package to support STR9 with GCC, so I've been looking at the STR9/IAR demo (which has no makefile) and the WizNET\_DEMO\_GCC\_ARM7 demo, trying to carefully convert them over to STR9, but had some problems.  
  
 So I looked online, and found an example that purported to be for STR9 + GCC, and I tried it out on my machine.  
 However, I noted that the (anonymous) author used **-mcpu=arm7tdmi** instead of   
**-mcpu=arm966e-s**.&nbsp; I was confused by this, and tried changing -mcpu to the correct value, but when I try to build with that setting, I get numerous linker errors, like this:  
  
 c:/yagarto/bin/../lib/gcc/arm-elf/4.2.2/../../../../arm-elf/bin/ld.exe: ERROR: c:/yagarto/bin/../lib/gcc/arm-elf/4.2.2/../../../../arm-elf/lib/thumb/interwork\libg.a(lib\_a-memset.o) uses FPA instructions, whereas RTOSDemo.elf does not  
  
 If I change the -mcpu back to ARM7, these linker errors all go away.&nbsp; BTW, I had the same experience with the GCC\_ARM7 demo package; it builds with the ARM7 type but gets these linker errors with the ARM9 CPU type.  
 What does this mean?&nbsp; Is this because they are mixing THUMB and ARM modules?  
  
 I could test this by switching the entire project to ARM mode and abandoning THUMB mode, and I'm thinking of trying that just to see if it will build, but for now I'm more concerned with understanding what is going on...  
  
 I would appreciate any insights that other STR9 users out there might have about this issue.  
  
 Dan Miller  
  
  
  
  

* * *

| [![](http://static.avast.com/emails/avast-mail-stamp.png) ](http://www.avast.com/) | 

This email is free from viruses and malware because [avast! Antivirus](http://www.avast.com/) protection is active.

 |

---

<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:** [November 2, 2013, 12:12pm UTC](https://forums.freertos.org/t/trying-a-build-with-str912-cpu/3436/2 "2013-11-02T12:12:02Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Saturday, November 02, 2013](https://sourceforge.net/p/freertos/discussion/382005/thread/9a8f0590/#fd59):

I suspect the differences are due to the fact that the GCC versions with which the respective projects were built were different, and that both require different linker scripts.

You may find some old GCC projects here: [http://developers.stf12.net/projects-list](http://developers.stf12.net/projects-list)

Regards.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [November 6, 2013, 7:28pm UTC](https://forums.freertos.org/t/trying-a-build-with-str912-cpu/3436/3 "2013-11-06T19:28:59Z")

</div>

**[gorlash3](https://sourceforge.net/u/gorlash3/)** wrote on [Wednesday, November 06, 2013](https://sourceforge.net/p/freertos/discussion/382005/thread/9a8f0590/#fd59/dc2c):

I’m confused by your response.  
First, I’m using the same linker script to build this demo project, and I’m using the same source code. The only thing I’m changing is the -mcpu argument:  
-mcpu=arm7tdmi  
or  
-mcpu=arm966e-s

I’m also using the same toolchain in all cases. Why do I get linker errors when I use arm966e-s ??

Unfortunately, none of the projects at [stf12.net](http://stf12.net) are useable by me, since I’m building with gcc/Yagarto, not with IAR…

---

<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:** [November 6, 2013, 7:41pm UTC](https://forums.freertos.org/t/trying-a-build-with-str912-cpu/3436/4 "2013-11-06T19:41:11Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Wednesday, November 06, 2013](https://sourceforge.net/p/freertos/discussion/382005/thread/9a8f0590/#1711):

I mean you are trying to take a project from an anonymous authour, that built with the authors tools, and are now trying to build them with your tools. If your version of the tools are different to the version used by the anonymous authour then it is likely the linker script you received from the anonymous authour is not correct for use with your version of the tools when the arm966e-s option is used.

Regards.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [November 7, 2013, 5:22pm UTC](https://forums.freertos.org/t/trying-a-build-with-str912-cpu/3436/5 "2013-11-07T17:22:28Z")

</div>

**[gorlash3](https://sourceforge.net/u/gorlash3/)** wrote on [Thursday, November 07, 2013](https://sourceforge.net/p/freertos/discussion/382005/thread/9a8f0590/#a01f):

Ahhh… I understand now…  
I sure wish there was a FreeRTOS example for STR912 and GCC (the existing IAR example is not very useful because (a) I don’t have IAR, and (b) it doesn’t contain a Makefile). This is very complicated, especially as this is my first experience with an RTOS…
