99% of the ldscripts is identical, which makes it a pain to maintain.
Now we use cmake 'configure_file()' with a handful of variables to
produce each ldscript from a common template.
There is a pair of USB requests ( GS_USB_BREQ_GET_USER_ID and
_SET_USER_ID) that is not supported by the linux driver, and not used by
any known software :
https://github.com/candle-usb/candleLight_fw/issues/91
Since the firmware returns a unique serial #, there doesn't appear to be
any use case for assigning a user ID. Using a whole flash page for that
purpose can be wasteful on bigger targets .
This removes all the relevant code and adjusts the linker scripts
accordingly.
Add the STM32G0 to the CMake setup. This CMake is specific to the STM32G0B1xK device. Also included the linker file that is required for the make.
Currently G0 targets are disabled by default to keep project buildable
as-is.
This gives a nice memory usage overview during linking:
| Memory region Used Size Region Size %age Used
| FLASH: 15476 B 127 KB 11.90%
| RAM: 4304 B 16 KB 26.27%
| DATA: 4 B 1 KB 0.39%
dfu-util warns when flashing a .bin file that has no "dfu suffix". Now
we use dfu-suffix, if available, to add the dfu suffix; otherwise keep
the original dfu-util command line as a reflash target; fixes#56 GH.
Also add .bin files as BYPRODUCTS so that 'make clean' picks them up
too.
We need to specify -Wno-deprecated at the top level, and not just when
building stm32_HAL because any regular source file that includes in stm32f0xx_hal.h also pulls in those cmsis headers that trigger the deprecation warning.