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

Pavel Pisa pisa at cmp.felk.cvut.cz
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 http://rtime.felk.cvut.cz/rpp-tms570/).

But we start with soft-float BSP variant first.

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

eb       
  - mbig-endian        - for standard ARMv4
thumb/eb
  - mthumb mbig-endian - for THUMB  ARMv4+
thumb/armv7-r/eb
  - mthumb march=armv7-r mbig-endian - for Cortex-R
thumb/armv7-r/fpu/hard/eb
  - 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

thumb/armv7-r/fpu/hard
  - 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
now.

  https://rtime.felk.cvut.cz/debian/pool/main/b/binutils-2.24/
  https://rtime.felk.cvut.cz/debian/pool/main/g/gcc-4.9.0/

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

  https://rtime.felk.cvut.cz/hw/index.php/Cross_compilers#Installation_on_distributions_without_dpkg

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.

  https://github.com/hornmich/tms570ls3137-hdk-sdram

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

  https://github.com/AoLaD/rtems-tms570-utils

    - 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,

              Pavel


More information about the devel mailing list