This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Sharing debug on two items of Stellaris LM4F Launchpad



I have two Stellaris LM4F Launchpads which connected to my PC via USB. I use IAR EWARM compiler. Then I try to load code into controller, it is complete successful, but I don't know in which of these controllers code was loaded. How can I know in which?

  • I believe you must use external deviceslike XDS100 to work with 2 emulators on same system at same time.

    I would blink an LED to check code upload.

    Regards,
    Maciej 

  • Straight from IAR's most recent update/release: 6.50.6 but also listed @ 6.50.1:

    • Multi-core SWD support
      Two instances of IAR Embedded Workbench can now access one core each in a multi-core device via SWD.

    And now - as I look more closely - see that I "missed" multi-core.  But - this may indicate some improved facility to perform "debug/programming" - across 2 independent ARM MCUs - in a "ping-pong" fashion.  (we've not yet attempted - seems most targeted for multi-chip communication)

    Note the SWD restriction - which is outside your USB method. 

    If indeed your PC is able to uniquely address and transact w/2 Stellaris MCUs - via USB - would not the PC's device manager provide confirming insight? 

    My initial sense is that this mode of operation was not fully/deliberately intended - nor time-tested - and may thus be issue-laden...

     

  • I might be wrong but I think that ICDI was created as a low-cost interface. The ICDI emulators does not differ from each other (ex by serial code). As a result software is not able to see two different emulators in the system.

    Please note that this is only me guessing.

    Regards,
    Maciej

  • Happen to agree - and as such - wherever possible - we avoid - instead use J-Link under SWD w/in IAR.  (harvest 2 added GPIO in the process)

    Curious as to why (and how) poster "believes" he established contact w/both boards.  (my bet - one at a time...)

    Read enough about "crash/burn" of IDEs w/out added burden of multiple, attached lunchpads...

    @Tankist: Would you be so good to explain - why you attempted this, "multiple board - simultaneous usage," scheme?

    And - in answer to your post - would not the board which received your code download - then execute that code?

  • Apparently, I have made considerable confusion with my question. I do not need to perform debugging on both boards at the same time! I just want to know which of the boards got the code. Also note that the code is upload in completely "transparent" mode, no error messages and questions arise, the debug is going on as usual.

  • I understood you correctly the first time I read your post. I just did not have an answer. I still do not have one. My suggestion is as follows:

    1) Plug only one LaunchPad to an USB port of your PC. Start one instance of IDE on your PC. After you start download/debug, you know this instance of IDE is controlling the only LunchPad plugged in at the moment. Do not exit from debug. That IDE should continue to control that same LunchPad.

    2) Plug the other LunchPat to another USB of your PC. Start a second instance of IDE. If this second instance of IDE also can download/debug, it is controlling the second LaunchPad. This is because the other IDE is still controlled by the other LunchPad.

    My assumption is, (a) each instance of IDE can control only one LaunchPad, (b) each LaunchPad can be controlled by only one instance of IDE, (c) that control is established the moment you start to download/debug, and (d) that control continues and is ended the moment you exit debug.

    --OCY

  • By the way, I think instead of download/debug, you can also use debug without download.

    -- OCY

  • old_cow_yellow, thanks, but I'm doing now a same manner. The only difference is that I run only a single development environment. If you try to connect using the second instance of the IDE, you get an error. Therefore, debugging on the same machine two copies ICDI is impossible. How to find out current debugging device - no way.

  • Applause to OCY for well thought - detailed description of logical procedure.

    That said - if "board to board" commo is not required - does not such multi-connection scheme invite issues/trouble?  Any gain may come with uncharted risk...

    Now I can report (as per earlier post, this thread) that our recent IAR - when running 2 IDE instances - w/2 J-Links - has established reliable SWD commo with 2 custom LX4F boards.  Ours is paid IDE - this may not work w/limited version - and my test was brief - not especially in-depth. (downloaded 2 different programs - each appeared "normal") 

    Having 2 monitors was very helpful (perhaps mandatory) in this effort.  However that 2nd monitor is better used - imho - to display "live watch" and other key info/data - not the separate IDE instance...

    OCY's detail of debug - both with and without download - bears repeating.  Good stuff...