<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><tt>Hi,</tt></p>
<p><tt> I started to write a driver (
<a class="moz-txt-link-freetext" href="https://github.com/dioannidis/fp_ethernet_enc28j60.git">https://github.com/dioannidis/fp_ethernet_enc28j60.git</a> ) for
this chip ( ENC28J60 Ethernet Controller ) first for the </tt><tt><tt>
AVR platform, </tt>( heavily inspired from the UIPEthernet
library ( <a class="moz-txt-link-freetext" href="https://github.com/UIPEthernet/UIPEthernet.git">https://github.com/UIPEthernet/UIPEthernet.git</a> )) and
I want to ask the community, of course, is there anyone that
already done it ? <br>
</tt></p>
<p><tt> My goal is to made the free pascal users able to use a very
low cost solution Arduino Nano / UNO development board with a
ENC28J60 module for a little IoT ( and not only ) fun, learning
e.t.c. ...<br>
</tt></p>
<p><tt> I managed to configure the chip and the driver receives
packets ( </tt><tt><span class="pl-c">broadcast packets </span>configured
to allow only ARP ). <br>
</tt></p>
<p><tt> Now, because I'm not embedded developer I'm thinking that I
would need help / advices to take some decisions so here I am. <br>
</tt></p>
<p><tt> First and more important, in the new FPC version, will the
AVR platform review / resolve the following issues : <br>
</tt></p>
<tt> "AVR - incorrect stack error checking"
(<a class="moz-txt-link-freetext" href="https://bugs.freepascal.org/view.php?id=35332">https://bugs.freepascal.org/view.php?id=35332</a>) </tt><br>
<tt> "AVR - Assembler routines for 8, 16 & 32 bit unsigned
div (code contribution)" (
<a class="moz-txt-link-freetext" href="https://bugs.freepascal.org/view.php?id=32103">https://bugs.freepascal.org/view.php?id=32103</a> )</tt><br>
<tt> "</tt><tt>AVR - invalid address used when evaluating a
variable in gdb" ( <a class="moz-txt-link-freetext" href="https://bugs.freepascal.org/view.php?id=33914">https://bugs.freepascal.org/view.php?id=33914</a> )</tt><br>
<tt> "AVR - Incorrect SPI clock rate bit constant names in some
microcontroller units" (
<a class="moz-txt-link-freetext" href="https://bugs.freepascal.org/view.php?id=32339">https://bugs.freepascal.org/view.php?id=32339</a> ) </tt><br>
<tt> and add support for the</tt><tt> avrxmega3 subarch, atmega
3208, 3209, 4808, 4809 ( from Christo Crause's repository
<a class="moz-txt-link-freetext" href="https://github.com/ccrause/freepascal.git">https://github.com/ccrause/freepascal.git</a> ) ?</tt>
<p><tt> Except from Laksen's ethernet stack (
<a class="moz-txt-link-freetext" href="https://github.com/Laksen/fp-ethernet.git">https://github.com/Laksen/fp-ethernet.git</a> ) is there other, more
lightweight, ethernet stack library written in Object Pascal ?<br>
</tt></p>
<p><tt> As I'm not a compiler guy, is</tt><tt><tt> the "volatile"
intrinsic supported in AVR platform ( I didn't find it in
intrinsics unit ) ?</tt></tt></p>
<p><tt> In FPC embedded world/platforms, is the Object approach
more SRAM hungry ( my tests are inconclusive ) from the
procedure / function approach ?<br>
</tt></p>
<p><tt> What's more embedded "friendly" ?</tt></p>
<p><tt>this :<br>
</tt></p>
<p><tt>interface</tt></p>
<tt>type</tt><br>
<tt> TUART = Object<br>
private<br>
FBaudRate: DWord;<br>
function Divider: Integer;<br>
public<br>
procedure Init(const ABaudRate: DWord = 57600);<br>
procedure SendChar(c: char);<br>
function ReadChar: char;<br>
procedure SendString(s: ShortString);<br>
procedure SendStringLn(s: ShortString = '');<br>
end;</tt>
<p><tt>or this :</tt></p>
<tt>interface<br>
</tt><br>
<tt> var</tt><br>
<tt> FBaudRate: DWord;</tt><br>
<tt> function Divider: Integer;</tt><br>
<tt> procedure Init(const ABaudRate: DWord = 57600);</tt><br>
<tt> procedure SendChar(c: char);</tt><br>
<tt> function ReadChar: char;</tt><br>
<tt> procedure SendString(s: ShortString);</tt><br>
<p><tt> procedure SendStringLn(s: ShortString = '');</tt></p>
<p><tt><br>
</tt></p>
<p><tt>And of course anyone who wants to help is welcome .<br>
</tt></p>
<p><tt>regards,</tt></p>
<p><tt>-- <br>
</tt></p>
<p><tt>Dimitrios Chr. Ioannidis<br>
</tt></p>
</body>
</html>