Linking Problem

Comments

1 comment

  • Avatar
    Dr Danish Ali

    The header file gpio.h describes functions that you call from your main.c source code file. These show the compiler _how_ to call those functions (it "declares" those functions including GPIO_ResetBits() ). But it does not tell the compiler what the functions actually do.

    The functions are actually "defined" in another file stm32f10x_gpio.c which you need to tell Crossworks to compile and link in.So you could put a copy of stm32f10x_gpio.c into the directory that has main.c. And then from the project explorer in Crossworks right-click on your project or the "Source Files" folder and do "Add existing file..." and select stm32f10x_gpio.c

    Then next time you build the necessary functions will be compiled and linked in. You might also need to do the same for stm32f10x_rcc.c.

    Hope this helps,

    Danish

    0
    Comment actions Permalink

Please sign in to leave a comment.