Re: [fpc-pascal] Converting Delphi7 code to FreePascal with interfacing to protection key?

2023-03-30 Thread Bo Berglund via fpc-pascal
On Thu, 30 Mar 2023 10:02:49 +0200, Tomas Hajny via fpc-pascal wrote: >On 30 March 2023 9:36:35 +0200, Marco van de Voort via fpc-pascal > wrote: >>On 30-3-2023 07:38, Bo Berglund via fpc-pascal wrote: >>> The problem seems to be that neither is a valid COFF file acc

[fpc-pascal] FPC/Lazarus on RPi4 - How to read/write I2C connected EEPROM?

2023-04-01 Thread Bo Berglund via fpc-pascal
I need to read and write data to an EEPROM connected by I2C on a RaspberryPi4. The I2C channel is found in /dev as i2c-1: $ ll /dev/i2* crw-rw 1 root i2c 89, 1 2019-02-14 11:12 /dev/i2c-1 In this channel the EEPROM CAT24C128 is at address 0x50 The data on the device is organized as 256 pages

Re: [fpc-pascal] FPC/Lazarus on RPi4 - How to read/write I2C connected EEPROM?

2023-04-02 Thread Bo Berglund via fpc-pascal
On Sat, 1 Apr 2023 20:30:02 -0400, Travis Siegel via fpc-pascal wrote: >Generally, raspberry pi devices connected to other devices will (by >default) use python for their programming.  The python libs have all the >setup and tear down code built in.  You can use C as well, so I see no >reason

Re: [fpc-pascal] FPC/Lazarus on RPi4 - How to read/write I2C connected EEPROM?

2023-04-02 Thread Bo Berglund via fpc-pascal
On Sun, 2 Apr 2023 07:31:43 +0200, Christo Crause via fpc-pascal wrote: >On Sat, Apr 1, 2023 at 9:57?PM Bo Berglund via fpc-pascal < >fpc-pascal@lists.freepascal.org> wrote: > >> Question: >> Can I use Linux file system commands to read/write the data on the i2c >&g

Re: [fpc-pascal] FPC/Lazarus on RPi4 - How to read/write I2C connected EEPROM?

2023-04-02 Thread Bo Berglund via fpc-pascal
On Sun, 02 Apr 2023 10:23:24 +0200, Bo Berglund via fpc-pascal wrote: >On Sun, 2 Apr 2023 07:31:43 +0200, Christo Crause via fpc-pascal > wrote: > >>On Sat, Apr 1, 2023 at 9:57?PM Bo Berglund via fpc-pascal < >>fpc-pascal@lists.freepascal.org> wrote: >> >&

Re: [fpc-pascal] FPC/Lazarus on RPi4 - How to read/write I2C connected EEPROM?

2023-04-02 Thread Bo Berglund via fpc-pascal
On Sun, 2 Apr 2023 07:31:43 +0200, Christo Crause via fpc-pascal wrote: >On Sat, Apr 1, 2023 at 9:57?PM Bo Berglund via fpc-pascal < >fpc-pascal@lists.freepascal.org> wrote: > >> Question: >> Can I use Linux file system commands to read/write the data on the i2c >&g

Re: [fpc-pascal] FPC/Lazarus on RPi4 - How to read/write I2C connected EEPROM?

2023-04-02 Thread Bo Berglund via fpc-pascal
On Sun, 02 Apr 2023 15:07:48 -0400, Dennis Lee Bieber via fpc-pascal wrote: >On Sun, 02 Apr 2023 16:16:46 +0200, Bo Berglund via fpc-pascal > declaimed >the following: > > >> >> >>Byte Write >

Re: [fpc-pascal] FPC/Lazarus on RPi4 - How to read/write I2C connected EEPROM?

2023-04-02 Thread Bo Berglund via fpc-pascal
On Sun, 2 Apr 2023 23:14:25 +0200, Christo Crause via fpc-pascal wrote: >On Sun, Apr 2, 2023 at 9:30?PM Bo Berglund via fpc-pascal < >fpc-pascal@lists.freepascal.org> wrote: > >> Is there a reason that there is no i2c_write_reg demo in the github >> package? >>

