README revision 10458
1This directory contains a demo of C++ configuration of gem5.  The intention
2is to provide a mechanism to allow pre-generated config.ini files generated
3by Python-based gem5 to be reloaded in library-base versions of gem5
4embedded in other systems using C++ calls for simulation control.
5
6This demo implements a few of the simulation control mechanisms of the Python
7gem5 on top of a C++ configured system.
8
9Read main.cc for more details of the implementation.
10
11To build:
12
13First build gem5 as a library with cxx-config support and (optionally)
14without python.  Also build a normal gem5 (cxx-config not needed, Python
15needed):
16
17> cd ../..
18> scons build/ARM/gem5.opt
19> scons --with-cxx-config --without-python build/ARM/libgem5_opt.so
20> cd util/cxx_config
21
22Then edit Makefile to set the paths for PYTHON and run make
23
24> make
25
26Make a config file for the C++-configured gem5 using normal gem5
27
28> ../../build/ARM/gem5.opt ../../configs/example/se.py -c \
29>       ../../tests/test-progs/hello/bin/arm/linux/hello
30
31The binary 'gem5.opt.cxx' can now be used to load in the generated config
32file from the previous normal gem5 run.
33
34Try:
35
36> ./gem5.opt.cxx m5out/config.ini
37
38This should print:
39
40> Hello world!
41
42The .ini file can also be read by the Python .ini file reader example:
43
44> ../../build/ARM/gem5.opt ../../configs/example/read_config.py m5out/config.ini
45