Small program demonstrating the use of CSim with ARMv5T simulator.
The setup will download, configure and build required dependencies:
$ make configYou can configure CSIM by editing config.mk an then perform the setup:
$ make setupIt will download all require modules. Then you can compile CSIM:
$ makeTo generate the documentation documentation:
$ doxygenThe documentation is in html/index.html.
To launch the code, a program must be provided to the command, for instance samples/sample1.elf. Then type:
$ ./csim-run samples/sample1.elf
The current simulation simulates the program with two peripherals: a LED and a push button. They are displayed this way:
[ ] (A) HHHHHHHH <inst>
Where:
[ ]switched-off LED ([*]when it is switched on).(A)is the unpressed push button A. To press it, click on keyA. To release it, re-click on keyA.- HHHHHHHH is the adress of the current instruction.
- is the disassembled current instruction.
csim comes with a GUI developed in Python and using a browser to be displayed.
To run it, move into python directory and type:
$ cd python
$ make run NUM=numberWith number one of the number of samples in directory samples.
-
sample1.elf(sourcesample1.s) -- Switch on the LED when the button is pushed. -
sample2.elf(sourcesample2.s) -- Invert the state of the LEAD each time there is a click (a button push followed by a release).
To compile it, you need a compiled version of ARMv5T compiled in a directory in the same parent as csim. The path of ARMV5T can also be fixed in variable ARMV5T in the Makefile.
Then type the command:
$ makeTo get ARMV5T, you have to first get GLISS2 (OCAML is required):
$ git clone https://git.renater.fr/anonscm/git/gliss2/gliss2.git
$ cd gliss2
$ makeThen you can retrieve and compiole armv5r :
$ git clone https://git.renater.fr/anonscm/git/gliss2/armv5t.git
$ cd armv5t
$ makeThese directories have to be unpacked in the same parent directory.
SVG files are downloaded from FreeSVG.