cancel
Showing results for 
Search instead for 
Did you mean: 

IAR and Engineering Mode

Led
Senior

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.

20 REPLIES 20
Olivier GALLIEN
ST Employee

Hi @Led​ 

Thanks for those inputs.

I will proceed to analyze and appropriate escalation.

Could you please confirm you are using latest STM32CubeIDE 1.3 for this status ?

Thanks

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.

yes, CubIDE 1.3.0

yes, CubIDE 1.3.0

Olivier GALLIEN
ST Employee

Hi @Led​ 

This is my first analyze for STM32CubeIDE issues reported :

1 - Removing a project does not execute properly. If afterwards a project with the same same is imported again, it is not possible because the project still exists in the workspace.

Ok I guess I reproduce something similar. Remove GPIO_EXTI example but do not stick "remove 1 nested project" when prompt.

Import GPIO_EXTI again it complain that "sub-project" GPIO_EXTI_CM4 already exist.

Reboot STM32CubeIDE -> GPIO_EXTI_CM4 project indeed appears in workspace.

If you stick "remove 1 nested project" problem looks fixed.

Looks like not proper management of CM4 sub-project when delete parent project.

Issue escalate to IDE team.

2 - Open a file main.c. Then search for something in main.c with 'File Search' (CTRL+H) and open the found item. Then the file is opened a second time and can be edited independently. This is extremely confusing. At least the files should stay in sync.

Not reproduced. it does not open another file if search result is in the currently open.

3 - CubeMX drawings of pinout: The picture is reloaded about 3 times everytime over 4 seconds, at every tiny change of the GUI.

Never noticed and not reproduced on simple project creation. Any further detail on operation performed ?

Is problem always present ? On a fresh open IDE or after a while ?

First open of ioc or later on ?

Is your windows system particularly loaded during operation ?

4 - If another serial device is connected than the DK-2 board, the automatic connection results in strange errors. For example: connect an Serial-USB FTDI cable for the serial logs printed by FW, but forgetting to connect the serial console (USB-micro) connection of the DK-2.

This is not supported yet. STM32CubeIDE can not use alternative com port than ST-Link one. Plan to be delivered in a coming release.

5 - Renaming of the project name is not properly done. Or renaming ends in the error "exception has been caught .. Reason: null argument:". From that point on the project is rubbish.

error reproduced trying to rename CM4 project. rename fail but project looks not rubbish at first view ( can compile) .. but afterward got problem during Periodic workspace save". ( metadata folder not renamed! )

Issue escalate to IDE team.

6 - Often seen Java null pointer exceptions.

Please try to catch and share when problem occurs.

7 - After debugging I suddenly have the 'Console' window opened twice or 3 times.

Which console are you talking about ? gdb, serial one ?

Screenshot can help.

8 - The function 'clean Project' does not always clean everything.

Any specific example to share ?

9 Sometimes th CTRL key does not work anymore. Only restart of the program helps.

Already noticed it with CTRL +F. issue reported to IDE team.

BR,

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
Senior

This support is AWESOME !! :) :thumbs_up:

Thank you Oliver for providing so many answers and details. I appreciate this very much !

Short replies:

1) excellent.

2) Same behavior in Eclipse. This seems to come from the fact that directories are linked to the sub-project (for example 'Middleware' for the CM4 project). Workaround is to open only the CM4 sub-project.

3) I'm sorry, the issue is only in STM32CubeIDE (CubeMX standalone works fine), opening the .ioc project. I think this often reloading of the picture is a Java-behavior.

7) It was the OpenOCD console. I assume there is confusion because the 'View' called 'Console' is used for several things.

From my side we can close the chat. I can start a new one for new questions.

BR

Led

Olivier GALLIEN
ST Employee

Hi @Led​ 

Many thanks for this nice feedback !

If situation on STM32CubeIDE looks indeed mostly clarified, for me initial question of the question was related to IAR ... which is not close.

I will resume investigation for this and keep you posted.

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.
Nawres GHARBI
ST Employee

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
Senior

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
Senior

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

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.