[Scons-users] Can I filter the objects in env.Program

prife goprife at gmail.com
Sat Mar 2 00:08:53 EST 2013



>

> Or env["TEMPFILEPREFIX"] = ' ' <- a single space? Would that work?

>


This doesn't work, I will got this:
armlink -o rtthread-stm32.axf --device DARMSTM --info sizes --info totals
--info
unused --info veneers --list rtthread-stm32.map --scatter stm32_rom.sct
--libpa
th D:/Keil/ARM/RV31/LIB --keep __fsym_* --keep __vsym_* --via
@c:\users\admini~1
\appdata\local\temp\tmpcu4i8d.lnk
Using tempfile c:\users\admini~1\appdata\local\temp\tmpa1tqog.lnk for
command li
ne:
--via build\application.o build\startup.o build\board.o
build\stm32f10x_it.o bui
ld\rtc.o build\usart.o build\serial.o build\led.o build\sdcard.o
build\src\clock
.o build\src\device.o build\src\idle.o build\src\ipc.o build\src\irq.o
build\src
....
ild\bsp\Libraries\STM32F10x_StdPeriph_Driver\src\misc.o
build\bsp\Libraries\CMSI
S\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_hd.o
Fatal error: L3904U: Could not open via file
'@c:\users\admini~1\appdata\local\t
emp\tmpa1tqog.lnk'.
Finished: 0 information, 0 warning, 0 error and 1 fatal error messages.
scons: *** [rtthread-stm32.axf] Error 1
scons: building terminated because of errors.


2013/3/2 Bill Deegan <bill at baddogconsulting.com>


>

>

> On Fri, Mar 1, 2013 at 8:53 PM, Bill Deegan <bill at baddogconsulting.com>wrote:

>

>>

>>

>> On Fri, Mar 1, 2013 at 8:51 PM, Bill Deegan <bill at baddogconsulting.com>wrote:

>>

>>>

>>>

>>> On Fri, Mar 1, 2013 at 6:51 PM, prife <goprife at gmail.com> wrote:

>>>

>>>> 2013/3/2 Bill Deegan <bill at baddogconsulting.com>

>>>>

>>>>>

>>>>>

>>>>> On Fri, Mar 1, 2013 at 6:37 PM, prife <goprife at gmail.com> wrote:

>>>>>

>>>>>> 2013/3/2 William Deegan <bill at baddogconsulting.com>

>>>>>>

>>>>>>>

>>>>>>> So do you only want to change the list of obis in the SConstruct?

>>>>>>> And in what way do you want to modify them?

>>>>>>>

>>>>>> I want to change the list of objs in env.Program.In other words, I

>>>>>> want to get the list of total objs which are used to build the target.

>>>>>> I want to save them in temp file.

>>>>>>

>>>>>

>>>>> For what purpose?

>>>>> Saving them in a temp file, is not changing them...

>>>>> Is the command line too long?

>>>>>

>>>>

>>>> Yes, the command is too long, While the following method only can work

>>>> with a patch to scripts of SCons.

>>>> if rtconfig.PLATFORM == 'armcc':

>>>> env["TEMPFILE"] = SCons.Platform.TempFileMunge

>>>> # env["LINKCOM"] = "${TEMPFILE('$LINK -o $TARGET $SOURCES')}"

>>>> env["LINKCOM"] = "$LINK -o $TARGET $LINKFLAGS ${TEMPFILE('--via

>>>> $SOURCES')}"

>>>> env["TEMPFILEPREFIX"] = ' ' # arm tool chain

>>>>

>>>> C:\Python27\Lib\site-packages\scons-2.2.0\SCons\Platform\ __init__.py

>>>>

>>>> --- __init__.old.py Mon Nov 19 02:59:32 2012

>>>> +++ __init__.py Mon Nov 19 02:59:19 2012

>>>> @@ -202,7 +202,7 @@

>>>>

>>>> prefix = env.subst('$TEMPFILEPREFIX')

>>>> if not prefix:

>>>> - prefix = '@'

>>>> + prefix = ''

>>>>

>>>> args = list(map(SCons.Subst.quote_spaces, cmd[1:]))

>>>> os.write(fd, " ".join(args) + "\n")

>>>>

>>>> so I want to save the objs in a temp file, then modify the

>>>> env['"LINKCOM"] as;

>>>> env["LINKCOM"] = "$LINK -o $TARGET $LINKFLAGS --via temp.txt }"

>>>>

>>>

>>>

>>> Might I sugguest that you copy the patched version of TempFileMunge into

>>> your SConstruct.

>>> Then use:

>>> env["TEMPFILE"] = MyTempFileMunge

>>>

>>> I think that should work.

>>>

>>

>> Or env["TEMPFILEPREFIX"] = ' ' <- a single space? Would that work?

>>

>

> Or from the comments in the TempFileMunge function:

> env["TEMPFILEPREFIX"] = '-via' # arm tool chain

>

> ?

> -Bill

>

> _______________________________________________

> 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/20130302/dd8a00e8/attachment.html>


More information about the Scons-users mailing list