这是indexloc提供的服务,不要输入任何密码
Skip to content

Add support for "volatile" Segments #483

@redfast00

Description

@redfast00

On most microcontrollers I've worked with, interactions with hardware happens via memory mapped IO. For example, writing to memory addres 0x4000A7FF could set a GPIO pin high; reading from that address could read out the state of a GPIO pin.

In C, this is mostly done by using the volatile keyword, for example:

*((volatile uint32_t*) 0x4000A7FF) = *((volatile uint32_t*) 0x4000A7FF) | 1;.

This forces the compiler to really fetch/store to the memory address every time it's used, since it can have side-effects.

Most microcontroller vendors also publish the memory regions of their chips, which then looks something like this:

Image

So, what rev.ng would need to support this:

  • Support for adding volatile memory regions for memory mapped IO (in Ghidra, you have R,W,X,volatile)
  • Support for emitting the volatile keyword when interacting with the memory mapped IO regions

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions