Skip to main content
Led
Associate III
March 20, 2020
Solved

IAR and Engineering Mode

  • March 20, 2020
  • 13 replies
  • 5203 views

I have a STM32MP157c-DK2, programming on Windows-10.

What works:

  • Build Yocto, adapt it, flash the image to the SD-Card.
  • Use STM32CubeIDE to program and debug code on CM4

My goal is to setup a proper workflow of the project, where I can integrate our standard build environment, using cmake, build scripts, IAR (not yet sure I want/need that).

Couple of issues I faces:

Setup and generate code for an empty project for the DK2 with CubeMX for IAR. Running the example code it tells me 'no MCU device found' (Using CN11 'ST-Link').

a) Do I miss some configurations?

b) Is it engineering or production mode?

c) Do I need to set the boot pins? According en.DM00591354.pdf there is no engineering mode possible with the boot pins. Is this correct? If I use Bootpins = 0x100 it behaves same way.

d) Are there reasons not to use IAR (except costs)?

Alternative would be, to work with STM32CubeIDE. But I not yet fully happy with it (still a bit buggy). And it will be difficult to integrate our continous integration build environment.

This topic has been closed for replies.
Best answer by Nawres GHARBI

Hi @Led​ 

could you please test with those fixes

  1. remove the verify download and use flash loader in the debugger config
  2. Specify port 2 in the STLink config
  3. Set the reset mode to core in the STLink config

Regards

Nawres

13 replies

Nawres GHARBI
Nawres GHARBIBest answer
Technical Moderator
March 26, 2020

Hi @Led​ 

could you please test with those fixes

  1. remove the verify download and use flash loader in the debugger config
  2. Specify port 2 in the STLink config
  3. Set the reset mode to core in the STLink config

Regards

Nawres

Led
LedAuthor
Associate III
March 26, 2020

Hey Nwres, that's it!

Executing points 2 and 3 did the job.

Point 1 was not necessary.

The basic project generated by CubeMX standalone program works now with IAR.

Thanks,

Led

Led
LedAuthor
Associate III
March 26, 2020

.. but this does not work in Production Mode, right?

Olivier GALLIEN
Technical Moderator
March 26, 2020

For production mode back to my first answer :

Note that for Production mode the load of firmware to the target linux file system is not handle by IAR. You need to scp it under Linux file system on target /lib/firmware.

Then likely load the debugger without loading again the elf. ( just attach to running target or similar)

@Nawres GHARBI​ may probably give a more accurate answer than me.

Olivier

Olivier GALLIEN In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Led
LedAuthor
Associate III
March 26, 2020

I did not know about the 'attach to running target'. Using the ST Example ADC_SingleConversion, I could execute all the described steps. The own code does not yet work so well, but I'm confident to find the issue.

Thanks again a lot for this support!

Led