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

Fail to build under Windows with mingw64 #94

Open
eeyrw opened this issue Jan 23, 2018 · 3 comments
Open

Fail to build under Windows with mingw64 #94

eeyrw opened this issue Jan 23, 2018 · 3 comments

Comments

@eeyrw
Copy link

eeyrw commented Jan 23, 2018

PS C:\Users\admin\Desktop\stm8flash> make -j5
GCC -g -O0 --std=gnu99 --pedantic     -c -o stlink.o stlink.c
GCC -g -O0 --std=gnu99 --pedantic     -c -o stlinkv2.o stlinkv2.c
GCC -g -O0 --std=gnu99 --pedantic     -c -o espstlink.o espstlink.c
GCC -g -O0 --std=gnu99 --pedantic     -c -o main.o main.c
espstlink.c:27:10: fatal error: termios.h: No such file or directory
#include <termios.h>
          ^~~~~~~~~~~
GCC -g -O0 --std=gnu99 --pedantic     -c -o byte_utils.o byte_utils.cco
mpilation terminated.
make.exe": *** [espstlink.o] Error 1
make.exe": *** Waiting for unfinished jobs....
PS C:\Users\admin\Desktop\stm8flash>

It seems that the header termios.h is required and not presented by mingw64. By the way, what is espstink ? A wifi stlink made by ESP8266 ?
I use common usb stlink for STM8s. So can I remove this part code directly or how to make it works under Windows?

@helmo2004
Copy link

When a project uses termios.h it seems that the only way to build it under windows is cygwin. I would suggest to use a wrapper for serial port to stay platform-independent. My solution a the moment was to remove espstlink locally, because I don't need it.

Btw: I like the idea of using an esp8266 for flashing STM8-devices. So it would be great if it was available under windows.

Details about espstlink can be found here: https://github.com/rumpeltux/esp-stlink

Greetings Oliver

@eeyrw
Copy link
Author

eeyrw commented Jan 28, 2018

I have truncated the espstlink part and got it work and feel surprise that esp8266 stm8 flasher actually exists : https://github.com/lujji/esp-stm8-flasher.

@tenbaht
Copy link

tenbaht commented Nov 22, 2018

Same problem here. For the Sduino project I need to compile binaries for different systems, including Windows. My solution is to cut out the espstlink code, but using unmodified code would be a far better solution.

I suggest using a simple intermediate cross-platform layer like libserialport or to borrow some code from the stm8gal project.

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