[Scons-users] SCons integration with IAR

Bill Deegan bill at baddogconsulting.com
Fri Jan 17 11:53:42 EST 2020


Chris,

That's pretty far from standard and/or recommended SCons usage.

I'd suggest:
DefaultEnvironment(Tools=[]) # this prevents scons trying to initialize
MSVS which is slow
envlar = Environment(tools=['mingw'], env=os.environ)
envlar['AS']='iasmrx'
envIar['AS'] = 'iasmrx'
envIar['CC'] = 'iccrx'
envIar.['CXX'] = 'iccrx'
envIar['AR'] = 'iarchive'
envIar['RANLIB'] = None
envIar['LINK'] = 'ilinkrx'
envIar['EXEC_PATH'] = IAR_EXEC_PATH #the executable can be found


3) change the command line according IAR tools
envlar['CCCOM'] = '$CC $CFLAGS $CCFLAGS $_CCCOMCOM -o $TARGET $SOURCES'
envlar['CXXCOM'] = '$CXX $CXXFLAGS $CCFLAGS $_CCCOMCOM -o $TARGET $SOURCES'

envlar['LINKCOM'] = ['$LINK $SOURCES $LINKFLAGS -o $TARGET $__RPATH
$_LIBDIRFLAGS $_LIBFLAGS --map ${TARGET.base}.map']
envIar['ARFLAGS'] = ''

envlar.Replace() can always be replaced with envlar['VARIABLE']=value

-Bill
SCons Project Co-Manager


On Fri, Jan 17, 2020 at 11:05 AM Chris Redlats <chris.redlats at gmail.com>
wrote:

>  Hi Arjuman Banu
>
> I have done it this way.
> Please find below some code (might be not complete)
>
> 1) I used the default environment 'mingw' which is provided by Scons.
> env = DefaultEnvironment(TOOLS = ['mingw'], ENV = os.environ)
>
> 2) change the settings for the IAR compiler/linker/... in this example the
> IAR RX is used
> envIar = env.Clone()
> envIar.Replace(AS = 'iasmrx')
> envIar.Replace(CC = 'iccrx')
> envIar.Replace(CXX = 'iccrx')
> envIar.Replace(AR = 'iarchive')
> envIar.Replace(RANLIB = None)
> envIar.Replace(LINK = 'ilinkrx')
> envIar.Replace(EXEC_PATH = IAR_EXEC_PATH) #the executable can be found
>
>
> 3) change the command line according IAR tools
> _COM = ['$CC $CFLAGS $CCFLAGS $_CCCOMCOM -o $TARGET $SOURCES']
> envIar.Replace(CCCOM = _COM)
>
> _COM = ['$CXX $CXXFLAGS $CCFLAGS $_CCCOMCOM -o $TARGET $SOURCES']
> envIar.Replace(CXXCOM = _COM)
>
>
> _LCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET $__RPATH $_LIBDIRFLAGS
> $_LIBFLAGS --map ${TARGET.base}.map']
> envIar.Replace(LINKCOM = _LCOM)
>
>  envIar.Replace(ARFLAGS = [''])
>
> Best regards
> Chris
>
> Am Fr., 17. Jan. 2020 um 12:13 Uhr schrieb Akumalla Arjuman Banu via
> Scons-users <scons-users at scons.org>:
>
>> Can anyone tell me how to integrate SCons with IAR?
>> I know scons can be integrated with codeblocks and visual studio. But I
>> am not getting detailed information regarding IAR IDE integration with
>> SCons. If there are any websites or forums, Please share here.
>>
>> Regards,
>>
>>
>> Arjuman Banu
>>
>> Engineer | MEBU
>>
>> TATA ELXSI
>> ------------------------------
>> *Disclaimer: This email and any files transmitted with it are
>> confidential and intended solely for the use of the individual or entity to
>> whom they are addressed. If you are not the intended recipient of this
>> message , or if this message has been addressed to you in error, please
>> immediately alert the sender by reply email and then delete this message
>> and any attachments. If you are not the intended recipient, you are hereby
>> notified that any use, dissemination, copying, or storage of this message
>> or its attachments is strictly prohibited. Email transmission cannot be
>> guaranteed to be secure or error-free, as information could be intercepted,
>> corrupted, lost, destroyed, arrive late or incomplete, or contain viruses.
>> The sender, therefore, does not accept liability for any errors, omissions
>> or contaminations in the contents of this message which might have occurred
>> as a result of email transmission. If verification is required, please
>> request for a hard-copy version. *
>> ------------------------------
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20200117/489fcbde/attachment.html>


More information about the Scons-users mailing list