¿ªÔÆÌåÓý

Re: Let's Minimize the Library problems.


 

Perhaps the biggest problem with STM32F103 Blue Pill development on the Arduino platform is there are two competing tool chains, the original "Paul Stoffregen" toolchain and the "official" STM32 tool chain endorsed by STM. I would prefer the official STM32 toolchain, but most Arduino Blue Pill projects seem to have been developed with the Paul Stoffregen version, so I use it.?

Another big issue I've found, for example with the graphics/touchscreen libraries, is several libraries such as the Adafruit graphic libraries need to work together with the lower level display module drivers for the TFT and touchscreen hardware.?

Library writers upgrade and enhance their libraries and no regression tests are (or can be) done on other libraries compatibilities, especially the non-mainstream libraries like those for the Blue Pill. And writers of the STM32 libraries may not be maintaining their libraries anymore, so they don't get updated.?

For what ever reason, the ESP32 toolchain developers have been doing a much better job in keeping their libraries updated to reflect changes in other libraries they are dependent on.

In an example of trying to get a touchscreen display working on a Blue Pill, AdaFruit updated one of the screen attributes from one parameters to two. (I've forgotten which one, but they changed the X and Y parameters [possibility a dot size value] to be separately specified, rather than the X and Y values being equal.) There was no backwards compatibility so the STM32 touchscreen libraries no longer worked. The change was done in a way that adding simple wrappers, still required culling through the AdaFruit code to correct numerous instances in the code. (There were still other issues with the hardware assumptions around interrupts and SPI ports, that clashed in the latest libraries, but may not have in older libraries when the STM32 toolchains were first introduced, years earlier)

Unlike the ESP32 toolchain, the STM32 toolchain(s) seemed to get off to a bad start, along with libraries breaking over time as other libraries are updated, generating confusion and trouble it so far has not recovered from. Then adding two toolchains to top the confusion off.?

For many simpler projects, these issues are less troublesome and the Arduino platform is still simple fun to use.

Finally, I don't bother with putting boot loaders on the Blue Pills. I either flash the program with the serial boot loader built into the chip, with a USB to serial adaptor, or use one of the inexpensive ST-Link adaptor clones from eBay. Although I might try the various boot loaders out at some future point. I can see for something like the uBitx installing a USB boot loader would be the best way to go for usability.?

Whichever toolchain you use, as Jack pointed out, let people know where the actual source location of library you used can be found. ?As, many libraries have more than one version and authors.

Tom, wb6b

Join [email protected] to automatically receive all group messages.