ARM bare bsp

Thomas Rauscher trauscher at loytec.com
Wed Jul 10 07:34:46 UTC 2002


On Tue, 9 Jul 2002, Charles Steaderman wrote:

> I am trying to configure the ARM bare BSP using snapshot ss-20020301 and
> cannot seem to pass custom CFLAGS. Without them, the samples and tests
> compile and build without a problem, but things like arm cpu (arm7tdmi),
> endianess, etc. are incorrect. The following is the configure syntax
> that I used:
>
> $ ../rtems-ss-20020301/configure --target=arm-rtems --disable-posix
> --disable-networking --disable-cxx --enable-rtemsbsp="arm_bare_bsp"
> --enable-tests --enable-bare-cpu-model=marm7tdmi
> --enable-bare-cpu-flags="-mcpu=arm7tdmi -msoft-float -Wall -Wno-format
> -nostdinc -fno-builtin --pack-struct"
>
> I am developing under Cygwin using the arm-rtems-gcc package for Cygwin
> from oarcorp. Any ideas?
>

Hi,

we've developed an ARM BSP for RTEMS 4.0 and unfortunately didn't
track the actual snapshots so that our current BSP is somehow incompatible
to the snapshot designs, but I remember similar problems.

Here are some ideas:

* Try something like (this one helped on CYGWIN)
  CPP_FLAGS="my options" ../rtems-ss-20020301/configure ....
  C_FLAGS="my options" ../rtems-ss-20020301/configure ....
  CXX_FLAGS="my options" ../rtems-ss-20020301/configure ....

* Maybe you need to modify the GCC specs for your particular CPU.
  We had problems with 'as' options. A trick is to add extra
  specs to the target-specs in arm.h (gcc source tree). For example

  #define ASM_SPEC "%{mbig-endian:-EB} %{mcpu=*:-m%*} %{march=*:-m%*}
                    %{mapcs-*:-mapcs-%*} %{mapcs-float:-mfloat}
                    %{msoft-float:-mno-fpu}
                    %{mthumb-interwork:-mthumb-interwork}
                    %(subtarget_extra_asm_spec)
                    %{!mhard-float:%{!msoft-float:%(asm_float_default)}}"
  #define ASM_FLOAT_DEFAULT_SPEC "-mno-fpu"

  and add it to the spec array

    { "cpp_interwork_default",  CPP_INTERWORK_DEFAULT_SPEC },   \
    { "subtarget_cpp_spec",     SUBTARGET_CPP_SPEC },           \
+   { "asm_float_default",      ASM_FLOAT_DEFAULT_SPEC },       \
    SUBTARGET_EXTRA_SPECS

  Basically this can also be done in the bsp_specs file, but
  configuring RTEMS would fail anyway as the compiler checks would
  fail without this hack. Alternatively,

  CFLAGS="my options" configure ......

  maybe also works.

* Check that all parts use the same version of the multilib.

* Is --enable-bare-cpu-model=marm7tdmi    a typo?
                             ^

I hope something of that is useful for you,
Thomas

--
Dipl.-Ing. Thomas Rauscher                 Tel.:   ++43 1 402 08 05 15
                                           Fax:    ++43 1 402 08 05 99
LOYTEC electronics GmbH                    E-mail: trauscher at loytec.com
Stolzenthalergasse 24/3, A-1080 Wien       Web:    http://www.loytec.com




More information about the users mailing list