Handle mapped program memory segment aliasing properly, on WCH RISC-V targets

- Added `program_segment_key` target config param, to allow the user to specify the desired program memory segment
- Added the ability to resolve the currently aliased segment, by means of probing the mapped segment
- Added program counter transformation, when the mapped segment is aliasing a foreign segment
- Other bites of tidying
This commit is contained in:
Nav
2024-12-14 02:09:25 +00:00
parent b5ffca6753
commit 2580cecb26
11 changed files with 384 additions and 87 deletions

View File

@@ -0,0 +1,18 @@
#pragma once
#include "src/TargetController/Exceptions/TargetOperationFailure.hpp"
namespace Exceptions
{
class IllegalMemoryAccess: public TargetOperationFailure
{
public:
explicit IllegalMemoryAccess()
: TargetOperationFailure("Illegal memory access")
{}
explicit IllegalMemoryAccess(const std::string& message)
: TargetOperationFailure(message)
{}
};
}