2013-01-17 12:41 AM
Hi Guys,
I am 1 week old to STM32 Platforms and I am using stm32VL and stm32f4Discovery, and it is my first time to program microcontroller in C platform I am having a hardtime understanding the sample i found in web for USART hmm I dont know how to make them work. I understand all the arrays and logics what i dont understand is the process.. If anyone could give me a crash course where would i put the init or usart... etc.. if you could perform a relation so I could understand it better. I found many eamples but I was not able to run sucessfully even one sample. I tried this by clive https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=https%3a%2f%2fmy.st.com%2fpublic%2fSTe2ecommunities%2fmcu%2fLists%2fSTM32Discovery%2fSTM32F100%20UART%20problem&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F¤tviews... but I got this error Building configuration: basicIO - Debug Updating build tree... Linking Error[Li005]: no definition for ''USART_Init'' [referenced from C:\Users\KDREY.PH\Desktop\ cimba research\trials\BASICIO\Debug\Obj\basicIO.o] Error[Li005]: no definition for ''USART_Cmd'' [referenced from C:\Users\KDREY.PH\ Desktop\cimba research\trials\BASICIO\Debug\Obj\basicIO.o] Error[Li005]: no definition for ''USART_ITConfig'' [referenced from C:\Users\KDREY.PH\ Desktop\cimba research\trials\BASICIO\Debug\Obj\basicIO.o] Error while running Linker Total number of errors: 3 Total number of warnings: 02013-01-17 04:45 AM
Yeah, you'll need to work with your include files so it pulls in the ones from the libraries it needs, and that the project has the library source files in it.
You should perhaps review some of the project templates, and examples from the firmware library. Build those and understand the basic construction method for projects.2013-01-17 05:40 AM
2013-01-17 06:49 AM
IAR isn't my thing, under Keil I build my projects within the tree of the firmware library, and back reference into the library source and include directories.
C:\Keil\ARM\Examples\ST\stm32vldiscovery_package\Project\DemoUSART1 C:\Keil\ARM\Examples\ST\STM32F4-Discovery_FW_V1.1.0\Project\USART1 This way when a new version of the library comes out I can just clone the project under the new tree and recompile. With some GNU/GCC builds it is frankly easier to corral all the source/library and include files into one or two directories to reduce the dependencies and simplify the MAKE file/process. This flatness allows it to easily be zipped up and provided as a standalone example. You'll have to decide how to drive the tools, and what best fits your source management style.2013-01-17 07:22 AM
I can't speak of the IAR WB, but other toolchain have options to include user-defined macros / shell variables in the project paths setup, such as $(ProjectDir) or $(STM32Fxxx_Peripheral_Lib).
That is a convenient way to ease the project transfer, at least when using the same toolchain.2013-01-17 04:59 PM
2013-01-17 05:47 PM
Most likely it's trying to run it at 72 MHz, which the F100 won't hack.
2013-01-17 05:54 PM
Thank you Clive.. it is becoming more clear now