NXP_iMX7ULP_CortexA7.JLinkScript 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*********************************************************************
  2. * (c) 1995 - 2018 SEGGER Microcontroller GmbH *
  3. * The Embedded Experts *
  4. * www.segger.com *
  5. **********************************************************************
  6. -------------------------- END-OF-HEADER -----------------------------
  7. */
  8. /*********************************************************************
  9. *
  10. * ResetTarget
  11. */
  12. void ResetTarget(void) {
  13. //
  14. // This device requires a special reset as default reset does not work for this device.
  15. // TBD
  16. //
  17. JLINK_TARGET_Halt(); // Make sure that the CPU is halted when reset is called
  18. }
  19. /*********************************************************************
  20. *
  21. * InitTarget
  22. */
  23. void InitTarget(void) {
  24. Report("***************************************************");
  25. Report("J-Link script: iMX7ULP Cortex-A7 core J-Link script");
  26. Report("***************************************************");
  27. JLINK_CORESIGHT_Configure("IRPre=0;DRPre=0;IRPost=0;DRPost=0;IRLenDevice=4");
  28. CPU = CORTEX_A7; // Pre-select that we have a Cortex-A7 connected
  29. JTAG_AllowTAPReset = 0; // J-Link is allowed to use a TAP reset for JTAG-chain auto-detection
  30. //
  31. // Manually configure which APs are present on the CoreSight device
  32. //
  33. CORESIGHT_CoreBaseAddr = 0x80030000;
  34. CORESIGHT_AddAP(0, CORESIGHT_AHB_AP);
  35. CORESIGHT_AddAP(1, CORESIGHT_APB_AP);
  36. CORESIGHT_AddAP(2, CORESIGHT_CUSTOM_AP);
  37. CORESIGHT_AddAP(3, CORESIGHT_AHB_AP);
  38. CORESIGHT_AddAP(4, CORESIGHT_CUSTOM_AP);
  39. CORESIGHT_AddAP(5, CORESIGHT_CUSTOM_AP);
  40. CORESIGHT_IndexAPBAPToUse = 1;
  41. JTAG_SetDeviceId(0, 0x6BA00477); // 4-bits IRLen
  42. }