Re: [fpc-pascal] Generating RTL Units for STM32 Processors

2018-03-01 Thread Michael Ring
Both STM32F407 & 446 Chips are already in fpc-trunk, so no patches are 
needed to use those chips, mbf should work ok for you, I have a 
development kit for STM32F407VC (Mikroe EasyMXPro V7) and I should also 
have a NUCLEOF446RE Board somewhere here, so in case something does not 
work I may be able to help.


Michael

Am 01.03.18 um 21:46 schrieb Marc Santhoff:

On Wed, 2018-02-28 at 06:41 +0200, Christo Crause wrote:

On 28 Feb 2018 4:22 am, "R0b0t1"  wrote:

I will be following up with you off list, since you do not seem to mind.


I'm also interested in the general topic of incorporating embedded
controllers (avr at the moment)  into fpc.

Me too, especially STM32F407 & 446.



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Generating RTL Units for STM32 Processors

2018-03-01 Thread R0b0t1
On Thu, Mar 1, 2018 at 3:11 PM, R0b0t1  wrote:
> On Thu, Mar 1, 2018 at 2:46 PM, Marc Santhoff  wrote:
>> On Wed, 2018-02-28 at 06:41 +0200, Christo Crause wrote:
>>> On 28 Feb 2018 4:22 am, "R0b0t1"  wrote:
>>>
>>> I will be following up with you off list, since you do not seem to mind.
>>>
>>>
>>> I'm also interested in the general topic of incorporating embedded
>>> controllers (avr at the moment)  into fpc.
>>
>> Me too, especially STM32F407 & 446.
>>
>
> (did you have a preference?)

> Me too, especially STM32F407 & 446.

Whoops.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Generating RTL Units for STM32 Processors

2018-03-01 Thread R0b0t1
On Thu, Mar 1, 2018 at 2:46 PM, Marc Santhoff  wrote:
> On Wed, 2018-02-28 at 06:41 +0200, Christo Crause wrote:
>> On 28 Feb 2018 4:22 am, "R0b0t1"  wrote:
>>
>> I will be following up with you off list, since you do not seem to mind.
>>
>>
>> I'm also interested in the general topic of incorporating embedded
>> controllers (avr at the moment)  into fpc.
>
> Me too, especially STM32F407 & 446.
>

Well - as mentioned, it may be best to pick "standard" parts (did you
have a preference?). This is an issue even with C or C++; many parts,
especially from STM32, are very poorly documented. In C I am still
having issues with my controller than I can only fix by copying,
verbatim, the autogenerated code. At this point I suspect order of
hardware initialization matters where no order dependency is
documented.

This is kind of sad, because most of the popular STM32 parts are
rather old. For other manufacturers the situation can be even worse.
It is also sad because I want to try various products to see which is
best (e.g. PIC32 parts are very cheap but still performant), but my
experience as far as C goes is that all development environments and
vendor provided libraries are terrible.


Also, thank you Michael, I may be able to give an update with my
progress soon. It seems wise to iron out the initialization and
hardware setup in C first.

Without much cheer,
 R0b0t1
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Generating RTL Units for STM32 Processors

2018-03-01 Thread Marc Santhoff
On Wed, 2018-02-28 at 06:41 +0200, Christo Crause wrote:
> On 28 Feb 2018 4:22 am, "R0b0t1"  wrote:
> 
> I will be following up with you off list, since you do not seem to mind.
> 
> 
> I'm also interested in the general topic of incorporating embedded
> controllers (avr at the moment)  into fpc.

Me too, especially STM32F407 & 446.

-- 
Marc Santhoff 
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Linux getifaddrs

2018-03-01 Thread Brian
Thanks for all the suggestions but , I found and example which I have
modified for my needs. Currently using Synapse but it only returns the
loopback IP address since in my case the ports eth0 and eth1 are both static
IP's.

https://www.mail-archive.com/synalist-public@lists.sourceforge.net/msg03470/getlocalips.lpr

It is a bit odd that something like this isn't incorporated into Free Pascal
sockets.

Thanks
Brian



--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Linux getifaddrs

2018-03-01 Thread Mark Morgan Lloyd

On 01/03/18 15:15, Brian wrote:

Do you know of any kernel functions that would return the current IP address?


I think you're looking for something like SIOCGIFADDR in netdevice(7), 
but it's not necessarily what you want. You need to take into account 
that a single host might have multiple interfaces, and that each 
interface might have multiple assigned IP addresses (aliases in IP4 
terms). In practical terms you almost always either want to tell a 
program which of the available IP addresses to use or let it use 
0.0.0.0, and don't for one moment dream of embedding an IP address 
inside your comms protocol since you'll end up with a proxying nightmare 
like VOIP.


The only time I've really needed to play with this was when trying to 
work out a machine's local neighbours so I could see whether they 
responded to a non-standard UDP protocol.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Linux getifaddrs

2018-03-01 Thread Rik van Kekem

Op 01-03-2018 00:08 schreef Michael Van Canneyt:

On Wed, 28 Feb 2018, Brian wrote:


Has anyone translated* getifaddrs* function to Free Pascal ?

http://man7.org/linux/man-pages/man3/getifaddrs.3.html


Not to my knowledge. It's not a kernel function, but a Libc function, 
as far as I can see ?

You might find some more information here:
http://forum.lazarus.freepascal.org/index.php/topic,30062.msg190832.html#msg190832

(please note the type for libc.co)

There is also a function in Synapse (ResolveNameToIP()) which could 
resolve the localhost to all local IPs.

(and I'm sure there is also something in Indy)

Rik

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Linux getifaddrs

2018-03-01 Thread Brian
Do you know of any kernel functions that would return the current IP address
?

Thanks
Brian



--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal