Forum : ARM
Original Post
Post Information | Post |
---|---|
August 21, 2010 - 10:32pm
|
I cannot get any answer to my question |
Forum : ARM
Post Information | Post |
---|---|
August 21, 2010 - 10:32pm
|
I cannot get any answer to my question |
I wonder , is there a single working example in STM32F10x_StdPeriph_Lib_V3.3.0 ?
for example I create a new aplication
I read readme.txt of ADC_TIMTrigger_AutoInjection example
it says : add
- ADC/TIMTrigger_AutoInjection/stm32f10x_conf.h Library Configuration file
- ADC/TIMTrigger_AutoInjection/stm32f10x_it.c Interrupt handlers
- ADC/TIMTrigger_AutoInjection/stm32f10x_it.h Interrupt handlers header file
- ADC/TIMTrigger_AutoInjection/system_stm32f10x.c STM32F10x system source file
- ADC/TIMTrigger_AutoInjection/main.c
I added .
it says add - Add the required Library files :
- stm32f10x_adc.c
- stm32f10x_dma.c
- stm32f10x_gpio.c
- stm32f10x_tim.c
- stm32f10x_rcc.c
- misc.c
I added . I build and it gives following errors
C:\superonline\arm compiler\STM32F10x_StdPeriph_Lib_V3.3.0\Project\STM32F10x_StdPeriph_Examples\ADC\TIMTrigger_AutoInjection\stm32f10x_it.c:163: error: 'GPIO_Pin_6' undeclared (first use in this function)
C:\superonline\arm compiler\STM32F10x_StdPeriph_Lib_V3.3.0\Project\STM32F10x_StdPeriph_Examples\ADC\TIMTrigger_AutoInjection\stm32f10x_it.c:163: error: (Each undeclared identifier is reported only once
C:\superonline\arm compiler\STM32F10x_StdPeriph_Lib_V3.3.0\Project\STM32F10x_StdPeriph_Examples\ADC\TIMTrigger_AutoInjection\stm32f10x_it.c:163: error: for each function it appears in.)
C:\superonline\arm compiler\STM32F10x_StdPeriph_Lib_V3.3.0\Project\STM32F10x_StdPeriph_Examples\ADC\TIMTrigger_AutoInjection\stm32f10x_it.c:163: error: 'Bit_SET' undeclared (first use in this function)
C:\superonline\arm compiler\STM32F10x_StdPeriph_Lib_V3.3.0\Project\STM32F10x_StdPeriph_Examples\ADC\TIMTrigger_AutoInjection\stm32f10x_it.c:165: error: 'ADC_InjectedChannel_1' undeclared (first use in this function)
C:\superonline\arm compiler\STM32F10x_StdPeriph_Lib_V3.3.0\Project\STM32F10x_StdPeriph_Examples\ADC\TIMTrigger_AutoInjection\stm32f10x_it.c:167: error: 'ADC_IT_JEOC' undeclared (first use in this function)
C:\superonline\arm compiler\STM32F10x_StdPeriph_Lib_V3.3.0\Project\STM32F10x_StdPeriph_Examples\ADC\TIMTrigger_AutoInjection\stm32f10x_it.c:169: error: 'Bit_RESET' undeclared (first use in this function)
----------------------------------------
I have chosen the familiy HD and eval board - why does it give this errors ?
I havent changed a single line in source files
I tried other examples too like GPIO toggle still numerous erros
I am getting slowly crazy - please tell me is there a working example ?
Hi,
We are using this version of the lib without issue. We haven't tried all examples, but the ST people did.
What we do differently from you is we copy the example's files (main.c, stm32f10x_conf.h, etc) in the folder of the Ride project in place of the previous ones. Not doing it might result in the compiler including the wrong conf.h file, which would probably create the kind of errors that you report.
Also make sure that you select the correct configuration. Is this what you mean by "I have chosen the familiy HD and eval board"? You have to do this, as changing the CPU only will not work.
If you need more information, I suggest you ask the ST support. They design, test and maintain this library, and they know it much better than us.
Best Regards,
Vincent
https://my.st.com/public/STe2ecommunities/mcu/Lists/ARM%20CortexM3%20STM32/Flat.aspx?RootFolder=%2fpublic%2fSTe2ecommunities%2fmcu%2fLists%2fARM%20CortexM3%20STM32%2fI%20wonder%20%2c%20is%20there%20a%20single%20working%20example%20in%20STM32F10x%5fStdPeriph%5fLibrary&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000626BE2B829C32145B9EB5739142DC17E&TopicsView=https%3A%2F%2Fmy%2Est%2Ecom%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2FARM%2520CortexM3%2520STM32%2FAllItems%2Easpx%3FPaged%3DTRUE%26p%5FDiscussionLastUpdated%3D20100902%252015%253a10%253a14%26p%5FID%3D13559%26View%3D%257bEC839CCD%252d94F1%252d432B%252dBB98%252d7CB1618F3827%257d%26FolderCTID%3D0x012001%26PageFirstRow%3D41¤tviews=155
(ST have promised to do something about their unwieldy links "soon")
yes they all do work. there is a template project given in the library. copy the example files and replace it with those present in template project. enable all required header files in "stm32f10x_conf.h" including the header files enabled in previous "stm32f10x_conf.h" file (save it some where else before replacing new).
then in menu> project > properties> configuration> [select your hardware]
make sure these entries must be there
menu> project > properties> GCC compiler> defines> [STM32F10X_HD;USE_STDPERIPH_DRIVER;USE_STM3210E_EVAL]
now your project should work
Hello, I am facing same problem, can anyone tell me how I can configure in Eclipse, Basically in the Eclipse->properties:
I did not find any configuration option, where I can set the hardware devices.
Please help me out. wishes, badruduja.
Hi,
We do not have any Eclipse-based tools. Ride7 and RKit-ARM are standalone.
Note that the examples from the ST library are often wrong because of the stm32f_conf.h in which some required header files are commented out. The easy way to go is to uncomment all header files in stm32f_conf.h, which should fix the compilation problems.
Once this is done you can add all the "peripheral driver" files (even unneeded ones) to the example project and it should link. However this take longer to build.
Best regards,