unable to open /dev/mem on raspberry pi 4b - raspberry-pi

Please can anyone help?! I'm trying to read Raspberry Pi 4b GPIO pins in assembler using direct memory access, and need to open /dev/mem. I'm aspplying the info from the book "Raspberry Pi assembly language programming" by Stephen Smith. According to his book, the command for accessing /dev/mem is "openFile devmem", but it just returns " error 1b6" when I compile using gcc. If any of you clever guys can help or even provide me with a code sample to get around this problem, I'd be most grateful - really tearing my hair out trying to solve this one! Thanks, Paul.

Related

Scanning DataMatrix QR code on Raspberry PI

I am trying to scan a QR code and get the data from it on my raspberry pi.
The scanner I am using is the: DS6510b-2d
I am scanning the QR code on the picture below the post:
This QR code has separators so I can differentiate the DATA.
When I scan the QR code on Windows I get the following result:
10ABC123↔21U001273↔12040104↔3712345678
This is correct and exactly what I need.
When I scan the QR code connected to the raspberry I get the following:
10ABC12321U001273120401043712345678 Here it is missing the sepperators, this makes it impossible to differentiate the data.
How do I get it so when I scan the QR code on my raspberry it also shows the sepperators?
Thank you in advance for your help.
QR CODE:
A few ideas, though I can test none as I don't have your scanner...
You could try starting a "virtual console", see here, which is text-based and doesn't use X11, and then scanning with your scanner to see if the X11 server and keyboard mappings are "eating" your separators.
I'm not proposing this as a permanent solution, just a step in working out the issue.
Or, with X11 server started, you could run xev to see what X events are generated when you scan and potentially then use xmodmap to convert you "left right double arrow" thing into some other symbol all concerned parties can work with.
I don't use Windows but there must be a tool to get the Unicode codepoint of your "left right double arrow" thing. I guess it is U+21d4, see here.
Then you could type/generate that codepoint on the Raspberry Pi using this and see what Raspbian makes of it.

Simulating PSoC 5LP

I am working on extracting strain gauge values mounted on my ATV (front suspension) with the help of a 20 bit ADC of PSoC 5LP. Before that, I would like to simulate it. So could you please suggest an appropriate simulator? I have tried it on proteus but seems like proteus does not support cypress chips.
Thank you for reading.
I got the solution: It is to upgrade the Proteus Software (Proteus 3.10).Here, libraries are provided from the internet so no need to manually search for them.
Thank you :)

IMGLIB into yocto

I need to run C++ algorithm on gumstix using DSP image library. Without DSP, Algorithm is eating up 85% cpu with 20fps. I am trying to get TI Image Library IMGLIB on Gumstix with Yocto Project. I could not find any resources or hints how to do it.
It would be great if I can get some inputs on how to proceed with getting imglib on gumstix using yocto project/open-embedded
Should I write a recipe with bitbake or is there any other way to get IMGLIB on Gumstix?
am working on Linux
plz provide me the steps how to add IMGLIB into yocto..
am new to this plz help me regarding this.
As already mentioned meta-ti seems to have what you need[1]
[1] http://git.yoctoproject.org/cgit/cgit.cgi/meta-ti/tree/recipes-ti/imglib/imglib-c66x_3.1.1.0.bb?h=master

How to get FATfs working on Xmega A4? Not sure what I should add or what file to edit

First of all, I have already been through http://elm-chan.org, and while it has helped me, it is a bit vague (in my opinion).
I am attempting to read an SD Card with an Xmega128a4u using ASF (because the non-ASF way is too underground for me...). Anyway, although ASF has an example with the Xplained board for Xmega C3, it is not very helpful, and my attempts at porting it fail.
So, the following is what I do:
I start a Project in ASF (I'm programming in C)
I add the FATfs, SD/MMC and systemClock divers(or modules or services) to my project through ASF Wizard.
I get kind of lost... :(
I read in elm-chan's page that some sort of "glue file" but it's not very specific in what it should be. What should I #include in it or where should I #include it?
I'd appreciate some help on this as I have tried several things with no success.
you have to addapt the disk_read, disk_write, ... functions in the diskio.c file. they will connect the fatFS library with your (low-level) sd communication.
you should may first test a simple communication with the sd-card without file system.
I have the same "project" but with an arduino due board instead of Xmega and the simple communication does allready work, so I can read and write. But my problem is to addapt the FatFS correctly and I suppose that the fault can be localized in my diskio.c functions, cause they are individual.
Maybe someone has got the same problem and can help me?
Ciao
Imke

VxWorks PCI driver - compilation error

I am trying to write a PCI device driver in VXworks. Even though the source file is in place for the pciConfigLib, after compilation, it throws error stating " undefined function reference".
Any help is appreciated.
Thanks
VxNewbee
I am just going to throw this out there, but if you are in fact calling Pcifinddevice then that is wrong, you need pciFindDevice (case matters)
If that doesn't work, then from the vxworks shell can you show me the output of
lkup "pci"
Also be sure to read the device driver developers guide:
http://www.mecatronica.eesc.usp.br/wiki/upload/0/07/Vxworks_device_driver_developers_guide_6.0.pdf
It doesn't really have a good basic example of how to create a basic driver, but if you are using eclipse, then you should be able to create a new device driver project in there, it does give some good advice however, start from an existing template driver. Also there are other docs that you should be able to access from the wind river support site.
http://www.windriver.com/products/vxworks/