How to build start.o using waf?

Chris Johns chrisj at
Thu Oct 3 02:32:30 UTC 2019

On 3/10/19 3:30 am, Gedare Bloom wrote:
> On Wed, Oct 2, 2019 at 5:12 AM Sebastian Huber
> <sebastian.huber at> wrote:
>> On 30/09/2019 15:14, Sebastian Huber wrote:
>>> Hello,
>>> I would like to work on a new build system prototype. The idea is to use
>>> specification items maintained by Doorstop (YAML files), a Python
>>> configuration script and waf to build RTEMS and the tests. This is
>>> similar to the libbsd build. The difference is that in libbsd the build
>>> data is maintained directly in Python code (

A key design aspect is how the configuration of RTEMS is handled and maintained.
Amar's solution provides a specific model for managing settings and specifically
BSP options. We need a way to add options for a BSP that lets us collect,
document and validate these settings. We need a way to query and review option
defaults. The solution needs to be able to add and remove BSPs with minimal
impact and this leads to being able to build a BSP that is external to the RTEMS
source tree. There are BSPs that are private or export restricted. Another issue
to consider is how we deprecate, update or alter options.

I suspect we will have an iterating design around the internal design and
implementation complexity and suitable external user work-flows.

>>> How do you build a singe object file (start.o) from assembly files in
>>> waf? An example would be great.
>> I think I found it in:
>>         def start(self, source, defines=[]):
>>                 from os.path import splitext, basename
>>                 for s in source:
>>                         file = splitext(basename(s))[0]
>>                         self.ctx(
>>                                 rule     = '${CC} -DASM ${CFLAGS} ${CPPFLAGS} ${DEFINES_ST:DEFINES}
>> ${CPPPATH_ST:INCPATHS} -c -o ${TGT} ${SRC}',
>>                                 source   = s,
>>                                 target   = "%s.o" % file,
>>                                 name     = "start_%s_o" % file,
>>                                 features = "c casm bld_include src_include",
>>                                 defines  = defines,
>>                         )
> It seems likely for a simple link you'd only need features="casm",
> although I'm not sure.

I would try `feature = 'asm'` first ....

$ grep -r '@feature.*asm' .waf3-2.0.13-4c5a17779813574907c253ab5418388d/



More information about the devel mailing list