cancel
Showing results for 
Search instead for 
Did you mean: 

Why IAR giving an error while downloading the code to STEVAL SPIN3201 ?

DGaut.2
Associate II

Hi

I am trying to download the code to STEVAL SPIN3201 form IAR IDE. But i am getting an error (6S_STEVAL3201_SL_VM.out file not found or corrupted) while downloading.

Please can you help me to solve this issue. What I am doing wrong ? Please follow the image.

10 REPLIES 10
cedric H
ST Employee

Hello,

Could you confirm that your project compiled and linked successfully ?

Regards

Cedric

Hi Cedric

Thanks for quick reply . Yeah, there is no error in compilation and linking process. While flashing the code into the board ,this error is occurring. I tried multiple times and at the end getting the same error. And motor pilot is giving this (attached image) error.

please find one more image of registers form motor pilot window.

DGaut.2
Associate II

Hi

Please go through this processing video link (https://drive.google.com/file/d/1Y0MPW8dtoxFWQx1p--7ZdC7NZFR4XvOY/view?usp=sharing). And help me to figure out the error.

cedric H
ST Employee

Hello,

Thanks for the Video.

The main issue in your process is that you start from an example you browsed from your file system. You can not do that because the example we provide is not just a stmcx file. You must start from the example list proposed at the first screen. When you start from the project list, the generation stage will propose you an update button. you must click on it. It is key to NOT press generate, otherwise you will erase the IOC provided with the example.

The second point is more an advise. You do not need to start cubeMX and re-generate your project if you do not change the configuration. The MC-Workbench actually calls cubeMX to generate the code, so you just generate twice the same code.

Regarding now your compilation flow, it seems that you have a pretty fast multi threaded computer, and I would advise you to do things in two steps. Compile first, and once your code is compiled and linked, flash the MCU. I have the feeling that IAR starts to flash the board while the link is not fully completed.

Regards

Cedric

DGaut.2
Associate II

Hi Cedric

I followed your steps, still I am getting same error (https://drive.google.com/file/d/1a9ZFiCy6HaAnCdPEJihzWz3jJ1Ssnzwf/view?usp=sharing).

Then I tried with new project ,It's flashing the code to the STEVAL SPIN3201 board and Green led is turned ON. But another problem is coming while connecting to Motor Pilot (https://drive.google.com/file/d/1aFvxlDAGfzTeHAeVxR8p3j58hWcI4xx9/view?usp=sharing)

Please go through the video and help me to solve the issue.

Regards

Deepak Gautam

Also find the board connection picture.

cedric H
ST Employee

Hi @Community member​ 

The first thing to understand is that starting from a new project is fine, but you will generate a FOC project.

Starting from the example as you did is fine too but you will generate a 6steps project.

Regarding your 6steps project, could you follow the advise I wrote previously :

"it seems that you have a pretty fast multi threaded computer, and I would advise you to do things in two steps. Compile first, and once your code is compiled and linked, flash the MCU. I have the feeling that IAR starts to flash the board while the link is not fully completed."

There is a dedicated button to do the compilation only (or Press F7)

Now regarding the connection with the Pilot. The first thing I noticed is that your code is not running. Your debugger hold the processor at the main entry function.

(at least, I did not see on the Video that you press the Start button).

Last point, could you check the UART Baudrate. If you did not change it, when you start with a new project it is configured now at 1843200 bps.

Cedric

DGaut.2
Associate II

Hi

I tried it step by step , first compilation and then linking and flashing but i am getting the same error with IAR IDE.

I tried with STMcubeIDE too. Its giving lots of error in debugging session. please follow the video (https://drive.google.com/file/d/1cvDGzBxaZPeiHTjKcp0ROujUAiw91ZlC/view?usp=sharing)

It would be helpful if you can provide a video to get start step by step with STM32cube IDE.

Thanks

Deepak Gautam