Well, hello!
I have a inc structure to my project with most files in root directory, some in ./inc (startup_*.h and *_conf.h) and than inc and src inside ./STM32F4xx_StdPeriph_Driver. Up until this point, I have had adc, gpio and rcc undocumented. But now, I wanted to change some code up with using functions from tim, but after uncomenting that line and using this function:
TIM_GetITStatus(TIM2, TIM_IT_Update)
Results in spitting out an error, that this function is "undefined symbol" - errno L6218E, referred from something.o
Meanwhile just using constants from *_tim.h does work normally (but I need more)
I am not able to get this to work. Also adding some other arbitrary library by uncomenting results in same problems. What am I missing?
No, it's a LINKER error, you need to add stm32f4xx_tim.c from the LIBRARY into your project.
Remember INCLUDE files provide details of the calling syntax, they do not provide the code that performs the functionality.
Thank you for answering.
I do agree with you, that code is located in c files, but the problem is that, with this file structure:
inc | startup_stm32f4xx.s | startup_stm32f40xx.s | stm32f4xx_conf.h STM32F4xx_StdPeriph_Driver | inc || stm32f4xx_adc.h || stm32f4xx_rcc.h || stm32f4xx_tim.h || ... (26 total) | src || stm32f4xx_adc.c || stm32f4xx_rcc.c || stm32f4xx_tim.c || ... (31 total) main.c os.c os.h error.c error.h ...
The adc and rcc work. But tim does not. It doesnt work even if you move the respective .c file to root directory or somewhere else. The linker just doesn't seem to be able to connect the header and the source file.
The file structure on the disk, whilst entertaining, it not the issue. You must physically ADD the source file(s) to the project. You should expect to see it in the list of built files as you build the project.
Screen shot, compiling stm32f4xx_tim.c and linking http://imgur.com/hnxhM7c