Skip to main content
DFomi.1
Associate II
July 20, 2021
Question

STM32MP157 in KEIL error.

  • July 20, 2021
  • 8 replies
  • 5248 views

Hello.

I use a board STM32MP157A-DK1. I have SD-card with linux and now i try to run the board in KEIL. I have read file "Using STM32MP1 Cortex-M with Keil MDK". But I get error:

Error: flash download failed.

Also a can see:

Full ship erase done.

No Algorithm found for: 0000000H - 000003BBH

No Algorithm found for: 1000000H - 1000147FH

Programming skiped.

I think that (if i enter options - utilites - settings - add) I have to add the correct algorithm but I get the algorithm whatever i choose. Maybe may I download the correct algorithm?

This topic has been closed for replies.

8 replies

PatrickF
Technical Moderator
July 21, 2021

Hi,

I'm not sure Keil is able to 'erase' or 'flash' when debugging Cortex-M4.

Usually Cortex-M4 code is simply 'loaded' in SRAMs (directly with JTAG/SWD when platform is in engineering mode, or thru Linux using SSH connection when in production mode).

You might have missed a tool setup somewhere, maybe worth to ask directly to Keil support.

Regards.

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.NEW ! Sidekick STM32 AI agent, see here
DFomi.1
DFomi.1Author
Associate II
July 21, 2021

Hi Patrick. Thanks a lot!

May you advise me how i can flash Cortex-M4? I develop 1GB Ethernet on Cortex A7 using Linux instruments, but at the same time I wanna use Cortex M4 periphery using Windows (like common MCU, for example, stm32f4...). Is it possible? I think, there is some kind of guidance, but i cant see it. Thanks!

PatrickF
Technical Moderator
July 21, 2021

Hi,

Inside STM32MP15 series, the Cortex-M4 is see as a 'coprocessor' and has no dedicated flash, so cannot be 'flashed' in the sense of independent MCUs like STM32F4 for instance.

Cortex-M4 FW will reside in Linux filesystem and need to be loaded by Cortex-A7 before it could be started.

See the following articles:

https://wiki.st.com/stm32mpu/wiki/Coprocessor_management_overview

https://wiki.st.com/stm32mpu/wiki/Linux_remoteproc_framework_overview#Remote_processor_boot_through_sysfs

https://wiki.st.com/stm32mpu/wiki/How_to_start_the_coprocessor_from_the_bootloader

Regards.

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.NEW ! Sidekick STM32 AI agent, see here
Olivier GALLIEN
Technical Moderator
July 21, 2021

Hi @DFomi.1​ ,

Please confirm you refer to https://www.keil.com/appnotes/files/apnt_319_v1.2.pdf

Are you targeting Engineering mode or Production mode ?

With a provided ST example or your own ?

I recommend first Engineering mode with a provided exemple.

Which version of Keil ?

I don't remember you may need to manage Algorithm.

As fist assumption I would double check you have properly applied all recommendation for stlink. ( page 5)

Hope it help

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.
BRein.2
Visitor II
August 10, 2021

Hello,

I'm also having the same issue when trying to flash the M4 in engineering mode (B00T0 0, BOOT2 1) with KEIL µVision MDK-Lite V5.35.0.0

"Load "GPIO_EXTI\\Debug\\GPIO_EXTI.axf" 

No Algorithm found for: 00000000H - 000003BBH

No Algorithm found for: 10000000H - 10002B97H

Erase skipped!

Error: Flash Download failed - "Cortex-M4"

Flash Load finished at 15:47:29".

I first tried with an ULink Pro with JTAG and a custom STM32MP1 board in engineering mode following AN319.

After that did not work out, I switched to the STM32MP157C-DK2 and tried to load the example project "GPIO_EXTI" from https://github.com/STMicroelectronics/STM32CubeMP1.git with the onboard STLink and SW, again following AN319. Now i also get the same error.

Somebody have any ideas? Can somebody validate that please? When tryng to add a Programming Algorithm, no is there reasonable to choose.

BR and thanks in advance,

Benni

BRein.2
Visitor II
August 11, 2021

Today I tried the to flash the "GPIO_EXTI" with MDK 5.29 and a MDK essential license in engieering mode to STM32MP157C-DK2.

This time the error "no algorithm found" does not show with the same settings, but when trying to flash, an error dialog saysing "Internal parameter error" pops up.

Can somebody help me here?

0693W00000D27UiQAJ.png

Visitor II
June 23, 2023

Hello!

I have the same problem.
Can anyone help me?

PatrickF
Technical Moderator
June 26, 2023

Hi @Deniska 

I think it is worth to ask to Keil support.

Did you use a Keil project generated from CubeMX ?

Regards.

Regards.

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.NEW ! Sidekick STM32 AI agent, see here
OlivierK
Technical Moderator
August 16, 2021

Hi BRein.2 (Community Member)

Unlike STM32 MCUs. There is no embedded flash in the STM32MP157. In Engineering mode, the Cortex M4 access the MCU_SRAM by default. Therefore make sure the sct file points to MCUSRAM (follow https://www.keil.com/appnotes/files/apnt_319_v1.2.pdf) and you must disable the flashloader in the IDE debug connexion.

Regards,

Olivier

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.
BRein.2
Visitor II
August 17, 2021

Hello Olivier,

I checked both and I get the same error as above (internal parameter error).

With STM32CubeIDE I can flash the same project. Any ideas?

May this a problem, that the MDK essential version does not suffice for this processor (plus needed?)?

Thanks in advance,

Best Regards Benni

BRein.2
Visitor II
August 17, 2021

Attached is the project showing this error when using MDK essential. Flashing works with STm32CubeIDE.

BRein.2
Visitor II
August 18, 2021

Today I've tried with a MDK Plus Trial license, because Hitex support did not know which MDK version is necessary for this processor.

With MDK 5.29 I've got the same error as above (Internal Parameter error) and when using the newest MDK 5.35, I've got:

Include "***/GPIO_EXTI\\MDK-ARM\\debug.ini" 

LOAD %L NOCODE INCREMENTAL

No Algorithm found for: 00000000H - 000003BBH

No Algorithm found for: 10000000H - 10002597H

Programming skipped!

Error: Flash Download failed - "Cortex-M4"

Flash Load finished at 16:02:26

Can someone provide help here please, maybe with a working MDK project for STM32MP157C-DK2?