Issue with configure on MacOS

Mr. Andrei Chichak groups at chichak.ca
Tue Jan 5 23:29:25 UTC 2021


Good year!

Can anybody point me at a guide or set of notes for setting up a new BSP for RTEMS 5, derived from an existing one, so that ‘configure’ will pick it up?

At one point I took Sebastian’s STM32H7 BSP and munged it to work with an F767, but then the whole BSP system changed, my scripts broke, and I’ll have to start again.

I need to know things like what directory to place my BSP, and how to get the build system to recognize it.

I’m using the RTEMS User Manual 5.1 as my guide, targeting RTEMS 5 using MacOS Mojave as a host. 

I have the tools built and the script getting the kernel code is:

cd ~/RTEMS5/rtems
mkdir kernel
cd kernel
git clone git://git.rtems.org/rtems.git <git://git.rtems.org/rtems.git> rtems
cd rtems
git checkout 5

Then I patch in my stm32f767 BSP. I move:

configuration info into …/kernel/rtems/c/src/lib/libbsp/arm/stm32f767,  stolen from ../stm32f4 for now
code into …/kernel/rtems/bsp/arm/stm32f767, stolen from ../stm32f4 for now

and the script for building the kernel is

cd ~/RTEMS5/rtems/kernel/rtems
./bootstrap -c && ~/RTEMS5/rtems/rsb/source-builder/sb-bootstrap
cd ..
mkdir stm32f4
cd stm32f4
$HOME/RTEMS5/rtems/kernel/rtems/configure --prefix=$HOME/RTEMS5/rtems/5 \
--target=arm-rtems5 --enable-rtemsbsp=stm32f4 --enable-posix \
--disable-networking
make -j10 all

Building for stm32f4 builds clean.

Then I altered the script above swapping stm32f767 for stm32f4 and I get:

...
rm -f make/stm32f767.cache
make -f /Users/andreichichak/RTEMS5/rtems/kernel/rtems/c/src/make/bsp.mak \
	'RTEMS_BSP=stm32f767' 'RTEMS_ROOT=.' \
	make/stm32f767.cache
