[PATCH 0/5] arm/tms570: include hardware initialization and selftests to run RTEMS directly from Flash without loader on TMS570LS3137 HDK.
pisa at cmp.felk.cvut.cz
pisa at cmp.felk.cvut.cz
Mon Sep 12 21:47:25 UTC 2016
From: Pavel Pisa <pisa at cmp.felk.cvut.cz>
The code introduces initialization algorithms bases on Ti HalCoGen
generated files. The most of the code has been rewritten to use
RTEMS much more complete header files. This allowed to replace most
of the hardcoded hexadecimal values by appropriate fields macros documenting
how values are build.
The parity self-tests have been rewritten completely to minimize
code duplication. The solution is much better prepared to cover
variations of integrated peripherals between different Hercules
family chips.
The pin multiplexer code is written from scratch and complete
pin alternative functions "database" is included for easy
preparation of configurations for different chips and even
runtime pin functions changes.
Original Ti HalCoGen generated files include a BSD-like license.
It has been preserved where the file is mostly based Ti code.
Some other smaller (mostly rewritten) fragments are without
copyright header for now.
The code is reformatted to conform RTEMS coding style mostly.
There are left some original functions names and comments
using C++ delimiters "//". I expect to remove them in long
term perspective. But I would like to use them for matching
code and algorithms with other chip family members code
generated by HalCoGen. When two or three variants are fully
supported then we learn how to write support portable
and configurable way in the C code and these remarks would
not be required anymore.
The code taking care about internal SRAM parity self-test
is disabled for now because it clashes with code testing
for internal RAM linking variant. The MPU initialization
is missing as well. It would be required to use external
SDRAM for code.
Generally, there is much work required still to make BSP
full industry grade one. But I think that actual state
is the great step forward and work worth to be included
in RTEMS mainline in the actual state to simplify testing
and be base for new projects.
The second patch is quite huge so if it does not pass
through list then it can be accessed on GitHub
The branch: https://github.com/AoLaD/rtems/commits/tms570-bsp
Patch 2/5: https://github.com/AoLaD/rtems/commit/9d06f3be64f9b5e9e1988163762b613daba0963c
Pavel Pisa (5):
arm/tms570: define base addresses of all TMS570LS3137 SPI interfaces.
arm/tms570: include hardware initialization and selftest based on Ti
HalCoGen generated files.
arm/tms570: include TMS570_USE_HWINIT_STARTUP option to select bare
metal startup and selftest.
arm/tms570: document BSP setup with included hardware initialization.
arm/tms570: update bootstrap generated preinstall.am
c/src/lib/libbsp/arm/tms570/Makefile.am | 21 +
c/src/lib/libbsp/arm/tms570/README | 104 +++-
c/src/lib/libbsp/arm/tms570/configure.ac | 4 +
.../arm/tms570/hwinit/bspstarthooks-hwinit.c | 393 ++++++++++++++
.../libbsp/arm/tms570/hwinit/fail_notification.c | 17 +
.../lib/libbsp/arm/tms570/hwinit/init_emif_sdram.c | 59 +++
c/src/lib/libbsp/arm/tms570/hwinit/init_esm.c | 50 ++
c/src/lib/libbsp/arm/tms570/hwinit/init_pinmux.c | 195 +++++++
c/src/lib/libbsp/arm/tms570/hwinit/init_system.c | 380 +++++++++++++
c/src/lib/libbsp/arm/tms570/hwinit/tms570_hwinit.h | 23 +
.../libbsp/arm/tms570/hwinit/tms570_parity_can.c | 60 +++
.../arm/tms570/hwinit/tms570_parity_mibspi.c | 72 +++
.../libbsp/arm/tms570/hwinit/tms570_parity_std.c | 55 ++
.../libbsp/arm/tms570/hwinit/tms570_parity_tests.c | 273 ++++++++++
.../libbsp/arm/tms570/hwinit/tms570_parity_tests.h | 75 +++
.../lib/libbsp/arm/tms570/hwinit/tms570_selftest.c | 589 +++++++++++++++++++++
.../lib/libbsp/arm/tms570/hwinit/tms570_selftest.h | 156 ++++++
.../lib/libbsp/arm/tms570/hwinit/tms570_sys_core.S | 575 ++++++++++++++++++++
c/src/lib/libbsp/arm/tms570/include/tms570.h | 6 +-
c/src/lib/libbsp/arm/tms570/preinstall.am | 13 +
20 files changed, 3097 insertions(+), 23 deletions(-)
create mode 100644 c/src/lib/libbsp/arm/tms570/hwinit/bspstarthooks-hwinit.c
create mode 100644 c/src/lib/libbsp/arm/tms570/hwinit/fail_notification.c
create mode 100644 c/src/lib/libbsp/arm/tms570/hwinit/init_emif_sdram.c
create mode 100644 c/src/lib/libbsp/arm/tms570/hwinit/init_esm.c
create mode 100644 c/src/lib/libbsp/arm/tms570/hwinit/init_pinmux.c
create mode 100644 c/src/lib/libbsp/arm/tms570/hwinit/init_system.c
create mode 100644 c/src/lib/libbsp/arm/tms570/hwinit/tms570_hwinit.h
create mode 100644 c/src/lib/libbsp/arm/tms570/hwinit/tms570_parity_can.c
create mode 100644 c/src/lib/libbsp/arm/tms570/hwinit/tms570_parity_mibspi.c
create mode 100644 c/src/lib/libbsp/arm/tms570/hwinit/tms570_parity_std.c
create mode 100644 c/src/lib/libbsp/arm/tms570/hwinit/tms570_parity_tests.c
create mode 100644 c/src/lib/libbsp/arm/tms570/hwinit/tms570_parity_tests.h
create mode 100644 c/src/lib/libbsp/arm/tms570/hwinit/tms570_selftest.c
create mode 100644 c/src/lib/libbsp/arm/tms570/hwinit/tms570_selftest.h
create mode 100644 c/src/lib/libbsp/arm/tms570/hwinit/tms570_sys_core.S
--
1.9.1
More information about the devel
mailing list