cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with Keil and F3 discovery

fred27murphy
Associate II
Posted on December 04, 2012 at 13:08

Has anyone else got the F3 discovery working with Keil uVision? The code compiles but when starting a debug session it doesn't seem to deploy and it displays all zeros for the code on the device.

I'm using the latest uVision 4.6 and happily connecting to my F4 discovery so don't think I've made a basic mistake. (Not tried a F0 discovery yet but I will.) I checked the guides and believe everything is set up correctly.

STLink is showing up as expected as a USB device in Win7 and is identified in the debug tab for the project properties. The board is powered up and happily running the demo code.

Any tips? Anyone happily coding away?
12 REPLIES 12
frankmeyer9
Associate II
Posted on December 04, 2012 at 14:39

Has anyone else got the F3 discovery working with Keil uVision?

 

I've not yet tried this combination.

Any tips?

 

But I had a similiar problem more recently with a STM32F4 board.

I tried to access it with the embedded STLink of an F0 and F4 discovery, both giving such strange problems as you describe. And, as I believe, the board had readout protection level 1 set.

Only after I updated to the latest STLink-Utilitiy software, and updated the STLink firmware of the discovery boards used for debugging, I was able to mass-erase the board.

After that programming and debugging worked as expected.

As I have seen, there are already new versions for both. I think it's worth a try.

fred27murphy
Associate II
Posted on December 04, 2012 at 15:18

Thanks. I haven't used the ST-Link Utility but was planning to download and try that tonight.

The F4 does seem to have an older version of ST-Link as I get prompted to update the firmware. I haven't done this as it's working and I didn't want to break it. (I have got 2 x F3 and 2 x F4 so I suppose I could risk it if it helps diagnose the problem.)
frankmeyer9
Associate II
Posted on December 04, 2012 at 15:43

That is an issue were ST could shed  some light on - if only they participated in this forum...

In the case I described, the target board was a mikromedia M4, with the same controller as on the STM32F4_Discovery. Only the revision numbers differed, the discovery controller was older.

I suppose the (embedded) STLink firmware also contains a list of device IDs upon which it decides what to do. That will enforce updates for older STLinks.

That shouldn't be the case for the F3 board, I guess ST delivers it with integrated F3 support...

But the IDE and it's debug adapter drivers are the last item in the chain. I guess your uVision version already supports the F3 controller. Updating/reinstalling the STLink driver might help, too.

And, by the way, you need to select ''STLink (Deprecated Version)'' as debug adapter in uVision. The other option supposedly only works with the standalone version.

Posted on December 04, 2012 at 19:15

The ''ST-Link Deprecated'' gives me an unknown target connected error, and can't erase/write flash.

I used ''ST-Link Debugger'', Debug->Settings->Debug->Port SWD, and  Flash Download->STM32F3xx Flash
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
frankmeyer9
Associate II
Posted on December 04, 2012 at 19:35

I have been using nothing newer than V4.53 yet.

At least up to this version, it only worked with the ''Deprecated'' driver.

As I mainly use Crossworks, I don't see a point in keeping the restricted free version up to date.

fred27murphy
Associate II
Posted on December 04, 2012 at 21:27

I think the Flash Download tab was the one! Under ''Programming Algorithm'' I didn't have an entry and once I added ''STM32Fxx Flash'' it worked. I had also updated drivers, installed the ST-Link utility and attempted to upgrade the STLink firmware so these may have contributed. I also found I needed to check ''Create HEX file'' on the output tab to ensure the latest code was deployed when debugging.

My F4 had previously  been working using ''ST Link (deprecated)'' and appeared to work with ''ST-Link/V2'' but as I hadn't changed the code maybe it was no longer programming but I hadn't noticed.

Thanks for all your help. Although I can't see ST making much impact on the hobby market if this sort of stuff doesn't work out of the box and isn't covered by the setup guide. Maybe I'd borked it myself but I don't think I did.

Posted on December 05, 2012 at 01:04

The V4.60 release is the first to support the F3 series parts.

The F3-Discovery projects have the debugger set up by default for the ''ST-Link Deprecated'' debugger, which really doesn't work. The problem here is one of chasing the bleeding edge, a release or two down the pike the tools and examples will mature.

Experience suggests that ST is not really targeting the hobby market, it's a space that needs a lot of baby sitting, and has relatively low returns. It's a game of finding $1M customers, not 1M x $1 customers. I don't work for ST, but I do understand the math.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
frankmeyer9
Associate II
Posted on December 05, 2012 at 08:47

The V4.60 release is the first to support the F3 series parts.

 

 

The F3-Discovery projects have the debugger set up by default for the ''ST-Link Deprecated'' debugger, which really doesn't work. The problem here is one of chasing the bleeding edge, a release or two down the pike the tools and examples will mature.

 

That's true.

And Keil is usually one of the first to provide support for a new controller.

One can still take a F4 makefile & startup code and hack it for the F3...

Experience suggests that ST is not really targeting the hobby market, it's a space that needs a lot of baby sitting, and has relatively low returns. It's a game of finding $1M customers, not 1M x $1 customers. I don't work for ST, but I do understand the math.

 

That depends on the perspective, especially that of the management.

Hobbyists have a really meagre share of sales, at least at short term.

But as a counter example, a lot of software companies sell their 5k...10k software packages to students at symbolic prices. Such a strategy does not pay off in a business year, but in the long run. I view the ultra-cheap discovery boards as a step in this direction.

And assuming a near-zero profit margin for that hardware, I can understand ST's hesitation to provide substantial service.

fred27murphy
Associate II
Posted on December 05, 2012 at 10:56

Experience suggests that ST is not really targeting the hobby market, it's a space that needs a lot of baby sitting, and has relatively low returns. It's a game of finding $1M customers, not 1M x $1 customers. I don't work for ST, but I do understand the math.

 

If you sell a dev board for about $10 (and give some away free) then you're definitely targetting the hobby market. It may well be so that they get more people using the product and make a few of those $1m sales later on.

However, if those hobbyists plug the board in and it doesn't work then you've gained nothing. In fact you've given people the impressions (correct or not) that your products are a pain to use. That's an expensive mistake. Do it properly or don't do it at all. I'm happy to put in a bit of effort to get this working but your average Arduino user may not.