= Tms570 = {{Infobox BSP |BSP_name = TMS570 |Manufacturer = Texas Instruments |image = TMS570LS31x_HDK_Kit.jpg |caption = TMS570LS31x HDK Kit |Board_URL = http://www.ti.com/tool/tmds570ls31hdk |Dimensions = 125 x 110 mm |Architecture = ARM Cortex-R (big-endian) |CPU_model = Texas Instruments Cortex-R TMS570LS3137 microcontroller |Power = Powered by included adapter |Aliases = None |RAM = 256 kB EEC SRAM internal + 8 MB SDRAM |NVMEM = 3 MB EEC Flash |Serial = 1 x I2C, 3 x CAN, 1 x 2ch FlexRay, 2 x UARTs (1 with LIN), 3+2 x SPI |NICs = 10/100 Ethernet |Other = 2 x N2HET timing coprocessor, 2 x ADC }} = Warning = '''BSP is Work in the Progress state now. It is developed in a frame of GSoC 2014 project''' RTEMS with BSP sources is available from respective GitHub project tms570-bsp branch * https://github.com/AoLaD/rtems/tree/tms570-bsp = Overview = The TMS570LS3137 device is a high-performance automotive-grade microcontroller family for safety systems. The safety architecture includes the following: = 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 = Tool-chain = GCC 4.9.0 + Newlib 2.1.0 + Binutils 2.24 configuration {{{ CFLAGS="-O2 -pipe" LDFLAGS=-s \ ../../../src/gcc-4.9/configure --target=arm-rtems4.11 --prefix=/usr \ --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 \ }}} Next patches required for Cortex-R and big-endian ARM support * Enable big-endian multilib variant for GCC * http://lists.rtems.org/pipermail/devel/2014-July/007244.html * Newlib memchr ARM profile correction correction * https://sourceware.org/ml/newlib/2014/msg00193.html * RTEMS common Newlib sigaltstack patch applied * http://git.rtems.org/rtems-tools/plain/tools/4.11/newlib/newlib-sys-signal-20130532.diff The first target is soft-float RTEMS Cortex-R support. Next GCC options are used {{{ -mbig-endian -march=armv7-r -mthumb }}} for future hard float alternative {{{ -mbig-endian -mthumb -march=armv7-r -mfpu=vfpv3-d16 -mfloat-abi=hard }}} = Execution = We have not used any generic bootloader nor initial complex CPU and peripherals initialization and self test is implemented and included in RTEMS BSP. We use simple Ti's HalCoGen generated application to setup board and then download RTEMS image over OpenOCD to internal EEC SRAM or external SDRAM. Setup application code is available there * https://github.com/hornmich/tms570ls3137-hdk-sdram = Debugging = OpenOCD support with GDB and DDD frontend setup can be found there * https://github.com/AoLaD/rtems-tms570-utils/tree/master/openocd = Test Reports = The hello world and ticker test running. =References= * http://www.ti.com/tool/tmds570ls31hdk * http://www.ti.com/product/tms570ls3137 * https://rtime.felk.cvut.cz/hw/index.php/TMS570LS3137