# Compiling the LPC2000 port on OS X  

**URL:** <https://forums.freertos.org/t/compiling-the-lpc2000-port-on-os-x/3608>\
**Category:** Kernel\
**Created:** [May 16, 2010, 1:25pm UTC](https://forums.freertos.org/t/compiling-the-lpc2000-port-on-os-x/3608 "2010-05-16T13:25:50Z")\
**Posts on this page:** 13\
**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 16, 2010, 1:25pm UTC](https://forums.freertos.org/t/compiling-the-lpc2000-port-on-os-x/3608/1 "2010-05-16T13:25:50Z")

</div>

**[jstoezel](https://sourceforge.net/u/jstoezel/)** wrote on [Sunday, May 16, 2010](https://sourceforge.net/p/freertos/discussion/382005/thread/9f1b0383/#1947):

Hello,

I’ve installed the arm-elf toolchain on my MAC OS X machine following these instructions: [http://www.ethernut.de/en/documents/cross-toolchain-osx.html](http://www.ethernut.de/en/documents/cross-toolchain-osx.html)  
I’m able to compile and I’ve checked the compiled file runs on my microcontroller.

While compiling freeRTOS for the LPC2000 port, first of I get way more warnings than what I used to get when I compiled for the VC++ port. Most of the warnings are generated from the port, thus as somehow dependent on the toolchain.  
Here’s a subset of the warnings I get:

FreeRTOS/Source/portable/GCC/ARM7\_LPC2000/portmacro.h:108:1: warning: multi-line comment  
FreeRTOS/Source/portable/GCC/ARM7\_LPC2000/portmacro.h:146:1: warning: multi-line comment  
FreeRTOS/Source/portable/GCC/ARM7\_LPC2000/portISR.c: In function ‘vPortISRStartFirstTask’:  
FreeRTOS/Source/portable/GCC/ARM7\_LPC2000/portISR.c:120: warning: no previous prototype for ‘swi\_handler’  
FreeRTOS/Source/portable/GCC/ARM7\_LPC2000/portISR.c:120: warning: declaration of ‘swi\_handler’ shadows a global declaration  
FreeRTOS/Source/portable/GCC/ARM7\_LPC2000/portISR.c:94: warning: shadowed declaration is here  
FreeRTOS/Source/portable/GCC/ARM7\_LPC2000/portISR.c: In function ‘swi\_handler’:  
FreeRTOS/Source/portable/GCC/ARM7\_LPC2000/portISR.c:140: warning: nested extern declaration of ‘vTickISR’

However I get critical errors:  
- For example, I had to modify the prototype declaration of pxCurrentTCB in portmacro.h, which did not seem to match the declaration in tasks.c. - I’ve fixed this issue, I believe.  
- I get this error I can’t seem to fix:

FreeRTOS/Source/portable/GCC/ARM7\_LPC2000/portISR.c:142: error: static declaration of ‘vTickISR’ follows non-static declaration  
FreeRTOS/Source/portable/GCC/ARM7\_LPC2000/portISR.c:140: error: previous declaration of ‘vTickISR’ was here

and here is what portISR.c looks like between line 140 and 142 (this code is unchanged from the downloaded version):

void vTickISR( void ) \_\_attribute\_\_((naked));  
void vTickISR( void )

So considering I wasn’t expecting so many warnings, and these errors, I am thinking I don’t have the appropriate compiler options (I use a make file that was initially written for winARM).  
Any help fixing this error, and cleaning up a bit the warnings would be appreciated.

Thanks!  
Jean

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [May 16, 2010, 1:48pm UTC](https://forums.freertos.org/t/compiling-the-lpc2000-port-on-os-x/3608/2 "2010-05-16T13:48:13Z")

</div>

**[davedoors](https://sourceforge.net/u/davedoors/)** wrote on [Sunday, May 16, 2010](https://sourceforge.net/p/freertos/discussion/382005/thread/9f1b0383/#a220):

It is not clear what you are attempting here. It looks like you have built your own MAC version of arm-elf-gcc, and are trying to build a FreeRTOS demo. Which demo? Have you modified anything (linker script, source files, etc.), or are you trying a clean build?

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [May 16, 2010, 2:03pm UTC](https://forums.freertos.org/t/compiling-the-lpc2000-port-on-os-x/3608/3 "2010-05-16T14:03:00Z")

</div>

**[jstoezel](https://sourceforge.net/u/jstoezel/)** wrote on [Sunday, May 16, 2010](https://sourceforge.net/p/freertos/discussion/382005/thread/9f1b0383/#d9be):

Yes I built my own version of arm-elf-gcc, and for now I am trying to  
compile the freeRTOS source code.

I am starting with a clean build, meaning I am not trying to compile a  
demo project for now. I do have linker scripts and startup code that  
do work on my platform. I understand that eventually I will need to  
get startup code that initialize the CPU into a mode suitable for  
freeRTOS. I guess that will be another issue, as I have to use a  
bootloader that comes with specific startup code too. Some kind of  
merging will be necessary.

Anyhow for now I’m just trying to have freeRTOS to compile on the  
arm-elf toolchain I have installed on my Mac OS X machine. While doing  
so, as explained in my initial email, I observed several critical  
errors, like the one I pointed out.

Jean

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [May 16, 2010, 2:06pm UTC](https://forums.freertos.org/t/compiling-the-lpc2000-port-on-os-x/3608/4 "2010-05-16T14:06:07Z")

</div>

**[davedoors](https://sourceforge.net/u/davedoors/)** wrote on [Sunday, May 16, 2010](https://sourceforge.net/p/freertos/discussion/382005/thread/9f1b0383/#501a):

The search path and definitions defined in the makefile have to be right to ensure the right header files get included in the right order. I would recommend starting with a makefile from a demo app, even if you don’t use the demo app main.c

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [May 16, 2010, 3:22pm UTC](https://forums.freertos.org/t/compiling-the-lpc2000-port-on-os-x/3608/5 "2010-05-16T15:22:35Z")

</div>

**[jstoezel](https://sourceforge.net/u/jstoezel/)** wrote on [Sunday, May 16, 2010](https://sourceforge.net/p/freertos/discussion/382005/thread/9f1b0383/#4be9):

Alright following your advice I am now reusing the LPC2106-GCC port.

Something must not be right with my install because now I am guessing this error:

command-line\>: error: macro names must be identifiers  
In file included from …/…/Source/include/portable.h:307,  
from …/…/Source/include/FreeRTOS.h:70,  
from …/…/Source/portable/GCC/ARM7\_LPC2000/portISR.c:82:

From the comment in portable.h, I believe this is happening because portENTER\_CRITICAL is not defined, because portMacro.h is not included yet.

However, I am now using all the code provided as is from the port. It seems portmacro.h has to be included before compiling freeRTOS. From what I see happening during the compilation process, portIsr.c is compiled first. portIsr.h includes “freeRTOS.h”, which includes “portable.h”, which seems to be generating this error because portENTER\_CRITICAL is not defined (portMacro.h not included?).

Shouldn’t main.c be compiled first, as it includes all the freeRTOS headers? How do you control this? I guess portISR.c is compiled first because this is the only code compiled in ARM mode? - the rest being compiled in Thumb mode…

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [May 16, 2010, 4:19pm UTC](https://forums.freertos.org/t/compiling-the-lpc2000-port-on-os-x/3608/6 "2010-05-16T16:19:04Z")

</div>

**[davedoors](https://sourceforge.net/u/davedoors/)** wrote on [Sunday, May 16, 2010](https://sourceforge.net/p/freertos/discussion/382005/thread/9f1b0383/#a74a):

That demo can be built in one of four ways, each of which has a batch file to configure the definitions. Look at the .bat files in the Demo\ARM7\_LPC2106\_GCC directory. One of the batch files must be executed before make is called.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [May 16, 2010, 4:50pm UTC](https://forums.freertos.org/t/compiling-the-lpc2000-port-on-os-x/3608/7 "2010-05-16T16:50:14Z")

</div>

**[jstoezel](https://sourceforge.net/u/jstoezel/)** wrote on [Sunday, May 16, 2010](https://sourceforge.net/p/freertos/discussion/382005/thread/9f1b0383/#f172):

Thank you for your reply.

ok, I now use the content of the bat files to setup my environment.

While this cleared the error with portable.h not being included, I am now back to having the following error:

…/…/Source/portable/GCC/ARM7\_LPC2000/portISR.c:143: error: static declaration of ‘vTickISR’ follows non-static declaration  
…/…/Source/portable/GCC/ARM7\_LPC2000/portISR.c:141: error: previous declaration of ‘vTickISR’ was here

I read on a forum that gcc treats this as an error while it should be a warning instead… I’m not to sure how to fix this is this is the case.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [May 16, 2010, 4:59pm UTC](https://forums.freertos.org/t/compiling-the-lpc2000-port-on-os-x/3608/8 "2010-05-16T16:59:49Z")

</div>

**[davedoors](https://sourceforge.net/u/davedoors/)** wrote on [Sunday, May 16, 2010](https://sourceforge.net/p/freertos/discussion/382005/thread/9f1b0383/#5527):

I just tried building that project with arm-elf-gcc V4.4.2 and did not get any warnings or errors output.

arm-elf-gcc -c -Wall -Wextra -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare -Waggregate-return -Wstrict-prototypes  
-Wmissing-prototypes -Wmissing-declarations -Wunused -D RUN\_FROM\_ROM -D GCC\_ARM7 -I. -I…/…/Source/include -I…/Common/include&nbsp; -mcpu=arm7  
tdmi -Tlpc2106-rom.ld -O3 -fomit-frame-pointer -fno-strict-aliasing -fno-dwarf2-cfi-asm …/…/Source/portable/GCC/ARM7\_LPC2000/portISR.c -o  
…/…/Source/portable/GCC/ARM7\_LPC2000/portISR.o  
arm-elf-gcc -c -Wall -Wextra -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare -Waggregate-return -Wstrict-prototypes  
-Wmissing-prototypes -Wmissing-declarations -Wunused -D RUN\_FROM\_ROM -D GCC\_ARM7 -I. -I…/…/Source/include -I…/Common/include&nbsp; -mcpu=arm7  
tdmi -Tlpc2106-rom.ld -O3 -fomit-frame-pointer -fno-strict-aliasing -fno-dwarf2-cfi-asm serial/serialISR.c -o serial/serialISR.o  
arm-elf-gcc -c&nbsp; -Wall -Wextra -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare -Waggregate-return -Wstrict-prototype  
s -Wmissing-prototypes -Wmissing-declarations -Wunused -D RUN\_FROM\_ROM -D GCC\_ARM7 -I. -I…/…/Source/include -I…/Common/include&nbsp; -mcpu=arm  
7tdmi -Tlpc2106-rom.ld -O3 -fomit-frame-pointer -fno-strict-aliasing -fno-dwarf2-cfi-asm main.c -o main.o  
arm-elf-gcc -c&nbsp; -Wall -Wextra -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare -Waggregate-return -Wstrict-prototype  
s -Wmissing-prototypes -Wmissing-declarations -Wunused -D RUN\_FROM\_ROM -D GCC\_ARM7 -I. -I…/…/Source/include -I…/Common/include&nbsp; -mcpu=arm  
7tdmi -Tlpc2106-rom.ld -O3 -fomit-frame-pointer -fno-strict-aliasing -fno-dwarf2-cfi-asm serial/serial.c -o serial/serial.o  
arm-elf-gcc -c&nbsp; -Wall -Wextra -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare -Waggregate-return -Wstrict-prototype  
s -Wmissing-prototypes -Wmissing-declarations -Wunused -D RUN\_FROM\_ROM -D GCC\_ARM7 -I. -I…/…/Source/include -I…/Common/include&nbsp; -mcpu=arm  
7tdmi -Tlpc2106-rom.ld -O3 -fomit-frame-pointer -fno-strict-aliasing -fno-dwarf2-cfi-asm ParTest/ParTest.c -o ParTest/ParTest.o  
arm-elf-gcc -c&nbsp; -Wall -Wextra -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare -Waggregate-return -Wstrict-prototype  
s -Wmissing-prototypes -Wmissing-declarations -Wunused -D RUN\_FROM\_ROM -D GCC\_ARM7 -I. -I…/…/Source/include -I…/Common/include&nbsp; -mcpu=arm  
7tdmi -Tlpc2106-rom.ld -O3 -fomit-frame-pointer -fno-strict-aliasing -fno-dwarf2-cfi-asm …/Common/Minimal/integer.c -o …/Common/Minimal/in  
teger.o  
arm-elf-gcc -c&nbsp; -Wall -Wextra -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare -Waggregate-return -Wstrict-prototype  
s -Wmissing-prototypes -Wmissing-declarations -Wunused -D RUN\_FROM\_ROM -D GCC\_ARM7 -I. -I…/…/Source/include -I…/Common/include&nbsp; -mcpu=arm  
7tdmi -Tlpc2106-rom.ld -O3 -fomit-frame-pointer -fno-strict-aliasing -fno-dwarf2-cfi-asm …/Common/Minimal/flash.c -o …/Common/Minimal/flas  
h.o  
arm-elf-gcc -c&nbsp; -Wall -Wextra -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare -Waggregate-return -Wstrict-prototype  
s -Wmissing-prototypes -Wmissing-declarations -Wunused -D RUN\_FROM\_ROM -D GCC\_ARM7 -I. -I…/…/Source/include -I…/Common/include&nbsp; -mcpu=arm  
7tdmi -Tlpc2106-rom.ld -O3 -fomit-frame-pointer -fno-strict-aliasing -fno-dwarf2-cfi-asm …/Common/Minimal/PollQ.c -o …/Common/Minimal/Poll  
Q.o  
arm-elf-gcc -c&nbsp; -Wall -Wextra -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare -Waggregate-return -Wstrict-prototype  
s -Wmissing-prototypes -Wmissing-declarations -Wunused -D RUN\_FROM\_ROM -D GCC\_ARM7 -I. -I…/…/Source/include -I…/Common/include&nbsp; -mcpu=arm  
7tdmi -Tlpc2106-rom.ld -O3 -fomit-frame-pointer -fno-strict-aliasing -fno-dwarf2-cfi-asm …/Common/Minimal/comtest.c -o …/Common/Minimal/co  
mtest.o  
arm-elf-gcc -c&nbsp; -Wall -Wextra -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare -Waggregate-return -Wstrict-prototype  
s -Wmissing-prototypes -Wmissing-declarations -Wunused -D RUN\_FROM\_ROM -D GCC\_ARM7 -I. -I…/…/Source/include -I…/Common/include&nbsp; -mcpu=arm  
7tdmi -Tlpc2106-rom.ld -O3 -fomit-frame-pointer -fno-strict-aliasing -fno-dwarf2-cfi-asm …/Common/Minimal/flop.c -o …/Common/Minimal/flop.  
o  
arm-elf-gcc -c&nbsp; -Wall -Wextra -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare -Waggregate-return -Wstrict-prototype  
s -Wmissing-prototypes -Wmissing-declarations -Wunused -D RUN\_FROM\_ROM -D GCC\_ARM7 -I. -I…/…/Source/include -I…/Common/include&nbsp; -mcpu=arm  
7tdmi -Tlpc2106-rom.ld -O3 -fomit-frame-pointer -fno-strict-aliasing -fno-dwarf2-cfi-asm …/Common/Minimal/semtest.c -o …/Common/Minimal/se  
mtest.o  
arm-elf-gcc -c&nbsp; -Wall -Wextra -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare -Waggregate-return -Wstrict-prototype  
s -Wmissing-prototypes -Wmissing-declarations -Wunused -D RUN\_FROM\_ROM -D GCC\_ARM7 -I. -I…/…/Source/include -I…/Common/include&nbsp; -mcpu=arm  
7tdmi -Tlpc2106-rom.ld -O3 -fomit-frame-pointer -fno-strict-aliasing -fno-dwarf2-cfi-asm …/Common/Minimal/dynamic.c -o …/Common/Minimal/dy  
namic.o  
arm-elf-gcc -c&nbsp; -Wall -Wextra -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare -Waggregate-return -Wstrict-prototype  
s -Wmissing-prototypes -Wmissing-declarations -Wunused -D RUN\_FROM\_ROM -D GCC\_ARM7 -I. -I…/…/Source/include -I…/Common/include&nbsp; -mcpu=arm  
7tdmi -Tlpc2106-rom.ld -O3 -fomit-frame-pointer -fno-strict-aliasing -fno-dwarf2-cfi-asm …/Common/Minimal/BlockQ.c -o …/Common/Minimal/Blo  
ckQ.o  
arm-elf-gcc -c&nbsp; -Wall -Wextra -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare -Waggregate-return -Wstrict-prototype  
s -Wmissing-prototypes -Wmissing-declarations -Wunused -D RUN\_FROM\_ROM -D GCC\_ARM7 -I. -I…/…/Source/include -I…/Common/include&nbsp; -mcpu=arm  
7tdmi -Tlpc2106-rom.ld -O3 -fomit-frame-pointer -fno-strict-aliasing -fno-dwarf2-cfi-asm …/…/Source/tasks.c -o …/…/Source/tasks.o  
arm-elf-gcc -c&nbsp; -Wall -Wextra -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare -Waggregate-return -Wstrict-prototype  
s -Wmissing-prototypes -Wmissing-declarations -Wunused -D RUN\_FROM\_ROM -D GCC\_ARM7 -I. -I…/…/Source/include -I…/Common/include&nbsp; -mcpu=arm  
7tdmi -Tlpc2106-rom.ld -O3 -fomit-frame-pointer -fno-strict-aliasing -fno-dwarf2-cfi-asm …/…/Source/queue.c -o …/…/Source/queue.o  
arm-elf-gcc -c&nbsp; -Wall -Wextra -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare -Waggregate-return -Wstrict-prototype  
s -Wmissing-prototypes -Wmissing-declarations -Wunused -D RUN\_FROM\_ROM -D GCC\_ARM7 -I. -I…/…/Source/include -I…/Common/include&nbsp; -mcpu=arm  
7tdmi -Tlpc2106-rom.ld -O3 -fomit-frame-pointer -fno-strict-aliasing -fno-dwarf2-cfi-asm …/…/Source/list.c -o …/…/Source/list.o  
arm-elf-gcc -c&nbsp; -Wall -Wextra -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare -Waggregate-return -Wstrict-prototype  
s -Wmissing-prototypes -Wmissing-declarations -Wunused -D RUN\_FROM\_ROM -D GCC\_ARM7 -I. -I…/…/Source/include -I…/Common/include&nbsp; -mcpu=arm  
7tdmi -Tlpc2106-rom.ld -O3 -fomit-frame-pointer -fno-strict-aliasing -fno-dwarf2-cfi-asm …/…/Source/portable/MemMang/heap\_2.c -o …/…/Sou  
rce/portable/MemMang/heap\_2.o  
arm-elf-gcc -c&nbsp; -Wall -Wextra -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare -Waggregate-return -Wstrict-prototype  
s -Wmissing-prototypes -Wmissing-declarations -Wunused -D RUN\_FROM\_ROM -D GCC\_ARM7 -I. -I…/…/Source/include -I…/Common/include&nbsp; -mcpu=arm  
7tdmi -Tlpc2106-rom.ld -O3 -fomit-frame-pointer -fno-strict-aliasing -fno-dwarf2-cfi-asm …/…/Source/portable/GCC/ARM7\_LPC2000/port.c -o …  
/…/Source/portable/GCC/ARM7\_LPC2000/port.o  
arm-elf-gcc -Wall -Wextra -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare -Waggregate-return -Wstrict-prototypes -W  
missing-prototypes -Wmissing-declarations -Wunused -D RUN\_FROM\_ROM -D GCC\_ARM7 -I. -I…/…/Source/include -I…/Common/include&nbsp; -mcpu=arm7tdm  
i -Tlpc2106-rom.ld -O3 -fomit-frame-pointer -fno-strict-aliasing -fno-dwarf2-cfi-asm …/…/Source/portable/GCC/ARM7\_LPC2000/portISR.o serial  
/serialISR.o main.o serial/serial.o ParTest/ParTest.o …/Common/Minimal/integer.o …/Common/Minimal/flash.o …/Common/Minimal/PollQ.o …/Com  
mon/Minimal/comtest.o …/Common/Minimal/flop.o …/Common/Minimal/semtest.o …/Common/Minimal/dynamic.o …/Common/Minimal/BlockQ.o …/…/Sour  
ce/tasks.o …/…/Source/queue.o …/…/Source/list.o …/…/Source/portable/MemMang/heap\_2.o …/…/Source/portable/GCC/ARM7\_LPC2000/port.o -no  
startfiles boot.s -Xlinker -ortosdemo.elf -Xlinker -M -Xlinker -Map=rtosdemo.map  
arm-elf-objcopy rtosdemo.elf -O ihex rtosdemo.hex

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [May 16, 2010, 5:11pm UTC](https://forums.freertos.org/t/compiling-the-lpc2000-port-on-os-x/3608/9 "2010-05-16T17:11:31Z")

</div>

**[jstoezel](https://sourceforge.net/u/jstoezel/)** wrote on [Sunday, May 16, 2010](https://sourceforge.net/p/freertos/discussion/382005/thread/9f1b0383/#a498):

Alright, so there must be something wrong with my arm-elf version. I’m compiling from OS X.

arm-elf-gcc -version

arm-elf-gcc (GCC) 4.2.2  
Copyright (C) 2007 Free Software Foundation, Inc.  
This is free software; see the source for copying conditions.&nbsp; There is NO  
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

arm-elf-g++ -version

arm-elf-g++ (GCC) 4.2.2  
Copyright (C) 2007 Free Software Foundation, Inc.  
This is free software; see the source for copying conditions.&nbsp; There is NO  
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Do you have any further checks your recommend?

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [May 16, 2010, 5:21pm UTC](https://forums.freertos.org/t/compiling-the-lpc2000-port-on-os-x/3608/10 "2010-05-16T17:21:24Z")

</div>

**[davedoors](https://sourceforge.net/u/davedoors/)** wrote on [Sunday, May 16, 2010](https://sourceforge.net/p/freertos/discussion/382005/thread/9f1b0383/#0216):

Only to ensure that portASM.c is being compiled to ARM mode, otherwise it will not work, although might still compile.

I have done a thorough check and cannot find vTickISR() declared static anywhere in the whole directory tree.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [May 16, 2010, 5:21pm UTC](https://forums.freertos.org/t/compiling-the-lpc2000-port-on-os-x/3608/11 "2010-05-16T17:21:53Z")

</div>

**[davedoors](https://sourceforge.net/u/davedoors/)** wrote on [Sunday, May 16, 2010](https://sourceforge.net/p/freertos/discussion/382005/thread/9f1b0383/#dca9):

Also, I am not using G++.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [May 16, 2010, 8:24pm UTC](https://forums.freertos.org/t/compiling-the-lpc2000-port-on-os-x/3608/12 "2010-05-16T20:24:38Z")

</div>

**[jstoezel](https://sourceforge.net/u/jstoezel/)** wrote on [Sunday, May 16, 2010](https://sourceforge.net/p/freertos/discussion/382005/thread/9f1b0383/#6fc3):

I’m not using g++ either, I though I would just trow the version I’m using since gcc and g++ come together.

The specific error I’m pointing out happens at this section of the code in portisr.c:

void vTickISR( void ) \_\_attribute\_\_((naked));  
void vTickISR( void )  
{

The C compiler seems to consider that the \_\_attribute\_\_((naked)) makes the first prototype static., while the body of the function (next line) does not specify the attribute, and thus is not considered static…

I can compile and run code that uses ISRs. The code both does not use the naked attribute and also uses direct names for interrupt vector: void UNDEF\_Routine(void) \_\_attribute\_\_ ((interrupt(“UNDEF”)));

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [May 16, 2010, 10:30pm UTC](https://forums.freertos.org/t/compiling-the-lpc2000-port-on-os-x/3608/13 "2010-05-16T22:30:38Z")

</div>

**[jstoezel](https://sourceforge.net/u/jstoezel/)** wrote on [Sunday, May 16, 2010](https://sourceforge.net/p/freertos/discussion/382005/thread/9f1b0383/#f53e):

Alright, got it to compile, finally.

I had to remove this attribute: -fno-dwarf2-cfi-asm

Apparently it’s not supported with the GCC version we get on OS X…
