devmem2 | devmem2 - simple program to read/write from/to any location

 by   radii C Version: Current License: GPL-2.0

kandi X-RAY | devmem2 Summary

kandi X-RAY | devmem2 Summary

devmem2 is a C library. devmem2 has no bugs, it has no vulnerabilities, it has a Strong Copyleft License and it has low support. You can download it from GitHub.

A github mirror (and potential place to collect improvements) for the devmem2 utility. Originally written by, and hosted at, www.lartmaker.nl/lartware/ .
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              devmem2 has a low active ecosystem.
              It has 12 star(s) with 6 fork(s). There are 5 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              devmem2 has no issues reported. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of devmem2 is current.

            kandi-Quality Quality

              devmem2 has no bugs reported.

            kandi-Security Security

              devmem2 has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              devmem2 is licensed under the GPL-2.0 License. This license is Strong Copyleft.
              Strong Copyleft licenses enforce sharing, and you can use them when creating open source projects.

            kandi-Reuse Reuse

              devmem2 releases are not available. You will need to build from source code and install.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of devmem2
            Get all kandi verified functions for this library.

            devmem2 Key Features

            No Key Features are available at this moment for devmem2.

            devmem2 Examples and Code Snippets

            No Code Snippets are available at this moment for devmem2.

            Community Discussions

            QUESTION

            Reading Armv8-A registers with devmem from GNU/Linux shell
            Asked 2020-Feb-06 at 07:52

            I want to read the values of some Cortex-A53 registers, such as

            • D_AA64ISAR0_EL1 (AArch64)
            • ID_ISAR5 (Aarch32)
            • ID_ISAR5_EL1 (Aarch64)

            Unfortunately, I lack a little embedded/assembly experience. The documentation reveals

            To access the ID_AA64ISAR0_EL1: MRS , ID_AA64ISAR0_EL1 ; Read ID_AA64ISAR0_EL1 into Xt ID_AA64ISAR0_EL1[31:0] can be accessed through the internal memory-mapped interface and the external debug interface, offset 0xD30.

            I decided to utilize devmem2 on my target (since busybox does not include the devmem applet). Is the following procecure correct to read the register?

            ...

            ANSWER

            Answered 2020-Feb-05 at 20:36

            Disclaimer: I am not an Aarch64 expert, but I am currently learning about the architecture and have read a bit.

            You cannot read ID_AA64ISAR0_EL1, ID_ISAR5_EL1 nor ID_ISAR5 from a user-mode application running at EL0: the _EL1 suffix means than running at least at EL1 is required in order to be allowed to read those two registers.

            You may find helpful to read the pseudo-code in the arm documentation here and here. In the case of ID_ISAR5 for example, the pseudo-code is very explicit:

            Source https://stackoverflow.com/questions/60071590

            QUESTION

            How to calculate MMIO GPIO addresses for devmem2/mmap
            Asked 2019-Sep-01 at 15:10

            I am trying to access some MMIO GPIO addresses for LED control and battery monitoring. But I am not sure how to calculate the right addresses.

            The documentation states the following:

            ...

            ANSWER

            Answered 2019-Sep-01 at 15:10

            I don't understand how they got 0xD0C506A0 exactly, but only to the extent I don't understand why it's in the address starting with 0xD0000000 to start with.

            You have an error in how you're calculating everything else. The << operator has higher precedence than +, so the equation should be parenthesized as COMMUNITY_BASE + (PORT ID << 16) + 0x500. Calculating PORT_ID << 16 for the port in question yields COMMUNITY_BASE + 0xC50000 + 0x500 = COMMUNITY_BASE + 0xC50500. To that you add the red user 1 LED offset of 0x1A0 to get COMMUNITY_BASE + 0xC506A0.

            I mostly do ARM architectures at this level, so I don't understand how the device 0x0D information gets turned into COMMUNITY_BASE being 0xD0000000, but there you have it.

            If you look at the documentation you'll also see that the address is write-only ("output"), which explains why you're unable to read from the example address. If you're unfamiliar with using write-only GPIO registers, they aren't that uncommon. The usual approach is to either just not read them, or to maintain an in-memory copy of what you think they SHOULD be, then abstract the object so that you "read" from your private value of the register and "write" to the actual GPIO pin and update your private value.

            Source https://stackoverflow.com/questions/57635659

            QUESTION

            Use vivante GPU on IMX6 with 4.14 kernel
            Asked 2018-Nov-22 at 11:23

            I am working on IMX6QP with yocto rocko / Linux 4.14.24 and I am trying to use the GPU.

            My yocto configuration file :

            ...

            ANSWER

            Answered 2018-Nov-22 at 11:23

            I see you are using the KaRo TX6QP, too. I've managed to get eglfs with QT5 running on TX6DL/TX6S/TX6QP.

            For the newer Kernels (e.g. mainline) you don't want the deprecated vivante-gpu-driver. Toss that out of your local.conf! You want (or need) the community-developed mesa-etnaviv driver for your Kernel and QP-Board.

            Only three Steps are needed, since meta-karo already enabled mesa for all boards like you pasted from the meta-karo/conf/machine/include/tx-base.inc

            1. Enable QT5-Mesa-Support

            In your own meta-layer create the file recipes-qt5/qt5/qtbase_%.bbappend with the following content:

            Source https://stackoverflow.com/questions/53041843

            QUESTION

            During SDK build: environment-setup.d/ conflicts between attempted installs
            Asked 2018-Feb-28 at 09:40

            I am trying to build an image for beaglebone that contains Qt5, as well as generate the SDK for this image.

            Problem

            my problem is, that the build fails the do_populate_sdk task to create the SDK with the following error:

            Error: Transaction check error: file /opt/poky/2.3.1/sysroots/x86_64-pokysdk-linux/environment-setup.d conflicts between attempted installs of nativesdk-cmake-3.7.2-r0.x86_64_nativesdk and nativesdk-qtbase-tools-5.8.0+git0+49dc9aa409-r0.x86_64_nativesdk

            A little further up the stream I encountered the following error message:

            ERROR: Could not invoke dnf. Command '/home/ubuntu/workspace/bbb/build-toaster-2/tmp/work/my_machine-poky-linux-gnueabi/my-image-dev/1.0-r0/recipe-sysroot-native/usr/bin/dnf [...] ' returned 1:
            Added oe-repo repo from file:///home/ubuntu/workspace/bbb/build-toaster-2/tmp/work/my-machine-poky-linux-gnueabi/my-image-dev/1.0-r0/oe-rootfs-repo.
            Last metadata expiration check: 0:00:00 ago on Wed Aug 16 11:47:27 2017 UTC.
            Dependencies resolved.

            What I have

            To configure my image I followed the advice here as well as similar posts stating the same elsewhere on the web. This is my (shortened and slightly redacted) image bb-file:

            ...

            ANSWER

            Answered 2017-Aug-28 at 12:27

            Edit: Anders' answer provides a more elegant solution by switching the packaging class. If you can, check out his approach before trying this workaround.

            I found a workaround that worked for me but is no ideal solution. I am posting it anyway, in case it helps someone:

            I figured out, that the nativesdk-cmake package somehow collided with the Qt one. Therefor I created a nativesdk-packagegroup-sdk-host.bbappend file in my custom layer, with the following content:

            Source https://stackoverflow.com/questions/45716949

            QUESTION

            How do I handle fixes for bugs, that have not been made part of a version branch?
            Asked 2017-Jun-02 at 13:24

            Currently, I work on creating a yocto image for the beaglebone black, using the morty branch. I followed the tutorial here, mostly successful. At some point I encountered the following error:

            Fetcher failure for URL: 'http://www.lartmaker.nl/lartware/port/devmem2.c'. Checksum mismatch! File: '/home/user/bbb/downloads/devmem2.c' has md5 checksum e23f236e94be4c429aa1ceac0f01544b when be12c0132a1ae118cbf5e79d98427c1d was expected [...]

            I did some research, and found that this problem is known, and fixed with this commit to the meta-openembedded repo - it occurred because of changes in the devmem2 code. As the fixing commit was made to the master branch, I decided to override my local morty copy of devmem2.bb. Doing so worked fine, and I was able to download and compile my image from command line using bitbake qt5-image.

            After doing so, I decided to give Toaster a go. I added the required layers to a new Toaster project and ran a build of the qt5-image (which is part of the meta-bbb layer). However, I ran into the same error as before, as Toaster downloads its own copies of the repositories. I tried doing the same as before, overriding the devmem2.bb - without success, as Toaster checks out the current version from the VCS and therefore reverts my changes.

            Now, what I want to know is what would be the correct way of action, or what are my options?

            Openembedded advises to write to the mailing list in cases of checksum errors. But I am hesitant about this, as it is not really an open problem anymore and I don't exactly know what I am doing. But manually overriding recipes is dangerous and feels just plain wrong; even while working.

            Obviously, I am still new to yocto and even newer to Toaster, so this problem might be a beginners error (pretty sure, actually).

            ...

            ANSWER

            Answered 2017-Jun-02 at 13:24

            The recipe devmem2.bb in the branch Krogoth is broken because the mirror http://www.lartmaker.nl/lartware/port/devmem2.c is not available.

            The cleanest way to fix this issue would be to create another layer. Copy meta-openembedded/meta-oe/recipes-support/devmem2 to meta-newlayer/recipes-support/devmem2. Rename meta-newlayer/recipes-support/devmem2/devmem2.bb in devmem2.bbapend and replace everything inside it by :

            Source https://stackoverflow.com/questions/44306200

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install devmem2

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/radii/devmem2.git

          • CLI

            gh repo clone radii/devmem2

          • sshUrl

            git@github.com:radii/devmem2.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link