{"id":19571837,"url":"https://github.com/kylemanna/pydevmem","last_synced_at":"2025-04-27T03:32:47.559Z","repository":{"id":1936512,"uuid":"2865493","full_name":"kylemanna/pydevmem","owner":"kylemanna","description":"Python interface to /dev/mem","archived":false,"fork":false,"pushed_at":"2020-10-27T04:18:56.000Z","size":37,"stargazers_count":51,"open_issues_count":5,"forks_count":29,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-04T20:51:26.262Z","etag":null,"topics":["devmem","embedded","embedded-systems","linux","memory","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kylemanna.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-11-28T06:52:24.000Z","updated_at":"2025-03-27T09:24:12.000Z","dependencies_parsed_at":"2022-07-10T02:00:40.094Z","dependency_job_id":null,"html_url":"https://github.com/kylemanna/pydevmem","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylemanna%2Fpydevmem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylemanna%2Fpydevmem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylemanna%2Fpydevmem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylemanna%2Fpydevmem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kylemanna","download_url":"https://codeload.github.com/kylemanna/pydevmem/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251085145,"owners_count":21533821,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["devmem","embedded","embedded-systems","linux","memory","python"],"created_at":"2024-11-11T06:20:40.769Z","updated_at":"2025-04-27T03:32:45.556Z","avatar_url":"https://github.com/kylemanna.png","language":"Python","readme":"Python DevMem\n=============\n\n[![](https://img.shields.io/pypi/v/devmem.svg?maxAge=3600)](https://pypi.org/project/devmem/)\n\nThis is designed primarily for use with accessing /dev/mem on OMAP platforms.\nIt should work on other platforms and work to mmap() files rather then just\n/dev/mem, but these use cases aren't well tested.\n\nAll file accesses are aligned to DevMem.word bytes, which is 4 bytes on ARM\nplatforms to avoid data abort faults when accessing peripheral registers.\n\nUsage\n-----\n\n    Usage: devmem.py [options]\n\n    Options:\n      -h, --help            show this help message and exit\n      -r ADDR, --read=ADDR  read a value\n      -w ADDR VALUE, --write=ADDR VALUE\n    \t\t\t\t\t\twrite a value\n      -n NUM, --num=NUM     number of words to read\n      -s WORD_SIZE, --word-size=WORD_SIZE\n    \t\t\t\t\t\tsize of word when displayed\n      -m FILE, --mmap=FILE  file to open with mmap()\n      -v                    provide more information regarding operation\n      -d                    provide debugging information\n\n\nSpeed\n-----\n\nInitial testing on a BeagleBoard-xM (Cortex-A8 in a TI DM3730) shows that\nstarting up the python interpreter is pretty slow:\n\n    # time (echo | python)\n\n    real    0m0.859s\n    user    0m0.750s\n    sys     0m0.102s\n\n    # time python ./pydevmem.py -r 0x4830a204 -n 8\n    0x4830a204:   1b89102f  00000000  00000000  000000f0\n    0x4830a214:   cafeb891  0c030016  015739eb  1ff00000\n\n    real    0m1.109s\n    user    0m0.977s\n    sys     0m0.133s\n\n    # time python -S ./pydevmem.py -r 0x4830a204 -n 8\n    0x4830a204:   1b89102f  00000000  00000000  000000f0\n    0x4830a214:   cafeb891  0c030016  015739eb  1ff00000\n\n    real    0m0.659s\n    user    0m0.602s\n    sys     0m0.047s\n\n    # time python -S ./pydevmem.pyc -r 0x4830a204 -n 8\n    0x4830a204:   1b89102f  00000000  00000000  000000f0\n    0x4830a214:   cafeb891  0c030016  015739eb  1ff00000\n\n    real    0m0.647s\n    user    0m0.508s\n    sys     0m0.133s\n\n\nSystem information for those tests:\n\n    Linux omap 3.0.6-x3 #1 SMP Wed Oct 5 07:19:24 UTC 2011 armv7l GNU/Linux\n\n    python              2.7.2-7ubuntu2\n    python-configobj    4.7.2+ds-3\n    python-minimal      2.7.2-7ubuntu2\n    python2.7           2.7.2-5ubuntu1\n    python2.7-minimal   2.7.2-5ubuntu1\n\nSomething needs to be sped up to make python start-up in a reasonable amount\nof time.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkylemanna%2Fpydevmem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkylemanna%2Fpydevmem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkylemanna%2Fpydevmem/lists"}