Can't build hello app

Following the lines on User manual 6.1 chapter 2.7

All good until the waf configure, I want to build for ZynqMP, so I use:

./waf configure --rtems=$HOME/quick-start/rtems/6 --rtems-bsp=aarch64/zymqmp_apu

and I get:

No valid arch/bsps found
(complete log in <path>/app/hello/build/config.log)

Although waf (the one in rtems source folder) shows it:

./waf bsplist
Regenerate build specification cache (needs a couple of seconds)...
aarch64/a53_ilp32_qemu
aarch64/a53_lp64_qemu
aarch64/a72_ilp32_qemu
aarch64/a72_lp64_qemu
aarch64/raspberrypi4b
aarch64/versal_aiedge
aarch64/versal_qemu
aarch64/versal_vck190
aarch64/zynqmp_apu
aarch64/zynqmp_apu_ilp32
aarch64/zynqmp_cfc400x
aarch64/zynqmp_qemu
aarch64/zynqmp_qemu_ilp32

but not waf where the hello source is

Did you run ./waf install in the RTEMS source directory?

Does config.log provide any further clues?

If you are running this at the top of the rtems source tree, I wonder if providing a --rtems argument confuses things. It should be using the RTEMS in the current directory.

Also it is --rtems-bsps.

This is a link to the configure command my personal helper command builds up:

It certainly specifies arguments that can be defaulted but it gives an idea of one that works.

I think --rtems-bsps is redundant because you are supplying a config INI file and that will or should list the BSPs you are building.

I am not sure why we have --rtems-bsps and maybe it should be removed? We should encourage use of INI files.

Hello, I’m trying to understand the syntax and usage of the .ini file in RTEMS, particularly for configuring BSPs. I’ve been struggling to find clear answers in the documentation and would appreciate some guidance.

As an example, I’ve successfully built and tested the BSP for STM32F4, but I’m confused about where certain #define directives are set. Specifically, in the UART configuration for STM32F4 (found in bsps/arm/stm32f4/console/console-config.c), I see code like this:

#ifdef STM32F4_ENABLE_USART_3
    {
      .sDeviceName = "/dev/ttyS2",
      .deviceType = SERIAL_CUSTOM,
      .pDeviceFns = &stm32f4_usart_fns,
      .ulCtrlPort1 = (uint32_t) STM32F4_USART_3,
      .ulCtrlPort2 = 2,
      .ulClock = STM32F4_USART_BAUD,
      .ulIntVector = STM32F4_IRQ_USART3
    },
#endif

Where are defines like STM32F4_ENABLE_USART_3 typically specified? Are they set in the .ini file, bspopts.h, YAML files in spec/build, or somewhere else? Additionally, could someone explain the proper syntax for the .ini file and how it’s used to configure BSPs? Is there a recommended methodology or best practice for creating and customizing BSPs in RTEMS?
Thank you very much for any help or pointers you can provide!

You can get a complete listing of the configuration options for config.ini by running ./waf bspdefaults. It is likely that the UART enable you’re looking for is described there. Those configuration items are populated from the YAML under the spec/ directory.

1 Like

Thank you, I found the settings for some of the features I need. I have a question regarding yml configurations. Could you clarify the syntax used for defining BSP components in yml? Is it based on a standard format? If I wanted to create my own BSP, where could I learn more about this syntax?

I wouldn’t call it a standard format, but the format is documented here: 10. BSP Build System — RTEMS Software Engineering 7.8923d90 (14th April 2025) documentation

1 Like

Hello,

You mentioned that it’s preferable to use a .ini file for configuring projects. This works well for me in the main RTEMS 7 source tree. However, in my custom application project, I wasn’t able to configure the BSP using a config.ini file.

The following command does work for me, but I’m looking for the recommended or preferred approach:

./waf configure --rtems-arch=arm --rtems-bsp=arm/stm32f4

Thank you for any helpful advice.

Yes the INI configuration file is preferable. The Xilinx Zynq RTEMS Deployment configuration page has a couple of INI files I use in production level projects. These files are passed to RTEMS’s waf configure using the --rtems-config option.

This approach lets you hold your configuration in your project however that is done, for example a git repo. The RTEMS Deployment project is an example of this and there are many many other ways to do the same thing.


Note:

A BSP can have a lot of configuration items. You can see the complete list by providing RTEMS’s waf configure the option --rtems-bsps and a regular expression string with the bspdefaults build target. For example:

./waf bspdefaults --rtems-bsps=powerpc/mvme2700

I recommend you only place in your INI file the options you want or need to override and to leave as many of the default settings as possible as defaults. Capturing all the options in your INI file is easy with the bspdefaults target however the defaults can change and if you have captured the defaults previously you may not see a bug fix or defaults update in a later RTEMS release.

1 Like

I understand that you are talking about configuring the general RTEMS BSP build directory. However, I have a separate application project based on the example.
In this example, BSP configuration through config.ini is not supported? I’m a bit confused. As I understand it, I build and install the BSP once (I can install the BSP for stm32h7 and stm32f4 into a separate directory). In my project, I want to have the ability to configure the application either for f4 or for h7. I assume that config.ini should be used instead of explicitly passing --rtems-bsp=arm/stm32f4. I would appreciate it if you could suggest if it’s possible to do something like this (If a separate project does not support config.ini):

def configure(conf):
    # Find size to print size of executable after build
    conf.find_program('arm-rtems7-size', path_list=['C:/msys64/home/SimTech/toolchain/bin'], mandatory=True, var='SIZE')

    # Setting toolchain & RTEMS sources DIR
    conf.options.rtems_path = 'C:/msys64/home/SimTech/rtems/7'
    conf.options.rtems_tools = 'C:/msys64/home/SimTech/toolchain'
    conf.options.rtems_bsps   = 'arm/stm32h7'
    
    # Configure RTEMS
    rtems.configure(conf)

UPD: Execute comand in my project:

./waf bsplist
No function 'bsplist' defined in C:/msys64/home/SimTech/rtems-workspace/osf4/wscript

Sorry, I misunderstood.

The configuration is only used to build RTEMS. The built and installed header files and libraries are set to the configuration. This is normal for embedded realtime systems. Your application should reference the RTEMS install path. This is the --prefix option to RTEMS’s waf configure.

1 Like