source: rtems/c/src/lib/libbsp/arm/tms570/README @ 9935c23

Last change on this file since 9935c23 was 425f6cfa, checked in by Pavel Pisa <pisa@…>, on Sep 22, 2016 at 7:56:06 AM

arm/tms570: document BSP setup with included hardware initialization.

  • Property mode set to 100644
File size: 5.2 KB
Line 
1Development Board: TMS570LS31x Hercules Development Kit from TI
2
3http://www.ti.com/tool/tmds570ls31hdk
4
5Overview
6--------
7
8Drivers:
9
10  o Console
11  o Clock
12  o Ethernet - external lwIP fork repository
13
14BSP 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
17  tms570ls3137_hdk_with_loader - reserve 256kB at Flash start for loader
18                                 and place RTEMS application from address
19                                 0x00040000
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
27Tool-chain used for development
28-------------------------------
29
30  arm-rtems4.12-gcc (GCC) 6.1.1 20160526 + Newlib 2.4.0.20160527 + Binutils 2.26.20160125
31
32  CFLAGS="-O2 -pipe" LDFLAGS=-s \
33  ../../../src/gcc-6.1/configure --target=arm-rtems4.12 --prefix=/usr \
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 \
50               --disable-lto \
51               --enable-libgomp \
52               --enable-newlib-iconv \
53               --enable-newlib-iconv-encodings="iso_8859_1,utf_8" \
54
55All patches required for Cortex-R and big-endian ARM support are already
56integrated in GCC the mainline.
57
58RTEMS build configuration used for testing of self contained
59applications to run directly from Flash
60
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
69
70Execution
71---------
72
73Application build by above process can be directly programmed
74into Flash and run.
75
76For test and debug purposes, TI's HalCoGen generated application
77is used to set up the board and then the RTEMS application
78image is loaded using OpenOCD to internal EEC SRAM or external SDRAM.
79This prevents wear of Flash which has limited guaranteed
80erase cycles count.
81
82The following features are implemented in the BSP only partially:
83
84 + Initial CPU and peripheral initialization
85 + Cores Self-test
86
87Setup application code is available there:
88          https://github.com/hornmich/tms570ls3137-hdk-sdram
89
90TMDS570LS31HDK setup to use SDRAM to load and debug RTEMS applications
91-----------------------------------------------------------------------
92
93  o Program SDRAM_SCI_configuration-program or another boot loader
94    (for example ETHERNET XCP is developed)
95  o write BSP application either to sdram or intram and jump to RTEMS start code
96
97ETHERNET
98--------
99
100For ETHERNET, the lwIP port for TMS570LS3137 has been developed
101at Industrial Informatics Group of Czech Technical University
102in Prague and development versions are available on SourceForge.
103
104The RTEMS and TMS570 support is included in uLAN project lwIP
105repository for now
106
107  https://sourceforge.net/p/ulan/lwip-omk/
108
109But other place should be found when RTEMS lwIP
110integration with read, write, close etc. functions
111is implemented in future.
112
113Adapt BSP for another TMS570 based hardware
114-------------------------------------------
115
116When TMS570_USE_HWINIT_STARTUP=1 then quite complete
117initialization and selft-test code is included in TMS570
118BSP build. The support included in hwinit subdirectory
119provides version of bsp_start_hook_0 and bsp_start_hook_1
120which proceeds many self-tests functions, clocks, PLLs
121peripherals and other subsystems configuration.
122
123Complete pin multiplexer initialization according
124to the list of individual pins functions is included.
125Pins function definition can be found and altered
126in a file
127
128 rtems/c/src/lib/libbsp/arm/tms570/hwinit/init_pinmux.c
129
130Complete "database" of all possible pin functions for
131TMS570LS3137 chip is provided in a file
132
133  rtems/c/src/lib/libbsp/arm/tms570/include/tms570ls3137zwt-pins.h
134
135If another package or chip is considered then tools found
136in next repository can be used or extended to generate header
137files and pins "database"
138
139  https://github.com/AoLaD/rtems-tms570-utils
140
141Links to additional information
142-------------------------------
143
144Additional information about the BSP and board can be found at
145  https://devel.rtems.org/wiki/TBR/BSP/Tms570
146
147Additional information about the CPU can be found at
148  http://www.ti.com/product/tms570ls3137
Note: See TracBrowser for help on using the repository browser.