Accessing raw memory addresses on i.MX6 SoloX while running Linus on A9-core

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Accessing raw memory addresses on i.MX6 SoloX while running Linus on A9-core

Jump to solution
1,339 Views
andrewwayner
Contributor I

I am new to both Linux and to the i.MX6 SoloX. I am able to generate executables that run on Linux on the A9-core of the i.MX6 SoloX SABRE-SD. However, I seem to be having trouble trying to accesses memory directly (via pointers) per the System Memory Map specified in Table 2-1 of the reference manual. Is Linux using a virtual memory map? Can you please provide a procedure to be able to read/write to raw memory?

With this procedure I would like to be able to access the OCRAM, M4 TCM, and memory mapped CPU registers so that my program running on the Linux A9 core can interact/control the M4 core.

Labels (1)
0 Kudos
1 Solution
783 Views
Yuri
NXP Employee
NXP Employee

  For direct memory access Linux provides special node /dev/mem, which is used

by such tools as devmem. Really in our BSP there is the similar utility memtool

in /unit_tests directory. Basically You may look at memtool sources. Note, accesses

to non-supported address regions (hardcoded in /dev/mem driver) may cause system

issues.

  Supported registers may be shown using the next command

$ /unit_tests/memtool .

or

$ /unit_tests/memtool *

For help

$ /unit_tests/memtool


Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
1 Reply
784 Views
Yuri
NXP Employee
NXP Employee

  For direct memory access Linux provides special node /dev/mem, which is used

by such tools as devmem. Really in our BSP there is the similar utility memtool

in /unit_tests directory. Basically You may look at memtool sources. Note, accesses

to non-supported address regions (hardcoded in /dev/mem driver) may cause system

issues.

  Supported registers may be shown using the next command

$ /unit_tests/memtool .

or

$ /unit_tests/memtool *

For help

$ /unit_tests/memtool


Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos