TMS570 BSP updates and LwIP support
Pavel Pisa
pisa at cmp.felk.cvut.cz
Sun Nov 8 14:11:35 UTC 2015
Hello Martin and others,
I want to inform you about TMS570 BSP umpdates and discuss
possible development directions.
The discussion is related to actual state of tms570-bsp
branch in Premysl Houdek's RTEMS repository
https://github.com/AoLaD/rtems/tree/tms570-bsp
The branch is based on RTEMS-4.11 from September
for now. But rebasing to actual 4.11 is planned
soon. When we setup test environment for master
we rearrange changes to logical changes sequence
intended for inclusion to mainline.
The most of changes should/could go to 4.11 release
as well. The main changes
* corrected EMAC include files (original reg_emac.h has been mistakenly
taken from MDIO support block). The correct file for EMAC control registers
is reg_emacc.h
https://github.com/AoLaD/rtems/blob/tms570-bsp/c/src/lib/libbsp/arm/tms570/include/ti_herc/reg_emacc.h
* initial support for pin multiplexor setup has been added to allow setup
correct functions of pins used by ETHERNET controller
https://github.com/AoLaD/rtems/commit/09fcf37effd8fb7e1661c0af43d2dca009c40af5
Only functions provided are tms570_bsp_pin_set_function()
and tms570_bsp_pin_clear_function() for now.
The complete GPIO API or at least xx_gpio_set(), xx_gpio_clear(),
xx_gpio_write(), xx_gpio_get() and lpc24xx_pin_config() would be
nice in future. If the actual pin configuration should be reimplemented
to support that API or if it API should be wrapper to pinmux functions
is a question. The mapping between GPIO and actual pins is quite complex
in TMS570 case because pins are mapped by pinmux to peripherals and
in case, that given peripheral does not use given pin/terminal for
its specific purpose then peripheral includes set of registers to use
its available pins as GPIO.
I think that actual simple code is valuable and should be included
in mainline for now even if there is found time to replace it by
more complete one later.
* there are some changes used for VIM, POM and other parts debugging
and issues solving. Most of these is not intended for mainline.
* set of changes to not use exception vectors replace if it is not required
(RTEMS application image starts at address 0). When replacement is necessary,
POM is used only to deliver target addresses and not to replace jump
instructions now because instruction fetches from POM reveals to be unreliable.
All related code is amended by comprehensive comments to understand
its function and reasons why used solution has been selected
https://github.com/AoLaD/rtems/commit/7dab9093bc8211816def58460efef8958b041904
corresponding skeleton of bootup/loader code can be found in next repo
https://github.com/hornmich/tms570ls3137-hdk-sdram/blob/master/SDRAM_SCI_configuration/source/sys_intvecs.asm
I return to the loader problems in followup e-email.
TMES570 networking support. We would like to port or work from other TMS570
project to have native RTEMS included stack driver but we failed with
that because of limited time for now. Even priority to use actual RTEMS stack
has lowered due to RTEMS project global decision to prioritize LwIP
and complete new BSD stack. So we invested or time to LwIP TMS570 support.
The LwIP code with RTEMS system port and TMS570 driver included can be found
in next repository (it is/may be only temporal location). We started from
uLAN lwip-omk because it has been structured a way that we can easily
start development in environment we know/have build for other projects.
http://sourceforge.net/p/ulan/lwip-omk/ci/master/tree/
TMS570 driver location
http://sourceforge.net/p/ulan/lwip-omk/ci/master/tree/ports/driver/tms570_emac/
RTEMS system glue code for LwIP
http://sourceforge.net/p/ulan/lwip-omk/ci/master/tree/ports/os/rtems/
Test application is included in our RTEMS OM template
http://rtime.felk.cvut.cz/gitweb/rtems-devel.git
http://rtime.felk.cvut.cz/gitweb/rtems-devel.git/tree/HEAD:/rtems-omk-template/applwiptest
test application setups networking, obtains address from DHHCP and starts
TCP/IP echo server at port 23 (telnet).
Setup for TMS570 networking test
git clone git://rtime.felk.cvut.cz/rtems-devel.git
cd rtems-devel/rtems-omk-template
git clone -b master git://git.code.sf.net/p/ulan/lwip-omk lwip
ln -s config/config.tms570 config.target
# check that RTEMS_MAKEFILE_PATH points to right RTEMS BSP install location
ln -s config/config.tms570-lwip config.omk
# tune options and parameters in config.omk file
Application build in
_compiled/tms570ls3137_hdk_sdram/bin/applwiptest
is image intended for run from SDRAM, so loader, HW setup is required.
We use above mentioned tms570ls3137-hdk-sdram for debugging and load
application over OpenOCD. Scripts
https://github.com/AoLaD/rtems-tms570-utils/tree/master/openocd
OpenOCD with TMS570 adaptations and F021 support
http://cmp.felk.cvut.cz/~pisa/tms570/openocd-tms570-f021-wip.tar.gz
http://cmp.felk.cvut.cz/~pisa/tms570/openocd.configure-smirnov
Best wishes,
Pavel Pisa
More information about the devel
mailing list