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

other STM8 families should be supported, not just STM8 S #2

Open
bschwand opened this issue Feb 24, 2018 · 6 comments
Open

other STM8 families should be supported, not just STM8 S #2

bschwand opened this issue Feb 24, 2018 · 6 comments

Comments

@bschwand
Copy link
Owner

"PS: you also asked here for SPL patches for other devices than STM8A/S. Yes you are correct: on the STM homepage I found SPLs for 4 different STM8 families (STM8L10x, STM8L15x-16x-05x-AL31-L, STM8S, and STM8TL5x). The respective patches are all available from https://github.com/gicking/STM8-SPL_SDCC_patch"

I am not sure how to do this, does it make sense to try and have all that in a single repo ? I see the patches are against one original SPL download. I assume the code is different enough that one could not have a unified STM8 SPL for SDCC.

should we instead have separate projects ? I am not that interested in doing all that work for the other families unfortunately... I will add the (imperfect) script I used to help split all the files though, maybe anyone interested can then do the same for other families.

@gicking
Copy link
Contributor

gicking commented Feb 25, 2018

hi Bruno,
actually the patches are against different SPL downloads, namely STM8S/A, STM8L10x, STM8L15x-16x-05x-AL31-L, and STM8TL5x.

As the of the devices differs quite significantly, e.g. DMA or ADC, and also to reduce effort, I strongly propose to use different repos, and keep the structure of the SPLs as is.

How much manual re-work do you estimate after running your script (and how do I run it)? I would be volunteering if it isn't too much. However, I would greatly appreciate if you could take over the Github side if I prepare the files...? For a short feedback thanks a lot in advance!

Georg

@bschwand
Copy link
Owner Author

Yeah, I agree on different repositories. Well I did spend quite a bit of time, because every file needs to be checked manually after generation, and for each peripheral the proper "private" files need to be created. You just run the script in the SPL src/ directory, and give it the .c file to split as command line parameter and it will generate all the separate c files. YMMV, it might be all broken...

@gicking
Copy link
Contributor

gicking commented Feb 25, 2018

I have trouble using your perl script on the STM8L10x SPL :-(
Specifically:

  • in the script I replaced all "stm8s" to stm8l10x" to match the file prefixes
  • running "./split_spl.pl stm8l10x_gpio.c" gives no output and no new files

What do I do wrong here? Unfortunately I have no clue of Perl, so I would need some help by you... Thanks a lot in advance!

Georg

PS: do you use Skype? I guess that would be easiest...

@bschwand
Copy link
Owner Author

I was afraid of that. I'll have to download the others and check what is going on.
you can also try, in split_spl.pl to uncomment the lines in
#print
and comment out the file creation: #open(FILE...
and comment out the writing to the files: "print FILE ...

then invoke like this
./split_spl.pl < stm8l10x_gpio.c | less

it should make more obvious what the chunks it is trying to write out are. Most probably, the format is slightly different so the pattern matching for the beginning and end of functions is not succeeding. I said it was a hack :-)

@andrewsclapp
Copy link

andrewsclapp commented May 7, 2020

For folks who might have asked the question I asked below, check here first.

https://github.com/gicking/STM8-SPL_SDCC_patch

Hello Bruno,

I'm a late arrival to the conversation, but I have a strong interest in getting my copy of the SPL I downloaded for STM8L working for my project using STM8L051F3 chips. Would you be willing to outline your overall process for making the files useful in SDCC so that I might embark on the task with some direction? I'm starting with SDCC 4.0.0 and the files in STM8L15x-16x-05x-AL31-L_StdPeriph_Lib/ under linux. I'm able to leap small buildings in several attempts, but I have lots of time on my hands.

Thanks in advance,

-Andrew

@bschwand
Copy link
Owner Author

bschwand commented May 7, 2020 via email

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

No branches or pull requests

3 participants