Re: [fpc-pascal] FPC/Lazarus on RPi4 - How to read/write I2C connected EEPROM?

2023-04-03 Thread Bo Berglund via fpc-pascal
On Mon, 3 Apr 2023 08:42:12 -0400, "Jeffrey A. Wormsley via fpc-pascal" wrote: >> >> i2c_read_reg works too inasmuch as it does not error out, but it returns FF >> whatever addres I read like the i2c-tools command does. >> I am not sure that it is correct though... >> > >Yes this is expected, as

Re: [fpc-pascal] FPC/Lazarus on RPi4 - How to read/write I2C connected EEPROM?

2023-04-03 Thread Bo Berglund via fpc-pascal
>On Mon, Apr 3, 2023 at 10:53?AM Bo Berglund via fpc-pascal < >fpc-pascal@lists.freepascal.org> wrote: > >> On Mon, 3 Apr 2023 08:42:12 -0400, "Jeffrey A. Wormsley via fpc-pascal" >> wrote: >> >> >> >> >> i2c_read_re

Re: [fpc-pascal] FPC/Lazarus on RPi4 - How to read/write I2C connected EEPROM?

2023-04-03 Thread Bo Berglund via fpc-pascal
On Mon, 03 Apr 2023 20:55:43 +0200, Bo Berglund via fpc-pascal >On Mon, 3 Apr 2023 14:26:17 -0400, "Jeffrey A. Wormsley via fpc-pascal" > wrote: > >>I've been using i2c and SPI eeproms for almost two decades. All of them >>can read/write a single byte if

Re: [fpc-pascal] FPC/Lazarus on RPi4 - How to read/write I2C connected EEPROM?

2023-04-03 Thread Bo Berglund via fpc-pascal
On Mon, 3 Apr 2023 14:37:48 -0400, "Jeffrey A. Wormsley via fpc-pascal" wrote: >I noticed you put the part number in the original email. > >Interestingly, the data sheet mentions 64 byte pages, and 1,000,000 erase >cycles, but does not mention the need to erase a page before writing. So >perhaps

Re: [fpc-pascal] FPC/Lazarus on RPi4 - How to read/write I2C connected EEPROM?

2023-04-03 Thread Bo Berglund via fpc-pascal
On Mon, 03 Apr 2023 15:09:38 -0400, Dennis Lee Bieber via fpc-pascal wrote: >On Mon, 03 Apr 2023 20:55:43 +0200, Bo Berglund via fpc-pascal > declaimed >the following: > >>I just tested by writing four 0x00 bytes in a row, then verifying that the >>memory read shows t

Re: [fpc-pascal] FPC/Lazarus on RPi4 - How to read/write I2C connected EEPROM?

2023-04-04 Thread Bo Berglund via fpc-pascal
On Sun, 02 Apr 2023 23:21:38 +0200, Bo Berglund via fpc-pascal wrote: >On Sun, 2 Apr 2023 23:14:25 +0200, Christo Crause via fpc-pascal > wrote: > >>On Sun, Apr 2, 2023 at 9:30?PM Bo Berglund via fpc-pascal < >>fpc-pascal@lists.freepascal.org> wrote: >> >&

Re: [fpc-pascal] FPC/Lazarus on RPi4 - How to read/write I2C connected EEPROM?

