[4407ee6] | 1 | Development Board: TMS570LS31x Hercules Development Kit from TI |
---|
| 2 | |
---|
| 3 | http://www.ti.com/tool/tmds570ls31hdk |
---|
| 4 | |
---|
[425f6cfa] | 5 | Overview |
---|
| 6 | -------- |
---|
| 7 | |
---|
[4407ee6] | 8 | Drivers: |
---|
| 9 | |
---|
[425f6cfa] | 10 | o Console |
---|
| 11 | o Clock |
---|
| 12 | o Ethernet - external lwIP fork repository |
---|
[4407ee6] | 13 | |
---|
| 14 | BSP variants: |
---|
| 15 | tms570ls3137_hdk_intram - place code and data into internal SRAM |
---|
| 16 | tms570ls3137_hdk_sdram - place code into external SDRAM and data to SRAM |
---|
[38404cb] | 17 | tms570ls3137_hdk_with_loader - reserve 256kB at Flash start for loader |
---|
| 18 | and place RTEMS application from address |
---|
| 19 | 0x00040000 |
---|
[425f6cfa] | 20 | tms570ls3137_hdk - variant for stand-alone RTEMS application stored |
---|
| 21 | and running directly from flash. This variant |
---|
| 22 | requires initialization of hardware to be integrated |
---|
| 23 | into RTEMS. RTEMS has to be configured with |
---|
| 24 | TMS570_USE_HWINIT_STARTUP=1 |
---|
| 25 | and initialization code has to be included in the sources. |
---|
| 26 | |
---|
| 27 | Tool-chain used for development |
---|
| 28 | ------------------------------- |
---|
[4407ee6] | 29 | |
---|
[425f6cfa] | 30 | arm-rtems4.12-gcc (GCC) 6.1.1 20160526 + Newlib 2.4.0.20160527 + Binutils 2.26.20160125 |
---|
[4407ee6] | 31 | |
---|
| 32 | CFLAGS="-O2 -pipe" LDFLAGS=-s \ |
---|
[425f6cfa] | 33 | ../../../src/gcc-6.1/configure --target=arm-rtems4.12 --prefix=/usr \ |
---|
[4407ee6] | 34 | --enable-languages=c,c++ \ |
---|
| 35 | --disable-libstdcxx-pch \ |
---|
| 36 | --with-gnu-ld \ |
---|
| 37 | --with-gnu-as \ |
---|
| 38 | --enable-threads \ |
---|
| 39 | --enable-target-optspace \ |
---|
| 40 | --with-system-zlib \ |
---|
| 41 | --verbose \ |
---|
| 42 | --disable-nls --without-included-gettext \ |
---|
| 43 | --disable-win32-registry \ |
---|
| 44 | --with-newlib \ |
---|
| 45 | --enable-plugin \ |
---|
| 46 | --enable-newlib-io-c99-formats \ |
---|
| 47 | --enable-version-specific-runtime-libs \ |
---|
| 48 | --enable-newlib-iconv \ |
---|
| 49 | --disable-lto \ |
---|
[425f6cfa] | 50 | --disable-lto \ |
---|
| 51 | --enable-libgomp \ |
---|
| 52 | --enable-newlib-iconv \ |
---|
| 53 | --enable-newlib-iconv-encodings="iso_8859_1,utf_8" \ |
---|
| 54 | |
---|
| 55 | All patches required for Cortex-R and big-endian ARM support are already |
---|
| 56 | integrated in GCC the mainline. |
---|
| 57 | |
---|
| 58 | RTEMS build configuration used for testing of self contained |
---|
| 59 | applications to run directly from Flash |
---|
[4407ee6] | 60 | |
---|
[425f6cfa] | 61 | ../../../src/rtems/configure --target=arm-rtems4.12 --prefix=/opt/rtems4.12 \ |
---|
| 62 | --enable-rtems-inlines --disable-multiprocessing --enable-cxx \ |
---|
| 63 | --enable-rdbg --enable-maintainer-mode --enable-tests=samples \ |
---|
| 64 | --disable-networking --enable-posix --enable-itron --disable-ada \ |
---|
| 65 | --disable-expada --disable-multilib --disable-docs \ |
---|
| 66 | --enable-rtemsbsp="tms570ls3137_hdk" \ |
---|
| 67 | --enable-rtems-debug \ |
---|
| 68 | TMS570_USE_HWINIT_STARTUP=1 |
---|
[4407ee6] | 69 | |
---|
| 70 | Execution |
---|
[425f6cfa] | 71 | --------- |
---|
[4407ee6] | 72 | |
---|
[425f6cfa] | 73 | Application build by above process can be directly programmed |
---|
| 74 | into Flash and run. |
---|
[4407ee6] | 75 | |
---|
[425f6cfa] | 76 | For test and debug purposes, TI's HalCoGen generated application |
---|
| 77 | is used to set up the board and then the RTEMS application |
---|
| 78 | image is loaded using OpenOCD to internal EEC SRAM or external SDRAM. |
---|
| 79 | This prevents wear of Flash which has limited guaranteed |
---|
| 80 | erase cycles count. |
---|
| 81 | |
---|
| 82 | The following features are implemented in the BSP only partially: |
---|
| 83 | |
---|
| 84 | + Initial CPU and peripheral initialization |
---|
[4407ee6] | 85 | + Cores Self-test |
---|
| 86 | |
---|
| 87 | Setup application code is available there: |
---|
| 88 | https://github.com/hornmich/tms570ls3137-hdk-sdram |
---|
| 89 | |
---|
[425f6cfa] | 90 | TMDS570LS31HDK setup to use SDRAM to load and debug RTEMS applications |
---|
| 91 | ----------------------------------------------------------------------- |
---|
[4407ee6] | 92 | |
---|
[425f6cfa] | 93 | o Program SDRAM_SCI_configuration-program or another boot loader |
---|
| 94 | (for example ETHERNET XCP is developed) |
---|
[4407ee6] | 95 | o write BSP application either to sdram or intram and jump to RTEMS start code |
---|
| 96 | |
---|
[425f6cfa] | 97 | ETHERNET |
---|
| 98 | -------- |
---|
| 99 | |
---|
| 100 | For ETHERNET, the lwIP port for TMS570LS3137 has been developed |
---|
| 101 | at Industrial Informatics Group of Czech Technical University |
---|
| 102 | in Prague and development versions are available on SourceForge. |
---|
| 103 | |
---|
| 104 | The RTEMS and TMS570 support is included in uLAN project lwIP |
---|
| 105 | repository for now |
---|
| 106 | |
---|
| 107 | https://sourceforge.net/p/ulan/lwip-omk/ |
---|
| 108 | |
---|
| 109 | But other place should be found when RTEMS lwIP |
---|
| 110 | integration with read, write, close etc. functions |
---|
| 111 | is implemented in future. |
---|
| 112 | |
---|
| 113 | Adapt BSP for another TMS570 based hardware |
---|
| 114 | ------------------------------------------- |
---|
| 115 | |
---|
| 116 | When TMS570_USE_HWINIT_STARTUP=1 then quite complete |
---|
| 117 | initialization and selft-test code is included in TMS570 |
---|
| 118 | BSP build. The support included in hwinit subdirectory |
---|
| 119 | provides version of bsp_start_hook_0 and bsp_start_hook_1 |
---|
| 120 | which proceeds many self-tests functions, clocks, PLLs |
---|
| 121 | peripherals and other subsystems configuration. |
---|
| 122 | |
---|
| 123 | Complete pin multiplexer initialization according |
---|
| 124 | to the list of individual pins functions is included. |
---|
| 125 | Pins function definition can be found and altered |
---|
| 126 | in a file |
---|
| 127 | |
---|
| 128 | rtems/c/src/lib/libbsp/arm/tms570/hwinit/init_pinmux.c |
---|
| 129 | |
---|
| 130 | Complete "database" of all possible pin functions for |
---|
| 131 | TMS570LS3137 chip is provided in a file |
---|
| 132 | |
---|
| 133 | rtems/c/src/lib/libbsp/arm/tms570/include/tms570ls3137zwt-pins.h |
---|
| 134 | |
---|
| 135 | If another package or chip is considered then tools found |
---|
| 136 | in next repository can be used or extended to generate header |
---|
| 137 | files and pins "database" |
---|
| 138 | |
---|
| 139 | https://github.com/AoLaD/rtems-tms570-utils |
---|
| 140 | |
---|
| 141 | Links to additional information |
---|
| 142 | ------------------------------- |
---|
| 143 | |
---|
| 144 | Additional information about the BSP and board can be found at |
---|
| 145 | https://devel.rtems.org/wiki/TBR/BSP/Tms570 |
---|
[4407ee6] | 146 | |
---|
| 147 | Additional information about the CPU can be found at |
---|
| 148 | http://www.ti.com/product/tms570ls3137 |
---|