[Scons-users] =?GB2312?Q?Re=3A_=5BScons=2Dusers=5D_Re=3A_=5BScons=2Dusers=5D_is_there_any_way?= =?GB2312?Q?_that_I_can_get_the_final_command_line_from_scons=A3=BF?=
prife
goprife at gmail.com
Sun Nov 18 11:59:00 EST 2012
well, I am really appreciated for you relay, While I am really a newbie
to scons, and in fact I am even an newbie to python... ..
I just want to fix this issue for the users of RT-Thread (an RTOS under
GPLV2) http://code.google.com/p/rt-thread/
I will try and thanks for you help.
Best Regards
prife
2012/11/19 Gary Oberbrunner <garyo at oberbrunner.com>
> Try using $TEMPFILE. MSVC uses it for this purpose. Start by wrapping
> the LINKCOM with TEMPFILE like ${TEMPFILE('$LINK ...')} and then maybe set
> $TEMPFILE to TempFileMunge, and check Platform/__init__.py for how
> TempFileMunge works; you'll need to make it use the --via or whatever your
> linker needs. If you come up with something useful, at least post it on
> the wiki, or make an add-on tool that people can use (e.g. by putting it in
> site_scons/tools).
>
>
> On Sun, Nov 18, 2012 at 9:09 AM, prife <goprife at gmail.com> wrote:
>
>> HI, all
>>
>> I use scons to build sources, and the C compiler is the armcc (which is
>> from MDK).
>> In most cases, scons works very well, but if when there are too many
>> objects in the final command line, then I will get an error.
>> like this:
>>
>> armlink -o rtthread-stm32.axf --device DARMSTM --info sizes --info totals
>> --info unused --info veneers --list rtthread-stm32.map --scatter
>> stm32_rom.sct --libpath D:/Keil/ARM/RV31/LIB --keep __fsym_* --keep
>> __vsym_* build\application.o build\startup.o build\board.o
>> build\stm32f10x_it.o build\rtc.o ........................(many objs)
>>
>> The Command line is too long.
>> scons: *** [rtthread-stm32.axf] Error 1
>>
>> because the armcc has a limited command line length. It provides an
>> option
>> --via=file
>> ARM Compiler toolchain v4.1 for µVision Linker Reference Home > Linker
>> command-line options > --via=file
>> --via=*file*
>>
>> This option reads an additional list of input filenames and linker
>> options from *file*.
>>
>> so, I want to get the final command line, the write some to an temp
>> files, and use this --via option, then I can solve this issue. In fact I
>> can get the link and link flags with:
>>
>> env['LINK']
>>
>> env['LINKFLAGS']
>>
>> like this:
>>
>> armlink -o rtthread-stm32.axf --device DARMSTM --info sizes --info totals
>> --info unused --info veneers --list rtthread-stm32.map --scatter
>> stm32_rom.sct --libpath D:/Keil/ARM/RV31/LIB --keep __fsym_* --keep
>> __vsym_* --via ojb_files
>>
>> so what I really need is the string include all the objects. Any
>> questions?
>>
>> Best Regards
>>
>> prife
>>
>> --
>> 把有限的时间投入到无限的学习中去
>>
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org
>> http://four.pairlist.net/mailman/listinfo/scons-users
>>
>>
>
>
> --
> Gary
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> http://four.pairlist.net/mailman/listinfo/scons-users
>
>
--
把有限的时间投入到无限的学习中去
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20121119/00c4a7c2/attachment-0001.htm>
More information about the Scons-users
mailing list