u-blox / ubxlib

Portable C libraries which provide APIs to build applications with u-blox products and services. Delivered as add-on to existing microcontroller and RTOS SDKs.
Apache License 2.0
287 stars 82 forks source link

A good practice proposol #258

Open danzadok opened 1 week ago

danzadok commented 1 week ago

Hello, First, I'd like to apologize if my proposal sounds arrogant or patronized.
I think it would be better if the 'Porting' code would be separated into two categories: OS & HW. Supported OS: Windows, Linux, Zephyr and FreeRTOS Supported HW: x86, STM32, Nordic, etc. For instance the MUTEX functions are OS dependent, but GPIO functions are HW dependent. Thanks for your attention.

RobMeades commented 1 week ago

That would be possible but it wouldn't necessarily save a great deal: we have now removed nRF5-SDK so the only two platforms using FreeRTOS (i.e. where there is a duplication in the ubxlib code) are ESP-IDF and native STM32, and since ESP-IDF have branched FreeRTOS we have to build with their version anyway, though it might be that we don't use any of their modified code, I'd have to check.

Otherwise Windows, Linux and Zephyr are all distinct of course, and these days i gather that there is ESP-IDF support within Zephyr, as there is STM32 support, so likely in the future there may just be Windows, Linux and Zephyr.