Subject:
|
Re: GCC vs. IAR compiler: Could GCC be tweaked to generate code as tight as IAR?
|
Newsgroups:
|
lugnet.robotics.nxt.nxthacking
|
Date:
|
Wed, 14 Mar 2007 20:45:40 GMT
|
Viewed:
|
16839 times
|
| |
| |
In lugnet.robotics.nxt.nxthacking, Rasmus Pedersen wrote:
> Hi,
>
> If I compile the LEGO firmware sources with gcc, the code size increases much
> beyond the 128 KB (which I think) the IAR compiled sources fits into. That means
> that one have to relocate part of the compiled code into the memory areas
> between 128KB-256KB. That is ok, but not totally optimal as the files,
> filehandles, and file verion info is also in that region making it a puzzle.
> Also I think it is hard to download new files if the flash is partly taken for
> code purposes.
>
> With the http://nxtgcc.sf.net project (which you need to look into this) I get
> these numbers from the make process:
>
> Size after:
> m_sched.elf :
> section size addr
> .text 126176 1048576
> .text2 23572 1279744
> .data 6180 2097152
> .bss 45828 2103332
> .comment 2133 0
> .debug_aranges 496 0
> .debug_pubnames 31 0
> .debug_info 2139 0
> .debug_abbrev 512 0
> .debug_line 2732 0
> .debug_frame 216 0
> .debug_str 276 0
> .debug_loc 353 0
> .debug_ranges 48 0
> Total 210692
>
> text2 and data is relocated. (See AT91SAM7S256_memory.ldh linker details in the
> "common") folder for details. I have tried with a "home-made" toolchain (see
> "toolchain" folder and now with the precompiled WinArm toolchain, which produces
> tighter code. The GNUARM toolchain did worse than WinARM.
Have you experimented at all with the compiler optimisation flags? I don't know
if all of them are supported for the ARM architecture, and some options cause
problems on other architectures, but there's a bit of a list here:
http://developer.apple.com/documentation/DeveloperTools/gcc-3.3/gcc/Optimize-Options.html
Also, removing debug information (-s) will reduce the size, but you may not want
to do that while hacking.
ROSCO
|
|
Message has 1 Reply:
Message is in Reply To:
11 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|