PEmicro logo
Cart New Account Login

Logo image
HomeAbout usProductsSupportForumsBlogCustomer Service

search inside this forum
search inside all forums
K64: Can I Debug in JTAG Mode and Program the Flash in JTAG Mode
Dallas P. Feb 24, 2021 at 01:14 PM (13:14 hours)
Staff: Takao Y.

  • I have (2) Circuit Boards [Brd-1 and Brd-2]. Brd-1 connects to Brd-2 via 20-Pin Connector. I'm using a Multilink FX Module. I have a K64 on Brd-1. On Brd-1, there are (2)+3.3V ALVC 3-State Buffers [Buff-1 and Buff-2]. A 10-Pin Mini-Header [Port G] feeds Buff-1 with HDR1_TCK, HDR1_TMS, HDR1_TDI, HDR1_TDO. The Output of Buff-1 feeds the K64 with TCK, TMS, TDI, TDO. On Brd-2, there is (1) +3.3V ALVC 3-State Buffers [Buff-3]. A 10-Pin Mini-Header [Port G] feeds Buff-3 with HDR3_TMS, HDR3_TCK, HDR3_TMS, HDR3_TDO. The Output of Buff-3 feeds the 20-Pin Connector that allows Brd-2 to Mate with Brd-1. The 20-Pin Mating Connector on Brd-1 [Receives JTAG from Brd-2 via Buff-3] feeds Buff-2 with HDR2_TCK, HDR2_TMS, HDR2_TDI, HDR2_TDO. With this Configuration, if I "Only" have Brd-1 in the System, then I can Debug and Program the Flash in the K64 by Attaching the Multilink FX Probe to HDR-1 and "Enabling" the outputs of Buff-1 [Buff-2 is "Disabled"]. On the other hand, if I have "both" Brd-1 and Brd-2 in the System, then I can Debug and Program the Flash in the K64 by Attaching the Multilink FX Probe to HDR-3 which "Automatically" "Disables" the outputs of Buff-1 and "Enables" the outputs on Buff-2. Effectively, this design allows me Debug and Flash the K64 from "Either" Board. In the Multilink Tool, I see an "Option" to Debug in "Either" JTAG Mode or in SWD Mode [Debug Screen]. Our Design is setup for JTAG Mode, so I am "able" to Debug the K64 from "Either" Brd-1 or Brd-2. When I want to Flash the K64, I did "Not" see an "Option" to Flash in JTAG-Mode or in SWD-Mode [Flash Screen]. Can I "both" debug and flash the K64 in JTAG Mode? How can I do this? My Software Engineer says that we do "Not" have the correct IDE in order to do this. Please Provide Guidance.




    Comments

  • Greetings,

    Which IDE are you using? This will clear up any confusion that I may have about this question.

    If you are using MCUXpresso or Codewarrior, then the flash program tool within those IDE is not done by PEmicro, but instead created by NXP. Only the debugging is done by PEmicro. As you saw in debugging we give you the option for JTAG versus SWD.

    If you want to use our software for flash programming in JTAG, then you can purchase our PROGACMP software. This is a standalone software you can use typically for small production lines and it includes command-line programming.


    Takao

  • Takao, thanks for your timely response. We are using Codewarrior. As you stated, the flash program tool within the IDE is "Not" done by PEmicro, but instead is created by NXP. This explains why I can "Debug" using the Multilink FX Adapter in JTAG mode, but can "Not" program the Flash in the K64 in JTAG Mode.

    Just double checking: If I purchase "Your" PROGACMP software, then I will be able Debug in JTAG Mode...…"And"....Program the K64's Flash using the PROGACMP Software?

    All of this will Operate from the Same Environment, or will I literally be running (2) Different Tools [1 for Debug and 1 for Programming K64 Flash]?

  • Greetings,

    PROGACMP is only for flash programming, just to be clear. The debugging is still done in Codewarrior. So you will be using 2 different software.

    May I ask what is the goal here? Are you setting up a production for flash programming? Debugging does flash program your board too, just it also sets up a debug session and that may not be what your end goal may be.


    Takao

  • My goal is to Debug the Code [Whenever erroneous bugs are found] and then Program the Flash in the K64. We typically use our Boundary SCAN Tools [Via JTAG] to validate connections on each build of the board with the final step of "Programming" the K64 Internal Flash.

  • Greetings,

    What I would do is continue using Codewarrior debug as a method of flash programming and debug any bugs. And only when you are ready for production should you switch over to PROGACMP. It does not make sense to be using 2 different software at the same time. A debug session by default will flash program your board.


    Takao

  • I thought a Debug Session by Default would "Not" Flash Program my K64? I could "Only" find the option to set JTAG Mode or SWD Mode in Debug Mode. For Flash Programing in Debug Mode, "How" do I set the Tool to use JTAG Mode? It only appears to allow me to use SWD Mode!

  • Greetings,

    A debug session most definitely flash programs your board. It would be quite difficult if you made changes in your code and you start a debug session without updating the flash. You do not have to set it up yourself. The debug session does it for you. As long as you specified the ELF file from your project within the debug configurations and settings.


    Takao

Add comment


   Want to comment? Please login or create a new PEmicro account.







© 2021 P&E Microcomputer Systems Inc.
Website Terms of Use and Sales Agreement