Commit Graph

141 Commits

Author SHA1 Message Date
Bernard Xiong 1a5c579e71 [Tools] merge local modification 2015-08-09 00:03:40 +08:00
Bernard Xiong 804e23a3aa [tools] fix the list in list issue when use LOCAL_* options 2015-08-04 09:43:27 +08:00
Bernard Xiong 0af2be6b5d [Tools] Add LOCAL_* options for group definition 2015-07-27 10:34:53 +08:00
Bernard Xiong f5217d6a9c [Tools] Add LOCAL_* options for group definition 2015-07-25 23:50:17 +08:00
aozima 76d82d6803 update scons MDK5 project script: clean old groups. 2015-06-25 20:49:54 +08:00
aozima 6230ff81cc fixed scons building error when use LIB. 2015-05-22 16:49:07 +08:00
BernardXiong 2313424f81 [tools] Add better way to generate MDK project file. 2015-05-11 21:12:53 +08:00
Bernard Xiong 448f9c9a7a [tools] Fix ua target issue. 2015-05-04 22:04:01 +08:00
Bernard Xiong 1e38f39bea [tools] Using object name to decide whether use alias name in Keil MDK. 2015-04-24 11:48:38 +08:00
Bernard Xiong b6951f64b8 [tools] Using object name to decide whether use alias name in Keil MDK. 2015-04-24 11:48:26 +08:00
Bernard Xiong 1f95de43aa [tools] Add package.json as building script 2015-04-10 06:35:59 +00:00
Bernard Xiong 4b838caaf8 Merge remote-tracking branch 'upstream/master' 2015-04-10 06:34:02 +00:00
www220@tom.com 7e260dbcce 修正rtt-root位于其他目录时计算目录错误的bug 2015-04-08 00:52:42 +08:00
www220@tom.com 2eaaa2cb05 在vs2010中将编译文件分组 2015-04-07 18:27:51 +08:00
Bernard Xiong 6c83ff6eca Merge remote-tracking branch 'coding/master' 2015-03-31 07:03:22 +00:00
Bernard.Xiong cf37bccae4 Add copyright information 2015-03-22 08:56:37 +08:00
Grissiom 43e020d481 building: PrepareBuilding forgot to declare BuildOptions as global
The global variables in the building.py are totally a pile of shit.
2015-03-18 15:50:10 +08:00
Bernard Xiong 1d23ce6cbd [Tools] Add bsp_directory.
Add bsp_directory for PrepareModuleBuilding function and module building environment can parse rtconfig.h too.
2015-03-14 09:46:37 +08:00
Bernard Xiong 950c3a4298 [Tools] Add copyright information for scons script files 2015-01-23 14:34:09 +08:00
Bernard Xiong 765ac35e13 add AStyle shell script file 2015-01-19 08:54:18 +00:00
bernard 09602fd9d8 If there is no CPPDEFINES, generate an empty GetCPPDEFINES function. 2015-01-04 12:26:01 +08:00
Grissiom ee59452ee5 clang-analyze: force 32bit compile 2014-12-24 12:10:00 +08:00
Bright Pan 777d3c059b Add mdk5 support in SCons tools 2014-11-19 14:57:10 +08:00
Bright Pan 06f8426f59 Delete trailing whitespace 2014-11-19 14:52:36 +08:00
Grissiom 767720c1f7 SCons: allow set object files in DefineGroup
The source files can be the raw file names end with .c or .o. So return
the raw file names is more flexible than wrap them with Object.
2014-11-18 17:08:21 +08:00
Grissiom d33df46f19 tools: fix SrcRemove on empty src
If the src is empty list, it will crash at:

    IndexError: list index out of range:
      File "/home/xxx/src/SConstruct", line 39:
        objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=True)
      ...
      File "/home/xxx/src/drivers/SConscript", line 12:
        SrcRemove(src, src_need_remove)
      File "/home/rt-thread-stable/tools/building.py", line 496:
        if type(src[0]) == type('str'):
2014-10-08 18:03:12 +08:00
Grissiom 2c5eea4c21 tools: preserve the order of CPPPATH/CPPDEFINES/LIBPATH/LIBS
The order of them are important while the uniqueness has nothing to do
with the compiling.
2014-10-08 12:22:30 +08:00
Xiongfei Guo a1beec4ad3 Remove unsupport syntex for python 2.6.
Dict Comprehensions is imported in Python 2.7 & 3.0 which is PEP 274 [1]. Some
OS like CentOS 6 which is use Python 2.6 cannot support this syntex.

[1] http://legacy.python.org/dev/peps/pep-0274/

