On Wed, Dec 9, 2020 at 8:06 AM Robin Müller <robin.muelle...@gmail.com>
wrote:

> Thank you Sebastian. I'm looking at building the example erc32 application
> and the blinky executable right now. There is the issue
> that determining the BSP path,tool binary determination, all the checking
> etc.. bleeds into the application CMakeLists.txt but there is
> probably a good way to extract that checking into an external file. It
> might even possible to make this generic.
>
> Maybe this would also be interesting for the QuickStart guide or the
> examples in general so if you are interested
> I could submit a patch for this (if everything works out as expected).
>

We haven't discussed it as openly as we probably should have but we are
quite agnostic to the build system used by user applications. We all have
our preferences and settled on waf for use wth RTEMS going forward.

But the rtems-examples show how to do applications with the old application
Makefile infrastructure and waf. If we had a hello world with cmake, that
would
be good.

As I read this thread, this morning, it occurred to me that the Users
Manual needs a chapter on build systems for end user applications.
It needs to cover fetching the settings from the pkgconfig files and using
waf, old Makefile infrastructure, etc. Guidance on using cmake, scons,
meson, Eclipse managed builds, and Visual Studio would probably be
of benefit. Or at least someone may care about each build system. Likely
no one individual cares about more than one or two. :)

A contribution would be welcomed as it would help others tread the
same path.

In the end, you just need to invoke the right compiler and linker with
the right arguments. Assume they are magic strings per BSP and
just make sure your build system produces equivalent invocations to
say the build of hello world in rtems-examples. There isn't much
beyond that.

--joel


>
> Kind Regards
> Robin
>
> On Wed, 9 Dec 2020 at 13:59, Sebastian Huber <
> sebastian.hu...@embedded-brains.de> wrote:
>
>> Hello Robin,
>>
>> you can use whatever build system you want to build your applications.
>> You can use pkgconfig to get the necessary flags for a particular BSP
>> installation.
>>
>> On 09/12/2020 13:50, Robin Müller wrote:
>> > I also had another question about a specific flag used when linking
>> > RTEMS executables.
>> > The link command for the example application is the following:
>> >
>> > arm-rtems6-gcc -mthumb -mcpu=cortex-m7 -mfpu=fpv5-d16 -mfloat-abi=hard
>> > -I=$RTEMS_INST/arm-rtems6/stm32h7/lib/include -MMD
>> > -B$RTEMS_INST/arm-rtems6/stm32h7/lib -Wl,--gc-sections init.c.1.o
>> > led.c.1.o stm32h7xx_nucleo.c.1.o -o blinky-test.elf -Wl,-Bstatic
>> > -Wl,-Bdynamic -qrtems
>> >
>> > Can anyone tell me the meaning of the -q flag? I did not find anything
>> > by running arm-rtems6-gcc --help
>>
>> This flag selects the right GCC specification for RTEMS. It is
>> necessary, just use it.
>>
>> If you want to know how it works, you have to learn the GCC
>> specification format. For a start you can use "arm-rtems6-gcc -dumpspecs".
>>
>> --
>> embedded brains GmbH
>> Herr Sebastian HUBER
>> Dornierstr. 4
>> 82178 Puchheim
>> Germany
>> email: sebastian.hu...@embedded-brains.de
>> phone: +49-89-18 94 741 - 16
>> fax:   +49-89-18 94 741 - 08
>>
>> Registergericht: Amtsgericht München
>> Registernummer: HRB 157899
>> Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
>> Unsere Datenschutzerklärung finden Sie hier:
>> https://embedded-brains.de/datenschutzerklaerung/
>>
>> _______________________________________________
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to