Template_ExcludeIllegalRegions.JLinkScript 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*********************************************************************
  2. * (c) SEGGER Microcontroller GmbH *
  3. * The Embedded Experts *
  4. * www.segger.com *
  5. **********************************************************************
  6. -------------------------- END-OF-HEADER -----------------------------
  7. File : Template_ExcludeIllegalRegions.JLinkScript
  8. Purpose : Script which shows how to exclude specific memory regions
  9. Literature:
  10. [1] J-Link User Guide
  11. Additional information:
  12. For more information about public functions that can be implemented in order to customize J-Link actions, please refer to [1]
  13. */
  14. /*********************************************************************
  15. *
  16. * Global functions
  17. *
  18. **********************************************************************
  19. */
  20. /*********************************************************************
  21. *
  22. * ConfigTargetSettings()
  23. *
  24. * Function description
  25. * Called before InitTarget(). Mainly used to set some global DLL variables to customize the
  26. * normal connect procedure. For ARM CoreSight devices this may be specifying the base
  27. * address of some CoreSight components (ETM, ...) that cannot be auto-detected by J-Link
  28. * due to erroneous ROM tables etc. May also be used to specify the device name in case
  29. * debugger does not pass it to the DLL.
  30. *
  31. * Return value
  32. * >= 0: O.K.
  33. * < 0: Error
  34. *
  35. * Notes
  36. * (1)May not, under absolutely NO circumstances, call any API functions that perform target communication.
  37. * (2)Should only set some global DLL variables.
  38. */
  39. int ConfigTargetSettings(void) {
  40. //
  41. // The map region command can be used to exclude certain memory region(s).
  42. // The J-Link DLL will ignore all read / write accesses to the specified region(s).
  43. // This can be used if an IDE for example accesses an illegal memory address for some reason.
  44. //
  45. JLINK_ExecCommand("map region 0xC0000000-0xC000FFFF X");
  46. return 0;
  47. }
  48. /*************************** end of file ****************************/