Re: [fpc-pascal] Hashmap for integers

2010-08-22 Thread Jeppe Johansen
Den 22-08-2010 17:36, Juha Manninen (gmail) skrev: On Sunday 22 August 2010 17:34:55 Andreas Schneider wrote: uses fgl; type TIntMap = specialize TFPGMap; //Maps Int --> Int Thanks. I tried that. However the class name, TFPGMap, turned out to be misleading. It inherits from TFPSMap which

Re: [fpc-pascal] ARM-Cortex port

2010-08-23 Thread Jeppe Johansen
Den 23-08-2010 16:09, Andreas Berger skrev: I know that FPC works under ARM+Linux. Is this also true for the Cortex version of ARM? One of our major applications is written in C++ simply because it is to run in the future on an embedded system as well as the PC. Well the embedded processor ha

Re: [fpc-pascal] inline asm in fpc progran

2010-08-26 Thread Jeppe Johansen
Fpc should be compiled with -dFPC-ARMEL in OPT, not CROSSOPT Den 26-08-2010 07:10, Nataraj S Narayan skrev: Hi Jonas I tried a very elementary code on arm-linux-uclibc, compiled using "ppcrossarm -TLinux -darm ttt3.pas -CfSOFT -XParm-linux- -XR/cdrom" program kuraj; begin writeln('Hooua

Re: [fpc-pascal] inline asm in fpc progran

2010-08-26 Thread Jeppe Johansen
Err, that should be -dFPC_ARMEL of course Den 26-08-2010 09:42, Jeppe Johansen skrev: Fpc should be compiled with -dFPC-ARMEL in OPT, not CROSSOPT Den 26-08-2010 07:10, Nataraj S Narayan skrev: Hi Jonas I tried a very elementary code on arm-linux-uclibc, compiled using "ppcro

Re: [fpc-pascal] ARM-Cortex port

2010-09-04 Thread Jeppe Johansen
Den 26-08-2010 18:20, Geoffrey Barton skrev: On 24 Aug 2010, at 21:52, Florian Klaempfl wrote: Am 24.08.2010 11:53, schrieb Geoffrey Barton: using Jonas and Jeppe's answers to my idiot questions in this forum, and Jeppe's startup code for the STM32F, I have FPC cross-compiling for the LM3

Re: [fpc-pascal] ARM STM32F Processor

2010-09-04 Thread Jeppe Johansen
Den 04-09-2010 10:50, Rainer Stratmann skrev: Is it possible to compile for this device? Yes Can somebody help? Yes I want to switch from Atmel (8bit) to ARM. I Also need hardware demo board, if someone has an example. I have a small guide here: http://j-software.dk/stm32f103.aspx I think

Re: [fpc-pascal] ARM STM32F Processor

2010-09-04 Thread Jeppe Johansen
Den 04-09-2010 12:37, Rainer Stratmann skrev: Am Saturday 04 September 2010 11:57:25 schrieb Jeppe Johansen: Den 04-09-2010 10:50, Rainer Stratmann skrev: Is it possible to compile for this device? Yes Can somebody help? Yes I want to switch from Atmel (8bit) to ARM. I Also need

Re: [fpc-pascal] Interface with NASM

2010-09-16 Thread Jeppe Johansen
Pushes/pops on x86/x86_64 are always word sized Den 16-09-2010 11:44, Jonas Maebe skrev: On 14 Sep 2010, at 08:35, leledumbo wrote: segment .text global tes tes: push ebp mov ebp,esp push 65 Check that this puts a 32 bit value on the stack rather than an 8 bit or 16 bit one. You may n

Re: [fpc-pascal] Problem with OpenGL drawing on Linux

2010-12-09 Thread Jeppe Johansen
I can't spot anything inherently wrong here. Try glOrtho with near plane at -1 Otherwise, what kind of graphics driver are you running? Radeon DRI for example? A quick search seems to indicate that that one has a persisting problem with glLineStipple Den 10-12-2010 00:34, Darius Blaszyk skre

Re: [fpc-pascal] Re: FPC programs in Android without JNI

2010-12-27 Thread Jeppe Johansen
Den 18-12-2010 11:13, Felipe Monteiro de Carvalho skrev: ahahah, I was writing an answer in my phone, but then gave up. Probably hit the send button by accident. Anyway, yes, I had also seen that one and it is a step in the right direction =) I haven't yet fully understood how this new APIs wor

