SDCC not work with stm8
Closed this issue · 5 comments
i am use this cmd (sdcc --Werror --std-sdcc99 -mstm8 -DSTM8S103F3 -c C:\Users\techs\Desktop\STM8s103F\main.c -o C:\Users\techs\Desktop\STM8s103F\Output/STM8s103F.o )
sdcpp.exe: fatal error: when writing output to : Invalid argument
include\STM8S103F3.h:1903: syntax error: token -> 'volatile' ; column 29
please healp me
are you sure you are using the latest STM8 headers? Because I don't get this error message when compiling the attached file main.c.txt (change extension to .c) with
sdcc --Werror --std-sdcc99 -mstm8 -DSTM8S103F3 -c main.c
Also in the current version line 1903 does not contain the keyword "volatile". If you are indeed using the latest STM8 headers from Github and the problem still exists, can you please provide more details like SDCC version, and maybe an example that fails? Thanks a lot in advance!
I got the error actually it was in another file but SDCC was pointing it to this header file. Removing the second header file fixed it.
Thanks for the help. I have another question. Can I distribute these header files with my open source code editor software without any license?
ad 1) thanks for letting me know! If only all problems were solved that easily... ;-)
ad 2) sure, feel free. I only added a license to exclude liability. May I ask what code editor you're developing?
Thanks, I was trying to add the header files inside my open source code editor MicroStudio IDE for programming stm8 microcontrollers using SDCC but for a long time there was no solution for me. On the SDCC forum 2 days ago, I found out that these header files are now available and they gave me the link here. Currently I am working on version 2.3 of Micro Studio IDE which will be released by March 11 2021 with stm8 microcontrollers. Sorry for my bad English.
glad to hear my code is actually being used :-)
I'm quite interested in an OSS IDE for STM8, so I checked your Website already. Does your IDE also support Linux and graphical debugging?