cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP157 in KEIL error.

DFomi.1
Associate II

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?

14 REPLIES 14
PatrickF
ST Employee

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.

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!

Olivier GALLIEN
ST Employee

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.

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.

Thanks!

I have a question more. Does coprocessor run on power-up? Or only from Linux terminal?

Hi,

Coprocessor FW does not automatically run at power-up, but it could be early-launched by u-Boot or later by Linux (automatically or using terminal command).

See also https://wiki.st.com/stm32mpu/wiki/Boot_chain_overview#Overview

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.
BRein.2
Associate II

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
Associate II

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

OlivierK
ST Employee

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