Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add extra libraries #3

Open
maxgerhardt opened this issue Jul 29, 2021 · 2 comments
Open

Add extra libraries #3

maxgerhardt opened this issue Jul 29, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@maxgerhardt
Copy link
Member

Each GD32XXX Firmware Library package comes with not just the CMSIS and SPL files, but often also with a USB device library, USB host libary, utitlity files for eval boards (e.g. gd32f303e_eval.c, gd32f307c_lcd_eval.c, ...), and other third party libraries (fat_fs, .. LCD_Commom (yes that's how they called it).

The repo should contain all these files as well. The builder script should then have options for including those additional libraries or code.

@maxgerhardt
Copy link
Member Author

I've had an idea about this: We can can model these additional components as just libraries. That way they're automatically discovered and added in the build process.

So e.g., we can create a folder libraries/GD32F30x and in that folder create a new folder for each library, say e.g. a folder with gd32f303e_eval.c and gd32f303e_eval.h in it, then a folder with the fat_fs, USB library, etc. etc.

Then the builder script can add that to the general library discovery path just like the Arduino builder scripts do with the general Arduino libraries in the libraries/ folder of the core.

https://github.com/CommunityGD32Cores/ArduinoCore-GD32/blob/2f1adfb0d687db72b0598ea3c3bbf217a0446ce5/tools/platformio/platformio-build.py#L302-L306

Of course the path has to be dynamic and only including the folder containing the libraries for the specific SPL series.

@maxgerhardt
Copy link
Member Author

As one can see in https://github.com/CommunityGD32Cores/gd32-pio-spl-package/tree/main/gd32/spl/libraries a lot of libraries have been added for each series, only some series are missing their USB libraries because their structure differ from the GD32F3x0 one, but shouldn't be too hard to add.

We are also missing some BSP libraries from some START and EVAL boards, which don't seem to be supplied by GigaDevice:

  • gd32f103b_eval
  • gd32f103b_start
  • gd32f103c_start
  • gd32f105c_eval
  • gd32f105r_start

We either need to find them or write them ourselves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant