cancel
Showing results for 
Search instead for 
Did you mean: 

VERY weird 'Failed to execute MI command' problem

RedScorpio95
Associate
Hi everyone,
 
I start to question myself and this whole programming thing....
 
I'm using a STM32F3-Discovery Board and generated a code with STM32CubeMX in default mode. I changed absolutely nothing before code generation.
 
In main.c I added the following code to the default one:
 
#include "math.h"
#define PI 3.141
uint32_t sine_val[100];
 
void calcsin(void){
        for (int i=0; i<100; i++) {
        sine_val[i] = ((sin(i*2*PI/100) + 1)*(4096/2));
       }
}
 
That's all. So nothing special at all. The thing is, everything is fine but whenever I try to call calcsin() in the int main function I get the following error:
 
Error in final launch sequence:
 
Failed to execute MI command:
load E:\\STM32\\Workspace\\090924\\Default\\Debug\\Default.elf 
 
Error message from debugger back end:
Error finishing flash operation
 
Also the STM32CubeIDE opens another error message (sporadically?!) which says "No source available for "__muldf3() at 0x8000754"
 
Can somebody please help? 

 

1 ACCEPTED SOLUTION

Accepted Solutions
SofLit
ST Employee

Hello @RedScorpio95 and welcome to the community.

I didn't reproduce the behavior on STM32F3-Discovery board.

Attached a project. Could you please double check?

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.

View solution in original post

1 REPLY 1
SofLit
ST Employee

Hello @RedScorpio95 and welcome to the community.

I didn't reproduce the behavior on STM32F3-Discovery board.

Attached a project. Could you please double check?

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.