error in stm32f10x
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-27 06:53 AM
hello,
I have this error: '' #error ''Please select first the target STM32F10x device used in your application (in stm32f10x.h file)'' and in the file I don't know what I must do... I have put in attached file the stm32f10x.h. thanks to all- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-27 12:23 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-29 04:37 AM
Hi,
As it is mentioned, you should check your device:- Low-density devices are STM32F101xx, STM32F102xx and STM32F103xx microcontrollers where the Flash memory density ranges between 16 and 32 Kbytes. - Low-density value line devices are STM32F100xx microcontrollers where the Flash memory density ranges between 16 and 32 Kbytes. - Medium-density devices are STM32F101xx, STM32F102xx and STM32F103xx microcontrollers where the Flash memory density ranges between 64 and 128 Kbytes. - Medium-density value line devices are STM32F100xx microcontrollers where the Flash memory density ranges between 64 and 128 Kbytes. - High-density devices are STM32F101xx and STM32F103xx microcontrollers where the Flash memory density ranges between 256 and 512 Kbytes. - High-density value line devices are STM32F100xx microcontrollers where the Flash memory density ranges between 256 and 512 Kbytes. - XL-density devices are STM32F101xx and STM32F103xx microcontrollers where the Flash memory density ranges between 512 and 1024 Kbytes. - Connectivity line devices are STM32F105xx and STM32F107xx microcontrollers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-29 05:38 AM
Well no idea about your part or toolchain from your question, but I'll suspect you have failed to define the part family passed to the compiler.
To specify a Medium Density part (for example), and to use the standard peripheral library, you'd typically have the IDE/makefile pass some #defines on the compiler command line.-DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER
I might go further and assume you don't have the scatter file or linker script set up correctly for your part either, which you will need to convey to the linker the size/location of the memory (FLASH/RAM). You'll have to work this out for the specific part and tool chain you have chosen.Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-30 01:21 AM
I have a stm32f107 and I'm programing on IAR embedded workbench.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-07-06 01:10 AM
Hi,
Choose ''ST STM32F10xxC'' under General option -> Target -> Device. It will make adjustments accordingly.