Hi !
We've started testting Linux Software development with PEEK and POKE commands.
3.1 - Very Low Level access with Peek and Poke
And then we moved to the mmap system call.
3.2 - Easy Custom IP access with application development based on mmap
In this post we've seen the mmap system call is based on the /dev/mem system virtual file use.
Well, I've just discovered that the /dev/mem is also directly available from the command line using a utility application provided by BusyBox which is called devmem !
This provides us a second very low level access method with the PEEK and POKE commands.
So let's see that we can do the same things as the PEEK and POKE commands !
Stage 1
Some information about the devmem utility use.
Stage 3
Now, to force the output led to ON, we only have to do the same steps as in the LED_TEST_IP_SetLedOn function of our driver.
Remember that our custom IP LED_TEST_IP is located at the physical offset 0x43C0_0000.
Which gives.
And there you go !
The led is ON on the MiniZed board.
Stage 4
Now, to force the output led to OFF, we only have to do the same steps as in the LED_TEST_IP_SetLedOff function of our driver.
Which gives.
And there you go !
The led is OFF on the MiniZed board.
Stage 5
Now, to force the output led to BLINK, we only have to do the same steps as in the LED_TEST_IP_SetLedBlink function of our driver.
Which gives.
And there you go !
The led blinks on the MiniZed board.
Post Conclusion
Now we have :
- Used the devmem utility application from the command line to control the behavior of our custom IP.
Like the PEEK and POKE commands, this is another methode to avoid writting a single line of software !
It can be a usefull tool.
- Used the devmem utility application from the command line to control the behavior of our custom IP.
Like the PEEK and POKE commands, this is another methode to avoid writting a single line of software !
It can be a usefull tool.




This is a test.
ReplyDeleteFeel free to write a comment on any post !
Is this blog usefull ? useless ?
Your tutorial is very intuitive and helpful to beginners in Linux embedded design.
ReplyDeleteKeep on your great work ^^