gicking/STM8-SPL_SDCC_patch

The issue of sdcc version #error traps require SDCC >=3.4.3. Please update!

hungtcs opened this issue · 3 comments

Hello!
When I tried to run the test project after I finished the patch, there are the following mistakes:

sdcc -mstm8 -lstm8 --opt-code-size -I.. -I../../../Libraries/STM8S_StdPeriph_Driver/inc -I../../../Utilities/STM8S_EVAL -I../../../Utilities/STM8S_EVAL/Common -I../../../Utilities/STM8S_EVAL/STM8-128_EVAL -DSTM8AF52Ax -c ../stm8s_it.c -o STM8AF52Ax/stm8s_it.rel
In file included from ../stm8s_it.h:33,
                 from ../stm8s_it.c:31:
../../../Libraries/STM8S_StdPeriph_Driver/inc/stm8s.h:2800:5: error: #error traps require SDCC >=3.4.3. Please update!
../stm8s_it.c:71: error 7: Old style C declaration. IGNORED 'INTERRUPT_HANDLER_TRAP'
../stm8s_it.c:72: error 141: two or more data types in declaration for 'INTERRUPT_HANDLER_TRAP'
../stm8s_it.c:72: error 1: Syntax error, declaration ignored at 'INTERRUPT_HANDLER_TRAP'
Makefile:75: recipe for target 'STM8AF52Ax/stm8s_it.rel' failed
make: *** [STM8AF52Ax/stm8s_it.rel] Error 1

My sdcc version is 3.5.0, this is sdcc -v output

SDCC : mcs51/z80/z180/r2k/r3ka/gbz80/tlcs90/ds390/TININative/ds400/hc08/s08/stm8 3.5.0 #9253 (Mar 24 2016) (Linux)
published under GNU General Public License (GPL)

sdcc path

Thanks for you project!

hello hungtcs,

that is strange, since:

  • "sdcc -v" yields 3.5.0 -> traps should be supported acc. to the mailing list, but
  • compile output shows "stm8s.h:2800:5: error: #error traps require SDCC >=3.4.3. Please update!" -> version seems to be too old for traps

The error message is triggered if SDCC_VERSION (line 89 in stm8s.h) is <v3.4.3 (line 2797). But for v3.5.0 this should not be the case. To me it seems like something is be broken in your toolchain - or this specific SDCC version...?

I just uploaded a new patch to fix another, unrelated bug in the test project. With my sdcc 3.6.0 (#9615) it now compiles w/o error or warning. I propose you update to exclude a possible toolchain error..?

Please let me know if this solves your issue. Thanks a lot in advance!

Regards, Georg

PS: what tool do you use for scree capturing to gif? Cool idea :-)

Hello gicking,

After I update sdcc to 3.7.0(install from source), this problem is gone.

By the way, Peek is an excellent GIF screen recorder

ad 1) that's great!

ad 2) thanks for the tip :-)