Author Topic: Open sourcing STM32 firmware  (Read 17061 times)

0 Members and 1 Guest are viewing this topic.

Offline alan.bainTopic starter

  • Regular Contributor
  • *
  • Posts: 81
  • Country: gb
Open sourcing STM32 firmware
« on: November 22, 2023, 10:59:26 am »
Does anyone have any advice on how to open source firware source code for an STM32 project? The hardware design is open too, but that's easy as it is just KiCad files/Gerbers.  The issue is the tangled way in which the STM32CubeIDE mixes in bits of STM code, other projects like LWIP and RTOS buf often in bespoke ST modified forms.

I can obviously put an appropriate public domain (or similar if something else is deemed preferable) license header in the files which I wrote, but given that to build it into a working image the rest of the files need to be there and the right versions - and making the mix work is often the hardest part of doing a build. I'm wondering what other people do?

I'd like to be able to dump it on a suitable public access SVN repository like sourceforge.
 

Offline robca

  • Frequent Contributor
  • **
  • Posts: 257
Re: Open sourcing STM32 firmware
« Reply #1 on: November 22, 2023, 06:19:03 pm »
Does this help? https://github.com/STMicroelectronics/STM32Cube_MCU_Overall_Offer

Each of the linked projects contains a licensing file like https://github.com/STMicroelectronics/STM32CubeF1/blob/master/License.md

Worst case, you can simply provide your code and a list of dependencies to the STM Github repositories

 
The following users thanked this post: alan.bain

Online dobsonr741

  • Frequent Contributor
  • **
  • Posts: 702
  • Country: us
Re: Open sourcing STM32 firmware
« Reply #2 on: November 22, 2023, 09:02:40 pm »
Quote
suitable public access SVN repository like sourceforge
GitHub please. SVN is the past, retired, forgotten
 
The following users thanked this post: werediver

Offline orzel

  • Regular Contributor
  • *
  • Posts: 82
  • Country: fr
    • Sylphide Consulting
Re: Open sourcing STM32 firmware
« Reply #3 on: January 09, 2024, 08:23:58 pm »
GitHub please. SVN is the past, retired, forgotten

mercurial please ! (https://www.mercurial-scm.org/) Git is the past ! And use gitlab instead of github. There's even a gitlab fork for mercurial, https://heptapod.net/.
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6289
  • Country: 00
Re: Open sourcing STM32 firmware
« Reply #4 on: February 01, 2024, 07:34:04 pm »
I use platformio. The libraries are separated from your app and you just need to publish your files and platformio fetches the dependencies automatically.

MxCube IDE's approach of adding user snippet code in auto generated files is very bad IMO and makes the app code less manageable and readable.
 
The following users thanked this post: werediver

Offline robca

  • Frequent Contributor
  • **
  • Posts: 257
Re: Open sourcing STM32 firmware
« Reply #5 on: February 01, 2024, 09:47:29 pm »
I use platformio. The libraries are separated from your app and you just need to publish your files and platformio fetches the dependencies automatically.

MxCube IDE's approach of adding user snippet code in auto generated files is very bad IMO and makes the app code less manageable and readable.
Are you using Platformio with the Arduino framework? If so, you are dealing with a huge amount of horrible HAL code, one of the most wasteful and pointless abstraction layers ever developed. Convenient and fast but very limiting. For example, if you use the ADC read function, it fully re-initializes the ADC for each single read, making an ADC loop orders of magnitude slower than a properly written one using LL libraries and DMA.

If you are programming the STM32 using low-level libraries (LL_*), you need STM32CubeMX to help generate the project skeleton. Once that is done, you can use any IDE for development.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf