Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT




Loading

Installing GCC for ARM

Posted by Nobody/Anonymous on April 22, 2005
Hello,
I'm trying to compile the LPC2106 ARM demo for FreeRTOS and am having trouble getting everything installed and configured correctly.

I installed GNUARM. All of the important files such as Arm-elf-gcc are located in folder C:\Program Files\GNUARM\bin and NOT in the normal Cygwin directory c:\cygwin.

Is this the right folder?

Per suggestion from your website, I downloaded and installed UNXUTILS. I understand, with this I don't need Cygwin. What folder should I put UNXUTILS in? In the folder C:\Program Files\GNUARM\bin? When I tried to unzip UNXUTILS , WinZip gave me an error. So I tried unzipping using PKZIP. It was still corrupted but PKZIP was able to fix the problem. When unzipped, I got the folders "user\local\wbin" and a few other folders. wbin is where all of the Cygwin files are located. Where do I place these folders?

Once I get GNUARM and UNXUTILS installed, where do I install the demo files located in the demo download "ARM7_LPC2106_GCC"? When I run the ram_arm.bat, it can't find any of the files?

Please help me,
Thanks!

RE: Installing GCC for ARM

Posted by Richard on April 22, 2005
Hi, see my answers below.

>I'm trying to compile the LPC2106 ARM demo
>for FreeRTOS and am having trouble getting
>everything installed and configured correctly.
>
>I installed GNUARM. All of the important
>files such as Arm-elf-gcc are located in
>folder C:\Program Files\GNUARM\bin and
>NOT in the normal Cygwin directory c:\cygwin.

Did you use the prebuilt files with the Windoze installation program. If so then I’m sure the installation location is fine. My copy is installed in the directory: D:\DevTools\GNUARM so also not in the normal Cygwin directory.

You don’t say what problem you get when you try to use the tools?

A simple test would be to create a file, say called test.c with the following:

int main( void )
{
return 0;
}

then try compiling it with “arm-elf-gcc test.c”.

Does this work?

You might get problems if you have multiple and different versions of the cygwin dll installed on your machine.

There is a mailing list detailed on the gnuarm.org homepage for installation problems.

>Is this the right folder?

You can put it where you like provided the bin directory is in your PATH environment variable.


>Per suggestion from your website, I downloaded
>and installed UNXUTILS. I understand, with
>this I don't need Cygwin. What folder should
>I put UNXUTILS in?

Again you can put it where you like provided it is in your path. Also if you have different versions of make installed on your machine (I have many!) then you need to ensure you are using the correct one. This can be done by making sure it is listed first within your PATH.

>In the folder C:\Program
>Files\GNUARM\bin? When I tried to unzip
>UNXUTILS , WinZip gave me an error. So
>I tried unzipping using PKZIP. It was still
>corrupted but PKZIP was able to fix the
>problem. When unzipped, I got the folders
>"user\local\wbin" and a few other folders.
>wbin is where all of the Cygwin files are
>located. Where do I place these folders?

I should try downloading it again if it is corrupted.

You don’t need to use this make utility in particular. Any GNU compatible version will do.


>Once I get GNUARM and UNXUTILS installed,
>where do I install the demo files located
>in the demo download "ARM7_LPC2106_GCC"?
>When I run the ram_arm.bat, it can't find
>any of the files?


Ensure you keep the directory structure in tact when you unzip the FreeRTOS files. You should end up with two directories at the top of the tree – source and demo. The makefile assumes this directory structure exists and will look for files from both. Take a look at the source code organisation section of the WEB site. You should not need to make any modifications to the download in order for it to compile.

RE: Installing GCC for ARM

Posted by Nobody/Anonymous on April 28, 2005
Here are the problems that I'm having:

In DOS shell, I change to the directory where my arm compiler is located e.g. "c:\Program Files\GNUARM\bin"

My FreeRTOS download is located in folder
c:\a\FreeRTOS.

All sub folders remain in tact from download.

I'm trying to run the rom_arm.bat file located in my directory "C:\a\FreeRTOS\Demo\ARM7_LPC2106_GCC"

In DOS, I type "C:\a\FreeRTOS\Demo\ARM7_LPC2106_GC\rom_arm.bat"

It appears the first 5 commands in the bat file are running correctly. When it gets to running the "make" command, I get the output in DOS window

"make***: No targets specified and no makefile found. Stop"

Some general comments:
1. I am able to compile GNU arm programs for my LPC2106 and run them without using FreeRTOS.
2. I'm using the make file from UNXUTILS. I placed the make.exe in the folder C:\Program Files\GNUARM\bin. This folder is located in my path environment variable in Windows 2000.

Where is the Windoze GNUARM download located?

If I have UNXUTILS installed correctly, do I still need to have Cygwin installed or does UNXUTILS replace Cygwin?

RE: Installing GCC for ARM

Posted by Nobody/Anonymous on April 28, 2005
I think the problem might just be that you are in the wrong directory when calling the batch file.

You seem to be calling the batch file from the GNUARM bin directory. Because the makefile uses relative path's it will not be able to find the source files, or the makefile itself for that matter.

You say that the bin directory is in your path - so all you should need to do is go into the C:\a\FreeRTOS\Demo\ARM7_LPC2106_GCC directory - then call the batch file by simply typing "rom_arm".


