Closed aguegu closed 6 years ago
the patch works fine on version 2.3.0
$ md5sum en.stsw-stm8069.zip
74e6fb584ab164b37542db4b0bdc7c57 en.stsw-stm8069.zip
Maybe we should specify the version for the base lib.
hello aguegu,
sorry for the issue! I wasn't aware a new SPL version has been released :-) I will try to fix the patch asap, but I am currently experiencing problems with SDCC. Specifically I cannot compile after upgrading to Ubuntu 18.04. Any idea...?
Georg
PS: good idea to mention the required SPL base version! Or better yet provide different patches for different SPL versions
hi @gicking , it has been a while, :)
To be honest with you, I am not longer an Ubuntu fan. I have switched all my work environment to Manjaro(XFCE), so I can always get the latest updates from official repos and AUR. Both SDCC and stm8flash are supplied within AUR.
right now, I have just setup a new desktop of manjaro and have been trying to to do fresh toolchains setup. That is why I spot this issue.
My SDCC is of version 3.7.0 and built from source (the AUR way). It works fine with all my demo codes in https://github.com/aguegu/stm8demos (with 2.3.0 patched STM8S SPL)
However, these demos are simple.
hi aguegu, can you please try again and let me know if it works? Following your advice I have now added the SPL base version to the name of the patchfile. Georg
PS: I checked the Manjaro Wiki, and it looks really good. However, I also use an old Netbook, and I understand that 32-bit are no longer officially supported...?
I have tried the patch on v2.3.1, and I got this error with SDCC 3.7.0
../../spl/STM8S_StdPeriph_Lib/Libraries/STM8S_StdPeriph_Driver/inc/stm8s.h:2798:5: error: #error traps require SDCC >=3.5, please update!
The interesting thing is that in stm8s.h, now it is
/* traps require >=v3.5 */
#if SDCC >= 350
#define INTERRUPT_HANDLER_TRAP(a) void a() __trap
#else
#error traps require SDCC >=3.5, please update!
#endif
but it is used to be
/* traps require >=v3.4.3 */
#if SDCC_VERSION >= 30403
#define INTERRUPT_HANDLER_TRAP(a) void a() __trap
#else
#error traps require SDCC >=3.4.3. Please update!
#endif
the old one works fine, I figured you missed to define SDCC
or SDCC_VERSION
PS. try https://manjaro32.org ?
hi again, ad 1) in the past I defined my own SDCC_VERSION (top of stm8s.h), but then I figured I might as well use the predefined macro SDCC. Seems I was wrong... Anyway, according to the SDCC manual, the declaration of getchar() changed yet again in 3.7.0, so I need to fix that anyway and let you know
ad 2) good point, I will check that out :-)
ok, hope I found it. According to p.62 in the SDCC manual, the define SDCC is no longer supported --> I reverted back to my own SDCC_VERSION declaration (see top of stm8s.h). Could you please try again and report if it works now?
Well, the patch works. But it requires some hacking. For some libs, I have to suffix the raw folder name with version to make the patch work. Would be better to doc it.
what exactly do you mean...? Before documenting it, I would rather (try to) fix it.
it is simple. if you download the en.***.zip files from ST website, unzip it, and try to patch them. You would know. For example,
$ unzip en.stsw-stm8069.zip
$ mv STM8S_StdPeriph_Lib STM8S_StdPeriph_Lib_V2.3.1
$ patch -p0 < STM8S_StdPeriph_Lib_V2.3.1_sdcc.patch
if the mv
step is missed, the patching would fail.
but for en.stsw-stm8030.zip
, unzip it would get folder STM8TL5x_StdPeriph_Lib_V1.0.1
, the patch works without mv
.
sorry, didn't think of that! Now it should work...!?
it works except for en.stsw-stm8030.zip
so we should do
$ unzip en.stsw-stm8030.zip
$ mv STM8TL5x_StdPeriph_Lib_V1.0.1 STM8TL5x_StdPeriph_Lib
$ patch -p0 < STM8-SPL_SDCC_patch/STM8TL5x_StdPeriph_Lib_V1.0.1.patch
It is ST's mistake, folder name style varies, at the first place, I agree. So we should doc it.
darn! Now it should work with the downloaded version. Can you please check again? Sorry for the fuss!
@gicking it works fine now.
With the latest download, version: 2.3.1, released on 26-April-2018,
https://my.st.com/content/my_st_com/en/products/embedded-software/mcus-embedded-software/stm8-embedded-software/stsw-stm8069.html
the patching failed.