mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-09 20:15:58 +02:00
Add a monitor command list to be called after uploading is finished.
This commit is contained in:
parent
29cf0ce9d6
commit
9de2a8dfbc
@ -138,7 +138,7 @@ var
|
|||||||
AAfterConnectMonitorCmds: TStringList;
|
AAfterConnectMonitorCmds: TStringList;
|
||||||
ASkipSectionsList: TStringList;
|
ASkipSectionsList: TStringList;
|
||||||
AAfterUploadBreakZero: boolean;
|
AAfterUploadBreakZero: boolean;
|
||||||
AAfterUploadMonitorReset: boolean;
|
AAfterUploadMonitorCmds: TStringList;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
@ -961,10 +961,10 @@ begin
|
|||||||
|
|
||||||
// Fancy stuff - load exe & sections, run monitor cmds etc
|
// Fancy stuff - load exe & sections, run monitor cmds etc
|
||||||
if assigned(AAfterConnectMonitorCmds) and (AAfterConnectMonitorCmds.Count > 0) then
|
if assigned(AAfterConnectMonitorCmds) and (AAfterConnectMonitorCmds.Count > 0) then
|
||||||
begin
|
begin
|
||||||
for i := 0 to AAfterConnectMonitorCmds.Count-1 do
|
for i := 0 to AAfterConnectMonitorCmds.Count-1 do
|
||||||
SendMonitorCmd(AAfterConnectMonitorCmds[i]);
|
SendMonitorCmd(AAfterConnectMonitorCmds[i]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// Start with AVR logic
|
// Start with AVR logic
|
||||||
// If more targets are supported, move this to target specific debugger class
|
// If more targets are supported, move this to target specific debugger class
|
||||||
@ -1018,9 +1018,11 @@ begin
|
|||||||
if AAfterUploadBreakZero then
|
if AAfterUploadBreakZero then
|
||||||
SetBreakWatchPoint(0, wkpExec); // Todo: check if different address is required
|
SetBreakWatchPoint(0, wkpExec); // Todo: check if different address is required
|
||||||
|
|
||||||
// Todo: Rather use a user configurable list of monitor commands, similar to AAfterConnectMonitorCmds
|
if assigned(AAfterUploadMonitorCmds) and (AAfterUploadMonitorCmds.Count > 0) then
|
||||||
if AAfterUploadMonitorReset then
|
begin
|
||||||
SendMonitorCmd('reset');
|
for i := 0 to AAfterUploadMonitorCmds.Count-1 do
|
||||||
|
SendMonitorCmd(AAfterUploadMonitorCmds[i]);
|
||||||
|
end;
|
||||||
|
|
||||||
// Must be last init command, after init the debug loop waits for the response in WaitForSignal
|
// Must be last init command, after init the debug loop waits for the response in WaitForSignal
|
||||||
res := SendCommandAck('?');
|
res := SendCommandAck('?');
|
||||||
@ -1043,5 +1045,9 @@ initialization
|
|||||||
finalization
|
finalization
|
||||||
if Assigned(AAfterConnectMonitorCmds) then
|
if Assigned(AAfterConnectMonitorCmds) then
|
||||||
FreeAndNil(AAfterConnectMonitorCmds);
|
FreeAndNil(AAfterConnectMonitorCmds);
|
||||||
|
if Assigned(ASkipSectionsList) then
|
||||||
|
FreeAndNil(ASkipSectionsList);
|
||||||
|
if Assigned(AAfterUploadMonitorCmds) then
|
||||||
|
FreeAndNil(AAfterUploadMonitorCmds);
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user