config.status: creating lib/libbsp/Makefile
config.status: executing depfiles commands
=== configuring in make (/Users/andreichichak/RTEMS5/rtems/kernel/stm32f767/arm-rtems5/c/stm32f767/make)
configure: running /bin/sh /Users/andreichichak/RTEMS5/rtems/kernel/rtems/c/src/make/configure --disable-option-checking '--prefix=/Users/andreichichak/RTEMS5/rtems/5'  '--host=arm-rtems5' '--build=x86_64-apple-darwin18.7.0' '--target=arm-rtems5' '--enable-posix' '--disable-networking' 'BSP_VERBOSE_FATAL_EXTENSION=1' '--with-target-subdir=arm-rtems5' '--exec-prefix=/Users/andreichichak/RTEMS5/rtems/5/arm-rtems5' '--includedir=/Users/andreichichak/RTEMS5/rtems/5/arm-rtems5/include' 'build_alias=x86_64-apple-darwin18.7.0' 'host_alias=arm-rtems5' 'target_alias=arm-rtems5' '--with-project-root=../../' '--with-project-top=../../' '--with-rtems-build-top=/Users/andreichichak/RTEMS5/rtems/kernel/stm32f767/arm-rtems5/c/stm32f767' '--with-rtems-source-top=/Users/andreichichak/RTEMS5/rtems/kernel/rtems' 'RTEMS_BSP=stm32f767' 'RTEMS_BSP_FAMILY=stm32f767' 'CFLAGS=-mthumb -mcpu=cortex-m4 -O2 -g -ffunction-sections -fdata-sections -Wall -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs' --cache-file=/dev/null --srcdir=/Users/andreichichak/RTEMS5/rtems/kernel/rtems/c/src/make
checking for gmake... no
checking for make... make
checking build system type... x86_64-apple-darwin18.7.0
checking host system type... arm-unknown-rtems5
checking rtems target cpu... arm
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-rtems5-strip... arm-rtems5-strip
checking for a thread-safe mkdir -p... /Users/andreichichak/RTEMS5/rtems/kernel/rtems/c/src/make/../../../install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for RTEMS_BSP... stm32f767
checking for cat... /bin/cat
checking for cp... /bin/cp
checking for mv... /bin/mv
checking for ln... /bin/ln
checking whether ln -s works... yes
checking for chmod... /bin/chmod
checking for sort... /usr/bin/sort
checking for touch... /usr/bin/touch
checking for cmp... /usr/bin/cmp
checking for sed... /usr/bin/sed
checking for gm4... /opt/local/bin/gm4
checking for bash... /bin/bash
checking for style of include used by make... GNU
checking for arm-rtems5-gcc... arm-rtems5-gcc
checking for arm-rtems5-gcc... (cached) arm-rtems5-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether arm-rtems5-gcc accepts -g... yes
checking for arm-rtems5-gcc option to accept ISO C89... none needed
checking dependency style of arm-rtems5-gcc... gcc3
checking how to run the C preprocessor... arm-rtems5-gcc -E
checking whether arm-rtems5-gcc accepts -isystem... yes
checking whether arm-rtems5-gcc accepts --pipe... yes
checking whether arm-rtems5-gcc --pipe accepts -specs... yes
checking whether CPU supports SMP... disabled
checking for arm-rtems5-g++... arm-rtems5-g++
checking whether we are using the GNU C++ compiler... yes
checking whether arm-rtems5-g++ accepts -g... yes
checking dependency style of arm-rtems5-g++... gcc3
checking how to run the C++ preprocessor... arm-rtems5-g++ -E
checking for arm-rtems5-ar... arm-rtems5-ar
checking for arm-rtems5-as... arm-rtems5-as
checking for arm-rtems5-ld... arm-rtems5-ld
checking for arm-rtems5-ranlib... arm-rtems5-ranlib
checking for arm-rtems5-size... arm-rtems5-size
checking for arm-rtems5-nm... arm-rtems5-nm
checking for arm-rtems5-objcopy... arm-rtems5-objcopy
checking if wanting multiprocessing... no
checking whether BSP supports networking... disabled
checking whether CPU supports libposix... yes
checking whether to build rtems++... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: linking /Users/andreichichak/RTEMS5/rtems/kernel/rtems/c/src/make/leaf.cfg to leaf.cfg
config.status: executing depfiles commands
=== configuring in lib/libbsp/arm (/Users/andreichichak/RTEMS5/rtems/kernel/stm32f767/arm-rtems5/c/stm32f767/lib/libbsp/arm)
configure: running /bin/sh /Users/andreichichak/RTEMS5/rtems/kernel/rtems/c/src/lib/libbsp/arm/configure --disable-option-checking '--prefix=/Users/andreichichak/RTEMS5/rtems/5'  '--host=arm-rtems5' '--build=x86_64-apple-darwin18.7.0' '--target=arm-rtems5' '--enable-posix' '--disable-networking' 'BSP_VERBOSE_FATAL_EXTENSION=1' '--with-target-subdir=arm-rtems5' '--exec-prefix=/Users/andreichichak/RTEMS5/rtems/5/arm-rtems5' '--includedir=/Users/andreichichak/RTEMS5/rtems/5/arm-rtems5/include' 'build_alias=x86_64-apple-darwin18.7.0' 'host_alias=arm-rtems5' 'target_alias=arm-rtems5' '--with-project-root=../../' '--with-project-top=../../' '--with-rtems-build-top=/Users/andreichichak/RTEMS5/rtems/kernel/stm32f767/arm-rtems5/c/stm32f767' '--with-rtems-source-top=/Users/andreichichak/RTEMS5/rtems/kernel/rtems' 'RTEMS_BSP=stm32f767' 'RTEMS_BSP_FAMILY=stm32f767' 'CFLAGS=-mthumb -mcpu=cortex-m4 -O2 -g -ffunction-sections -fdata-sections -Wall -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs' --cache-file=/dev/null --srcdir=/Users/andreichichak/RTEMS5/rtems/kernel/rtems/c/src/lib/libbsp/arm
checking for gmake... no
checking for make... make
checking build system type... x86_64-apple-darwin18.7.0
checking host system type... arm-unknown-rtems5
checking rtems target cpu... arm
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-rtems5-strip... arm-rtems5-strip
checking for a thread-safe mkdir -p... /Users/andreichichak/RTEMS5/rtems/kernel/rtems/c/src/lib/libbsp/arm/../../../../../install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for RTEMS_BSP... stm32f767
configure: error: Invalid BSP
configure: error: /Users/andreichichak/RTEMS5/rtems/kernel/rtems/c/src/lib/libbsp/arm/configure failed for lib/libbsp/arm
make[2]: *** [stm32f767] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1


Any ideas or pointers?


Thanks,
Andrei




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20210105/ec66d3cd/attachment-0001.html>


More information about the users mailing list