Signed-off-by: Xiongfei Guo <xfguo@credosemi.com>
2014-09-06 14:33:46 +08:00
Grissiom 51c4a3aeae tools/building: remove the use of startupinfo
The startupinfo does not have any visible effects on the building
process and some old Python version does not have it at all. So remove
it for the seek of simple.

Tested `scons -j4` in a dual core virtual machine.
2014-09-01 10:11:10 +08:00
Grissiom 83f8b52064 tools/keil: preserve the order of CPPPATH
The order of CPPPATH is important: some project would use the order of
CPPPATH to override the default configuration headers. This commit also
refine the this piece of code in a more Pythonic way.
2014-08-27 11:39:34 +08:00
aozima 0cf9018e49 Update keil.py
clear old groups in template.uvproj.
2014-08-05 11:51:32 +08:00
Grissiom af3dc0e63e tools/building.py: more descriptive on error
Print the command that failed to execute and try to tell the reason to
fall.
2014-06-09 11:35:36 +08:00
Grissiom 66ac9821de Scons: fix the Win32Spawn
Windows(tm) CreateProcess does not use the env passed to it to find the
executables. So we have to modify our own PATH to make Popen work. Also,
detect the cmd build-in commands and execute it directly.

Tested on MDK toolchain on RB4088 and the MSVS toolchain on simulator
BSP.
2014-05-24 13:04:49 +08:00
Grissiom 81b284b316 scons: no need to set RTT_ROOT as Repository
In SCons manual:

=================
In order to inform the C compiler about the repositories,  SCons will
add appropriate -I flags to the compilation commands for each directory
in the $CPPPATH list. So if we add the current directory to the
construction environment $CPPPATH like so:

    env = Environment(CPPPATH = ['.'])
    env.Program('hello.c')
    Repository('/usr/repository1')

Then re-executing SCons yields:

    % scons -Q
    cc -o hello.o -c -I. -I/usr/repository1 hello.c
    cc -o hello hello.o
=================

The additional include directory is definitely not what we want. Just
remove the additional Repository line.
2014-04-10 15:09:20 +08:00
Grissiom a03816ef9a scons: seperate the BSP build with the kernel build
BSPs could have their own components/ etc. If they point to the same
folder, SCons would find the wrong source code to compile.
2014-04-10 15:03:11 +08:00
bernard de16b800a4 [scons] fix the BSP_ROOT issue in ua.py. 2014-03-25 10:04:48 +08:00
bernard 6289a1aa25 Add UA building script. 2014-03-24 14:50:47 +08:00
Bernard Xiong 3d80e414ff [JS] fix the include path issue 2014-02-25 13:43:59 +08:00
bernard 5ce39b8ad8 [scons] Add the library to the group when used buildlib building 2014-02-23 00:08:38 +08:00
Bernard Xiong 5ccbef26e4 [scons] Change attribution for wizard.py (ci build) 2014-02-16 16:37:40 +08:00
Bernard Xiong fd4554392a [scons] Use a single path for group (ci build) 2014-02-16 16:36:54 +08:00
bernard fb6b1c2520 [scons] fix library suffix issue. 2014-02-15 10:29:35 +08:00
bernard 07f8375783 Add more feature on buildlib 2014-02-07 23:23:44 +08:00
prife 821ab3b9aa scons script: support to generate vs2012 project xml
rename template.vcproj to template_vs2005.vcproj
add template_vs2012.vcxproj
NOTE: the vs2012.py is ugly, just can work.
2013-10-01 15:37:34 +08:00
Grissiom dacd2cb9a9 travis: add scan-build in PATH 2013-09-07 18:31:05 +08:00
Grissiom c289aa9fc1 Scons: add a custom tool to do clang static analyze
Bsps can use the clang analyzer as a tool:

    env = Environment(toolpath=[os.path.join(RTT_ROOT, 'tools',
                      'tools')], tools = ['clang-analyze'])

When building the project, the static analyzer will be called to check
all the C code. The warnings are print to stderr.
2013-09-07 15:15:48 +08:00
Grissiom 3b4f3f5931 Scons: run `clang -Wall -fsyntax-only` in clang-analyze
The `clang -fsyntax-only` will give us additional warning messages in
the console.
2013-09-07 15:15:47 +08:00
bernard dce51ddf05 add buildlib for Keil MDK 2013-08-09 22:26:22 +08:00
Grissiom 34027e65e3 building.py: add clang static analyzer support
It adds the '--clang-analyzer' option that could invoke clang as the
static code checker. It is recommanded to work with 'scan-build' shipped
with Clang. For example, `scan-build scons --clang-analyzer`.
2013-07-09 21:08:36 +08:00
aozima 0633e9853c update iar.py: fixed bug when path is absolute. 2013-06-22 23:22:30 +08:00