TMS570 BSP: RTEMS license compatible TMS570LS3137 header files progress
pisa at cmp.felk.cvut.cz
Wed Apr 1 11:01:39 UTC 2015
I would like to inform you that Premysl Houdek is near to finishing
preparation of complete registers header files for TMS570LS3137.
The register and fields definition are interactively retrieved
with help of some macro from MCU PDF manual files.
We decided to store retrieved data in JSON format.
The raw files are available in rtems-tms570-utils repository
There are examples of the final JSON files after check/review
for completeness. I.e. for CRC module
Then there is a Python script which generates RTEMS style
The single bit fields are generated as
#define TMS570_CRC_CRC_INTR_CH2_TIMEOUTENR BSP_FLD32(12)
The multibit fields should be generated as
#define TMS570_CRC_CRC_PCOUNT_REG1_CRC_PAT_COUNT1(val) BSP_FLD32(val,0, 19)
#define TMS570_CRC_CRC_PCOUNT_REG1_CRC_PAT_COUNT1_GET(reg) BSP_FLD32GET(reg,0, 19)
#define TMS570_CRC_CRC_PCOUNT_REG1_CRC_PAT_COUNT1_SET(reg,val) BSP_FLD32SET(reg, val,0, 19)
There is now mistake that GET is used once instead of SET in this example.
But that will be corrected.
It would be great amount of work to prepare complete initialization
sequence from scratch to not touch problematically licensed HalCoGen
files. But when format of header files is agreed upon it is doable.
So generally, what is your opinion about the format?
(may be that tools and approach can be reused for other chips as well)
We plan to shake-up actual RTEMS TMS570 serial port and timers
support to use proposed headers format. Then we start on HalCoGen-free
boot-up process work. So I hope we can have complete self-contained
RTEMS support mainlined one day.
The first step is to finish headers and replace initial sparse
ones in RTEMS mainline by new set. I expect that we include only
header files in RTEMS and JSONs stay in utils repo. But we are open
to other suggestions as well.
To Martin Galvan: What is your opinion? Would you join the work in
We have no contract for the work so I cannot promise any timing.
Premysl Houdek should to finish main part of the work before
his thesis submission. Which can be in two up to max eight months.
More information about the devel