From jean-christophe.barriol at rsautomation.com Thu Mar 6 17:03:03 2008 From: jean-christophe.barriol at rsautomation.com (Jean Christophe BARRIOL) Date: Thu, 6 Mar 2008 18:03:03 +0100 Subject: debugger problem with m68k-elf 4.2.47 Message-ID: <004901c87fab$f14b05a0$82bebfc0@JCB2> Hello, With m68k-elf 4.1.32 I succed in debugging my application ( I can insert breakpoint and step throuth the code) But with m68k-elf 4.2.47, It don't work: I can't insert breakpoint, I get an error: No symbol table is loaded. Use the "file" command. I work on the same project, with the same options! Any Idea ? Is there something new to do?, a new option for GCC or GDB ? ******************************* Jean Christophe BARRIOL R.S.A.I. Rue des Mineurs ZI de la Vaure BP 30940 42290 Sorbiers t?l : +33 (0)4-77-53-30-48 Fax : +33 (0)4-77-53-38-61 Internet: www.rsautomation.com ******************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: From carlos at codesourcery.com Thu Mar 6 19:16:34 2008 From: carlos at codesourcery.com (Carlos O'Donell) Date: Thu, 06 Mar 2008 14:16:34 -0500 Subject: [coldfire-gnu-discuss] debugger problem with m68k-elf 4.2.47 In-Reply-To: <004901c87fab$f14b05a0$82bebfc0@JCB2> References: <004901c87fab$f14b05a0$82bebfc0@JCB2> Message-ID: <47D04312.8000601@codesourcery.com> Jean Christophe BARRIOL wrote: > Hello, > > With m68k-elf 4.1.32 I succed in debugging my application ( I can > insert breakpoint and step throuth the code) > > But with m68k-elf 4.2.47, It don't work: I can't insert breakpoint, I > get an error: > *No symbol table is loaded. Use the "file" command.* > I work on the same project, with the same options! > > Any Idea ? How did you invoke the debugger? Cheers, Carlos. -- Carlos O'Donell CodeSourcery carlos at codesourcery.com (650) 331-3385 x716 From bob.brusa at gmail.com Fri Mar 7 09:24:06 2008 From: bob.brusa at gmail.com (Robert Brusa) Date: Fri, 07 Mar 2008 10:24:06 +0100 Subject: debugging does not work Message-ID: <1204881846.5427.26.camel@debi27.local.lan> Hi all, I have set up the factorial-example as described in chapter 5 of the document "Getting_Started_Guide.pdf". The program compiles and I also succeeded to mount the program-folder on my target (using nfs). Then I start the program there (on the target) using the command "./factorial" That works fine. Then I proceed, setting up the debug configuration, but when I start the debugger by clicking on the "debug" symbol in the IDE, the perspective does not change to "debugging", instead, I get an error: > Error creating session:local host 10000: Connection refused I am working on a debian etch host. The target is a COBRA5282-Board with uClinux, kernel 2.6 running. Because of an error in the IDE (the MCF5282 is not available) one must use a trick in the configuration. I applied this workaround (which I got from CodeSourcery). Could this same IDE-problem now also be the root of my debug problem? The Getting-Started_Guide writes about a gdbserver. However, there is no gdbserver available for the MCF5282. Which one does the IDE use? Or must it be launched earlier (by the user)? And if yes how? I hope someone has answers that make my further debugging a success. Thank you and best regards Bob -- ------------------------------ Bob Brusa BRUSAG Sensorik & messtechn. Entwicklungen Chapfwiesenstr. 14 CH-8712 Staefa (Switzerland) bob.brusa at gmail.com +41 44 926 74 74 www.brusag.ch From nathan at codesourcery.com Fri Mar 7 09:36:00 2008 From: nathan at codesourcery.com (Nathan Sidwell) Date: Fri, 07 Mar 2008 09:36:00 +0000 Subject: [coldfire-gnu-discuss] debugging does not work In-Reply-To: <1204881846.5427.26.camel@debi27.local.lan> References: <1204881846.5427.26.camel@debi27.local.lan> Message-ID: <47D10C80.6050605@codesourcery.com> Robert, > "./factorial" That works fine. Then I proceed, setting up the > debug configuration, but when I start the debugger by clicking on the > "debug" symbol in the IDE, the perspective does not change to > "debugging", instead, I get an error: Can you clarify. Are you using Lite with some IDE, or are you using Sourcery G++? nathan -- Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery From bob.brusa at gmail.com Fri Mar 7 10:03:22 2008 From: bob.brusa at gmail.com (Robert Brusa) Date: Fri, 07 Mar 2008 11:03:22 +0100 Subject: [coldfire-gnu-discuss] debugging does not work In-Reply-To: <47D10C80.6050605@codesourcery.com> References: <1204881846.5427.26.camel@debi27.local.lan> <47D10C80.6050605@codesourcery.com> Message-ID: <1204884202.10657.1.camel@debi27.local.lan> Am Freitag, den 07.03.2008, 09:36 +0000 schrieb Nathan Sidwell: > Robert, > > > "./factorial" That works fine. Then I proceed, setting up the > > debug configuration, but when I start the debugger by clicking on the > > "debug" symbol in the IDE, the perspective does not change to > > "debugging", instead, I get an error: > > Can you clarify. Are you using Lite with some IDE, or are you using Sourcery G++? > > nathan > Hi Nathan I am using sourcery G++. Its help menu provides the following information: Sourcery G++ IDE Version: 4.2-54 Regards Bob From bob.brusa at gmail.com Fri Mar 7 17:26:34 2008 From: bob.brusa at gmail.com (Robert Brusa) Date: Fri, 07 Mar 2008 18:26:34 +0100 Subject: Problem Debugging in Sourcery_GXX_IDE Message-ID: <1204910794.3862.13.camel@debi27.local.lan> Hi all further to my previous cry for help, I have have some news. The uClinux I am running on my COBRA5282-board includes a gdbserver. So I firstly connect my working directory to the target using ntfs, then I start the gdbserver on the target. This looks as follows (I am using minicom on a host running debian etch) > /> mount -t nfs -o rsize=4096,wsize=4096 > 192.168.0.55:/home/rwb/ws1 /usr > /> gdbserver localhost:10000 /usr/factorial/Debug/factorial > Process /usr/factorial/Debug/factorial created; pid = 35 > code at 0x3c8040 - 0x3cbd20, data at 0x3cbd24 Then I go back to my Sourcery_GXX_IDE with the factorial example and start a debug-session by clicking on the debug-icon and get the message Error creating session: localhost:10000: Connection refused What's wrong? The IDE is configured as explained in the documentation and still this error. Thanks for any advice and best regards Bob -- ------------------------------ Bob Brusa BRUSAG Sensorik & messtechn. Entwicklungen Chapfwiesenstr. 14 CH-8712 Staefa (Switzerland) bob.brusa at gmail.com +41 44 926 74 74 www.brusag.ch From nathan at codesourcery.com Fri Mar 7 17:35:03 2008 From: nathan at codesourcery.com (Nathan Sidwell) Date: Fri, 07 Mar 2008 17:35:03 +0000 Subject: [coldfire-gnu-discuss] Problem Debugging in Sourcery_GXX_IDE In-Reply-To: <1204910794.3862.13.camel@debi27.local.lan> References: <1204910794.3862.13.camel@debi27.local.lan> Message-ID: <47D17CC7.9020504@codesourcery.com> Robert Brusa wrote: > Hi all > > further to my previous cry for help, I have have some news. > > The uClinux I am running on my COBRA5282-board includes a gdbserver. So > I firstly connect my working directory to the target using ntfs, then I > start the gdbserver on the target. This looks as follows (I am using > minicom on a host running debian etch) > >> /> mount -t nfs -o rsize=4096,wsize=4096 >> 192.168.0.55:/home/rwb/ws1 /usr >> /> gdbserver localhost:10000 /usr/factorial/Debug/factorial >> Process /usr/factorial/Debug/factorial created; pid = 35 >> code at 0x3c8040 - 0x3cbd20, data at 0x3cbd24 gdbserver is listening on localhost:10000 -- the target board > > Then I go back to my Sourcery_GXX_IDE with the factorial example and > start a debug-session by clicking on the debug-icon and get the message > > Error creating session: localhost:10000: Connection refused gdb is trying to talk to localhost:10000 -- the host system nathan -- Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery From bob.brusa at gmail.com Sat Mar 8 10:36:23 2008 From: bob.brusa at gmail.com (Robert Brusa) Date: Sat, 08 Mar 2008 11:36:23 +0100 Subject: [coldfire-gnu-discuss] Problem Debugging in Sourcery_GXX_IDE In-Reply-To: <47D17CC7.9020504@codesourcery.com> References: <1204910794.3862.13.camel@debi27.local.lan> <47D17CC7.9020504@codesourcery.com> Message-ID: <1204972583.5842.4.camel@debi27.local.lan> Am Freitag, den 07.03.2008, 17:35 +0000 schrieb Nathan Sidwell: > Robert Brusa wrote: > > Hi all > > > > further to my previous cry for help, I have have some news. > > > > The uClinux I am running on my COBRA5282-board includes a gdbserver. So > > I firstly connect my working directory to the target using ntfs, then I > > start the gdbserver on the target. This looks as follows (I am using > > minicom on a host running debian etch) > > > >> /> mount -t nfs -o rsize=4096,wsize=4096 > >> 192.168.0.55:/home/rwb/ws1 /usr > >> /> gdbserver localhost:10000 /usr/factorial/Debug/factorial > >> Process /usr/factorial/Debug/factorial created; pid = 35 > >> code at 0x3c8040 - 0x3cbd20, data at 0x3cbd24 > > gdbserver is listening on localhost:10000 -- the target board > > > > > Then I go back to my Sourcery_GXX_IDE with the factorial example and > > start a debug-session by clicking on the debug-icon and get the message > > > > Error creating session: localhost:10000: Connection refused > > gdb is trying to talk to localhost:10000 -- the host system > > nathan Nathan - sorry, but I do not understand what your comments try to tell me. What exactly should I do to make it work? Regards Bob. From maxim at codesourcery.com Sat Mar 8 17:36:39 2008 From: maxim at codesourcery.com (Maxim Kuvyrkov) Date: Sat, 08 Mar 2008 20:36:39 +0300 Subject: [coldfire-gnu-discuss] Problem Debugging in Sourcery_GXX_IDE In-Reply-To: <1204972583.5842.4.camel@debi27.local.lan> References: <1204910794.3862.13.camel@debi27.local.lan> <47D17CC7.9020504@codesourcery.com> <1204972583.5842.4.camel@debi27.local.lan> Message-ID: <47D2CEA7.9010509@codesourcery.com> Robert Brusa wrote: > Am Freitag, den 07.03.2008, 17:35 +0000 schrieb Nathan Sidwell: >> Robert Brusa wrote: >>> Hi all >>> >>> further to my previous cry for help, I have have some news. >>> >>> The uClinux I am running on my COBRA5282-board includes a gdbserver. So >>> I firstly connect my working directory to the target using ntfs, then I >>> start the gdbserver on the target. This looks as follows (I am using >>> minicom on a host running debian etch) >>> >>>> /> mount -t nfs -o rsize=4096,wsize=4096 >>>> 192.168.0.55:/home/rwb/ws1 /usr >>>> /> gdbserver localhost:10000 /usr/factorial/Debug/factorial >>>> Process /usr/factorial/Debug/factorial created; pid = 35 >>>> code at 0x3c8040 - 0x3cbd20, data at 0x3cbd24 >> gdbserver is listening on localhost:10000 -- the target board >> >>> Then I go back to my Sourcery_GXX_IDE with the factorial example and >>> start a debug-session by clicking on the debug-icon and get the messag >>> >>> Error creating session: localhost:10000: Connection refused >> gdb is trying to talk to localhost:10000 -- the host system >> >> nathan > Nathan - sorry, but I do not understand what your comments try to tell > me. What exactly should I do to make it work? From what you've posted, I understand that you configured IDE debugger to connect to your local system, instead of your board. You should specify your board's name or IP address in the IDE's debugger configuration. E.g., on the board you should run $ gdbserver :10000 myprog and on your host system gdb should connect to myboard:10000 . -- Maxim From bob.brusa at gmail.com Mon Mar 10 09:57:03 2008 From: bob.brusa at gmail.com (Robert Brusa) Date: Mon, 10 Mar 2008 10:57:03 +0100 Subject: [coldfire-gnu-discuss] Problem Debugging in Sourcery_GXX_IDE In-Reply-To: <47D2CEA7.9010509@codesourcery.com> References: <1204910794.3862.13.camel@debi27.local.lan> <47D17CC7.9020504@codesourcery.com> <1204972583.5842.4.camel@debi27.local.lan> <47D2CEA7.9010509@codesourcery.com> Message-ID: <1205143024.3144.24.camel@debi27.local.lan> Am Samstag, den 08.03.2008, 20:36 +0300 schrieb Maxim Kuvyrkov: > Robert Brusa wrote: > > Am Freitag, den 07.03.2008, 17:35 +0000 schrieb Nathan Sidwell: > >> Robert Brusa wrote: > >>> Hi all > >>> > >>> further to my previous cry for help, I have have some news. > >>> > >>> The uClinux I am running on my COBRA5282-board includes a gdbserver. So > >>> I firstly connect my working directory to the target using ntfs, then I > >>> start the gdbserver on the target. This looks as follows (I am using > >>> minicom on a host running debian etch) > >>> > >>>> /> mount -t nfs -o rsize=4096,wsize=4096 > >>>> 192.168.0.55:/home/rwb/ws1 /usr > >>>> /> gdbserver localhost:10000 /usr/factorial/Debug/factorial > >>>> Process /usr/factorial/Debug/factorial created; pid = 35 > >>>> code at 0x3c8040 - 0x3cbd20, data at 0x3cbd24 > >> gdbserver is listening on localhost:10000 -- the target board > >> > >>> Then I go back to my Sourcery_GXX_IDE with the factorial example and > >>> start a debug-session by clicking on the debug-icon and get the messag > >>> > >>> Error creating session: localhost:10000: Connection refused > >> gdb is trying to talk to localhost:10000 -- the host system > >> > >> nathan > > Nathan - sorry, but I do not understand what your comments try to tell > > me. What exactly should I do to make it work? > > From what you've posted, I understand that you configured IDE debugger > to connect to your local system, instead of your board. You should > specify your board's name or IP address in the IDE's debugger configuration. > > E.g., on the board you should run > > $ gdbserver :10000 myprog > > and on your host system gdb should connect to myboard:10000 . > > -- > Maxim > Hi, Your input helped. Now the two systems connect. But I get an error - see attachment Error1.txt. What I have done is the following: On the serial terminal (mini) connected to my COBRA5282 board I enter the commands: > /> mount -t nfs -o rsize=4096,wsize=4096 192.168.0.55:/home/rwb/ws1 /usr > /> gdbserver :10000 /usr/factorial/Debug/factorial Then I launch Sourcery_GXX_IDE with the program factorial. There I had (previously) configured the debug connection - see attachment DebugCfg.png. When the IDE ist up and ready, I run the program with F11 (debug last launched) now the error-message pops up. All this seems overly complicated. I would expect the gdbserver to be capable of downloading the program from the host. After all, the two systems are connected - even twice: serial link and LAN. Why do I have to tell the target which program to debug? Why doesn' the IDE tell this to the target? I doubt that I am on the right track. However, the documentation delivered by codesourcery does not give any clue about these details. Any help around? Thank you and best regards Bob -- ------------------------------ Bob Brusa BRUSAG Sensorik & messtechn. Entwicklungen Chapfwiesenstr. 14 CH-8712 Staefa (Switzerland) bob.brusa at gmail.com +41 44 926 74 74 www.brusag.ch -------------- next part -------------- Execution is suspended because of error. Remote 'g' packet reply is too long: 003ce3f001000000000000000000000000000001003cbd240025dec80025deb4003c813a003cbcec003cc398003cff6c003cbcf000530004003cff18003cff1000000000003c8140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 Remote 'g' packet reply is too long: 003ce3f001000000000000000000000000000001003cbd240025dec80025deb4003c813a003cbcec003cc398003cff6c003cbcf000530004003cff18003cff1000000000003c81400000000000000000000 -------------- next part -------------- A non-text attachment was scrubbed... Name: DebugCfg.png Type: image/png Size: 142158 bytes Desc: not available URL: From nathan at codesourcery.com Mon Mar 10 10:14:07 2008 From: nathan at codesourcery.com (Nathan Sidwell) Date: Mon, 10 Mar 2008 10:14:07 +0000 Subject: [coldfire-gnu-discuss] Problem Debugging in Sourcery_GXX_IDE In-Reply-To: <1205143024.3144.24.camel@debi27.local.lan> References: <1204910794.3862.13.camel@debi27.local.lan> <47D17CC7.9020504@codesourcery.com> <1204972583.5842.4.camel@debi27.local.lan> <47D2CEA7.9010509@codesourcery.com> <1205143024.3144.24.camel@debi27.local.lan> Message-ID: <47D509EF.2040602@codesourcery.com> Robert Brusa wrote: > All this seems overly complicated. I would expect the gdbserver to be capable > of downloading the program from the host. After all, the two systems are connected - > even twice: serial link and LAN. Why do I have to tell the target which program > to debug? Why doesn' the IDE tell this to the target? I doubt that I am on the > right track. However, the documentation delivered by codesourcery does not give > any clue about these details. Any help around? This is not functionality that gdbserver supports. nathan -- Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery From jean-christophe.barriol at rsautomation.com Wed Mar 12 15:24:58 2008 From: jean-christophe.barriol at rsautomation.com (Jean Christophe BARRIOL) Date: Wed, 12 Mar 2008 16:24:58 +0100 Subject: Best libraries for mcf5234 Message-ID: <001301c88455$3d140d30$82bebfc0@JCB2> Hello, What are the best libraries for Coldfire MCF523x ? The toolchain proposes m5206e, m5208, m5213 or m5249. Thanks, Jean Christophe. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nathan at codesourcery.com Wed Mar 12 15:54:13 2008 From: nathan at codesourcery.com (Nathan Sidwell) Date: Wed, 12 Mar 2008 15:54:13 +0000 Subject: [coldfire-gnu-discuss] Best libraries for mcf5234 In-Reply-To: <001301c88455$3d140d30$82bebfc0@JCB2> References: <001301c88455$3d140d30$82bebfc0@JCB2> Message-ID: <47D7FCA5.6060204@codesourcery.com> Jean, > What are the best libraries for Coldfire MCF523x ? > The toolchain proposes m5206e, m5208, m5213 or m5249. What do you mean 'the toolchain proposes ...'? The appropriate libraries will be selected when you use the -mcpu=523x compilation option. nathan -- Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery From bob.brusa at gmail.com Wed Mar 12 16:08:10 2008 From: bob.brusa at gmail.com (Robert Brusa) Date: Wed, 12 Mar 2008 17:08:10 +0100 Subject: math-functions: floor, sin, cos, atan, sqrt Message-ID: <1205338090.28642.7.camel@debi27.local.lan> Hi I have written a program that uses the above mentioned math-functions. At the very top of my source there is the statement: > #include > #include However, I get errors each time I try to call one of these functions. This triggers two questions? 1) What do I have to import to get these functions in? 2) Where is this type of stuff documented? Thank you and best regards Bob -- Bob Brusa BRUSAG Sensorik & messtechn. Entwicklungen Chapfwiesenstr. 14 CH-8712 Staefa (Switzerland) bob.brusa at gmail.com +41 44 926 74 74 www.brusag.ch From nathan at codesourcery.com Wed Mar 12 16:15:12 2008 From: nathan at codesourcery.com (Nathan Sidwell) Date: Wed, 12 Mar 2008 16:15:12 +0000 Subject: [coldfire-gnu-discuss] math-functions: floor, sin, cos, atan, sqrt In-Reply-To: <1205338090.28642.7.camel@debi27.local.lan> References: <1205338090.28642.7.camel@debi27.local.lan> Message-ID: <47D80190.8050708@codesourcery.com> Robert Brusa wrote: > Hi > I have written a program that uses the above mentioned math-functions. > At the very top of my source there is the statement: > >> #include >> #include have you searched the knowledge base for 'math library'? nathan -- Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery From bob.brusa at gmail.com Wed Mar 12 17:22:39 2008 From: bob.brusa at gmail.com (Robert Brusa) Date: Wed, 12 Mar 2008 18:22:39 +0100 Subject: [coldfire-gnu-discuss] math-functions: floor, sin, cos, atan, sqrt In-Reply-To: <47D80190.8050708@codesourcery.com> References: <1205338090.28642.7.camel@debi27.local.lan> <47D80190.8050708@codesourcery.com> Message-ID: <1205342559.32724.10.camel@debi27.local.lan> Am Mittwoch, den 12.03.2008, 16:15 +0000 schrieb Nathan Sidwell: > Robert Brusa wrote: > > Hi > > I have written a program that uses the above mentioned math-functions. > > At the very top of my source there is the statement: > > > >> #include > >> #include > > have you searched the knowledge base for 'math library'? > > nathan Well no, because I do not know where to enter this search string 'math library'. When entering this search-string in Sourcery G++ IDE Version: 4.2-54 (via help-menu) I get 0 hits. Bob From bob.brusa at gmail.com Wed Mar 12 17:27:16 2008 From: bob.brusa at gmail.com (Robert Brusa) Date: Wed, 12 Mar 2008 18:27:16 +0100 Subject: [coldfire-gnu-discuss] math-functions: floor, sin, cos, atan, sqrt In-Reply-To: <47D80190.8050708@codesourcery.com> References: <1205338090.28642.7.camel@debi27.local.lan> <47D80190.8050708@codesourcery.com> Message-ID: <1205342836.32724.14.camel@debi27.local.lan> Am Mittwoch, den 12.03.2008, 16:15 +0000 schrieb Nathan Sidwell: > Robert Brusa wrote: > > Hi > > I have written a program that uses the above mentioned math-functions. > > At the very top of my source there is the statement: > > > >> #include > >> #include > > have you searched the knowledge base for 'math library'? > > nathan Well no - because I do not know where I should enter this search string. When clicking on the help ? search of the Sourcery G++ IDE Version: 4.2-54 and entering this or similar strings I get 0 hits. Hence: Which knowledge base do you mean? Bob From mark at codesourcery.com Wed Mar 12 17:34:44 2008 From: mark at codesourcery.com (Mark Mitchell) Date: Wed, 12 Mar 2008 10:34:44 -0700 Subject: [coldfire-gnu-discuss] math-functions: floor, sin, cos, atan, sqrt In-Reply-To: <1205342836.32724.14.camel@debi27.local.lan> References: <1205338090.28642.7.camel@debi27.local.lan> <47D80190.8050708@codesourcery.com> <1205342836.32724.14.camel@debi27.local.lan> Message-ID: <47D81434.6020306@codesourcery.com> Robert Brusa wrote: > Well no - because I do not know where I should enter this search string. > When clicking on the help ? search of the Sourcery G++ IDE Version: > 4.2-54 and entering this or similar strings I get 0 hits. Hence: Which > knowledge base do you mean? > Bob See: https://support.codesourcery.com/GNUToolchain/kbentry67 Thanks, -- Mark Mitchell CodeSourcery mark at codesourcery.com (650) 331-3385 x713 From haluongvn at gmail.com Sat Mar 15 06:56:24 2008 From: haluongvn at gmail.com (Ha Luong) Date: Sat, 15 Mar 2008 13:56:24 +0700 Subject: About space optimization Message-ID: <61577c8f0803142356u7ecdbb1ekdf291f28c2ef965a@mail.gmail.com> Dear Sir, Could you please suggest the options for the best space optimization? I used the compiler flag is "-mcpu=5282 -O3 -Os -msoft-float" and the linker flag is "-Tm5282evb-ram-hosted.ld" Thank you, Ha Luong -------------- next part -------------- An HTML attachment was scrubbed... URL: From carlos at codesourcery.com Sat Mar 15 14:45:31 2008 From: carlos at codesourcery.com (Carlos O'Donell) Date: Sat, 15 Mar 2008 10:45:31 -0400 Subject: [coldfire-gnu-discuss] About space optimization In-Reply-To: <61577c8f0803142356u7ecdbb1ekdf291f28c2ef965a@mail.gmail.com> References: <61577c8f0803142356u7ecdbb1ekdf291f28c2ef965a@mail.gmail.com> Message-ID: <47DBE10B.2020806@codesourcery.com> Ha Luong wrote: > Dear Sir, > > Could you please suggest the options for the best space optimization? I > used the compiler flag is "-mcpu=5282 -O3 -Os -msoft-float" and > the linker flag is "-Tm5282evb-ram-hosted.ld" Remove "-O3" and use only "-Os" for space optimizations. Cheers, Carlos. -- Carlos O'Donell CodeSourcery carlos at codesourcery.com (650) 331-3385 x716 From haluongvn at gmail.com Mon Mar 24 07:32:23 2008 From: haluongvn at gmail.com (Ha Luong) Date: Mon, 24 Mar 2008 14:32:23 +0700 Subject: The different size is gotten from m68k-elf-nm and m68k-elf-readelf Message-ID: <61577c8f0803240032h1ee4a8a6o2cde5d9c568c1b0f@mail.gmail.com> Dear Sir, I used m68k-elf-readelf and m68k-elf-nm for calculating the elf size. But the total size from m68k-elf-readelf is different to its from m68k-elf-nm. I used The total size from m68k-elf-readelf = the total of size column. with the command line option "m68k-elf-readelf -S xxx.elf" And The total size from m68k-elf-nm = the total of column 2 with the command line option "m68k-elf-nm.exe -S --print-size --print-armap --size-sort xxx.elf" I double checked by used m68k-elf-objdump by calculating each variable and each function. I saw its total size is equal The total size from m68k-elf-nm. I don't know why the total size from m68k-elf-readelf is different to its from m68k-elf-nm. Could you please help me? Thanks, Ha Luong -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: test.zip Type: application/zip Size: 210347 bytes Desc: not available URL: From dan at codesourcery.com Mon Mar 24 14:00:11 2008 From: dan at codesourcery.com (Daniel Jacobowitz) Date: Mon, 24 Mar 2008 10:00:11 -0400 Subject: [coldfire-gnu-discuss] The different size is gotten from m68k-elf-nm and m68k-elf-readelf In-Reply-To: <61577c8f0803240032h1ee4a8a6o2cde5d9c568c1b0f@mail.gmail.com> References: <61577c8f0803240032h1ee4a8a6o2cde5d9c568c1b0f@mail.gmail.com> Message-ID: <20080324140008.GQ13245@caradoc.them.org> On Mon, Mar 24, 2008 at 02:32:23PM +0700, Ha Luong wrote: > Dear Sir, > > I used m68k-elf-readelf and m68k-elf-nm for calculating the elf size. But > the total size from m68k-elf-readelf is different to its from m68k-elf-nm. > I used > The total size from m68k-elf-readelf = the total of size column. > with the command line option "m68k-elf-readelf -S xxx.elf" > > And The total size from m68k-elf-nm = the total of column 2 > with the command line option "m68k-elf-nm.exe -S --print-size --print-armap > --size-sort xxx.elf" The total size of all sections may be larger than the total size of all symbols. There are structures in your application, like the symbol table, which do not have an associated symbol. If you just want the memory requirements of your application, I recommend using m68k-elf-size or m68k-elf-readelf -l (lowercase L). -- Daniel Jacobowitz CodeSourcery From dan at codesourcery.com Tue Mar 25 11:31:07 2008 From: dan at codesourcery.com (Daniel Jacobowitz) Date: Tue, 25 Mar 2008 07:31:07 -0400 Subject: [coldfire-gnu-discuss] The different size is gotten from m68k-elf-nm and m68k-elf-readelf In-Reply-To: <61577c8f0803250316p522b0f11q28aed6da2a881460@mail.gmail.com> References: <61577c8f0803240032h1ee4a8a6o2cde5d9c568c1b0f@mail.gmail.com> <20080324140008.GQ13245@caradoc.them.org> <61577c8f0803250316p522b0f11q28aed6da2a881460@mail.gmail.com> Message-ID: <20080325113102.GN13245@caradoc.them.org> On Tue, Mar 25, 2008 at 05:16:10PM +0700, Ha Luong wrote: > Dear Daniel Jacobowitz, > > Could you please told me the file size and mem size mean? Every allocatable ("A" flag) section, and every LOAD segment, takes a certain amount of space in the file and a certain amount in memory. Sometimes the memory size is bigger; the difference is filled with zeroes for uninitialized variables. -- Daniel Jacobowitz CodeSourcery From haluongvn at gmail.com Tue Mar 25 10:16:10 2008 From: haluongvn at gmail.com (Ha Luong) Date: Tue, 25 Mar 2008 17:16:10 +0700 Subject: [coldfire-gnu-discuss] The different size is gotten from m68k-elf-nm and m68k-elf-readelf In-Reply-To: <20080324140008.GQ13245@caradoc.them.org> References: <61577c8f0803240032h1ee4a8a6o2cde5d9c568c1b0f@mail.gmail.com> <20080324140008.GQ13245@caradoc.them.org> Message-ID: <61577c8f0803250316p522b0f11q28aed6da2a881460@mail.gmail.com> Dear Daniel Jacobowitz, Could you please told me the file size and mem size mean? Thanks, Ha Luong On 3/24/08, Daniel Jacobowitz wrote: > > On Mon, Mar 24, 2008 at 02:32:23PM +0700, Ha Luong wrote: > > Dear Sir, > > > > I used m68k-elf-readelf and m68k-elf-nm for calculating the elf size. > But > > the total size from m68k-elf-readelf is different to its from > m68k-elf-nm. > > I used > > The total size from m68k-elf-readelf = the total of size column. > > with the command line option "m68k-elf-readelf -S xxx.elf" > > > > And The total size from m68k-elf-nm = the total of column 2 > > with the command line option "m68k-elf-nm.exe -S --print-size > --print-armap > > --size-sort xxx.elf" > > The total size of all sections may be larger than the total size of > all symbols. There are structures in your application, like the > symbol table, which do not have an associated symbol. > > If you just want the memory requirements of your application, I > recommend using m68k-elf-size or m68k-elf-readelf -l (lowercase > L). > > -- > Daniel Jacobowitz > CodeSourcery > -------------- next part -------------- An HTML attachment was scrubbed... URL: