iMX6SX_CortexM4.JLinkScript 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*********************************************************************
  2. * SEGGER Microcontroller GmbH *
  3. * Solutions for real time microcontroller applications *
  4. **********************************************************************
  5. * *
  6. * (c) 1995 - 2018 SEGGER Microcontroller GmbH *
  7. * *
  8. * Internet: www.segger.com Support: support@segger.com *
  9. * *
  10. **********************************************************************
  11. ----------------------------------------------------------------------
  12. Purpose :
  13. ---------------------------END-OF-HEADER------------------------------
  14. */
  15. /*********************************************************************
  16. *
  17. * ResetTarget
  18. */
  19. void ResetTarget(void) {
  20. // In case cores 1-3 are reset, we do nothing,
  21. // as we would lose connection to these cores, when resetting the device
  22. // as a reset disables the clock to them.
  23. }
  24. /*********************************************************************
  25. *
  26. * InitTarget
  27. */
  28. void InitTarget(void) {
  29. int WordAcc;
  30. int v;
  31. Report("******************************************************");
  32. Report("J-Link script: iMX6 SoloX Cortex-M4 core J-Link script");
  33. Report("******************************************************");
  34. JLINK_CORESIGHT_Configure("IRPre=0;DRPre=0;IRPost=13;DRPost=3;IRLenDevice=4");
  35. CPU = CORTEX_M4; // Pre-select that we have a Cortex-A5 connected
  36. JTAG_AllowTAPReset = 1; // J-Link is allowed to use a TAP reset for JTAG-chain auto-detection
  37. CORESIGHT_AddAP(0, CORESIGHT_AHB_AP);
  38. CORESIGHT_AddAP(1, CORESIGHT_APB_AP);
  39. CORESIGHT_IndexAHBAPToUse = 0;
  40. JTAG_SetDeviceId(0, 0x4BA00477); // 4-bits IRLen
  41. JTAG_SetDeviceId(1, 0x4BA00477); // 4-bits IRLen
  42. JTAG_SetDeviceId(2, 0x00000001); // 5-bits IRLen
  43. JTAG_SetDeviceId(3, 0x0891C01D); // 4-bits IRLen
  44. }