CY8C6xx7_CM0p.JLinkScript 1.3 KB

123456789101112131415161718192021222324252627282930
  1. int ConfigTargetSettings(void) {
  2. //
  3. // Mark a specific memory region as memory type illegal
  4. // in order to make sure that the software is not allowed to access these regions
  5. //
  6. // Note: This does not work for J-Flash tool
  7. //
  8. // Exclude SFLASH regions
  9. JLINK_ExecCommand("map region 0x16000000-0x160007FF XI"); // [SFLASH Start - User Data Start]
  10. JLINK_ExecCommand("map region 0x16001000-0x160019FF XI"); // [User Data End - NAR Start]
  11. JLINK_ExecCommand("map region 0x16001C00-0x160059FF XI"); // [NAR End - Public Key Start]
  12. JLINK_ExecCommand("map region 0x16006600-0x16007BFF XI"); // [Public Key End - TOC2 Start]
  13. // Exclude Cy Metadata
  14. JLINK_ExecCommand("map region 0x90300000-0x903FFFFF XI"); // Cy Checksum
  15. JLINK_ExecCommand("map region 0x90500000-0x905FFFFF XI"); // Cy Metadata
  16. }
  17. void InitTarget(void) {
  18. Report("********************************************");
  19. Report("InitTarget for PSoC6 Cortex-M0+ script");
  20. CORESIGHT_AddAP(0, CORESIGHT_AHB_AP); // SYSAP
  21. CORESIGHT_AddAP(1, CORESIGHT_AHB_AP); // AHB-AP used to connect to M0+ core
  22. CORESIGHT_AddAP(2, CORESIGHT_AHB_AP); // AHB-AP used to connect to M4 core
  23. CORESIGHT_IndexAHBAPToUse = 1;
  24. CPU=CORTEX_M0;
  25. JLINK_ExecCommand("SetETBIsPresent = 1");
  26. Report("********************************************");
  27. }