hi all,
for the STM8 Discovery board I want to use Valentin's stm8flash tool
(https://github.com/vdudouyt/stm8flash) for flashing via SWIM / ST-Link. This
board has no UART<->USB connection and therefore cannot be programmed via UART
boot loader —> need a SWIM tool
Unfortunately I wasn’t able to compile the tool on my Mac. Here's my steps with
observations:
installed pkg-config and libusb via Homebrew --> worked
compile of stlink.c gave
many warning messages like (ignored):
stlink.c:37:71: warning: passing 'char [32]' to parameter of type 'unsigned
char *' converts between pointers to integer types with different sign
[-Wpointer-sign]
--> suppose this is not critical...? Disabled all warnings by CFLAGS += -w in
Makefile
many error messages like (fixed):
/usr/local/Cellar/libusb/1.0.19/include/libusb-1.0/libusb.h:1696:10: error: use
of undeclared identifier ‚NULL'
--> fixed by #include <stddef.h> in stlink.c before #include <libusb.h>
many error message like (open):
stlink.c:340:12: error: use of undeclared identifier ‚stderr'
fprintf(stderr, "Unknown status: %x\n", status);
In addition it warns that
declaration of built-in function 'fprintf' requires inclusion of the header
<stdio.h>
--> it seems like the inclusion of <stdio.h> in line 4 of stlink.c has no
effect... :-(
to make sure my toolchain is ok, I compiled a dummy program with
fprintf(stderr,"test"); and it was ok
—> I played around a lot but can't get that stdio.h error fixed. Apparently the
compiler "forgets“ the stdio.h declarations completely and I have no clue, why…
:-(
Hardware Setup:
iMac running MacOS X 10.10.3
"gcc -v“ yields:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
--with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.3.0
Thread model: posix
HW works under Windows on a VirtualPC, i.e. STVD could flash & debug the board
on the same Mac and USB port
Anybody has idea what's going wrong, or maybe even succeeded in compiling the
tool for MacOS X? For your help thanks a lot in advance!
Regards,
Georg Icking
------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user