2023-04-04 Thread Bo Berglund via fpc-pascal
On Tue, 4 Apr 2023 23:43:21 +0200, Christo Crause via fpc-pascal wrote: >> if not i2cMaster.WriteBytesToReg(FEEPROMAddr, startaddress, @source[0], >> NumBytes) then >> >> Here the source argument is a TBytes array of bytes so I supply the >> address of >> element 0 as the data argument (expected

Re: [fpc-pascal] FPC/Lazarus on RPi4 - How to read/write I2C connected EEPROM?

2023-04-04 Thread Bo Berglund via fpc-pascal
On Wed, 05 Apr 2023 00:33:50 +0200, Bo Berglund via fpc-pascal wrote: >On Tue, 4 Apr 2023 23:43:21 +0200, Christo Crause via fpc-pascal > wrote: > > >>Is your startaddress variable an unsigned 16 bit integer >>(word/uint16)? If not, type cast this to a uint16 to ensure

Re: [fpc-pascal] FPC/Lazarus on RPi4 - How to read/write I2C connected EEPROM?

2023-04-05 Thread Bo Berglund via fpc-pascal
On Wed, 5 Apr 2023 11:40:09 +0200, Christo Crause via fpc-pascal wrote: >Looking at the datasheet for CAT24C128, Fig. 6 Byte Write Sequence, shows >no repeated start condition between register address and data bytes. I >suspect that the second i2c message should contain the I2C_M_NOSTART flag, >el

Re: [fpc-pascal] FPC/Lazarus on RPi4 - How to read/write I2C connected EEPROM?

2023-04-05 Thread Bo Berglund via fpc-pascal
On Wed, 5 Apr 2023 17:57:00 +0200, Christo Crause via fpc-pascal wrote: >The use of WriteBytesToReg in the TI2c_eeprom.WriteData method seems fine, >perhaps retest with the updated WriteBytesToReg method. I pulled the i2c.pas file from GitHub (actually downloaded the zip since I don't really kno

Re: [fpc-pascal] Building trunk of today fails on Windows: Error: Invalid DLL C:\WINDOWS\system32\common.dll, invalid header size

2023-04-08 Thread Bo Berglund via fpc-pascal
On Mon, 23 Aug 2021 23:01:39 +0200, Bart via fpc-devel wrote: Replying here since my attempt at replying in the devel group failed... >On Mon, Aug 23, 2021 at 8:04 PM Bart wrote: > >> And, of course, the guide on how to remove this utility >> (https://www.intel.com/content/www/us/en/support/ar

[fpc-pascal] Declaring an array as var or not in function calls?

2023-04-12 Thread Bo Berglund via fpc-pascal
I am wondering how to deal with this var or not in function calls: In a processing program where I am building the command arguments for a write operation by analyzing incoming commands and splitting the data such that the write can be fully done by executing a series of smaller write commands for

Re: [fpc-pascal] Declaring an array as var or not in function calls?

2023-04-12 Thread Bo Berglund via fpc-pascal
On Thu, 13 Apr 2023 00:06:16 +0200, Sven Barth via fpc-pascal wrote: >Bo Berglund via fpc-pascal schrieb am >Mi., 12. Apr. 2023, 21:17: > >> Now my question: >> >> Since I am modifying the WArgs variable inside the BuildArgumentsArray >> f

[fpc-pascal] Is there a Pos() function for TBytes?

2023-04-19 Thread Bo Berglund via fpc-pascal
I am transferring data via serial comm and they wind up inside a TBytes dyn array. Now I want to easily find a certain pattern of bytes inside that array, but how? I have a cludge that does not feel right but works and I want to get it replaced by the "correct" way of doing it. So what I have don

Re: [fpc-pascal] Is there a Pos() function for TBytes?

2023-04-20 Thread Bo Berglund via fpc-pascal
On Thu, 20 Apr 2023 08:40:48 +0200 (CEST), Michael Van Canneyt via fpc-pascal wrote: >> I found this page: >> https://www.freepascal.org/docs-html/rtl/system/copy.html >> >> Here there is also reference to the other functions for strings: >> Delete (string and dyn array) >> Copy(string and d

[fpc-pascal] How to use StrToDateTime() to convert a string with no delimiters?

2023-04-24 Thread Bo Berglund via fpc-pascal
I have a device that sends data over the serial port with a timestamp in this format: (230424194642W) This is coded as yymmddhhnnss and the last char designates daylight savings (S)ummer or normal (W)inter time. In the example above it is W for normal winter time. What I have done so far is: - R

Re: [fpc-pascal] How to use StrToDateTime() to convert a string with no delimiters?

2023-04-25 Thread Bo Berglund via fpc-pascal
On Tue, 25 Apr 2023 08:25:01 +0200 (CEST), Michael Van Canneyt via fpc-pascal wrote: > > >On Mon, 24 Apr 2023, Thomas Kurz via fpc-pascal wrote: > >> I always use ScanDateTime for such purposes: >> >> https://www.freepascal.org/docs-html/rtl/dateutils/scandatetime.html >> >> You can explicitly de

[fpc-pascal] Why does RunCommand not produce the correct output?

2023-05-01 Thread Bo Berglund via fpc-pascal
I am trying to create a function to list the available serial ports on a Linux device. But I have trouble getting commands which work on a terminal to also work when run from my console program. When I run this conmmand in the terminal I get the correct reply: $ ls -l /sys/class/tty/*/device/driv

Re: [fpc-pascal] Why does RunCommand not produce the correct output?

2023-05-01 Thread Bo Berglund via fpc-pascal
On Mon, 1 May 2023 14:25:28 -0400, Travis Siegel via fpc-pascal wrote: >You could just add the line: > >#!/bin/bash > >to the first line of your script, then just call the script from your >program. > >Alternatively, you could call the bash command, and pass the command to >it that way, either

Re: [fpc-pascal] Why does RunCommand not produce the correct output?

2023-05-02 Thread Bo Berglund via fpc-pascal
On Mon, 01 May 2023 11:00:56 -0400, Bo Berglund via fpc-pascal wrote: >I am trying to create a function to list the available serial ports on a Linux >device. But I have trouble getting commands which work on a terminal to also >work when run from my console program. > >When I ru

[fpc-pascal] Serial connection via TCP/IP sockets on RPi?

2023-11-03 Thread Bo Berglund via fpc-pascal
I am wondering if there is already available what I am needing? My situation is the following: I have a remote installation of a measuring equipment, which communicates through RS232 to an RPi3 interface unit. On that there is a service that handles the data sent both ways. But it is geared toward

Re: [fpc-pascal] Serial connection via TCP/IP sockets on RPi?

2023-11-03 Thread Bo Berglund via fpc-pascal
On Fri, 3 Nov 2023 06:47:30 -0700, Wayne Sherman via fpc-pascal wrote: >Yes, there is software that bridges a serial connection over a >network. On Windows it is often called a "virtual com port" or >"virtual serial port" or "com port redirector". > >Open Source Linux: >ser2net >https://github.c

Re: [fpc-pascal] Serial connection via TCP/IP sockets on RPi?

2023-11-03 Thread Bo Berglund via fpc-pascal
On Fri, 03 Nov 2023 17:34:09 +0100, Bo Berglund via fpc-pascal wrote: >So ser2net seems like a logical use given that the RPi3 is already there >connected by wire to the serial line and is available via VPN on the network. I >have just checked (using PuTTY via VPN) that the RPi3 doe

Re: [fpc-pascal] Serial connection via TCP/IP sockets on RPi?

2023-11-04 Thread Bo Berglund via fpc-pascal
On Fri, 03 Nov 2023 19:47:01 +0100, Bo Berglund via fpc-pascal wrote: >I have now found that there is a Linux utility named socat, which apparently is >able to map a serial port to a network socket server: > >https://www.acmesystems.it/socat > >Here they actually use ser2net as

[fpc-pascal] Difference between string and Tbytes as procedure arguments?

2023-11-05 Thread Bo Berglund via fpc-pascal
I am maintaining an old utility program that started out about 20+ years ago using Delphi7. The utility communicates via RS232 with a measuring system in order to retrieve and process recorded data and at the time this was started I used strings as buffers for the serial comm. A string at the tim

Re: [fpc-pascal] Difference between string and Tbytes as procedure arguments?

2023-11-05 Thread Bo Berglund via fpc-pascal
On Sun, 5 Nov 2023 10:36:47 +0100 (CET), Michael Van Canneyt via fpc-pascal wrote: >> So my question is this: >> Is there a difference in handling the arguments between string, AnsiString, >> RawByteString and TBytes in a declaration like this: >> >> function TSSConnection.ParseCmdFileData(var SS

[fpc-pascal] Cannot build fpc on Raspberry Pi4B running PiOS 64 bit (aarch64 Linux)

2023-11-15 Thread Bo Berglund via fpc-pascal
>From the Lazarus list: >Just a quick follow-up here: >It seems like the fpc sources have not been updated with the solution to the >bug >discussed here: > >https://gitlab.com/freepascal.org/fpc/source/-/issues/39295 > >This causes the build of Lazarus using fpcupdeluxe with the latest fpc 3.2.2

Re: [fpc-pascal] Cannot build fpc on Raspberry Pi4B running PiOS 64 bit (aarch64 Linux)

2023-11-16 Thread Bo Berglund via fpc-pascal
On Thu, 16 Nov 2023 08:19:17 +0100, Bo Berglund via fpc-pascal wrote: >I have tried every fpc source release from 3.2.2 up to trunk with the exact >same >result (here from a build try on trunk) Forgot to mention that I am using fpcupdeluxe when installing fpc/lazarus on my RPi4B with

[fpc-pascal] Error when building fpc on aarch64-linux still not resolved

2023-11-16 Thread Bo Berglund via fpc-pascal
I tried to post this to the devel list but it seems to have failed so now trying the general list instead... See ticket: https://gitlab.com/freepascal.org/fpc/source/-/issues/39295 It was closed a year ago being purportedly resolved... But only for powerpc 64 bit... It is still there for aarch6

Re: [fpc-pascal] Cannot build fpc on Raspberry Pi4B running PiOS 64 bit (aarch64 Linux)

2023-11-18 Thread Bo Berglund via fpc-pascal
On Fri, 17 Nov 2023 11:27:53 +0100, Sven Barth via fpc-pascal wrote: >Bo Berglund via fpc-pascal schrieb am >Do., 16. Nov. 2023, 08:19: > >> From the Lazarus list: >> >> >Just a quick follow-up here: >> >It seems like the fpc sources have not been

Re: [fpc-pascal] Cannot build fpc on Raspberry Pi4B running PiOS 64 bit (aarch64 Linux)

2023-11-20 Thread Bo Berglund via fpc-pascal
On Sat, 18 Nov 2023 13:31:51 +0100, Sven Barth via fpc-pascal wrote: >Bo Berglund via fpc-pascal schrieb am >Sa., 18. Nov. 2023, 11:32: > >> Today after realizing that I did the following on an RPi4B where I have >> used apt >> to install the fpc compiler so I

Re: [fpc-pascal] Cannot build fpc on Raspberry Pi4B running PiOS 64 bit (aarch64 Linux)

2023-11-24 Thread Bo Berglund via fpc-pascal
On Tue, 21 Nov 2023 10:33:46 +0100, Tomas Hajny via fpc-pascal wrote: >On November 21, 2023 8:33:55 +0100, Bo Berglund via fpc-pascal > wrote: >>I did not know that there is a library of seed compilers available on >>Sourceforge, I thought everything had moved over to GitLab

[fpc-pascal] Question regarding building fpc from sources

2023-11-29 Thread Bo Berglund via fpc-pascal
I have for many years been building my Linux versions of fpc and lazarus from sources downloaded first from the svn repository and later from github. When doing the build on a new Linux system I need a seed compiler for the platform and I usually get that from earlier builds on other devices. To si

Re: [fpc-pascal] Question regarding building fpc from sources

2023-11-30 Thread Bo Berglund via fpc-pascal
On Thu, 30 Nov 2023 10:50:02 +0100 (CET), Michael Van Canneyt via fpc-pascal wrote: >> Somewhere in the process above the newly built compiler/ppcarm disappears >> from >> the compiler dir >> >> Is this what should happen or is it an error? > >Because installing sources requires a 'clean' so

Re: [fpc-pascal] Error when building fpc on aarch64-linux still not resolved

2023-12-09 Thread Bo Berglund via fpc-pascal
On Thu, 16 Nov 2023 13:15:27 +0100, Bo Berglund via fpc-pascal wrote: >I tried to post this to the devel list but it seems to have failed so now >trying >the general list instead... > >See ticket: >https://gitlab.com/freepascal.org/fpc/source/-/issues/39295 > >It was

[fpc-pascal] Extra linkxxx.res files left over when compiling/building project

2024-01-15 Thread Bo Berglund via fpc-pascal
I have been working on troubleshooting a command line FreePascal project for a couple of weeks now and when I look in the project dir it is full of link files: 2021-09-12 10:2323 900 link.res 2024-01-15 00:3023 833 link11600.res 2024-01-13 10:3923 833 link172

[fpc-pascal] Signing applications, how?

2024-08-10 Thread Bo Berglund via fpc-pascal
I have been using FreePascal (and before that Delphi) for many years and it has worked fine. I am now retired and only perform maintenance work. And now I am getting a request for "signing" the applications (and/or possibly the installers made by InnoSetup) and I have no idea on how to do this.

Re: [fpc-pascal] Signing applications, how?

2024-08-10 Thread Bo Berglund via fpc-pascal
On Sat, 10 Aug 2024 13:32:12 +0200, Luca Olivetti via fpc-pascal wrote: >El 10/8/24 a les 11:28, Jeppe Johansen via fpc-pascal ha escrit: > >> It's fairly straight-forward to use this on executables. You point it at >> the EXE and the code signing certificate you will use. > >I guess you'll have

Re: [fpc-pascal] How to compile program from command line on Linux?

2024-12-16 Thread Bo Berglund via fpc-pascal
On Mon, 16 Dec 2024 14:19:56 +0100 (CET), Michael Van Canneyt via fpc-pascal wrote: > > >On Mon, 16 Dec 2024, Bo Berglund via fpc-pascal wrote: > >> I have written a command line utility program on Linux using Lazarus as the >> IDE. >> This was done a while

[fpc-pascal] How to compile program from command line on Linux?

2024-12-16 Thread Bo Berglund via fpc-pascal
I have written a command line utility program on Linux using Lazarus as the IDE. This was done a while ago on an Ubuntu Desktop 20.04 machine, which I normally access using VNC when doing Lazarus work there. Now since a few months the TigerVNC server on that machinbe won't start anymore so I canno

Re: [fpc-pascal] How to compile program from command line on Linux?

2024-12-16 Thread Bo Berglund via fpc-pascal
On Mon, 16 Dec 2024 15:06:45 +0100, Bo Berglund via fpc-pascal wrote: >On Mon, 16 Dec 2024 14:19:56 +0100 (CET), Michael Van Canneyt via fpc-pascal > wrote: > >> >> >>On Mon, 16 Dec 2024, Bo Berglund via fpc-pascal wrote: >> >>> I have written a c

Re: [fpc-pascal] Adding command line parameter to GUI application?

2025-02-25 Thread Bo Berglund via fpc-pascal
On Tue, 25 Feb 2025 22:47:29 +0100, Tomas Hajny via fpc-pascal wrote: >On 2025-02-25 22:09, Jean SUZINEAU via fpc-pascal wrote: >> I haven't done it recently but basically on Windows you have keys in >> the registry under HKEY_CLASSES_ROOT to associate your program with a >> specific file extensi

[fpc-pascal] Adding command line parameter to GUI application?

2025-02-25 Thread Bo Berglund via fpc-pascal
I have created a Video Player application to be used in order to create the ffmpeg command to edit a video file according to cut points evaluated inside the program. I have used the PasLibVLC library for the video handling. But I have found that it is also useful as a regular video player where I

<    1   2   3