Re: [fpc-pascal] Re: FPC programs in Android without JNI

2010-12-28 Thread Jeppe Johansen
Den 28-12-2010 10:03, Florian Klämpfl skrev: Am 28.12.2010 04:17, schrieb Jeppe Johansen: They are C APIs indeed. I just took a stab at it, and after a long day of pointer errors in converted C code and really, really badly descriptions of error messages, I managed to port the example from here

Re: [fpc-pascal] Segmentation fault gone if compiled with -glh

2011-01-09 Thread Jeppe Johansen
Den 10-01-2011 02:36, leledumbo skrev: Compile the attached project (really difficult to trim it down) using two different options. First, using -glh, then using -g. The first one raises nothing (program runs fine), while the second raises segmentation fault. When debugged deeper using gdb, the s

Re: [fpc-pascal] Segmentation fault gone if compiled with -glh

2011-01-10 Thread Jeppe Johansen
Den 10-01-2011 16:10, Jonas Maebe skrev: On 10 Jan 2011, at 06:54, Jeppe Johansen wrote: Doesn't the problem lie in that TFPGObjectList uses @ on the incoming parameters? function TFPGObjectList.Add(const Item: T): Integer; begin Result := inherited Add(@Item); end; Unless there&#

Re: [fpc-pascal] Re: FPC programs in Android without JNI

2011-01-13 Thread Jeppe Johansen
Den 13-01-2011 15:58, Felipe Monteiro de Carvalho skrev: Hello, On Tue, Dec 28, 2010 at 4:17 AM, Jeppe Johansen wrote: They are C APIs indeed. I just took a stab at it, and after a long day of pointer errors in converted C code and really, really badly descriptions of error messages, I

Re: [fpc-pascal] Internal error 2006012201 while cross compiling

2011-01-27 Thread Jeppe Johansen
Didn't it give a filename and a line number? Den 27-01-2011 15:34, Julien Devillers skrev: Hello I'm building an app from win64 to linux64. The compilation fires an Internal error 2006012201. Any idea ? Regards Julien ___ fpc-pascal maillist -

Re: [fpc-pascal] SNMP and MIBs

2011-01-29 Thread Jeppe Johansen
Den 29-01-2011 11:48, Marco van de Voort skrev: In our previous episode, Michael Van Canneyt said: Noted previous mention of TSNMPSend etc., but has anybody ever looked at compiling an MIB into an FPC object for use with RTTI? MIB = Men In Black ? Management information base, used between SNMP

Re: [fpc-pascal] Internal error 2006012201 while cross compiling

