This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

stm32f4xx conf and linker

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?

Parents
  • 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.

Reply
  • 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.

Children