RE: Installing GCC for ARM

Posted by Nobody/Anonymous on April 28, 2005
In DOS, I navigate to folder C:\a\FreeRTOS\Demo\ARM7_LPC2106_GCC and type rom_arm per your suggestion. I get the same error message "make***: No targets specified and no makefile found. Stop". The last line in the rom_arm.bat file is make with no arguments. How does make know what makefile to use? Maybe this is the source of the error? I modified the last line and set to make make so that make tries to make the make file named make in the folder C:\a\FreeRTOS\Demo\ARM7_LPC2106_GCC. I then get the error message "make: nothing to be done for make".

Shouldn't I get a *.hex file as output?

RE: Installing GCC for ARM

Posted by Nobody/Anonymous on April 29, 2005
An update to my previous question. I restored the rom_arm bat file to the original and just renamed the make file to makefile. After reading up on make, it looks for the file named makefile and not make unless you use the -f flag.

Now I get the following DOS output:

C:\a\FreeRTOS\Demo\ARM7_LPC2106_GCC>rom_arm

C:\a\FreeRTOS\Demo\ARM7_LPC2106_GCC>set USE_THUMB_MODE=NO

C:\a\FreeRTOS\Demo\ARM7_LPC2106_GCC>set DEBUG=

C:\a\FreeRTOS\Demo\ARM7_LPC2106_GCC>set OPTIM=-O3

C:\a\FreeRTOS\Demo\ARM7_LPC2106_GCC>set RUN_MODE=RUN_FROM_ROM

C:\a\FreeRTOS\Demo\ARM7_LPC2106_GCC>set LDSCRIPT=lpc2106-rom.ld

C:\a\FreeRTOS\Demo\ARM7_LPC2106_GCC>make
arm-elf-gcc -c -Wall -D RUN_FROM_ROM -D GCC_ARM7 -I. -I../../Source/include -I..
/Common/include -mcpu=arm7tdmi -Tlpc2106-rom.ld -Wcast-align -O3 ../../Source/p
ortable/GCC/ARM7/portISR.c -o ../../Source/portable/GCC/ARM7/portISR.o
process_begin: CreateProcess((null), arm-elf-gcc -c -Wall -D RUN_FROM_ROM -D GCC
_ARM7 -I. -I../../Source/include -I../Common/include -mcpu=arm7tdmi -Tlpc2106-ro
m.ld -Wcast-align -O3 ../../Source/portable/GCC/ARM7/portISR.c -o ../../Source/p
ortable/GCC/ARM7/portISR.o, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [../../Source/portable/GCC/ARM7/portISR.o] Error 2

RE: Installing GCC for ARM

Posted by Nobody/Anonymous on April 29, 2005
Another update. I tried to compile a test.c program in a folder that's not c:\program files\gnuarm\bin and I can't. I get the error arm-elf-gcc: installation problem, cannot exec `cc1': No such file or directory. I only can compile from the arm-elf-gcc folder. I know that this isn't a problem with FreeRTOS, but I'm new to GNU and am having a difficult time trying to figure out where to install files and what paths to set. On my system, CC1.exe is located in C:\Program Files\GNUARM\libexec\gcc\arm-elf\3.4.0. I've included this folder in my PATHS system variable. Still no luck. It can't find CC1.


RE: Installing GCC for ARM

Posted by Richard on April 29, 2005
It seems there is something wrong with your GCC installation somewhere. The batch files should execute with no modifications provided you are in the correct directory – and the zip file was unzipped with all the directory structure maintained.

Here are a couple of things to try to see if we can find the problem.


1) Open a DOS prompt and go to the FreeRTOS/Demo/ARM7_LPC2106_GCC directory.

Type “path” to display your path environment variable.

Do you see that the bin directory of your gnuarm installation is in the path? Preferably it should be the first thing in the path to ensure you are using the correct one. If it is not in the path then it needs to be added. I normally use a batch file called setenv.bat to do this:

SET PATH=c:\program files\gnuarm\bin;%PATH%

[this would have to be done each time you start the dos prompt]

now type “arm-elf-gcc --version" to check that gcc can be called correctly. You should see the version number and copyright message printed.


2) Now gcc can be found correctly do the same check for make. Often people will have a lot of different versions of make on their computer if they have multiple compilers installed.

Type “make --version"

You should get a message as:”GNU Make 3.80” then a copyright message. If you see anything else then you need to change the path environment variable again to ensure the correct make is found first.


3) Ensure the FreeRTOS files are exactly as downloaded again, with no modification. Does the ROM_ARM.bat file execute now?

make.exe, will by default look for a file called makefile. This should be in the same directory as the batch file.


Does this make any difference?

If you still have problems then search your hard disks for a file called cygwin1.dll – do you have more than one version on your machine? You need to be using the version that came with the gnuarm distribution.

Are you using the gnuarm distribution that has the installation utility? (i.e. you just run setup.exe and it installs everything for you).


Regards,
Richard.

RE: Installing GCC for ARM

Posted by Nobody/Anonymous on April 30, 2005
It works! Performing the following made it work:

SET PATH=c:\program files\gnuarm\bin;%PATH%

even though I already had this path in my PATHS variable. Putting it at the start made all the difference.

Thanks!


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS