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
9c012400
Commit
9c012400
authored
Jun 29, 2020
by
lcgamboa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new: support to atmega2560
parent
761728d7
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
708 additions
and
319 deletions
+708
-319
share/boards/ic100.png
share/boards/ic100.png
+0
-0
src/Makefile.X11
src/Makefile.X11
+1
-1
src/boards/board_0.cc
src/boards/board_0.cc
+36
-35
src/boards/board_0.h
src/boards/board_0.h
+1
-1
src/boards/board_avr.cc
src/boards/board_avr.cc
+668
-279
src/boards/board_avr.h
src/boards/board_avr.h
+1
-2
src/picsimlab5.h
src/picsimlab5.h
+1
-1
No files found.
share/boards/ic100.png
0 → 100644
View file @
9c012400
9.61 KB
src/Makefile.X11
View file @
9c012400
...
...
@@ -17,7 +17,7 @@ execdir= ${prefix}/bin/
override
CFLAGS
+=
-DEXT_BROWSER
-D_VERSION_
=
\"
${VERSION}
\"
-Wall
-ggdb
-D_SHARE_
=
\"
${sharedir}
\"
-I
/usr/include/lxrad_X11
-Wall
-D_REENTRANT
#override CFLAGS+= -D_NOTHREAD
override
CFLAGS
+=
-fsanitize
=
address
#
override CFLAGS+=-fsanitize=address
override
CFLAGS
+=
-D_EXPERIMENTAL_
#LIBS = `lxrad_X11-config --libs` -lpicsim -lsimavr -lelf -lminizip
...
...
src/boards/board_0.cc
View file @
9c012400
...
...
@@ -347,9 +347,9 @@ cboard_0::Draw(CDraw *draw, double scale)
draw
->
Canvas
.
Rectangle
(
1
,
output
[
i
].
x1
,
output
[
i
].
y1
,
output
[
i
].
x2
-
output
[
i
].
x1
,
output
[
i
].
y2
-
output
[
i
].
y1
);
break
;
case
O_MP
:
lxFont
font
((
MGetPinCount
()
>
14
)
?
12
:
10
,
lxFONTFAMILY_TELETYPE
,
lxFONTSTYLE_NORMAL
,
lxFONTWEIGHT_NORMAL
);
lxFont
font
((
MGetPinCount
()
>
14
)
?
12
:
10
,
lxFONTFAMILY_TELETYPE
,
lxFONTSTYLE_NORMAL
,
lxFONTWEIGHT_NORMAL
);
draw
->
Canvas
.
SetFont
(
font
);
ps
=
micbmp
->
GetSize
();
...
...
@@ -378,7 +378,7 @@ cboard_0::Run_CPU(void)
int
j
;
unsigned
char
pi
;
const
picpin
*
pins
;
unsigned
int
alm
[
4
0
];
unsigned
int
alm
[
10
0
];
int
JUMPSTEPS
=
0
;
//long int NSTEPJ = 0;
...
...
@@ -450,7 +450,7 @@ cboard_0::Run_CPU(void)
memset
(
alm
,
0
,
pinc
*
sizeof
(
unsigned
int
));
//read pic.pins to a local variable to speed up
pins
=
board_avr
::
MGetPinsValues
();
if
(
use_spare
)
Window5
.
PreProcess
();
...
...
@@ -593,39 +593,40 @@ cboard_0::MInit(const char * processor, const char * fname, float freq)
break
;
}
if
(
!
ret
)
lxImage
image
;
switch
(
MGetPinCount
())
{
lxImage
image
;
case
8
:
image
.
LoadFile
(
Window1
.
GetSharePath
()
+
lxT
(
"boards/ic08.png"
));
break
;
case
14
:
image
.
LoadFile
(
Window1
.
GetSharePath
()
+
lxT
(
"boards/ic14.png"
));
break
;
case
18
:
image
.
LoadFile
(
Window1
.
GetSharePath
()
+
lxT
(
"boards/ic18.png"
));
break
;
case
20
:
image
.
LoadFile
(
Window1
.
GetSharePath
()
+
lxT
(
"boards/ic20.png"
));
break
;
case
28
:
image
.
LoadFile
(
Window1
.
GetSharePath
()
+
lxT
(
"boards/ic28.png"
));
break
;
case
40
:
image
.
LoadFile
(
Window1
.
GetSharePath
()
+
lxT
(
"boards/ic40.png"
));
break
;
case
100
:
image
.
LoadFile
(
Window1
.
GetSharePath
()
+
lxT
(
"boards/ic100.png"
));
break
;
default:
image
.
LoadFile
(
Window1
.
GetSharePath
()
+
lxT
(
"boards/ic40.png"
));
printf
(
"IC package with %i pins not found!
\n
"
,
MGetPinCount
());
break
;
}
switch
(
MGetPinCount
())
{
case
8
:
image
.
LoadFile
(
Window1
.
GetSharePath
()
+
lxT
(
"boards/ic08.png"
));
break
;
case
14
:
image
.
LoadFile
(
Window1
.
GetSharePath
()
+
lxT
(
"boards/ic14.png"
));
break
;
case
18
:
image
.
LoadFile
(
Window1
.
GetSharePath
()
+
lxT
(
"boards/ic18.png"
));
break
;
case
20
:
image
.
LoadFile
(
Window1
.
GetSharePath
()
+
lxT
(
"boards/ic20.png"
));
break
;
case
28
:
image
.
LoadFile
(
Window1
.
GetSharePath
()
+
lxT
(
"boards/ic28.png"
));
break
;
case
40
:
image
.
LoadFile
(
Window1
.
GetSharePath
()
+
lxT
(
"boards/ic40.png"
));
break
;
default:
image
.
LoadFile
(
Window1
.
GetSharePath
()
+
lxT
(
"boards/ic40.png"
));
printf
(
"IC package with %i pins not found!
\n
"
,
MGetPinCount
());
break
;
}
if
(
micbmp
)
delete
micbmp
;
micbmp
=
new
lxBitmap
(
image
,
&
Window1
);
if
(
micbmp
)
delete
micbmp
;
micbmp
=
new
lxBitmap
(
image
,
&
Window1
);
}
return
ret
;
}
...
...
src/boards/board_0.h
View file @
9c012400
...
...
@@ -86,7 +86,7 @@ class cboard_0:public board_pic, public board_avr
void
Run_CPU
(
void
);
//Return a list of board supported microcontrollers
#ifdef _EXPERIMENTAL_
String
GetSupportedDevices
(
void
){
return
lxT
(
"atmega328p,PIC16F18324,PIC16F18855,PIC16F1619,PIC16F1788,PIC16F1789,PIC16F1939,PIC16F628A,PIC16F648A,PIC16F84A,PIC16F777,PIC16F877A,PIC18F452,PIC18F4520,PIC18F4550,PIC18F45K50,PIC18F4620,PIC18F27K40,PIC18F47K40,"
);};
String
GetSupportedDevices
(
void
){
return
lxT
(
"atmega328p,
atmega2560,
PIC16F18324,PIC16F18855,PIC16F1619,PIC16F1788,PIC16F1789,PIC16F1939,PIC16F628A,PIC16F648A,PIC16F84A,PIC16F777,PIC16F877A,PIC18F452,PIC18F4520,PIC18F4550,PIC18F45K50,PIC18F4620,PIC18F27K40,PIC18F47K40,"
);};
#else
String
GetSupportedDevices
(
void
){
return
lxT
(
"atmega328p,PIC16F628A,PIC16F648A,PIC16F84A,PIC16F777,PIC16F877A,PIC18F452,PIC18F4550,PIC18F4620,"
);};
#endif
...
...
src/boards/board_avr.cc
View file @
9c012400
This diff is collapsed.
Click to expand it.
src/boards/board_avr.h
View file @
9c012400
...
...
@@ -96,8 +96,7 @@ class board_avr: virtual public board
avr_t
*
avr
;
avr_irq_t
*
serial_irq
;
picpin
pins
[
256
];
//FIXME only for atmega328 suppport
avr_irq_t
*
Write_stat_irq
[
28
];
avr_irq_t
*
Write_stat_irq
[
100
];
unsigned
int
serialbaud
;
float
serialexbaud
;
void
pins_reset
(
void
);
...
...
src/picsimlab5.h
View file @
9c012400
...
...
@@ -30,7 +30,7 @@
#include"parts/part.h"
#include"parts/parts_defs.h"
#define IOINIT
7
0
#define IOINIT
11
0
/**
* @brief CPWindow4 class
...
...
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