Missing source files

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Missing source files

      Hi, I started using SES to create applications for the GD32 RISC-V board by seeed studio. At this point I'm only controlling the MCU board, not the LCD.

      So, I created a new project for the on-board MCU, the GD32VF103VBT6. Then I wanted to use the provided libraries (mostly gd32vf103.h), so I called some GPIO funcions declared in gd32vf103_gpio.h, but then I got a linker error because these fuinctions are not defined.

      Looking for the matching .c files in my project (for example gd32vf103_gpio.c), I failed to find most of them (that's over 15 source files). That seems odd to me since the header files are provided. A simple Google search yielded the necessaary .c files, which I added to my source and the application compiled and ran just fine. However, I figured this does not look like the intended procedure at all.

      I looked for the .c files in the installed package ...\packages\GD32VF1xx\Device (where the .h files are stored under the \Include directory), but the \Source directory doesn't have most of the matching .c files. It only has 4, which are exactly the ones originally present in my project.

      Am I missing something?
      Is this a mistake and the .c files are supposed to be in the installed \Source directory?
    • Hello,

      Thank you for your inquiry.
      Generally the project wizard will only copy the .c files that are for your particular target device.
      In the include folder there may be all headers from the particular package or device family. This does however not mean that all are needed.

      That you could not call GPIO macros from your application that are defined in one of the headers is most likely because the header file was not included in your source file.
      Could you check if #include gd32vf103.h is set in the source file where you tried to call the corresponding macros?

      Should the issue persist, could you elaborate how exactly you created the project and provide a little code snipped of what you tried to do that caused the linker error?

      Best regards,
      Please read the forum rules before posting: Forum Rules

      Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
      Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
      Should you be entitled to support you can contact us via our support system: segger.com/ticket/

      Or you can contact us via e-mail.