[SOLVED] Debug new STM32 device with old IAR EWARM 5.2?

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] Debug new STM32 device with old IAR EWARM 5.2?

    We are currently using IAR EWARM 5.2 to support an old device that has an STM32F103xx device using J-Link Plus to flash the device and debug. That all works great.

    We are looking into updating the device and possibly moving to an STM32F205xx device which IAR EWARM 5.2 doesn't support.

    In order to do some initial checkout, I'd like to use that combination of tools -IAR 5.2 and J-Link Plus - but I can't figure out how to get the STMF205 flashed. JFlash supports the STM32F205, so I'm wondering if there is a way to configure things so that when I use IAR's "Download and Debug" command that the JLink can download using JFlash then start the debugging? I was hoping I could do something like configure the IAR project as a generic "Cortex-M3" core then somehow pass to the Jlink flash downloader (JFlash?) the information that the target is an STM32F205.

    Is that possible?

    Thanks!
  • Hi,
    Thank you for your inquiry.

    I would suggest to use Ozone, the SEGGER debugger to debug your project:
    segger.com/products/development-tools/ozone-j-link-debugger/

    Alternatively you could try the following:
    - Update the DLL of the IDE (via J-Link DLL updater, available as part of the J-Link Software Package)
    - Select Cortex-M3 as device in the IDE
    - Add the correct RAM / Flash to the linker file manually.
    - Start the debug session.
    - The J-Link DLL should now show the Device Selection Dialog.
    -----> Choose the correct device.
    Please note that we cannot guarantee that this works correctly and that we do not provide any support for this use case.

    Does this answer your questions?

    Best regards,
    Fabian
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Thanks for the response, Fabian.


    I did the following:


    - used the JLinkDLLUpdater.exe to update the DLL in IAR (to v6.82g)
    - changed the IAR project settings to Cortex M3 device
    - changed the IAR project settings to uncheck the "use Flash downloader" box in the Debugger config dialog

    But the J-Link DLL never showed the Device Selection dialog when I rebuilt the project and told it to "Download and Debug".


    The small "Downloading Application" dialog displays a progress bar (only one progress bar - I was expecting the downloading dialog box that has 3 progress bars), and there are no errors displayed until it tries to set up the stack pointer which is incorrect because the flash was never written.


    The Debug log in IAR looks completely OK.


    I should have made clear in my previous message that I can get things to work by building the project and having it output an Intel Hex file. Then I can use JFlash to flash the F205 device with the hex file, go back to IAR and tell it to "Debug without Downloading". I was hoping to be able to remove so much manual work for each build/debug cycle.


    I did try Ozone; it flashes OK, but then it runs into a problem setting the SP and PC registers when the debugging starts. I have asked about that in the Ozone forum (Ozone can't set SP and PC at start for STM32F205)


    Unless you have some other idea, I guess this question can be closed and I will hope that the Ozone problem can be resolved.
  • Hi,
    Okay.

    Best regards,
    Fabian
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.