cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f103 copy and paste program error

ted korczak
Associate III
Posted on August 29, 2017 at 16:36

Hi

When I copy and paste this program ( the rirst one with 285 lines)

http://embeddedsystemengineering.blogspot.ca/2016/06/arm-cortex-m3-stm32f103-project-dsp.html

I have an error:

fatal error: stm32f10x.h: No such file or directory

/Src/main.c(2): error: #5: cannot open source input file 'stm32f10x_rcc.h': No such file or directory

How to solve the problem ?

Regards

Ted
5 REPLIES 5
Posted on August 29, 2017 at 21:10

Hello Ted

Go to Project options ->C/C++ tab->Include paths  and add new paths to your include directories

0690X000006083gQAA.png

Regards

vf

Posted on August 29, 2017 at 21:44

Example uses the original SPL (Standard Peripheral Library), not the HAL/Cube libraries.

http://www.st.com/en/embedded-software/stsw-stm32054.html

 

Download, bottom of page

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on August 29, 2017 at 23:13

I installed STSW-STM32054

I think I need to change #1 to #2 but how ?

________________

Attachments :

change.jpg : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyTI&d=%2Fa%2F0X0000000b8C%2FBkJ2PqPQ7W_25thIN3BipFBdzuXD1bjY5BJrnu1gqkM&asPdf=false
Posted on August 30, 2017 at 16:27

>>I think I need to change ♯ 1 to ♯ 2 but how ?

What do these refer too?

You'd want to replicate one of the project templates for your donor project, and then paste in code from the example into the 'main.c'.

You shouldn't need to pull in the separate peripheral files, usually these come in via stm32f10x.h, and stm32f10x_conf.h and the define USE_STDPERIPH_DRIVER

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..