Recent

Author Topic: AVR / Arduino GUI Package for Lazarus  (Read 5403 times)

Mathias

  • Jr. Member
  • **
  • Posts: 88
Re: AVR / Arduino GUI Package for Lazarus
« Reply #15 on: May 01, 2020, 05:01:40 pm »
The serial monitor has made great progress.
WordWarp is (still) without function.

If you feel like it, you can try it out.

https://github.com/sechshelme/Lazarus-Embedded/tree/master/Lazarus_Arduino_AVR_GUI_Package

Mathias

  • Jr. Member
  • **
  • Posts: 88
Re: AVR / Arduino GUI Package for Lazarus
« Reply #16 on: July 22, 2020, 03:30:09 pm »
I released the tool as version 1.0.0.


Mathias

  • Jr. Member
  • **
  • Posts: 88
Re: AVR / Arduino GUI Package for Lazarus
« Reply #17 on: August 05, 2020, 01:28:07 pm »
@Dimitrios Chr. Ioannidis

In your project I found lines that take me a lot further.
Interrupt the Com-Port when uploading and then open it again.

Code: Pascal  [Select][+][-]
  1. procedure TLSW.DoOpen;
  2. begin
  3.   ShowMessage('Serial Öffnen');
  4. //  if Assigned(SerialMonitor) then
  5. //    SerialMonitor.RequestActivateMonitor(True);
  6. end;
  7.  
  8. procedure TLSW.DoClose;
  9. begin
  10.   ShowMessage('Serial Schliessen');
  11. //  if Assigned(SerialMonitor) then
  12. //    SerialMonitor.RequestActivateMonitor(False);
  13. end;
  14.  
  15. ....
  16.   // Run ( without or with debugger ) hooks
  17.   LazarusIDE.AddHandlerOnRunDebug(@LSW.RunHandler);
  18.   LazarusIDE.AddHandlerOnRunWithoutDebugInit(@LSW.RunNoDebugHandler);
  19.   LazarusIDE.AddHandlerOnRunFinished(@LSW.StopHandler, True);


Addendum:
I completely did without Synaser in my project, I now use the Serial unit, which is part of Lazarus.


I have discovered another error regarding this stopping of the Com-Port.

Overriding these functions is useless since they are only executed when avrdude is ready.
Code: Pascal  [Select][+][-]
  1.   // Useless
  2.   LazarusIDE.AddHandlerOnRunDebug(@NewIDEHandle.RunHandler, False);
  3.   LazarusIDE.AddHandlerOnRunWithoutDebugInit(@NewIDEHandle.RunNoDebugHandler, False);
  4.   LazarusIDE.AddHandlerOnRunFinished(@NewIDEHandle.StopHandler, True);
[
 

You have to overwrite the following:
Code: Pascal  [Select][+][-]
  1.   // correct
  2.   LazarusIDE.AddHandlerOnProjectBuilding(@NewIDEHandle.RunBuilding, False);
  3.   LazarusIDE.AddHandlerOnProjectBuildingFinished(@NewIDEHandle.StopBuilding, True);

d.ioannidis

  • Full Member
  • ***
  • Posts: 221
    • Nephelae
Re: AVR / Arduino GUI Package for Lazarus
« Reply #18 on: August 05, 2020, 03:00:31 pm »
Hi,


< sip>

I have discovered another error regarding this stopping of the Com-Port.

Overriding these functions is useless since they are only executed when avrdude is ready.
Code: Pascal  [Select][+][-]
  1.   // Useless
  2.   LazarusIDE.AddHandlerOnRunDebug(@NewIDEHandle.RunHandler, False);
  3.   LazarusIDE.AddHandlerOnRunWithoutDebugInit(@NewIDEHandle.RunNoDebugHandler, False);
  4.   LazarusIDE.AddHandlerOnRunFinished(@NewIDEHandle.StopHandler, True);
[
 

You have to overwrite the following:
Code: Pascal  [Select][+][-]
  1.   // correct
  2.   LazarusIDE.AddHandlerOnProjectBuilding(@NewIDEHandle.RunBuilding, False);
  3.   LazarusIDE.AddHandlerOnProjectBuildingFinished(@NewIDEHandle.StopBuilding, True);

it's not an error Mathias.

The lazserialmonitor at github,  is a proof of concept showing that you can override some IDE handlers depending on the situation and the functionality you want.

Also you can see at "Added handlers for project build." commit from April 25, that I added those build handlers ;) .

regards,

Mathias

  • Jr. Member
  • **
  • Posts: 88
Re: AVR / Arduino GUI Package for Lazarus
« Reply #19 on: August 06, 2020, 03:50:58 pm »
I probably caught an older version of you there. The building was not yet overwritten there.
For what do you still have the open and close in the handle?
For me this was useless.

 

TinyPortal © 2005-2018