gnupic: Re: [gnupic] Re: FreeBSD and gpsim
Subject:
Re: [gnupic] Re: FreeBSD and gpsim
From:
Xiaofan Chen ####@####.####
Date:
9 Jan 2006 11:48:14 +0000
Message-Id: <a276da400601090348u5fb67b2ejcc3499793b9b8d08@mail.gmail.com>
On 1/9/06, Xiaofan Chen ####@####.#### wrote:
>
> The whole problem comes from the definition of dlerror()
> under FreeBSD. It is defined as "const char * dlerror(void);" Therefore
> the following code in os_dependent.c gives the problem since it
> casts the return value of dlerror() which is a const char * as a plain char *.
>
> char * get_error_message() {
> #ifndef _WIN32
> return dlerror();
> #else
> return g_win32_error_message(GetLastError());
> #endif
> }
>
Okay I know the solution now with the help of Google. The
solution is to case dlerror() to char *.
char * get_error_message() {
#ifndef _WIN32
return char * dlerror();
#else
return g_win32_error_message(GetLastError());
#endif
}
Not so sure if this will breaks other OS like Linux.
[xiaofan@myfreebsd xiaofan]$ gpsim -v
gpsim - the GNUPIC simulator
version: Release 0.21.11
type help for help
Release 0.21.11
starting server....
started server
gpsim> SimulationMode:52
gpsim> processor list
pic10f200 pic12c508 pic12c509 pic12ce518
pic12ce519 pic16c84 pic16cr83 pic16cr84
pic16f83 pic16f84 pic16c54 pic16c55
pic16c56 pic16c61 pic16c71 pic16c712
pic16c716 pic16c62 pic16c62a pic16cr62
pic16c63 pic16c64 pic16c65a pic16c65
pic16c72 pic16c73 pic16c74 pic16f627
pic16f628 pic16f871 pic16f873 pic16f874
pic16f876 pic16f877 pic17c7xx pic17c75x
pic17c752 pic17c756 pic17c756a pic17c762
pic17c766 pic18c242 pic18c252 pic18c442
pic18c452 pic18f242 pic18f252 pic18f442
pic18f248 pic18f452 pic18f1220 pic18f1320
gpsim>
So it is good now that I have the major GNU PIC tools
(gputils/sdcc/gpsim) built and working under FreeBSD.
Ktechlab-0.3 may be the next target.
Regards,
Xiaofan