NXP_iMX7D_Connect_CortexM4.JLinkScript 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. // In case cores 1-3 are reset, we do nothing,
  14. // as we would lose connection to these cores, when resetting the device
  15. // as a reset disables the clock to them.
  16. }
  17. /*********************************************************************
  18. *
  19. * InitTarget
  20. */
  21. void InitTarget(void) {
  22. Report("*************************************************");
  23. Report("J-Link script: iMX7D Cortex-M4 core J-Link script");
  24. Report("*************************************************");
  25. JLINK_CORESIGHT_Configure("IRPre=0;DRPre=0;IRPost=0;DRPost=0;IRLenDevice=4");
  26. CPU = CORTEX_M4; // Pre-select that we have a Cortex-M4 connected
  27. JTAG_AllowTAPReset = 1; // J-Link is allowed to use a TAP reset for JTAG-chain auto-detection
  28. JTAG_SetDeviceId(0, 0x4BA00477); // 4-bits IRLen
  29. CORESIGHT_AddAP(0, CORESIGHT_AHB_AP);
  30. CORESIGHT_AddAP(1, CORESIGHT_APB_AP);
  31. CORESIGHT_AddAP(2, CORESIGHT_CUSTOM_AP);
  32. CORESIGHT_AddAP(3, CORESIGHT_CUSTOM_AP);
  33. CORESIGHT_AddAP(4, CORESIGHT_AHB_AP);
  34. CORESIGHT_IndexAHBAPToUse = 4;
  35. }