Description
A pure python ARM emulator
Installation
Install the last released version using pip:
python3 -m pip install --user -U armulator
Or install the latest version from sources:
git clone git@github.com:matan1008/armulator.git
cd pyiosbackup
python3 -m pip install --user -U -e .
Usage
To create a processor object, you need to import it first:
from armulator.armv6.arm_v6 import ArmV6
Then you can just create it:
arm = ArmV6()
Getting familiar with the Memory controller concept is crucial for using the processor.
In short, there is one "hub" to which you can connect several controllers.
A "Memory Controller" can be a stick of RAM, Memory mapped LCD screen or whatever you wish.
For example, let's create a RAM controller:
from armulator.armv6.memory_types import RAM
from armulator.armv6.memory_controller_hub import MemoryController
mem = RAM(0x100)
mc = MemoryController(mem, 0xF0000000, 0xF0000100)
arm.mem.memories.append(mc)
Now, trying to access a memory between 0xF0000000 and 0xF0000100, will access the mem object.
You can also change the memory manually:
mem.write(0, 2, "\xfe\xe7")
Another useful feature is playing with the memory protection or management unit, for example cancelling memory protection will look like:
arm.registers.sctlr.m = 0
arm.take_reset()
Please note that after changing internal features it is recommended to reset the processor.
When running the armulator, you will probably want to start from a defined address, so:
arm.registers.branch_to(0x100)
The last thing we need to do is to really run the processor, which can be done with:
arm.emulate_cycle()
Running the tests
Running the tests can be done easily with pytest:
python3 -m pytest tests -vv
Acknowledgments
- At first, I did it to learn the ARM architecture better. I guess I was carried away.
- Feel free to report bugs.
- Feel free to ask for more features.
Metadata
Release files for armulator 1.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| armulator-1.1.3.tar.gz | 122.8 kB | Without provenance | Details for armulator-1.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| armulator-1.1.3-py3-none-any.whl | Python 3 | none | any | Details for armulator-1.1.3-py3-none-any.whl |
Total release size: 660.1 kB
Release files / armulator-1.1.3.tar.gz
| Download URL | armulator-1.1.3.tar.gz |
|---|---|
| Size | 122.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a193f43fb5863d6b65d5d0d2e3b6753cc2b619df4fd2bd15301aa32362f98325
|
|
BLAKE2b-256 checksum How to use checksums |
9fc1cb4f719288c4969dfabc6cce4af7e94523864e84429ec07ea68599044bd4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Release files / armulator-1.1.3-py3-none-any.whl
| Download URL | armulator-1.1.3-py3-none-any.whl |
|---|---|
| Size | 537.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
20933f20eb525c973c4b44f48f9604446530c43a124a79e98c2dd06ab5a49387
|
|
BLAKE2b-256 checksum How to use checksums |
8c35b71920ea55726abaf6224dcb1a8232f70aab7009801478fa1be1450fecbe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Security for armulator 1.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.