diff options
author | Chris Johns <chrisj@rtems.org> | 2012-11-21 17:51:28 +1100 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2012-11-21 17:51:28 +1100 |
commit | 62b19fe866226b8fa0ce54351162dab367daa06a (patch) | |
tree | 116f3c25dde426341f454ecc3fd986877101f056 /rtems.py | |
parent | 949047b68658e2a71fa91799780917c95b84e86d (diff) |
Add rtems-ld support for applications.
Update the waf build support to create a RTEMS application and get
it placed in the root file system embedded in the application.
Diffstat (limited to 'rtems.py')
-rw-r--r-- | rtems.py | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -365,6 +365,7 @@ def _find_tools(conf, arch, paths, tools): arch_tools['OBJDUMP'] = conf.find_program([arch + '-objdump'], path_list = paths) arch_tools['OBJCOPY'] = conf.find_program([arch + '-objcopy'], path_list = paths) arch_tools['READELF'] = conf.find_program([arch + '-readelf'], path_list = paths) + arch_tools['RTEMS_LD'] = conf.find_program(['rtems-ld'], path_list = paths) tools[arch] = arch_tools return tools @@ -490,3 +491,14 @@ def _load_flags_set(flags, arch_bsp, conf, config, pkg): def _log_header(conf): conf.to_log('-----------------------------------------') + +from waflib import TaskGen +from waflib.Tools.ccroot import link_task, USELIB_VARS +USELIB_VARS['rap'] = set(['RTEMS_LINKFLAGS']) +@TaskGen.extension('.c') +class rap(link_task): + "Link object files into a RTEMS applicatoin" + run_str = '${RTEMS_LD} ${RTEMS_LINKFLAGS} --cc ${CC} ${SRC} -o ${TGT[0].abspath()} ${STLIB_MARKER} ${STLIBPATH_ST:STLIBPATH} ${STLIB_ST:STLIB} ${LIBPATH_ST:LIBPATH} ${LIB_ST:LIB}' + ext_out = ['.rap'] + vars = ['RTEMS_LINKFLAGS', 'LINKDEPS'] + inst_to = '${BINDIR}' |