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
36f9e56b
Commit
36f9e56b
authored
Jul 13, 2020
by
lcgamboa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new: Menu option to kick load Arduino bootloader
parent
3528dbf4
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
695 additions
and
43 deletions
+695
-43
share/bootloaders/arduino_atmega2560.hex
share/bootloaders/arduino_atmega2560.hex
+513
-0
share/bootloaders/arduino_atmega328p.hex
share/bootloaders/arduino_atmega328p.hex
+125
-0
src/boards/board_avr.cc
src/boards/board_avr.cc
+1
-1
src/picsimlab1.cc
src/picsimlab1.cc
+32
-39
src/picsimlab1.h
src/picsimlab1.h
+3
-1
src/picsimlab1_d.cc
src/picsimlab1_d.cc
+11
-1
src/picsimlab_1.lxrad
src/picsimlab_1.lxrad
+10
-1
No files found.
share/bootloaders/arduino_atmega2560.hex
0 → 100644
View file @
36f9e56b
This diff is collapsed.
Click to expand it.
share/bootloaders/arduino_atmega328p.hex
0 → 100644
View file @
36f9e56b
:107800000C94343C0C94513C0C94513C0C94513CE1
:107810000C94513C0C94513C0C94513C0C94513CB4
:107820000C94513C0C94513C0C94513C0C94513CA4
:107830000C94513C0C94513C0C94513C0C94513C94
:107840000C94513C0C94513C0C94513C0C94513C84
:107850000C94513C0C94513C0C94513C0C94513C74
:107860000C94513C0C94513C11241FBECFEFD8E036
:10787000DEBFCDBF11E0A0E0B1E0ECE9FFE702C060
:1078800005900D92A230B107D9F712E0A2E0B1E065
:1078900001C01D92AD30B107E1F70E942D3D0C945F
:1078A000CC3F0C94003C982F959595959595959582
:1078B000905D8F708A307CF0282F295A8091C0000B
:1078C00085FFFCCF9093C6008091C00085FFFCCF60
:1078D0002093C6000895282F205DF0CF982F809127
:1078E000C00085FFFCCF9093C6000895EF92FF92F1
:1078F0000F931F93EE24FF2487018091C00087FD22
:1079000017C00894E11CF11C011D111D81E4E8164B
:1079100082E4F8068FE0080780E0180770F3E09132
:107920000401F091050109958091C00087FFE9CF1E
:107930008091C6001F910F91FF90EF9008950E94D3
:10794000763C982F8091C00085FFFCCF9093C600B5
:1079500091362CF490330CF09053892F089597555D
:10796000892F08951F930E949F3C182F0E949F3CCF
:107970001295107F810F1F9108951F93182F882350
:1079800021F00E94763C1150E1F71F9108951F935A
:10799000182F0E94763C803249F0809103018F5F5E
:1079A000809303018530C1F01F9108958091C0003C
:1079B00085FFFCCF84E18093C6008091C00085FFE5
:1079C000FCCF1093C6008091C00085FFFCCF80E102
:1079D0008093C6001F910895E0910401F091050184
:1079E00009951F9108950E94763C803241F0809164
:1079F00003018F5F80930301853081F008958091AA
:107A0000C00085FFFCCF84E18093C6008091C00058
:107A100085FFFCCF80E18093C6000895E0910401CA
:107A2000F09105010995089540E951E08823A1F0FE
:107A30002D9A28EE33E0FA013197F1F721503040CA
:107A4000D1F72D9828EE33E0FA013197F1F7215064
:107A50003040D1F7815061F708953F924F925F9285
:107A60006F927F928F929F92AF92BF92CF92DF924E
:107A7000EF92FF920F931F93CF93DF93000080E16B
:107A80008093C4001092C50088E18093C10086E015
:107A90008093C2005098589A259A81E00E94143D24
:107AA00024E1F22E9EE1E92E85E9D82E0FE0C02ECA
:107AB00010E1B12EAA24A394B1E49B2EA6E58A2E50
:107AC000F2E57F2EE0E26E2E79E4572E63E5462E36
:107AD00050E5352E0E94763C8033B1F18133B9F107
:107AE000803409F46FC0813409F476C0823409F41B
:107AF00085C0853409F488C0803531F1823521F1A3
:107B0000813511F1853509F485C0863509F48DC0BC
:107B1000843609F496C0843709F403C1853709F423
:107B200072C1863709F466C0809103018F5F80932C
:107B30000301853079F6E0910401F0910501099582
:107B40000E94763C803351F60E94F33CC3CF0E94E2
:107B5000763C803249F78091C00085FFFCCFF092DF
:107B6000C6008091C00085FFFCCF9092C600809136
:107B7000C00085FFFCCF8092C6008091C00085FFC9
:107B8000FCCF7092C6008091C00085FFFCCF609250
:107B9000C6008091C00085FFFCCF5092C600809146
:107BA000C00085FFFCCF4092C6008091C00085FFD9
:107BB000FCCF3092C6008091C00085FFFCCFB09210
:107BC000C60088CF0E94763C863808F4BDCF0E945C
:107BD000763C0E94F33C7ECF0E94763C803809F4CC
:107BE0009CC0813809F40BC1823809F43CC1883942
:107BF00009F48FC080E00E94C73C6CCF84E10E94F2
:107C0000BD3C0E94F33C66CF85E00E94BD3C0E94D3
:107C1000F33C60CF0E94763C809306010E94763C44
:107C2000809307010E94F33C55CF0E94763C80333D
:107C300009F41DC183E00E94BD3C80E00E94C73C66
:107C400049CF0E94763C809309020E94763C809343
:107C5000080280910C028E7F80930C020E94763C79
:107C6000853409F415C18091080290910902892B8D
:107C700089F000E010E00E94763CF801E85FFE4FDA
:107C800080830F5F1F4F80910802909109020817AF
:107C9000190788F30E94763C803209F045CF809125
:107CA0000C0280FF01C16091060170910701660F0F
:107CB000771F7093070160930601A0910802B091AD
:107CC00009021097C9F0E8E0F1E09B01AD014E0F09
:107CD0005F1FF999FECF32BD21BD819180BDFA9A17
:107CE000F99A2F5F3F4FE417F50799F76A0F7B1F4B
:107CF00070930701609306018091C00085FFFCCF5F
:107D0000F092C6008091C00085FFFCCFB092C60003
:107D1000E1CE83E00E94C73CDDCE82E00E94C73CFA
:107D2000D9CE0E94763C809309020E94763C8093D3
:107D300008028091060190910701880F991F909386
:107D40000701809306010E94763C853409F4A6C0A1
:107D500080910C028E7F80930C020E94763C8032D0
:107D600009F0B8CE8091C00085FFFCCFF092C6002C
:107D7000609108027091090261157105B9F140E046
:107D800050E080910C02A82FA170B82FB27011C0E2
:107D9000BB2309F45CC0E0910601F0910701319624
:107DA000F0930701E09306014F5F5F4F46175707B7
:107DB000E8F4AA2369F3F999FECF209106013091E6
:107DC000070132BD21BDF89A90B58091C00085FFB2
:107DD000FCCF9093C6002F5F3F4F30930701209355
:107DE00006014F5F5F4F4617570718F38091C00099
:107DF00085FDE5CE8091C00085FFF8CFE0CE81E023
:107E00000E94C73C67CE0E94763C803209F08CCE3F
:107E10008091C00085FFFCCFF092C6008091C00029
:107E200085FFFCCFE092C6008091C00085FFFCCFAB
:107E3000D092C6008091C00085FFFCCFC092C600E2
:107E40008091C00085FFFCCFB092C60043CEE09188
:107E50000601F091070194918091C00085FFFCCF4D
:107E60009093C6009CCF80E10E94C73C33CE0E9415
:107E7000763C0E94763C182F0E94763C112309F430
:107E800083C0113009F484C08FE00E94C73C22CE29
:107E900080910C02816080930C02E5CE80910C02EF
:107EA000816080930C0259CF809107018823880F4D
:107EB000880B8A2180930B02809106019091070123
:107EC000880F991F90930701809306018091080203
:107ED00080FF09C080910802909109020196909359
:107EE000090280930802F894F999FECF1127E091D6
:107EF0000601F0910701C8E0D1E08091080290915D
:107F00000902103091F40091570001700130D9F34B
:107F100003E000935700E89500915700017001308D
:107F2000D9F301E100935700E89509901990009169
:107F3000570001700130D9F301E000935700E89534
:107F40001395103498F011270091570001700130FB
:107F5000D9F305E000935700E895009157000170B0
:107F60000130D9F301E100935700E895329602976A
:107F700009F0C7CF103011F00296E5CF112480919F
:107F8000C00085FFB9CEBCCE8EE10E94C73CA2CD19
:0C7F900085E90E94C73C9ECDF894FFCF0D
:027F9C00800063
:040000030000780081
:00000001FF
src/boards/board_avr.cc
View file @
36f9e56b
...
...
@@ -75,7 +75,7 @@ board_avr::board_avr(void)
{
avr
=
NULL
;
serial_irq
=
NULL
;
avr_debug_type
=
0
;
avr_debug_type
=
0
;
}
void
...
...
src/picsimlab1.cc
View file @
36f9e56b
...
...
@@ -359,7 +359,7 @@ CPWindow1::Configure(CControl * control, const char * home)
{
sscanf
(
value
,
"%i"
,
&
debug_type
);
}
if
(
!
strcmp
(
name
,
"debugp"
))
{
sscanf
(
value
,
"%hu"
,
&
debug_port
);
...
...
@@ -477,20 +477,20 @@ CPWindow1::Configure(CControl * control, const char * home)
#else
if
(
debug
)
{
int
ret
=
pboard
->
DebugInit
(
debug_type
);
if
(
ret
<
0
)
int
ret
=
pboard
->
DebugInit
(
debug_type
);
if
(
ret
<
0
)
{
statusbar1
.
SetField
(
1
,
status
+
lxT
(
"Debug: Error"
));
}
else
{
if
(
ret
)
if
(
ret
)
{
statusbar1
.
SetField
(
1
,
status
+
lxT
(
"Debug: GDB:"
)
+
itoa
(
debug_port
));
statusbar1
.
SetField
(
1
,
status
+
lxT
(
"Debug: GDB:"
)
+
itoa
(
debug_port
));
}
else
else
{
statusbar1
.
SetField
(
1
,
status
+
lxT
(
"Debug: MDB:"
)
+
itoa
(
debug_port
));
statusbar1
.
SetField
(
1
,
status
+
lxT
(
"Debug: MDB:"
)
+
itoa
(
debug_port
));
}
}
}
...
...
@@ -514,6 +514,16 @@ CPWindow1::Configure(CControl * control, const char * home)
sprintf
(
fname
,
"%s/parts_%02i.pcf"
,
home
,
lab
);
Window5
.
LoadConfig
(
fname
);
if
((
lab
==
0
)
||
(
lab
==
5
))
{
menu1_Tools_ArduinoBootloader
.
SetEnable
(
true
);
}
else
{
menu1_Tools_ArduinoBootloader
.
SetEnable
(
false
);
}
}
//Change frequency
...
...
@@ -668,35 +678,8 @@ CPWindow1::filedialog1_EvOnClose(int retId)
if
(
retId
&&
(
filedialog1
.
GetType
()
==
(
lxFD_OPEN
|
lxFD_CHANGE_DIR
)))
{
pboard
->
MEnd
();
pboard
->
MSetSerial
(
SERIALDEVICE
);
switch
(
pboard
->
MInit
(
pboard
->
GetProcessorName
(),
filedialog1
.
GetFileName
().
char_str
(),
NSTEP
*
NSTEPKF
))
{
case
HEX_NFOUND
:
Message
(
lxT
(
"File not found!"
));
mcurun
=
0
;
break
;
case
HEX_CHKSUM
:
Message
(
lxT
(
"File checksum error!"
));
pboard
->
MEraseFlash
();
mcurun
=
0
;
break
;
case
0
:
mcurun
=
1
;
break
;
}
pboard
->
Reset
();
if
(
mcurun
)
SetTitle
(
lxT
(
"PICSimLab - "
)
+
String
(
boards_list
[
lab
])
+
lxT
(
" - "
)
+
pboard
->
GetProcessorName
()
+
lxT
(
" - "
)
+
basename
(
filedialog1
.
GetFileName
()));
else
SetTitle
(
lxT
(
"PICSimLab - "
)
+
String
(
boards_list
[
lab
])
+
lxT
(
" - "
)
+
pboard
->
GetProcessorName
());
LoadHexFile
(
filedialog1
.
GetFileName
());
PATH
=
filedialog1
.
GetDir
();
FNAME
=
filedialog1
.
GetFileName
();
...
...
@@ -764,6 +747,7 @@ CPWindow1::menu1_Help_Examples_EvMenuActive(CControl * control)
#ifdef EXT_BROWSER_EXAMPLES
//lxLaunchDefaultBrowser(lxT("file://")+share + lxT ("docs/picsimlab.html"));
lxLaunchDefaultBrowser
(
lxT
(
"https://lcgamboa.github.io/picsimlab/examples/examples_index.html#board_"
+
itoa
(
lab
)
+
lxT
(
"_"
)
+
pboard
->
GetProcessorName
()));
WDestroy
();
#else
OldPath
=
filedialog2
.
GetDir
();
...
...
@@ -833,7 +817,7 @@ CPWindow1::menu1_File_Configure_EvMenuActive(CControl * control)
}
void
CPWindow1
::
menu1_File_ReloadLast_EvMenuActive
(
CControl
*
control
)
CPWindow1
::
LoadHexFile
(
String
fname
)
{
int
pa
;
...
...
@@ -851,7 +835,7 @@ CPWindow1::menu1_File_ReloadLast_EvMenuActive(CControl * control)
pboard
->
MEnd
();
pboard
->
MSetSerial
(
SERIALDEVICE
);
switch
(
pboard
->
MInit
(
pboard
->
GetProcessorName
(),
FNAME
.
char_str
(),
NSTEP
*
NSTEPKF
))
switch
(
pboard
->
MInit
(
pboard
->
GetProcessorName
(),
fname
.
char_str
(),
NSTEP
*
NSTEPKF
))
{
case
HEX_NFOUND
:
Message
(
lxT
(
"File not found!"
));
...
...
@@ -876,11 +860,14 @@ CPWindow1::menu1_File_ReloadLast_EvMenuActive(CControl * control)
SetTitle
(
lxT
(
"PICSimLab - "
)
+
String
(
boards_list
[
lab
])
+
lxT
(
" - "
)
+
pboard
->
GetProcessorName
());
mcupwr
=
pa
;
timer1
.
SetRunState
(
1
);
}
void
CPWindow1
::
menu1_File_ReloadLast_EvMenuActive
(
CControl
*
control
)
{
LoadHexFile
(
FNAME
);
}
void
...
...
@@ -1200,6 +1187,12 @@ CPWindow1::menu1_Tools_Esp8266ModemSimulator_EvMenuActive(CControl * control)
#endif
}
void
CPWindow1
::
menu1_Tools_ArduinoBootloader_EvMenuActive
(
CControl
*
control
)
{
LoadHexFile
(
share
+
"bootloaders/arduino_"
+
pboard
->
GetProcessorName
()
+
".hex"
);
}
void
CPWindow1
::
Set_mcudbg
(
int
pd
)
{
...
...
src/picsimlab1.h
View file @
36f9e56b
...
...
@@ -97,6 +97,7 @@ public:
CItemMenu
menu1_Tools_SerialTerm
;
CItemMenu
menu1_Tools_SerialRemoteTank
;
CItemMenu
menu1_Tools_Esp8266ModemSimulator
;
CItemMenu
menu1_Tools_ArduinoBootloader
;
CItemMenu
menu1_Help_Contents
;
CItemMenu
menu1_Help_Examples
;
CItemMenu
menu1_Help_About
;
...
...
@@ -127,6 +128,7 @@ public:
void
menu1_Tools_SerialTerm_EvMenuActive
(
CControl
*
control
);
void
menu1_Tools_SerialRemoteTank_EvMenuActive
(
CControl
*
control
);
void
menu1_Tools_Esp8266ModemSimulator_EvMenuActive
(
CControl
*
control
);
void
menu1_Tools_ArduinoBootloader_EvMenuActive
(
CControl
*
control
);
void
menu1_Help_Contents_EvMenuActive
(
CControl
*
control
);
void
menu1_Help_Examples_EvMenuActive
(
CControl
*
control
);
void
menu1_Help_About_EvMenuActive
(
CControl
*
control
);
...
...
@@ -272,7 +274,7 @@ public:
void
menu1_EvBoard
(
CControl
*
control
);
void
menu1_EvMicrocontroller
(
CControl
*
control
);
void
LoadWorkspace
(
String
fnpzw
);
void
LoadHexFile
(
String
fname
);
private:
String
share
;
...
...
src/picsimlab1_d.cc
View file @
36f9e56b
...
...
@@ -177,7 +177,7 @@ CPWindow1::CPWindow1(void)
menu1_Tools
.
SetName
(
lxT
(
"menu1_Tools"
));
menu1_Tools
.
SetTag
(
0
);
menu1_Tools
.
SetText
(
lxT
(
"Tools"
));
menu1_Tools
.
SetMenuItems
(
lxT
(
"Serial Term,Serial Remote Tank,Esp8266 Modem Simulator,"
));
menu1_Tools
.
SetMenuItems
(
lxT
(
"Serial Term,Serial Remote Tank,Esp8266 Modem Simulator,
Arduino Bootloader,
"
));
menu1
.
CreateChild
(
&
menu1_Tools
);
//menu1_Help
menu1_Help
.
SetFOwner
(
this
);
...
...
@@ -307,6 +307,16 @@ CPWindow1::CPWindow1(void)
menu1_Tools_Esp8266ModemSimulator
.
SetSubMenu
(
NULL
);
menu1_Tools_Esp8266ModemSimulator
.
EvMenuActive
=
EVMENUACTIVE
&
CPWindow1
::
menu1_Tools_Esp8266ModemSimulator_EvMenuActive
;
menu1_Tools
.
CreateChild
(
&
menu1_Tools_Esp8266ModemSimulator
);
//menu1_Tools_ArduinoBootloader
menu1_Tools_ArduinoBootloader
.
SetFOwner
(
this
);
menu1_Tools_ArduinoBootloader
.
SetClass
(
lxT
(
"CItemMenu"
));
menu1_Tools_ArduinoBootloader
.
SetName
(
lxT
(
"menu1_Tools_ArduinoBootloader"
));
menu1_Tools_ArduinoBootloader
.
SetTag
(
0
);
menu1_Tools_ArduinoBootloader
.
SetText
(
lxT
(
"Arduino Bootloader"
));
menu1_Tools_ArduinoBootloader
.
SetEnable
(
1
);
menu1_Tools_ArduinoBootloader
.
SetSubMenu
(
NULL
);
menu1_Tools_ArduinoBootloader
.
EvMenuActive
=
EVMENUACTIVE
&
CPWindow1
::
menu1_Tools_ArduinoBootloader_EvMenuActive
;
menu1_Tools
.
CreateChild
(
&
menu1_Tools_ArduinoBootloader
);
//menu1_Help_Contents
menu1_Help_Contents
.
SetFOwner
(
this
);
menu1_Help_Contents
.
SetClass
(
lxT
(
"CItemMenu"
));
...
...
src/picsimlab_1.lxrad
View file @
36f9e56b
...
...
@@ -177,7 +177,7 @@
<Name type="String">menu1_Tools</Name>
<Tag type="int">0</Tag>
<Text type="String">Tools</Text>
<MenuItems type="MenuItems">Serial Term,Serial Remote Tank,Esp8266 Modem Simulator,</MenuItems>
<MenuItems type="MenuItems">Serial Term,Serial Remote Tank,Esp8266 Modem Simulator,
Arduino Bootloader,
</MenuItems>
</menu1_Tools>
<menu1_Help>
<Class type="String">CPMenu</Class>
...
...
@@ -294,6 +294,15 @@
<SubMenu type="SubMenu">NULL</SubMenu>
<EvMenuActive type="Event">TRUE</EvMenuActive>
</menu1_Tools_Esp8266ModemSimulator>
<menu1_Tools_ArduinoBootloader>
<Class type="String">CItemMenu</Class>
<Name type="String">menu1_Tools_ArduinoBootloader</Name>
<Tag type="int">0</Tag>
<Text type="String">Arduino Bootloader</Text>
<Enable type="bool">1</Enable>
<SubMenu type="SubMenu">NULL</SubMenu>
<EvMenuActive type="Event">TRUE</EvMenuActive>
</menu1_Tools_ArduinoBootloader>
<menu1_Help_Contents>
<Class type="String">CItemMenu</Class>
<Name type="String">menu1_Help_Contents</Name>
...
...
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