[Scons-users] =?GB2312?Q?Re=3A_=5BScons=2Dusers=5D_Re=3A_=5BScons=2Dusers=5D_Re=3A_=5BScons=2Dusers?= =?GB2312?Q?=5D_Re=3A_=5BScons=2Dusers=5D_Re=3A_=5BScons=2Dusers=5D_is_there_any_way_that_?= =?GB2312?Q?I_can_get_the_final_command_line_from_scons=A3=BF?=

Gary Oberbrunner garyo at oberbrunner.com
Mon Nov 19 22:12:28 EST 2012


I have to think about that one -- env.subst compresses extra spaces.
Perhaps that test and using @ if not set isn't really needed.


On Mon, Nov 19, 2012 at 9:46 PM, prife <goprife at gmail.com> wrote:


> hi, I found a hack-way to solve this problem. Two patches are needed.

> 1) patch for SConstruct

>

> Index: SConstruct

> ===================================================================

> --- SConstruct (°æ±¾ 2411)

> +++ SConstruct (¹¤×÷¸±±¾)

> @@ -18,6 +18,12 @@

> CXX = rtconfig.CXX,

> AR = rtconfig.AR, ARFLAGS = '-rc',

> LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)

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

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

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

> $SOURCES')}"

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

> +

> env.PrependENVPath('PATH', rtconfig.EXEC_PATH)

>

> Export('RTT_ROOT')

>

> 2) path for

> 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")

>

> then , I do `scons -j4` in CMD, then I can build correctly

>

> armlink -o rtthread-mini2440.axf --device DARMSS9 --strict --info sizes

> --info t

> otals --info unused --info veneers --list rtthread-mini2440.map --ro-base

> 0x3000

> 0000 --entry Entry_Point --first Entry_Point --libpath

> "D:/Keil/ARM/RV31/LIB" --

> keep __rtmsym_* --keep __fsym_* --keep __vsym_* --via

> c:\users\admini~1\appdata\

> local\temp\tmp05gi1v.lnk

> Using tempfile c:\users\admini~1\appdata\local\temp\tmpvte9xd.lnk for

> command li

> ne:

> --via build\application.o build\startup.o build\board.o build\console.o

> build\le

> d.o build\sdcard.o build\dm9000.o build\touch.o build\key.o

> build\calibration.o

> build\lcd_t35.o build\src\clock.o build\src\device.o build\src\idle.o

> build\src\

> ......................

> ox.o build\examples\gui\demo_view_edit.o

> build\examples\gui\demo_view_bmp.o buil

> d\examples\gui\demo_plot.o build\examples\gui\mywidget.o

> fromelf --bin rtthread-mini2440.axf --output rtthread.bin

> fromelf -z rtthread-mini2440.axf

>

> ========================================================================

>

> ** Object/Image Component Sizes

>

> Code (inc. data) RO Data RW Data ZI Data Debug Object

> Name

>

> 629776 33616 705644 3784 170348 2727209

> rtthread-min

> i2440.axf (uncompressed)

> 629776 33616 705644 1544 170348 2727209

> rtthread-min

> i2440.axf (compressed)

> 629776 33616 705644 1544 0 0 ROM

> Totals f

> or rtthread-mini2440.axf

> scons: done building targets.

>

> PS. the second patch is really ugly, Is there any way that I can omit the

> '@' in the head of the path fo tempfile? env["TEMPFILEPREFIX"]=' '

> (space here) doesn't help.

>

> --

> °ÑÓÐÏÞµÄʱ¼äͶÈëµ½ÎÞÏÞµÄѧϰÖÐÈ¥

>

> _______________________________________________

> Scons-users mailing list

> Scons-users at scons.org

> http://four.pairlist.net/mailman/listinfo/scons-users

>

>



--
Gary
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20121119/89fba672/attachment.html>


More information about the Scons-users mailing list