Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add native-blink example #46

Merged
merged 6 commits into from
Mar 25, 2021
Merged

Add native-blink example #46

merged 6 commits into from
Mar 25, 2021

Conversation

maxgerhardt
Copy link
Contributor

Adds a native blink example using only one C file and the device header file for comfort from https://github.com/gicking/STM8_headers from @gicking. Analogue to https://github.com/platformio/platform-atmelavr/tree/develop/examples/native-blink.

The STM8_header's MIT license is FOSS and a copy of the license is included per license requirements as the LICENSE_STM8_HEADERS file.

Also, a small project description is added in the README file.

This project is debuggable in all cases and doesn't trigger any of the two SDCC bugs currently plaguing SPL and Arduino.

Adds a native blink example using only one C file and the device
header file for comfort from https://github.com/gicking/STM8_headers

The MIT license is FOSS and a copy of the license is included per
license requirements.
@valeros
Copy link
Member

valeros commented Mar 23, 2021

Looks great! I'm wondering though whether it makes sense to wrap the https://github.com/gicking/STM8_headers repo into a header-only library, so we won't need to sync that native example each time when the headers update.

@maxgerhardt
Copy link
Contributor Author

maxgerhardt commented Mar 23, 2021

I've actually done so at gicking/STM8_headers#5 to make the repo a PlatformIO compatible library, but it hasn't been merged yet. My original repo https://github.com/maxgerhardt/stm8-headers-pio had a copy of that library (with the library.json) in it.

If it gets merged we should be able to just point at

lib_deps = 
   https://github.com/gicking/STM8_headers.git

(or at its name in the library repository if it gets uploaded)

For just "getting it to work" I copy-pasted the three files for the three specified environments in here and copied the license file.

@gicking
Copy link

gicking commented Mar 24, 2021

hi, I just merged the PR gicking/STM8_headers#5. Sorry for the delay!

@valeros
Copy link
Member

valeros commented Mar 25, 2021

Hi @maxgerhardt ! Any chance you could refactor this example to use STM8_headers as a library?

Sadly there's no tag that I can reference, and I don't
want to assume everyone has git installed to reference
a commit, so I use a referenze to the ZIP file of
the master branch.
@maxgerhardt
Copy link
Contributor Author

I've rebased the example to use

lib_deps =
   https://github.com/gicking/STM8_headers/archive/refs/heads/master.zip

and without the local copy of the files. Sadly there's no tag / stable release I can reference (without assuming all people have a git client installed), and no safe backup copy is in the PIO library registry. Is this okay or should we do it another way?

@valeros valeros merged commit bef5278 into platformio:develop Mar 25, 2021
@valeros
Copy link
Member

valeros commented Mar 25, 2021

Thanks again for the PR! I think it's good enough to pull a zip from the master branch so as you mentioned it will work for users without Git installed.

@gicking
Copy link

gicking commented Mar 26, 2021

just created a tag v1.0 of the FOSS STM8_headers, see https://github.com/gicking/STM8_headers/releases/tag/v1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants