cancel
Showing results for 
Search instead for 
Did you mean: 

ST LINK V2 & STM32F205

fabricepeden
Associate II
Posted on May 27, 2014 at 15:17

Hi everybody,

I'm programming a STM32F205. I program it with a J-LINK and IAR, and it works well.

Now I'm trying to use a ST LINK V2. It seems to program my microcontroller, because I have no error, but I have a warming with the size of my stack.

I have already looking for information on the forum.

So I've tried to pull down BootX pins, and it doesn't change something.

When I'm programming my microcontroller with the ST LINK V2 & STM 32 ST LINK utility, it works well.

So now I'm trying to understand why in some cases it works (J-LINK, ST LINK + ST LINK utility) and why in other cases (ST LINK + IAR) it doesn't work !

If you have some ideas to help me,

Thank you in advance,

Fabrice

#stm32f205-st-link
8 REPLIES 8
Posted on May 27, 2014 at 15:45

Make sure you are using the most current firmware, drivers and DLL's

For the warning about the stack, can you be more specific for those who haven't seen your project, or the specific error message given?

How big is your stack, is that adequate? Where is the stack located.

Do you have NRST wired up? Do you have any specific modes set to catch the device out of reset?

JTAG or SWD mode?

In Keil, I can interchangeably use U-Link, J-Link and ST-Link devices without problems on boards using F205 parts. I also use a standard 10-pin SWD/JTAG header, with a 20-pin adapter.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
fabricepeden
Associate II
Posted on May 27, 2014 at 16:27

Thank you for your answer.

The firmware of the ST LINK is : V2.J21.S4 (I think it's the last one).

DLL Version : 4.82

IAR : V7.10.3.6932

Concerning the warning, I got the following message :

My stack used the default settings : size : 0x400 (HEAP : 0x200)

It starts at @0x2000DD38 to 0x2000E138

My NRST is tied up to 3V3 with a 10k resistor. It is also connected on the programming connector. I have no specific mode.

I'm using the JTAG mode with 20 pins connector.0690X00000604v3QAA.png

I have also add one option : OPTION --> LINKER --> ADVANCED --> Enable Stack usage analysis and I have the following messages :

0690X00000604sAQAQ.png

fabricepeden
Associate II
Posted on May 27, 2014 at 16:55

I have also this following message (only with ST LINK V2 and not with J-LINK) :

0690X000006057fQAA.png

Posted on May 27, 2014 at 17:15

And it what fashion does it ''not work''?

I'm not familiar with IAR, but it seems to be reporting that the stack is now beyond the TOP of it's definition, this is rather odd as the stack travels downward.

Are you using an RTOS that might be allocating different process stacks?

It takes some time to wrestle control of the processor via SWD/JTAG after RESET, if you have code that runs early it may have already executed that before it managed to stop it. You could add a long wait loop to see if that stops the stack scoping error.

The previous stack warnings are from static analysis, basically complaining it doesn't understand how Reset_Handler is called, that another handler isn't called, and you have a re-entrant subroutine it can't make a maximal depth analysis of. You'd need to review the latter to know if it had depth limits, and if so what those were.

The schematic is a bit inconsistent in the use of connections, does the top 3V3 actually connect to the net list for those resistors?
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
fabricepeden
Associate II
Posted on May 27, 2014 at 17:43

Just to explain to you.

I have two versions of my software 1.5 & 1.6. I have a menu where I can see the software version.

When I download my version 1.6, on IAR, I can see the progress bar, everything looks to be good then I start the debug mode. My software is running normally.

Then I'm going to my menu to check the software version, it still be 1.5. I have checked in software in my #define, I have changed 1.5 & 1.6 so no errors on this way.

That's very strange.

I'm not using RTOS.

For the stack, why ST LINK gives me an error and no J-LINK ?

I have tried to add some delays, and it's the same.

Yes 3V3 is actually connected ? What do you say that it's a little bit inconsistent ?

Thank you

Posted on May 27, 2014 at 18:04

What do you say that it's a little bit inconsistent ?

I'm saying that the supply touches the wire in the top example, and touches a junction in the other three. That or you just over use the junction designator. I'm not familiar with the tool you are using, and the use of the junction is inconsistent. If I had problems, I'd look for disconnected nets, either via the net list or DRC.

0690X00000602riQAA.jpg

I don't know why the ST-LINK gives an error, I have postulated that it is because the code runs longer before the debugger can stop and restart it. You could test that by adding a longer delay in the reset code path. You could also add break points and check if the stack goes out of range anywhere else.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
chen
Associate II
Posted on May 27, 2014 at 18:34

Hi

''I have two versions of my software 1.5 & 1.6. I have a menu where I can see the software version.

When I download my version 1.6, on IAR, I can see the progress bar, everything looks to be good then I start the debug mode. My software is running normally.

Then I'm going to my menu to check the software version, it still be 1.5. I have checked in software in my #define, I have changed 1.5 & 1.6 so no errors on this way.

That's very strange.''

Please check IAR workbench settings very carefully!

IAR Workbench has a 'simulation' mode for the debugger. It behaves just like downloading to processor and executing on processor BUT is only simulating on the PC.

IAR Workbench will sometime switch from Debugger to simulator when changing a setting.

It has caught me out many times. Wasted many hours wondering why my code was not working only to find IAR has switched to the simulator!

fabricepeden
Associate II
Posted on May 28, 2014 at 07:57

Hi,

Concerning the 3V3, all points with 3V3 on my diagram are connected at 3V3.

I have also add delay at the starting of my software and it's the same, nothing change.

I have checked in my settings of IAR and the simulator mode is not activated.