gicking / STM8-SPL_SDCC_patch

Patch for STM8 Standard Peripherals Libraries
Apache License 2.0
88 stars 13 forks source link

SPL non-free license #1

Closed spth closed 6 years ago

spth commented 6 years ago

ST updated the license about 10 days ago: http://www.st.com/en/embedded-software/stsw-stm8069.html

The new license is non-free, by conditions 4 and 5.

Philipp

gicking commented 6 years ago

First of all I am glad that ST changed the license to a more liberal one! But let's go through each points and see if we agree on its meaning, and the relevance for a SDCC patch of the STM8-SPL:

  1. as long as I include the license file, I can publish a modified SPL as source code --> could publish the SPL_SDCC (including license) as sources, not just a patch :-)
  2. same as 1., but for binary code --> n/a for SPL_SDCC
  3. using ST brand name to advertise a product requires special permission --> n/a for SPL_SDCC
  4. STM8-SDCC and derived software must only be used for ST microcontrollers --> no conflict for the SPL itself, since it is STM8 specific. However, functions using the SPL must not be ported to other platforms. This is critical, as it's basically a viral ST license. Not good
  5. publishing derived OSS must not make the SPL OS as well --> ok for SPL_SDCC e.g. by using the Apache license. However, I cannot guarantee that every user is aware of this, which makes it critical
  6. SPL may contain some OSS --> actually I don't think so for the SPL. Anyway it's uncritical for the SPL_SDCC
  7. same as 6. but with third-party SW --> uncritical for SPL_SDCC
  8. disclaimer for maintenance --> sad but legally uncritical for SPL_SDCC
  9. SPL remains STM property --> understandable. Uncritical for SPL_SDCC
  10. SPL user has to obey laws --> uncritical for SPL_SDCC
  11. violating the above rules voids the right to re-distribute the SPL --> uncritical for SPL_SDCC

Rest mainly excludes any liability for bugs. As Philipp I see mainly points 5 and especially 4 as potentially critical. Any opinion on this and on my above assessment in general?

Until this is clarified, I will not publish the patched SPL itself, but only a patch (as before). For your understanding and support thanks a lot in advance!

Georg

spth commented 6 years ago

I don't know what you mean by "ok for SPL_SDCC e.g. by using the Apache license", as the Apache license is even given as an example for a not-allowed license (naturally, it would conflict with 4) anyway.

The terms might be friendlier than the previous version. But in the end, for free software projects they can still be summarized as "You may not use the SPL".

Philipp

gicking commented 6 years ago

hi Philipp,

guess you are correct, too bad! For me that means that I will continue to only provide the patch, not the modified sources. This should be ok for experienced users, but it makes setup and maintenance of an installation (a bit) more difficult.

Georg

gicking commented 6 years ago

keep open for users to be aware of this issue. Too bad!

bschwand commented 6 years ago

Hello,

The license for the STM8-SPL has been changed, it is now the Ultimate liberty license http://www.st.com/content/ccc/resource/legal/legal_agreement/license_agreement/de/fc/f7/32/a0/8b/4f/db/ultimate-liberty-v2.txt/files/ultimate-liberty-v2.txt/jcr:content/translations/en.ultimate-liberty-v2.txt

I would like to publish my version of the STM8 SPL, with the STM8-SPL_SDCC_patch applied, and some modifications of my own:

-- build the SPL as a library, which can be linked by applications, avoiding rebuild of the SPL code -- and also to eliminate dead code at link time, as sddc links whole object files at a time, not each function, leading to massive code bloat with unused functions (and basically making STM8 SPL unusable in STM8 with 8KB flash)

My understanding is that the Apache license is not incompatible with the Ultimate Liberty License, so all this could be placed under both.

Please comment, as I do not want to publish if there is any conflict.

Bruno

gicking commented 6 years ago

hi Bruno,

that is good news indeed! Where did you get that information from? Because I just checked the STM8A/S SPL page. And it still shows the "Mix Ultimate Liberty+OSS+3rd-party V1", which (according to the discussion above) is not free... Are you 100% sure?

But if that information is indeed official, I guess the SPL patch is now obsolete...? Would you be willing to apply the proposed (very sensible) changes to the patched SPLs, and publish them via Github? If yes, I happily delete this repo and link to yours...? Please drop me a note what you decide, I'm easy.

As for the license I will re-check with spth. He is MUCH more savy on that topic than me.

Have a nice day! Georg

PS: if that info is correct, I'll adapt my "STM8 templates" to use SPL headers and (partly) functions :-)

bschwand commented 6 years ago

Hi,

I have this information from Laurent Desseignes, ST's head of ecosystem marketing at the worldwide level:

Hi Mr Schwander

The Liberty license was actually superseded by the “Ultimate Liberty”. This license is very permissive and allows modification and redistribution.

To be on the safe side however, I would recommend to:
-       Clearly identify the portions you wrote inside the source files
-       Add an header with your own terms under which you distribute your modifications. You are welcome if you choose also Ultimate Liberty terms

You can then distribute the way you want. If you’re willing to explain your work on ST community and to share location where to grab the files, welcome also !

Rgds
Laurent

Yes, I think it would make sense to publish the patched version. I have modified the makefiles for the templates, but they could be improved to have multiple builds for example for debug or assert enabled versions, etc. Marking each modifications for SDCC might be a hassle to go through if they are not already commented, but I guess we can work on that once they are on github.

I'll wait on spth input also. Cheers !

spth commented 6 years ago

The "Ultimate Liberty v2" would allow SDCC to redistribute the header files (like SDCC currently does for PIC headers). It is still a non-free lciense by clause 4. SDCC developers will look into this after the 3.7.0 release later this month.

Philipp

bschwand commented 6 years ago

Well, personally I am not too worried about SDCC re-distributing the SPL or anything relate, my concern is:

Bruno

spth commented 6 years ago

As far as I understand, you want to redistribute a patched version of the SPL that works well with SDCC. So you are not redistributing a patched version of SDCC? So I don't see how the SDCC project would be involved.

Philipp

bschwand commented 6 years ago

Exactly, I do not plan to redistribute SDCC in any shape or form. But open-source projects are often understandably very picky about how something using an OSS project is distributed, and the main point of this patch and SPL changes I made, is to get SDCC working with the STM8 SPL pretty much off-the-shelf. So, I prefer to make sure and ask !

gicking commented 6 years ago

hello Bruno, no objections from my side - actually I look forward to it. Please let me know when you're done, then I will replace the patch with a link to your repo :-)

Please note that the patch does not cover all features, yet. For example INRAM needs to be handled separately, see here.

Regards, Georg

bschwand commented 6 years ago

Hi, I published here : https://github.com/bschwand/STM8-SPL-SDCC

note that this is for STM8S, I believe your original patch could be applied to the other STM8 families ? so my project is not complete in that sense.

let me know what you think, suggestions and any contribution are welcome.

Cheers !

gicking commented 6 years ago

hi Bruno,

just checked your above repo. Nice work! :-)

I added all required .mk files and fixed a few minor bugs. Now the libs can be created for all of the supported STM8A/S devices.

Stupid question: how can I send them to you? So far I only worked on my repos, and I have no idea how to upload them to yours... For your advice thanks a lot in advance!

Georg

gicking commented 6 years ago

moved to https://github.com/bschwand/STM8-SPL-SDCC/issues/1