2011-01-31 Thread Jeppe Johansen
Den 31-01-2011 11:18, Julien Devillers skrev: --- OK, I replaced the -va by -vewunchilbdrqpv (everything except timestamps). With that, the error message reports the last line of the unit. I removed a lot of code to find out that issue happens here function RoundTo(const AVal

Re: [fpc-pascal] Internal error 2006012201 while cross compiling

2011-01-31 Thread Jeppe Johansen
Den 31-01-2011 18:09, Julien Devillers skrev: Ok, so now it compiles but, I still an an error while linking : ld.exe: cannot find -lpthread This is basic crosslinking stuff. You must transfer all the required libraries from the target system, to be able to crosscompile it to there(In this case

Re: [fpc-pascal] A question about sets performance

2011-01-31 Thread Jeppe Johansen
Den 31-01-2011 22:54, Vladimir Zhirov skrev: I was surprised when B turned out to be almost 3 times slower than A (~11 vs ~29 sec. on my hardware). This ratio remains nearly the same regardless of compiler optimization level. I'm using FPC 2.4.2 [2010/12/27] for i386 on Linux. 1) Is it expected

Re: [fpc-pascal] dynamic array and new/dispose

2011-02-02 Thread Jeppe Johansen
Den 02-02-2011 17:26, Amit Bueno skrev: Snipped And you say it was on iOS? On ARM I suppose? What sort of compiler version and options do you use? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinf

Re: [fpc-pascal] Libnodave on linux

2011-02-04 Thread Jeppe Johansen
Try to do a fpc -k-lc testISO_TCP.pas That should instruct the linker to link libc too Den 04-02-2011 20:27, Peter Andersen skrev: Hello Is there anybody who has compilled the libnodave testprogram "TestISO_TCP.PAS" under linux. If yes could you tell what version of fpc and what options etc.

Re: [fpc-pascal]Unit initialization on Android library

2011-02-12 Thread Jeppe Johansen
Den 12-02-2011 13:26, Dejan Boras skrev: Okay, this works nicely. I do realize it should be done automatically, but for whatever reason it does not, and I am not sure if this is something Android related or a fpc bug. Thanks. It's probably fpc rtl related. It's a certain flavour of Linux that h

Re: [fpc-pascal] Converting code from C++ to FP....

2011-03-19 Thread Jeppe Johansen
Den 19-03-2011 08:30, Aleksa Todorovic skrev: 2) The parameter into the function is a pointer *A of type double. To me that indicates a value of some kind, but in the code it suddenly seems to appear as an array with indexing. What would be the proper pascal translation of this? Indeed. C does

Re: [fpc-pascal] Associate initializer value with array item type

2011-03-24 Thread Jeppe Johansen
I can see why it would be interesting. Simple cases such as lookup tables based on booleans for example In many cases I've needed something like this function test(a: boolean): longint; const MyLUT: array[boolean] of longint = (0,213); // Assuming false = index 0 begin result := MyLUT[a];

Re: [fpc-pascal] New to freepascal and how to translate my delphi program.

2011-04-18 Thread Jeppe Johansen
I think the synaser unit(from Synapse) is a very solid unit for crossplatform serial port access Den 18-04-2011 10:21, P. vanderWal skrev: I am new to free pascal, but have some experience with delphi. I wrote a program to control a milling machine (Elektor Profiler, see elektor.nl/ forum pro

Re: [fpc-pascal] Oberon Day 2011, N. Wirt speaking!

2011-05-13 Thread Jeppe Johansen
Den 13-05-2011 19:54, greim skrev: next week, Friday, 27th May 2011 there will be the Oberon day at the ETH in Zürich Also Niklaus Wirth is speaking so i guess its also interesting here in the freePascal group. Do you know if the talks there will be recorded? Could be nice :) __

Re: [fpc-pascal] In 'stream:' (line 1 pos 1): Root element is missing

2011-06-16 Thread Jeppe Johansen
Den 16-06-2011 14:09, Marcos Douglas skrev: I am using the xmlread.ReadXMLFile(doc, stream) function to read a XML. If I use a file works OK. If I use a Stream of the same file (I saved the Stream in a file and compare with de original file... are equal), happen an error: In 'stream:' (line 1 po

Re: [fpc-pascal] FPC Embedded DMA with STM32?

2015-05-10 Thread Jeppe Johansen
Are you using 2.6.4? This sounds like something that was fixed some time ago in trunk. Either way I cannot reproduce any problems with SVN trunk. On 05/10/2015 02:21 AM, turro75 wrote: Update: I solved by declaring individual registers as absolute. I need the help of some fpc guru to understa

Re: [fpc-pascal] ARM-embedded & Interrupt numbers

2015-08-14 Thread Jeppe Johansen
On 08/14/2015 09:08 AM, Koenraad Lelong wrote: Is this the way to do it ? Or is there better way ? Or does this exist already ? Comments please. If that's a proper way to do this, how could this be included in a next version of fpc ? Do I make a bug-report including the new file, with diffs

Re: [fpc-pascal] raw socket example

2015-11-18 Thread Jeppe Johansen
Here's an example: https://github.com/Laksen/fp-ethernet/blob/master/linuxraw.pas You need to change ifindex obviously, and I can't remember how that was found. But it should be relatively easy. On 11/18/2015 02:47 PM, Xiangrong Fang wrote: Hi, I am looking for some examples of writing linu

Re: [fpc-pascal] ARM CMSIS support

2016-01-08 Thread Jeppe Johansen
CMSIS is a lot of things. What exact part of it are you asking about here? FPC's embedded target has a bunch of controller units that are pulled in depending on the -Wp argument. These define exactly what you see in the units in the rtl/embedded/arm directory. In most cases just the physical r

Re: [fpc-pascal] ARM CMSIS support

2016-01-08 Thread Jeppe Johansen
Jeppe On 01/08/2016 11:58 PM, Marc Santhoff wrote: Answering myself here: On Fr, 2016-01-08 at 23:43 +0100, Marc Santhoff wrote: On Fr, 2016-01-08 at 23:23 +0100, Jeppe Johansen wrote: CMSIS is a lot of things. What exact part of it are you asking about here? In that file for e

Re: [fpc-pascal] AVR Busy Wait implementation

2016-01-17 Thread Jeppe Johansen
On 01/17/2016 11:15 PM, Florian Klämpfl wrote: Am 17.01.2016 um 22:01 schrieb Simon Ameis: I've now come up with the code below. The main problem is, that FPC doesn't inline the procedure _delay_ms. Thus the calculation of the required ticks is done at runtime wich timing is merely unpredicta

Re: [fpc-pascal] Happy tickets benchmark

2016-03-01 Thread Jeppe Johansen
On 03/02/2016 12:48 AM, vfclists . wrote: On 14 February 2016 at 10:06, Serguei TARASSOV > wrote: Hello, thank all for assistance! Sorry, I was not clear, the series should be ran with all tests _on the same computer_ regardless its hardware capaci

Re: [fpc-pascal] Bitcounting

2016-03-05 Thread Jeppe Johansen
The PopCount functions do exactly that. On 03/05/2016 07:03 PM, Bart wrote: Hi, Does FreePascal have a routine for counting bits? So that e.g. BitCount(%100110011) gives 5 (number of bits that are 1)? I came up with (extracted from IntToBin()): function BitCount(N: Int64): Integer; var

Re: [fpc-pascal] What is the best memory optimization parameter

2016-06-15 Thread Jeppe Johansen
On 06/15/2016 06:04 PM, czd wrote: Hi all, What is the extreme memory optimization parameter to compile fpc for the embedded system? And could someone tell me what is the minimum memory specification for freepascal to run? Thanks. Depends on your platform really but usually the short answer is: a

Re: [fpc-pascal] Constants in generics tests

2019-02-15 Thread Jeppe Johansen
Hi, Do you know why this doesn't work? type   TGPIO = class   public     class function ReadValue: NativeUInt; virtual; abstract;     class procedure SetValue(AValue: NativeUInt); virtual; abstract;     class function GetPin(const AIndex: NativeInt): boolean; virtual;   end;   generic TStm32GP

Re: [fpc-pascal] Bitpacked bug?

2019-05-12 Thread Jeppe Johansen
On 5/12/19 5:58 PM, Victor Campillo wrote: case integer of     0: (bit0: Boolean);     1: (bit1: Boolean);     2: (bit2: Boolean);     3: (bit3: Boolean);     4: (bit4: Boolean);     5: (bit5: Boolean);     6: (bit6: Boolean);     7:

Re: [fpc-pascal] ENoWideStringSupport

2019-08-11 Thread Jeppe Johansen
On 8/12/19 12:37 AM, Ryan Joseph wrote: Dump question that I can’t find an answer to for some reason. I’m getting this error: ENoWideStringSupport: Widestring manager not available. Recompile program with appropriate manager. How do I resolve it? Not sure what’s even triggering it. Regards,

Re: [fpc-pascal] FPC ARM inline Assembler

2023-04-07 Thread Jeppe Johansen via fpc-pascal
On 4/6/23 17:36, Sven Barth via fpc-pascal wrote: If so what is the equivalent ARM command for {$ASMMODE intel} There is none, because only one syntax is supported. Not entirely true. Two ARM assembly syntaxes are supported: "divided" (pre-UAL) and unified (UAL). Maybe not all aspects

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

2024-08-10 Thread Jeppe Johansen via fpc-pascal
On 8/10/24 09:56, Bo Berglund via fpc-pascal wrote: 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