Toolchain for RTEMS port to Cortex-R4F big-endian (TMS570LS3137)

Pavel Pisa pisa at
Mon Jun 30 17:07:35 UTC 2014

Hello everybody,

we have advanced with preparation RTEMS multilib toolchain which
targets Cortex-R in big-endian thumb mode. The required RTEMS ARM
target fragments are included in followup patch.

I have used next configure script options

CFLAGS="-O2 -pipe" LDFLAGS=-s \
../../../src/gcc-4.9/configure --target=arm-rtems4.11 --prefix=/usr \
             --build=x86_64-pc-linux-gnu  \
             --enable-languages=c,c++ \
             --disable-libstdcxx-pch \
             --with-gnu-ld \
             --with-gnu-as \
             --enable-threads \
             --enable-target-optspace \
             --with-system-zlib \
             --verbose \
             --disable-nls --without-included-gettext \
             --disable-win32-registry \
             --with-newlib \
             --enable-plugin \
             --enable-newlib-io-c99-formats \
             --enable-version-specific-runtime-libs \
             --enable-newlib-iconv \
             --disable-lto \

When I have been in GCC setup changes I have added even hard float
Cortex-R variant to RTEMS ARM GCC build to allow utilize FPU in future.
That is critical for Matlab/Simulink code generation for RTEMS
which we want to port to RTEMS one day (the actual non RTEMS version
is there

But we start with soft-float BSP variant first.

There is list of big-endian targets added to GCC setup

  - mbig-endian        - for standard ARMv4
  - mthumb mbig-endian - for THUMB  ARMv4+
  - mthumb march=armv7-r mbig-endian - for Cortex-R
  - mthumb march=armv7-r mfpu=vfpv3-d16 mfloat-abi=hard mbig-endian - for Cortex-R with FPU enabled

and finally hard float target for little-endian ARM Cortex-R which can
be interresting for porting to RM48 and RM57x based TexasInstruments chips

  - mthumb march=armv7-r mfpu=vfpv3-d16 mfloat-abi=hard -  for Cortex-R with FPU enabled

Our experimental version of new RTEMS GCC ARM tools for 32 and 64-bit Debian
(and other x86 Linux distribution) is available from our tools Debian archive

Some notes about installation of DEB archives on Linux distributions without
DEB packages format support is there

As for next steps, our other colleague - Michal Horn  has prepared simplified
code based on Ti's tools which configures SDRAM and UARTs on HDK kit and
prepares it for testing of minimal BSP code without need to wear FLASH.

Premek has prepared some minimal test of toolchain for the target.
The test has been successfully compiled by prepared tootchain
in thumb mode

  CPU_CFLAGS = -march=armv7-r -mthumb -mbig-endian

and when loaded to the target SRAM after Michal's SDRAM
and UART init with use of OpenOCD. It can be single stepped
and run at full speed by GDB or GDB+DDD frontend. Premek's test
code can be found there

    - uart-test - minimal code to send string to UART Tx register
                  with wait for UART Tx ready condition

    - openocd - scripts rund DDD, start on demand OpenOCD for TMS570LS31x
                HDK kit connected through XDS100v2 JTAG port

    - parser - work in progress scripts to generate peripheral registers
               header files

Premek has started on RTEMS BSP as well. Cloned and renamed BSP
is now part of build system and correct GCC build flags and ldscripts
are configured for board. Actual work is on cleaning up remains of
Cortex-M code from cloned BSP.

Best wishes,


More information about the devel mailing list