Changes between Version 12 and Version 13 of GSoC/2017/RTEMSTesterImprovements


Ignore:
Timestamp:
May 24, 2017, 1:51:52 PM (2 years ago)
Author:
Tanu Hari Dixit
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GSoC/2017/RTEMSTesterImprovements

    v12 v13  
    2828=== Handling macro values like %{_rtscripts}: ===
    2929We will use RawConfigParser to parse the macros from INI files. It handles %(value) and %{value} both as format specification.
     30rtemstoolkit/configuration.py has support for interpolation and extrapolation. It smoothens out the hard work of parsing ini files across hosts (and Python versions).
    3031=== Handling those macro files that need user-specific things ===
    3132We plan on taking assistance from a user-specified "settings" file that can help the main configuration file with user-specifics. THe ini file should have some defaults that lead to suitable errors which the user can rectify in the settings file.
    3233=== Macro Maps ===
    3334The macro maps are like namespaces and shouldn't be mixed for re-usability in different macro files for different BSPs.
    34 
     35=== Format ===
     36
     37I am adding an informal explanation here. I'll soon come up with a ReST document for this :)
     38
     39I have segregated the macro files on the basis of their similarity (or complexity):
     40
     41The simple ones are (Set 1):
     42
     43arm7tdmi.mc
     44arm7tdmi-run.mc
     45arm920.mc
     46arm920-run.mc
     47arm1136jfs.mc
     48arm1136jfs-run.mc
     49arm1136js.mc
     50arm1136js-run.mc
     51armcortexa9.mc
     52armcortexa9-run.mc
     53erc32.mc
     54erc32-run.mc
     55h8sxsim.mc
     56h8sxsim-run.mc
     57leon2.mc
     58leon2-run.mc
     59leon3.mc
     60leon3-run.mc
     61m32csim.mc
     62m32csim-run.mc
     63simsh1.mc
     64simsh1-run.mc
     65simsh2.mc
     66simsh2-run.mc
     67simsh2e.mc
     68simsh2e-run.mc
     69simsh4.mc
     70simsh4-run.mc
     71sis.mc
     72sis-run.mc
     73v850e1sim.mc
     74v850e1sim-run.mc
     75v850e2sim.mc
     76v850e2sim-run.mc
     77v850e2v3sim.mc
     78v850e2v3sim-run.mc
     79v850esim.mc
     80v850esim-run.mc
     81v850essim.mc
     82v850essim-run.mc
     83v850sim.mc
     84v850sim-run.mc
     85
     86We can convert the .mc file .ini on the basis of the following pattern:
     87arm7tdmi.mc -->
     88{{{
     89[global]
     90bsp:                 none,    none,     'arm7tdmi'
     91
     92[arm7tdmi]
     93arm7tdmi:                 none,    none,     '%{_rtscripts}/gdb.cfg'
     94arm7tdmi_arch:            none,    none,     'arm'
     95gdb_script:          none,    none,     'arm7tdmi_gdb_script'
     96arm7tdmi_gdb_script:      none,    none,     '''target sim
     97                                           load
     98                                           run'''
     99}}}
     100arm7tdmi.ini -->
     101{{{
     102[bsp]
     103bsp = 'arm7tdmi'
     104gdb = '%{_rtscripts}/gdb.cfg'
     105arch = 'arm'
     106
     107[gdb_script]
     108gdb_script ='arm7tdmi_gdb_script'
     109arm7tdmi_gdb_script =   'target sim
     110    load
     111    run'
     112}}}
     113
     114arm7tdmi-run.mc -->
     115{{{
     116 [global]
     117bsp:              none,    none,     'arm7tdmi'
     118
     119[arm7tdmi]
     120arm7tdmi:              none,    none,     '%{_rtscripts}/run.cfg'
     121arm7tdmi_arch:         none,    none,     'arm'
     122bsp_run_cmd:      none,    none,     '%{rtems_tools}/%{bsp_arch}-rtems%{rtems_version}-run'
     123bsp_run_opts:     none,    none,     '-a -nouartrx'
     124}}}
     125arm7tdmi-run.ini -->
     126{{{
     127[bsp]
     128bsp = 'arm7tdmi'
     129
     130[run]
     131run = '%{_rtscripts}/run.cfg'
     132arch = 'arm'
     133bsp_run_cmd = '%{rtems_tools}/%{bsp_arch}-rtems%{rtems_version}-run'
     134bsp_run_opts = '-a -nouartrx'
     135}}}
     136
     137The following macro files are similar to Set 1 except that their gdb_script is a bit different:
     138
     139bf537Stamp.mc
     140bf537Stamp-run.mc
     141jmr3904.mc
     142jmr3904-run.mc
     143leon3_tsim.mc
     144lm32_evr_gdbsim.mc
     145psim.mc
     146
     147Another set is the set of macro files for simulation on qemu (Set 2):
     148
     149generic_or1k.mc
     150realview_pbx_a9_qemu.mc
     151xilinx_zynq_a9_qemu.mc
     152xilinx_zynq_a9_qemu_smp.mc
     153xilinx_zynq_zc706_qemu.mc
     154
     155These can be converted as per following:
     156generic_or1k.mc -->
     157{{{
     158[global]
     159bsp:                      none,    none,     'generic_or1k'
     160
     161[generic_or1k]
     162generic_or1k:      none,    none,  '%{_rtscripts}/qemu.cfg'
     163generic_or1k_arch: none,    none,  'or32'
     164generic_or1k_opts: none,    none,  '%{qemu_opts_base} %{qemu_opts_no_net} -m 32M'
     165}}}
     166
     167generic_or1k.ini -->
     168{{{
     169[bsp]
     170bsp = 'generic_or1k'
     171
     172[qemu-script]
     173run = '%{_rtscripts}/qemu.cfg'
     174arch = 'or32'
     175opts = '%{qemu_opts_base} %{qemu_opts_no_net} -m 32M'
     176}}}
     177Next is the set of macro files which are particularly difficult, because they require user specific information (Set 3):
     178
     179beagleboardxm.mc
     180mcf5235.mc //might require tty settings
     181xilinx_zynq_zc706.mc
     182
     183These can be converted as following:
     184
     185xilinx_zynq_zc706.mc -->
     186{{{
     187[global]
     188bsp:                          none,    none,   'xilinx_zynq_zc706'
     189jobs:                         none,    none,   '1'
     190
     191[xilinx_zynq_zc706]
     192xilinx_zynq_zc706:            none,    none,   '%{_rtscripts}/gdb.cfg'
     193xilinx_zynq_zc706_arch:       none,    none,   'arm'
     194#bsp_tty_dev:                  none,    none,   '/dev/cuaU0'
     195bsp_tty_dev:                  none,    none,   '/dev/cu.SLAB_USBtoUART'
     196gdb_script:                   none,    none,   'xilinx_zynq_zc706_gdb_script'
     197xilinx_zynq_zc706_gdb_script: none,    none,   '''target remote kaka:3333
     198mon load_image /home/chris/development/si/work/hydra/boot/xilinx-zynq-fsbl/build/arm-rtems4.11-xilinx_zynq_zc706/hydra-fsbl.elf 0 elf
     199                                                  mon resume 0
     200                                                  mon sleep 4000
     201                                                  mon halt
     202                                                  load
     203                                                  b bsp_reset
     204                                                  continue'''
     205}}}
     206
     207xilinx_zynq_zc706.ini -->
     208{{{
     209[bsp]
     210bsp =  'xilinx_zynq_zc706'
     211jobs = '1'
     212
     213[gdb-script]
     214gdb =  '%{_rtscripts}/gdb.cfg'
     215arch =  'arm'
     216bsp_tty_dev =  '/dev/tty0'
     217gdb_script =  'xilinx_zynq_zc706_gdb_script'
     218xilinx_zynq_zc706_gdb_script =  'target remote kaka:3333
     219mon load_image /path/to/elf.elf 0 elf
     220    mon resume 0
     221    mon sleep 4000
     222    mon halt
     223    load
     224    b bsp_reset
     225    continue'
     226}}}