IDE accesses illegal memory regions

From SEGGER Wiki
Revision as of 14:45, 2 August 2019 by Erik (talk | contribs) (Created page with "__TOC__ We have seen some IDEs or 3rd party applications (e.g. GDB) which request memory accesses to invalid memory regions. By default, the J-Link software has to perform th...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

We have seen some IDEs or 3rd party applications (e.g. GDB) which request memory accesses to invalid memory regions. By default, the J-Link software has to perform those requested memory accesses because it does not know if a region is invalid (e.g. reserved memory space) or not. The result of such an illegal memory access highly depends on the device. Some just ignore the request and return an error, others enter a unrecoverable confused state. In latter case, the debug session crashes and a power-on-reset of the target hardware is required.

Solution

Using the J-Link Command String map region, a specific memory range can be set to illegal. Once a range has been set to illegal, the DLL ignores all memory accesses (read / write) to this region.