2011-04-25 05:17 AM
hello everybody,
I want to run a simple program that blinks the leds of stm32 discovery board, when I use the sample example (blinky) everything is ok but when I want to create a new project there are a lot of errors when I click build target, even if I include all files of the sample example and set all the options of my project as the sample example, I don't know what the problem is. I have some how the same problem with STM3210B-EVAL, when I use the samle examples everything is ok but when I create my own project and include the files, there isn't any error but the board don't show the result of the program. I know that I may forget an awfull issue, could any one help me solve this problem? thanks in advance2011-04-25 12:57 PM
Without looking at a busted project it's hard to say exactly what you missed, from the cpu, to the memory map, to the options and defines, the include and library directories, debug and flash settings. There is crate loads of metadata within the project that you are likely to miss or screw up if you are not consummately familiar with the tool chain and IDE. Short of reading the fine manual, and experimenting, you're not going to get this level of competence.
Suggest you take a working example project, copy the whole project directory tree to a new one at the same path level/depth. Open the project, prune out the unwanted stuff, rename things, and copy in or paste your new code/files into this project shell. Even better make the project empty and save it as a template.2011-04-25 11:01 PM
thanks for your reply,
I've tried to create an empty project, I use UM0986 user manual and follow the steps of ''creating my application'' but when I build the target I get this error : Undefined symbol SystemInit (referred from startup_stm32f10x_md_vl.o). I don't know what the problem is but I know it's very awfull and that's all beacause I'm new user of stmicroelectronic , I attach my simple project, plz help me solve this problem. thanks2011-04-26 09:01 AM
You rar'd the project while it was open, the project file itself is literally empty as a result.
SystemInit() is part of the library code, you will need the system_stm32f10x.c file added as part of you project, and probably set up some include paths for the library too. You'll need to review where you unpacked yours, I put it in my ST ARM tree under Keil. C:\Keil4\ARM\Examples\ST\stm32vldiscovery_package\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.c Perhaps, looking at some of your files, E:\stm32 discovery\stm32vldiscovery_package\an3268\stm32vldiscovery_package\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.c I'm going to reiterate my previous suggestion one more time. Copy the directory E:\stm32 discovery\stm32vldiscovery_package\an3268\stm32vldiscovery_package\Project\Demo into E:\stm32 discovery\stm32vldiscovery_package\an3268\stm32vldiscovery_package\Project\Empty Trim out the EWARMv5 and TrueSTUDIO directories. Open the new Empty\MDK-ARM project file, rename DISCOVER.uvopt and DISCOVER.uvproj first if you really have too. Open main.c, cut out the bulk of the code, leaving the includes, main(), and assert_failed(). You should also be able to trim out the library files you don't want, but it might be easier to leave them there for now until you really understand what you do/don't want, and where they live. Confirm you can build the project, then close it. Copy ...\Project\Empty into ...\Project\JobOne and use that.2011-04-26 11:38 PM
2011-04-27 01:03 AM
Sounds like you don't have the memory or flash profiles set up correctly.
There is a lot of metadata contained within the project, it is very hard to explain all of this, and I don't have the man-hours to spend generating a 16-20 page guide on how to do it from scratch. The key question is, does the Demo project compile and debug properly? If yes, then use that project as a template. It takes a couple of seconds to duplicate it, or you can just spend hours pounding your head against a rock, reading documentation, experimenting, and going over the minutia of the settings one by one.2011-04-28 12:05 AM
thanks for your suggestions, they were so usefull, I've search the error in the net and now some how I get what the problem is but I should check it.