Topic : STM32 Migration

Forum : ARM

Original Post
Post Information Post
April 20, 2011 - 5:53pm
Guest

Hi!

I recently get a STM32F103ZGT6. My question is, if my code written for one STM32F103ZET6 that is very similar, can be used to program STM32F103ZGT6 with small changes in code?
My Ride version has 1 year at least,
Ride7 version 7.26.09.0351 & RKit ARM version 1.22.09.0254.
Thanks for your time...

My complements.

Replies
Post Information Post
+1
0
-1
April 26, 2011 - 9:53am
Raisonance Support Team

Hi,

There are two things to consider:

1. ST lib
If your application does not use the flash functions, then you might be able to keep the same version of the ST lib. If your application uses the Flash functions (stm32...flash.h/.c), then you will have to update the ST library, and then probably you will need to adapt your code to it. Still, you should check (ST.com) for known bugs in the version that you are using. Of course we recommend to use the latest version in any case.

2. Ride project manager
If your version of Ride includes the STM32...G, you could manage the trick by simply changing the device selection in your Ride project. If your Ride does not support the STM32...ZG, you will have to upgrade it. That will provide you with a new version of the ST lib, but you can still use the old version if you prefer. Of course we recommend to use the latest version in any case.

Best Regards,

Vincent

+1
0
-1
August 17, 2011 - 6:35pm
Guest

Hi, again!
I have updated my ride7 aplication.
In this new version the STM32F103ZGT6 is now available, but when i create a new project and add my main file and stm32f10x_it.c and try to build i get this message:
"fatal error: stm32f10x_lib.h: no such file or dirctory".
I have enable the use of old precompiled in the project options, but seems to have no effect, return the same error...
The program was writed using library 3.1.0 in the last version of ride7.
This seems very different from template projects, what i need to do to convert my program?
I dont find any document to check this, but i was using the UM0427.

Thanks for your time.

+1
0
-1
August 18, 2011 - 10:29am
Raisonance Support Team

Hi,

The normal 'clean' way to convert your project is to download the latest version of the lib from the ST website, and then include all its files, both .c and .h, in your project.

If for some reason you really want to go on using the old precompiled lib, you must take the .h files from the old lib and add them in your project.

Best Regards,

Vincent

+1
0
-1
August 19, 2011 - 5:05pm
Guest

Hi,
I have tried with no success, to build my application with the latest library 3.5.0 and ride7 version 7.30.10.0159 & Rkit Arm 1.30.10.0356 & Ride7 Patch 7.30.10.0169.
I think that i create my program using the library version 2.0.3. When tried to use library 3.5.0 gives me the message:
"error STM32 precompiled library option is deprecated"
After deleting some parts of my program (NVIC, RCC,&..), the program was build with success with the size of 336K. Try to program it, and appears the message:
"Code Size Limit"
and with the option Started Kit Limited -> No
I'm using the STM32F103ZGT6 with 2 banks of 512 K, so i think that is not a space question.

Try to create a new project, base on template with the GPIO TOGGLE exemple with STM32F103ZGT6 with great success, but when i program the device gives me the following error:
"OPI DRIVER ERROR - > Error 0x82 reported by programmation plugin: Device Error" resulting in no debug option.
After this,when i press the reset botton, the processor makes blink the leds has expected, so the programming was ok.

Other thing that is strange, is that i have two R-Links programmers and only one of these can access the target device.
When tried to program with the other R-Link programmer gives me the following message:
"OPI DRIVER ERROR (231) -> Error reported by the DTC (Data Transfer Component)"

Can i send you my code?
Thanks for your time...

+1
0
-1
August 22, 2011 - 9:18am
Raisonance Support Team

Hi,

Regarding the build problem, for using the new libs you must make sure that you deactivate the 'use old precompiled lib" option in Ride, and then that you copy all the files of the library, including the .h files, in your project's directory. You must also set some defines as shown in the example project provided in the lib.

Of course if your program is larger than 64K, then you must uncheck the "starter kit limit" option, but then you will be able to debug only if you have a RLink-PRO. See the GettongStartedARM doc for more information on this.

Concerning the programming problems, you should upgrade the software to the latest versions: Ride7 v7.32.... and RKit-ARM v 1.32.... The latest versions include some fixes for STM32F103xG devices programming.

Best Regards,

Vincent

+1
0
-1
August 22, 2011 - 7:35pm
Guest

Hi, again!
I have installed last Ride7 7.32 version and RKit and the building program errors had gone...
I dont had time to test all peripherics, but the major part off the program seems to be running well. One of my problems now is the TIM12 interrupt that has been used with TIM8 BRK interrupt . The program simply locks... Do you have any exemple using TIM12 Interrupts?

Thanks for your time...
My complements

+1
0
-1
August 23, 2011 - 9:33am
Raisonance Support Team

Hi,

We have limited knowledge about the internals of the devices, and even less about their peripherals.
You may find some help in the ST Firmware Libraries (available in the Examples\ARM\ST folder)

We suggest that you contact the ST support team for more help on this issue.

Regards,
The Raisonance support team.