wiki:TBR/BSP/Tms570

Version 11 (modified by Pavel Pisa, on Sep 25, 2016 at 8:19:13 AM) (diff)

--

Tms570

BSP Information
BSP_name TMS570 (TMS570LS3137 HDK)
Manufacturer Texas Instruments
image TMS570LS31x_HDK_Kit.jpg
caption TMS570LS31x HDK Kit
Board_URL http://www.ti.com/tool/tmds570ls31hdk
Architecture ARM Cortex-R (big-endian)
CPU_model Texas Instruments Cortex-R TMS570LS3137 microcontroller
Monitor None, simple HW setup or XCP loader
Simulator No.
Aliases tms570ls3137_hdk, tms570ls3137_hdk_intram, tms570ls3137_hdk_sdram
RAM 256 kB ECC SRAM internal + 8 MB SDRAM
NVMEM 3 MB ECC Flash
Serial 2 x UARTs (1 with LIN), 1 x I2C, 3 x CAN, 1 x 2ch FlexRay?, 3+2 x SPI
NICs 1 x 10/100 Ethernet
Dimensions 125 x 110 mm
Other 2 x N2HET timing coprocessor, 2 x ADC

Overview

The TMS570LS3137 device is a high-performance automotive-grade microcontroller family for safety systems.

Features

  • Texas Instruments TMS570LS3137 MCU:
  • Dual CPUs in lockstep
  • CPU and memory Built-In Self-Test (BIST) logic
  • ECC on both the flash and the data SRAM
  • Parity on peripheral memories
  • Loopback capability on peripheral I/Os

BSP Status

The basic TMS570 support has been included in RTEMS mainline sources (commit) in August 2014. Support for initial hardware setup and basic system selftest has been included in RTEMS mainline in September 2016 (commit)

Development of the BSP started as Premysl Houdek's GSoC 2014 project at Industrial Informatics group at Czech Technical University in Prague

Development version of RTEMS with BSP sources is available from GitHub? in tms570-bsp branch

The lwIP driver sources with TMS570 EMAC driver and RTEMS port included can be obtained from our other project repository

The application for testing of RTEMS with the LwIP port is included in our RTEMS OM template repository

Tool-chain

arm-rtems4.12-gcc (GCC) 6.1.1 20160526 + Newlib 2.4.0.20160527 + Binutils 2.26.20160125

When GCC is built outside of RTEMS Source Builder then next setup matches RSB for RTESM-4.12 on ARM

../../../src/gcc-6.1/configure --target=arm-rtems4.12 --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 \
             --enable-libgomp \
             --enable-newlib-iconv \
             --enable-newlib-iconv-encodings="iso_8859_1,utf_8" \

All patches required for Cortex-R and big-endian ARM support are already integrated in GCC the mainline.

The TMS570 RTEMS BSP builds for hard float by default.

GCC CFLAGS for hard-float RTEMS for Cortex-R in big-endian variant

-mbig-endian -mthumb -march=armv7-r -mfpu=vfpv3-d16 -mfloat-abi=hard

CFLAGS for soft-float RTEMS Cortex-R support

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

RTEMS build configuration used for testing of self contained applications to run directly from Flash

../../../src/rtems/configure  --target=arm-rtems4.12 --prefix=/opt/rtems4.12 \
    --enable-rtems-inlines --disable-multiprocessing --enable-cxx \
    --enable-rdbg --enable-maintainer-mode --enable-tests=samples \
    --disable-networking --enable-posix --enable-itron --disable-ada \
    --disable-expada --disable-multilib --disable-docs \
    --enable-rtemsbsp="tms570ls3137_hdk" \
    --enable-rtems-debug \
    TMS570_USE_HWINIT_STARTUP=1

Execution

Application build by above process can be directly programmed into Flash and run.

For test and debug purposes, TI's HalCoGen? generated application is used to set up the board and then the RTEMS application image is loaded using OpenOCD to internal ECC SRAM or external SDRAM. This prevents wear of Flash which has limited guaranteed erase cycles count.

The following features are implemented in the BSP only partially:

  • Initial CPU and peripheral initialization
  • Cores Self-test

Setup application code is available there:

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

TMDS570LS31HDK setup to use SDRAM to load and debug RTEMS applications

  • Program SDRAM_SCI_configuration-program or another boot loader (for example ETHERNET XCP is developed)
  • write BSP application either to sdram or intram and jump to RTEMS start code

Debugging

OpenOCD support with GDB and DDD frontend setup can be found there

Test Reports

The hello world, ticker and most of the other tests are running from internal SRAM, Flash and external SDRAM. Loader or other HW configuration is required to run code from external SDRAM. Running from Flash with complete hardware initialization included in RTEMS application image requires to configure RTEMS BSP build with TMS570_USE_HWINIT_STARTUP option set to 1.

TMS570_USE_HWINIT_STARTUP=1

References