Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
picsimlab
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
picsimlab
Commits
c125467c
Commit
c125467c
authored
Aug 11, 2020
by
lcgamboa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chg: error messages updated !minor
parent
393ca12f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
25 deletions
+36
-25
src/Makefile
src/Makefile
+1
-1
src/Makefile.X11
src/Makefile.X11
+1
-1
src/Makefile.cross
src/Makefile.cross
+4
-2
src/Makefile.cross_32
src/Makefile.cross_32
+1
-1
src/boards/board_qemu_stm32.cc
src/boards/board_qemu_stm32.cc
+22
-19
src/boards/board_uCboard.cc
src/boards/board_uCboard.cc
+7
-1
No files found.
src/Makefile
View file @
c125467c
...
...
@@ -14,7 +14,7 @@ execdir= ${prefix}/bin/
#lxrad automatic generated block start, don't edit below!
override
CFLAGS
+=
-D_VERSION_
=
\"
$(VERSION)
\"
-Wall
-O2
-D_SHARE_
=
\"
${sharedir}
\"
`
lxrad-config
--cxxflags
`
override
CFLAGS
+=
-D_VERSION_
=
\"
$(VERSION)
\"
-Wall
-
g
-
O2
-D_SHARE_
=
\"
${sharedir}
\"
`
lxrad-config
--cxxflags
`
override
CFLAGS
+=
-DEXT_BROWSER
#override CFLAGS+=-fsanitize=address
...
...
src/Makefile.X11
View file @
c125467c
...
...
@@ -15,7 +15,7 @@ execdir= ${prefix}/bin/
#lxrad automatic generated block start, don't edit below!
override
CFLAGS
+=
-DEXT_BROWSER
-D_VERSION_
=
\"
${VERSION}
\"
-Wall
-g
gdb
-D_SHARE_
=
\"
${sharedir}
\"
-I
/usr/include/lxrad_X11
-Wall
-D_REENTRANT
override
CFLAGS
+=
-DEXT_BROWSER
-D_VERSION_
=
\"
${VERSION}
\"
-Wall
-g
-O2
-D_SHARE_
=
\"
${sharedir}
\"
-I
/usr/include/lxrad_X11
-Wall
-D_REENTRANT
#override CFLAGS+= -D_NOTHREAD
#override CFLAGS+=-fsanitize=address
...
...
src/Makefile.cross
View file @
c125467c
...
...
@@ -4,7 +4,7 @@ CC = x86_64-w64-mingw32-g++
WINDRES
=
x86_64-w64-mingw32-windres
STRIP
=
x86_64-w64-mingw32-strip
override
CFLAGS
+=
-Wall
-O3
-D_WIN_
-I
../dev_w64/include
-I
../dev_w64/include/lxrad
-D_VERSION_
=
\"
$(VERSION)
\"
-D_SHARE_
=
\"
share/
\"
override
CFLAGS
+=
-Wall
-
g
-
O3
-D_WIN_
-I
../dev_w64/include
-I
../dev_w64/include/lxrad
-D_VERSION_
=
\"
$(VERSION)
\"
-D_SHARE_
=
\"
share/
\"
override
CFLAGS
+=
-DEXT_BROWSER
override
CFLAGS
+=
-I
../dev_w64/lib/wx/include/x86_64-w64-mingw32-msw-unicode-3.1
-I
../dev_w64/include/wx-3.1
-D_FILE_OFFSET_BITS
=
64
-DWXUSINGDLL
-D__WXMSW__
#CFLAGS+=`x86_64-w64-mingw32-msw-unicode-3.1 --cxxflags`
...
...
@@ -12,7 +12,9 @@ override CFLAGS+=-I../dev_w64/lib/wx/include/x86_64-w64-mingw32-msw-unicode-3.1
ELIBS_
=
$(
addsuffix
.aw ,
$(ELIBS)
)
LIBS
=
$(ELIBS_)
-llxrad
-lOpenAL32
-lpicsim
-lsimavr
-lws2_32
-L
../dev_w64/lib
LIBS
+=
-Wl
,--subsystem,windows
-mwindows
-lwx_mswu_xrc-3
.1-x86_64-w64-mingw32
-lwx_mswu_html-3
.1-x86_64-w64-mingw32
-lwx_mswu_qa-3
.1-x86_64-w64-mingw32
-lwx_mswu_core-3
.1-x86_64-w64-mingw32
-lwx_baseu_xml-3
.1-x86_64-w64-mingw32
-lwx_baseu_net-3
.1-x86_64-w64-mingw32
-lwx_baseu-3
.1-x86_64-w64-mingw32
#LIBS+= -Wl,--subsystem,windows -mwindows
LIBS
+=
-Wl
,--subsystem,console
-mconsole
LIBS
+=
-lwx_mswu_xrc-3
.1-x86_64-w64-mingw32
-lwx_mswu_html-3
.1-x86_64-w64-mingw32
-lwx_mswu_qa-3
.1-x86_64-w64-mingw32
-lwx_mswu_core-3
.1-x86_64-w64-mingw32
-lwx_baseu_xml-3
.1-x86_64-w64-mingw32
-lwx_baseu_net-3
.1-x86_64-w64-mingw32
-lwx_baseu-3
.1-x86_64-w64-mingw32
#LIBS+=`x86_64-w64-mingw32-msw-unicode-3.1 --libs`
...
...
src/Makefile.cross_32
View file @
c125467c
...
...
@@ -4,7 +4,7 @@ CC = i686-w64-mingw32-g++
WINDRES
=
i686-w64-mingw32-windres
STRIP
=
i686-w64-mingw32-strip
override
CFLAGS
+=
-Wall
-O3
-D_WIN_
-I
../dev_w32/include
-I
../dev_w32/include/lxrad
-D_VERSION_
=
\"
$(VERSION)
\"
-D_SHARE_
=
\"
share/
\"
override
CFLAGS
+=
-Wall
-
g
-
O3
-D_WIN_
-I
../dev_w32/include
-I
../dev_w32/include/lxrad
-D_VERSION_
=
\"
$(VERSION)
\"
-D_SHARE_
=
\"
share/
\"
override
CFLAGS
+=
-DEXT_BROWSER
override
CFLAGS
+=
-I
../dev_w32/lib/wx/include/i686-w64-mingw32-msw-unicode-3.1
-I
../dev_w32/include/wx-3.1
-D_FILE_OFFSET_BITS
=
64
-DWXUSINGDLL
-D__WXMSW__
-mthreads
...
...
src/boards/board_qemu_stm32.cc
View file @
c125467c
...
...
@@ -104,7 +104,7 @@ board_qemu_stm32::MInit(const char * processor, const char * fname, float freq)
#ifdef _TCP_
if
((
listenfd
=
socket
(
PF_INET
,
SOCK_STREAM
,
0
))
<
0
)
{
printf
(
"socket error : %s
\n
"
,
strerror
(
errno
));
printf
(
"
picsimlab:
socket error : %s
\n
"
,
strerror
(
errno
));
exit
(
1
);
}
...
...
@@ -119,7 +119,7 @@ board_qemu_stm32::MInit(const char * processor, const char * fname, float freq)
#else
if
((
listenfd
=
socket
(
PF_UNIX
,
SOCK_STREAM
,
0
))
<
0
)
{
printf
(
"socket error : %s
\n
"
,
strerror
(
errno
));
printf
(
"
picsimlab:
socket error : %s
\n
"
,
strerror
(
errno
));
exit
(
1
);
}
...
...
@@ -131,13 +131,13 @@ board_qemu_stm32::MInit(const char * processor, const char * fname, float freq)
if
(
bind
(
listenfd
,
(
sockaddr
*
)
&
serv
,
sizeof
(
serv
))
<
0
)
{
printf
(
"bind error : %s
\n
"
,
strerror
(
errno
));
printf
(
"
picsimlab:
bind error : %s
\n
"
,
strerror
(
errno
));
exit
(
1
);
}
if
(
listen
(
listenfd
,
SOMAXCONN
)
<
0
)
{
printf
(
"listen error : %s
\n
"
,
strerror
(
errno
));
printf
(
"
picsimlab:
listen error : %s
\n
"
,
strerror
(
errno
));
exit
(
1
);
}
}
...
...
@@ -160,7 +160,7 @@ board_qemu_stm32::MInit(const char * processor, const char * fname, float freq)
}
else
{
printf
(
"Erro creating file %s
\n
"
,
fname_
);
printf
(
"
picsimlab:
Erro creating file %s
\n
"
,
fname_
);
exit
(
-
1
);
}
}
...
...
@@ -193,7 +193,7 @@ board_qemu_stm32::MInit(const char * processor, const char * fname, float freq)
free
(
resp
);
printf
(
"%s
\n
"
,
(
const
char
*
)
cmd
);
printf
(
"
picsimlab:
%s
\n
"
,
(
const
char
*
)
cmd
);
#ifdef _WIN_
lxExecute
(
Window1
.
GetSharePath
()
+
lxT
(
"/../"
)
+
cmd
);
#else
...
...
@@ -205,18 +205,18 @@ board_qemu_stm32::MInit(const char * processor, const char * fname, float freq)
if
(
(
sockfd
=
accept
(
listenfd
,
(
sockaddr
*
)
&
cli
,
&
clilen
))
<
0
)
{
printf
(
"accept error : %s
\n
"
,
strerror
(
errno
));
printf
(
"
picsimlab:
accept error : %s
\n
"
,
strerror
(
errno
));
exit
(
1
);
}
printf
(
"
Qemu connected
!
\n
"
);
printf
(
"
picsimlab: Qemu connected to PICSimLab
!
\n
"
);
setnblock
(
sockfd
);
//monitor
if
((
sockmon
=
socket
(
PF_INET
,
SOCK_STREAM
,
0
))
<
0
)
{
printf
(
"socket error : %s
\n
"
,
strerror
(
errno
));
printf
(
"
picsimlab:
socket error : %s
\n
"
,
strerror
(
errno
));
exit
(
1
);
}
memset
(
&
servm
,
0
,
sizeof
(
servm
));
...
...
@@ -224,20 +224,23 @@ board_qemu_stm32::MInit(const char * processor, const char * fname, float freq)
servm
.
sin_addr
.
s_addr
=
inet_addr
(
"127.0.0.1"
);
servm
.
sin_port
=
htons
(
2500
);
if
(
connect
(
sockmon
,
(
sockaddr
*
)
&
servm
,
sizeof
(
servm
))
<
0
)
n
=
0
;
while
(
connect
(
sockmon
,
(
sockaddr
*
)
&
servm
,
sizeof
(
servm
))
<
0
)
{
printf
(
"connect error : %s
\n
"
,
strerror
(
errno
));
exit
(
1
);
printf
(
"picsimlab: connect error : %s
\n
"
,
strerror
(
errno
));
if
(
n
>
5
)
exit
(
1
);
n
++
;
}
printf
(
"picsimlab: PICSimLab connected to Qemu qmp!
\n
"
);
//read monitor qemu first mensage
if
((
n
=
recv
(
sockmon
,
buff
,
99
,
0
))
<
0
)
{
printf
(
"
connect
error : %s
\n
"
,
strerror
(
errno
));
printf
(
"
picsimlab: recv
error : %s
\n
"
,
strerror
(
errno
));
exit
(
1
);
}
buff
[
n
]
=
0
;
printf
(
"%s"
,
buff
);
printf
(
"
picsimlab:
%s"
,
buff
);
...
...
@@ -540,7 +543,7 @@ board_qemu_stm32::MSetPin(int pin, unsigned char value)
val
|=
0x80
;
if
(
send
(
sockfd
,
(
const
char
*
)
&
val
,
1
,
0
)
!=
1
)
{
printf
(
"send error : %s
\n
"
,
strerror
(
errno
));
printf
(
"
picsimlab:
send error : %s
\n
"
,
strerror
(
errno
));
exit
(
1
);
}
pins
[
pin
-
1
].
value
=
value
;
...
...
@@ -618,7 +621,7 @@ board_qemu_stm32::qemu_cmd(const char * cmd, int raw)
}
buffout[n] = 0;
printf ("(%s)=(%s) \n", buffin, buffout);
printf ("
picsimlab:
(%s)=(%s) \n", buffin, buffout);
*/
if
(
raw
)
...
...
@@ -634,7 +637,7 @@ board_qemu_stm32::qemu_cmd(const char * cmd, int raw)
if
(
send
(
sockmon
,
buffin
,
size
,
0
)
!=
size
)
{
printf
(
"mon send error : %s
\n
"
,
strerror
(
errno
));
printf
(
"
picsimlab:
mon send error : %s
\n
"
,
strerror
(
errno
));
exit
(
1
);
}
...
...
@@ -650,7 +653,7 @@ board_qemu_stm32::qemu_cmd(const char * cmd, int raw)
}
buffout
[
n
]
=
0
;
printf
(
"(%s)=(%s)
\n
"
,
buffin
,
buffout
);
printf
(
"
picsimlab:
(%s)=(%s)
\n
"
,
buffin
,
buffout
);
connected
=
connected_
;
return
0
;
...
...
src/boards/board_uCboard.cc
View file @
c125467c
...
...
@@ -29,6 +29,10 @@
#include"../picsimlab5.h" //Spare Parts
#include"board_uCboard.h"
#ifndef _WIN_
#define INVALID_HANDLE_VALUE -1;
#endif
/* ids of inputs of input map*/
enum
{
...
...
@@ -80,6 +84,8 @@ cboard_uCboard::cboard_uCboard(void)
lxImage
image
;
image
.
LoadFile
(
Window1
.
GetSharePath
()
+
lxT
(
"boards/Common/ic40.png"
));
micbmp
=
new
lxBitmap
(
image
,
&
Window1
);
#
serialfd
=
INVALID_HANDLE_VALUE
;
}
//Destructor called once on board destruction
...
...
@@ -330,7 +336,7 @@ cboard_uCboard::Run_CPU(void)
int
j
;
unsigned
char
pi
;
unsigned
int
alm
[
64
];
int
JUMPSTEPS
=
Window1
.
GetJUMPSTEPS
();
//number of steps skipped
long
int
NSTEPJ
=
Window1
.
GetNSTEPJ
();
//number of steps in 100ms
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment