From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16610 invoked by alias); 13 Oct 2011 11:18:43 -0000 Received: (qmail 16602 invoked by uid 22791); 13 Oct 2011 11:18:42 -0000 X-SWARE-Spam-Status: No, hits=-0.3 required=5.0 tests=AWL,BAYES_00,SPF_SOFTFAIL,TVD_SUBJ_NUM_OBFU_MINFP,TW_BJ,TW_JC,TW_XD X-Spam-Check-By: sourceware.org Received: from krak.alatek.krakow.pl (HELO krak.alatek.krakow.pl) (46.170.108.42) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 13 Oct 2011 11:18:27 +0000 Received: from pawels.localnet (pawels.alatek.krakow.pl [10.0.2.35]) by krak.alatek.krakow.pl (Postfix) with ESMTP id 431B36A442; Thu, 13 Oct 2011 11:12:48 +0000 (Europe/Warsaw) From: Pawel Sikora To: Hadi Aminzadeh Cc: gcc-help@gcc.gnu.org Subject: Re: ARM7TDMI problem Date: Thu, 13 Oct 2011 11:18:00 -0000 Message-ID: <2137989.MiA6Gvp2CO@pawels> User-Agent: KMail/4.7.2 (Linux/3.0.4-2; KDE/4.7.2; x86_64; ; ) In-Reply-To: References: <201110130750.11583.pluto@agmk.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2011-10/txt/msg00086.txt.bz2 On Thursday 13 of October 2011 14:40:50 Hadi Aminzadeh wrote: > 2011/10/13 Pawe=C5=82 Sikora : > > On Thursday 13 of October 2011 07:37:26 Hadi Aminzadeh wrote: > >> 2011/10/12 Pawe=C5=82 Sikora : > >> > On Wednesday 12 of October 2011 18:41:42 Hadi Aminzadeh wrote: > >> >> On Tue, Oct 11, 2011 at 2:55 PM, Pawel Sikora wrot= e: > >> >> > On Tuesday 11 of October 2011 14:35:30 Hadi Aminzadeh wrote: > >> >> >> Hi Dear, > >> >> >> > >> >> >> I have a LPC2478 arm processor and want to use gcc to cross comp= ile my > >> >> >> code in x86 for LPC2478 > >> >> >> I use arm-linux-gnueabi-gcc to do that but (I think) the output = of gcc > >> >> >> is an application that can be run in arm ported linux kernel but= I > >> >> >> need Intel HEX-like format that can be programmed to micro contr= oller > >> >> >> (I haven't any OS) > >> >> >> I haven't any idea what to do or what keyword I must search. > >> >> > > >> >> > you basically need a proper linker script for small embedded devi= ce. > >> >> > please, see an example at http://www.dreamislife.com/arm/ -> lpc2= 106_gcc.zip > >> >> > and search arm groups for similar one tuned for LPC2478... > >> >> > > >> >> > > >> >> > >> >> Thanks for your replay > >> >> I find a linker script for my device (that tested with my board) and > >> >> used gnuarm pre-compiled binary and eclipse to compile my tested > >> >> simple LED flasher program. but no success :-( > >> >> you can see the output of eclipse. have any idea? > >> >> > >> >> make all > >> >> Building file: ../main.c > >> >> Invoking: GCC C Compiler > >> >> /home/noBackup/arm/gnuarm-4.0.2/bin/arm-elf-gcc -O3 -g -Wall -c > >> >> -fmessage-length=3D0 -mcpu=3Darm7tdmi-s -MMD -MP -MF"main.d" -MT"ma= in.d" > >> >> -o"main.o" "../main.c" > >> >> Finished building: ../main.c > >> >> > >> >> Building target: lpc2478 > >> >> Invoking: GCC C Linker > >> >> /home/noBackup/arm/gnuarm-4.0.2/bin/arm-elf-gcc -mcpu=3Darm7tdmi-s > >> >> -nostartfiles -T /home/hadi/workspace/lpc2478/LPC2478.ld -o"lpc2478" > >> >> ./main.o > >> >> Finished building target: lpc2478 > >> >> > >> >> make --no-print-directory post-build > >> >> /home/noBackup/arm/gnuarm-4.0.2/bin/arm-elf-objcopy --output-target > >> >> ihex lpc2478 lpc2478.hex > >> >> > >> > > >> > please show the 'simple LED flasher' source and 'arm-elf-objdump -hw= lpc2478'. > >> > > >> > >> I attach all of them. > >> Thanks for your time. > >> > > > > > > the delay_ms() function was optimized at compile time to plain 'return' > > you can see this with -fdump-tree-optimized gcc option. > > and finally the hexdump shows .debug* sections in binary - there's no n= eed > > to waste eeprom resources with debuginfo. > > >=20 > ok I disable the optimization ( -O0 ) but nothing happend :-( > Is it possible to generate an lst file ? I think it can help to find prob= lem. man gcc: --save-temps, -fverbose-asm >=20 > Regards, > Aminzadeh