[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] USRP2 firmware build
From: |
Eric Blossom |
Subject: |
Re: [Discuss-gnuradio] USRP2 firmware build |
Date: |
Sat, 4 Oct 2008 12:53:27 -0700 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Sat, Oct 04, 2008 at 03:22:52PM -0400, Jeff Long wrote:
>>
>> Right now __moddi3, __umoddi3, __divdi3 and __udivdi3 contain inlined
>> versions of __udivmoddi4. Un-inlining them should save about 5KB in
>> the worst case, 4KB typical. I'm working on it. (These routines
>> implement signed and unsigned 64-bit divides and mods. We use these
>> in dealing with our 64-fixed point frequency representation.)
>>
> I just commented out all the lines in print_tune_result, and the size
> of txrx went down to 21404. Adding -Os gives 20900 (didn't test these
> builds). Did not test -Os version.
>>
>> Jeff, which RFX board are you using?
>>
> RFX2400 Rev30 12-26-2006
>>
>> Eric
>
With the un-inlining of __udivmoddi4, txrx is down 3100 bytes using
-O2, nothing else changed:
$ size txrx
text data bss dec hex filename
21516 1348 2256 25120 6220 txrx
$ nm --size-sort txrx
...
00000150 T __muldi3
0000015c T dbsm_init
0000016c T print_tune_result
00000188 T db_tune
000001a8 T start_rx_streaming_cmd
000001b4 T clocks_mimo_config
000001b8 T printf
000001d8 T calc_dxc_freq
000001dc t dbsm_process_helper
000001f8 T main
00000230 T rfx_set_freq
00000258 T tvrx_set_freq
0000026c T u2_init
00000708 T handle_control_chan_frame
000008f0 T __udivmoddi4
I'll work up a clean patch to the compiler and upload the source and
generated binaries.
I was also trying to use the -mxl-gp-opt -G 16384 options, but this
triggers a bug (Xilinx AR #30271) that's fixed in EDK 10.1 SP1. They
are currently not distributing the source for that (in violation of
the GPL). I've just registered as a WebCase user; once I'm approved
I'll attempt to open a ticket on this. (The bug is that they are
putting "small" zero initialized items in the .bss section instead of
the .sbss section.) I may be able to find and fix this quicker than I
can get Xilinx to release the code :-/
-mxl-gp-opt -G 16384 should remove virtually all of the IMM
instructions, since all accesses to statically allocated data will be
based off of the small data base registers.
Eric