Re: [fpc-pascal] why fpc do not use a known return function value

2015-02-03 Thread jeppe
Constant propagation won't work on global variables in fpc because they currently are always considered volatile. -- Oprindelig besked--Fra: Jonas MaebeDato: tir., 3. feb. 2015 10:24Til: FPC-Pascal users discussions;Emne:Re: [fpc-pascal] why fpc do not use a known return fun

Re: [fpc-pascal] access violations on new ARM hardware

2015-02-11 Thread jeppe
Small correction: -Cparmv7a -- Oprindelig besked--Fra: Jonas MaebeDato: ons., 11. feb. 2015 13:36Til: FPC-Pascal users discussions;Emne:Re: [fpc-pascal] access violations on new ARM hardware On 11 Feb 2015, at 12:48, Björn Schreiber wrote:> Some new information: the manufac

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
questions Regards, Jeppe ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

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
owing more relevant I think it makes sense to have that table of IRQn numbers in there for all Cortex-M devices. You can either just use SVN to create a patch (there's info here: http://wiki.freepascal.org/Creating_A_Patch), or just send the files to me and I'll fix it up.

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
s. You can enable it by compiling your RTL and application with -CfFPv4_S16. If you decide to test it please write on the bugtracker if you run into problems. Best Regards, Jeppe On 01/08/2016 10:58 PM, Marc Santhoff wrote: Hi, looking at the embedded source code there has been done a lot of

Re: [fpc-pascal] ARM CMSIS support

2016-01-08 Thread Jeppe Johansen
the STM32F7 codebase here: https://github.com/Laksen/fp-stm32f7xx_hal If anyone other know of any nice embedded projects/links be sure to chime in :) I know some people have been working with Silicon Labs and Freescale codebases too. So there's a lot going on around. Best Regards,

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
he finalization code saving quite a bit of RAM and Flash. And of course do not use exceptions or ansistrings/managed types in general. Best Regards, Jeppe ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/m

Re: [fpc-pascal] Constants in generics tests

2019-02-15 Thread Jeppe Johansen
Value: NativeUInt; begin   result:=PNativeUInt(Base)^; end; class procedure TStm32GPIO.SetValue(AValue: NativeUInt); begin   PNativeUInt(Base)^:=AValue; end; type GPIOA = specialize TStm32GPIO<$1240>; Best Regards, Jeppe On 2/15/19 5:22 PM, Ryan Joseph wrote: Here’s the latest changes whic

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-embedded interrupts

2012-05-10 Thread Jeppe Græsdal Johansen
The easiest way to do interrupt processing in Cortex-M3 processors(which I assume you are using), is to create an interrupt vector table in SRAM and then change the NVIC to use that. That way you can point to the interrupt handlers at runtime. It's true that the normal way of doing it is with

Re: RE : RE : [fpc-pascal] Variable alignment in arm-embedded

2012-06-08 Thread Jeppe Græsdal Johansen
Den 08-06-2012 14:28, Ludo Brands skrev: Thanks Ludo, I'll take that as a starting point. I hope I will not need the "lost" 256 bytes in the future. I could be wrong but AFAIK if the compiler would do the alignment, the loss can also be up to 255 bytes. Here you lose 256 bytes in all cases. Yes

Re: [fpc-pascal] fpc arm-embedded suitable for cortex-m4 ?

2012-06-26 Thread Jeppe Græsdal Johansen
The FPU is single precision only, as far as I remember. That made it a little hard to work with in fpc, and last I took a stab at it there weren't any affordable chips around with support even. The DSP instructions will probably need intrinsics to be useful, otherwise I guess they could simply

Re: [fpc-pascal] Error when trying to build a crosscompiler for arm

2012-08-26 Thread Jeppe Græsdal Johansen
Den 25-08-2012 18:15, Rainer Stratmann skrev: Am Saturday 25 August 2012 15:22:59 schrieb Rainer Stratmann: Am Saturday 25 August 2012 14:14:18 schrieb Marco van de Voort: In our previous episode, Rainer Stratmann said: I downloaded the daily source an wanted to build a crosscompiler for arm w

Re: [fpc-pascal] Daily Source Snapshot of Development Tree (trunk)

2012-08-26 Thread Jeppe Græsdal Johansen
Den 26-08-2012 20:11, Rainer Stratmann skrev: http://www.freepascal.org/develop.var ftp://ftp.freepascal.org/pub/fpc/snapshot/trunk/source/fpc.zip Is this always the latest trunk version? Or is there somewhere a more current version? ___ fpc-pascal m

Re: [fpc-pascal] OT: Creating a site to contain Pascal units, libraries etc

2012-10-29 Thread Jeppe Græsdal Johansen
oject dies then allow users to specify new locations that eventual forked source can be found at. Regards, Jeppe ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Interrupts in ARM Embedded

2013-01-22 Thread Jeppe Græsdal Johansen
Den 21-01-2013 18:51, Juan Duran skrev: Hi all, I haven't been able to find a clear example on how to program on ARM with interrupts. Can somebody post an example? I am specially interested in Systick interrupts on LPC1768. Thanks in advance ___ fpc-

Re: [fpc-pascal] Compiling arm-embedded fpc

2013-01-24 Thread Jeppe Græsdal Johansen
Looks like a memory corruption problem. I just tried to compile trunk with 2.6.0 as a starting compiler on win32 and had no problems(apart from the broken RTL). What starting compiler and what os/cpu are you on? Den 23-01-2013 19:28, Koenraad Lelong skrev: On 23-01-13 17:20, Tomas Hajny wrote

Re: [fpc-pascal] Compiling arm-embedded fpc

2013-01-24 Thread Jeppe Græsdal Johansen
Den 24-01-2013 12:16, Koenraad Lelong skrev: On 24-01-13 11:24, Jeppe Græsdal Johansen wrote: Looks like a memory corruption problem. I just tried to compile trunk with 2.6.0 as a starting compiler on win32 and had no problems(apart from the broken RTL). What starting compiler and what os/cpu

Re: [fpc-pascal] x86 asm bswap

2013-02-06 Thread Jeppe Græsdal Johansen
function TPNGProcessor.SwapLong( const aValue: Cardinal ): Cardinal; begin result := BeToN(aValue); end; Den 06-02-2013 09:25, Juha Manninen skrev: A Delphi project "DeleD 3-D" which I try to convert, has unit_PNGSupport with method: function TPNGProcessor.SwapLong( const aValue: Cardinal )

Re: [fpc-pascal] Compiling arm-embedded fpc

2013-02-14 Thread Jeppe Græsdal Johansen
Den 14-02-2013 20:39, Florian Klämpfl skrev: Am 14.02.2013 20:08, schrieb Michael Ring: I might have found a hack to solve your linking problem for arm-embedded on linux, unfortunately I am not an expert on gnu ld, but perhaps this here gives a hint to somebody that knows how to properly solve y

Re: [fpc-pascal] Bending System.IndexByte to my will!!?

2013-04-17 Thread Jeppe Græsdal Johansen
Den 18-04-2013 07:57, Reinier Olislagers skrev: Hi all, (FPC 2.6.2 x86, trunk x64, on Windows; found similar behaviour on Linux x64) Busy getting DBase III memo support correct ;) In fcl-db\src\dbase\dbf_common.pas we find this part used to e.g. find end of file ($1A/ASCII 26) markers in a buf

Re: [fpc-pascal] How to use TThread?

2013-04-18 Thread Jeppe Græsdal Johansen
Den 18-04-2013 07:03, silvioprog skrev: Hi, I tried to use TThread in a small sample, but it don't works. The code is very simple, and I'm sending it in attached. Thanks, -- Silvio Clécio My public projects - github.com/silvioprog Here's a version which I thin

Re: [fpc-pascal] Some RTL functions cry big tears when mixing Pchar and Ansistring/String

2013-06-10 Thread Jeppe Græsdal Johansen
Den 11-06-2013 04:49, m...@rpzdesign.com skrev: Passing a Pchar gives weird, erratic behavior Could you maybe describe this weird, erratic behavior? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listi

Re: [fpc-pascal] Strings

2013-07-16 Thread Jeppe Græsdal Johansen
Why not just skip all the encoding uncertainity of strings and use an array of byte/char? It'll probably be a lot faster too Den 16-07-2013 12:17, Carsten Bager skrev: Hi I have a question about dynamic strings and memory allocation. If you look at my example underneath, I depend on that a dyn

Re: [fpc-pascal] Using arm-embedded-fpc

2013-10-23 Thread Jeppe Græsdal Johansen
Den 23-10-2013 13:15, Carsten Bager skrev: Hi Carsten, Unfortunately, my target will be STM32. I used the lpc to follow the wiki. Once I get that working I hope the STM32 will be working also. And I would like to use fpc 2.7.1 because I know that this version has enhanced interrupt-handling. I m

Re: [fpc-pascal] Re: GetAffinity\SetAffinity

2013-11-22 Thread Jeppe Græsdal Johansen
Den 22-11-2013 16:21, Brian skrev: Mark ... sorry for the mixup. The program and unit should now be stand alone. The unit links libc (rev6). Regards Brian coret.pas test_threads.pas

Re: [fpc-pascal] arm-embedded and interrupts

2013-12-11 Thread Jeppe Græsdal Johansen
Den 11-12-2013 19:20, Koenraad Lelong skrev: Hi, I made some time to tinker with my arm-embedded fpc-compiler. Since I had a problem in the past with routines optimized away I checked for this. And indeed there is a problem : my interrupt-routines are gone. How do I tell the compiler to leave

Re: [fpc-pascal] Memory leak in GetEnumerator

2013-12-27 Thread Jeppe Græsdal Johansen
Den 27-12-2013 10:16, Xiangrong Fang skrev: Hi All, I used HeapTrc on my TTreap class: https://github.com/xrfang/fpcollection/blob/master/src/units/treap.pas It reported memory leak in the following procedure: function TTreap.GetEnumerator: TTreap; begin Result := TTreap.Create; //<-- memory

Re: [fpc-pascal] ARM Linux crosscompiler: compiles but... executable gives segmentation fault

2014-01-13 Thread Jeppe Græsdal Johansen
Might be related to the mla/mls optimization which somehow has been enabled even though it's still broken - Reply message - Fra: "Reinier Olislagers" Dato: man., jan. 13, 2014 13:44 Emne: [fpc-pascal] ARM Linux crosscompiler: compiles but... executable gives segmentation fault Til: On

Re: [fpc-pascal] ARM Linux crosscompiler: compiles but... executable gives segmentation fault

2014-01-14 Thread Jeppe Græsdal Johansen
. The sp gets moved to 0x0fff8f94 which is unititialized Space before RAM. The Reason is that the offset for the local var .Lj9 (.long -32840) is plain wrong. It might be me doing something strange (Setting the record to absolute) but this works fine on armv7m. Jeppe, could you perhaps have a

Re: [fpc-pascal] FPC for ARM-7

2011-07-23 Thread Jeppe Grsædal Johansen
On 23-07-2011 20:34, Andreas Berger wrote: I am hoping to use FPC for ARM-7, compiling and debugging on a Windows machine. At the moment I am using Keil C + ULink2. Is it possible to use FPC from Windows and debug via the ULink2? I'm sure it should be possible. FPC can generate code for ARM7, and

Re: [fpc-pascal] ARM STM32F Processor

2011-09-19 Thread Jeppe Græsdal Johansen
Den 19-09-2011 17:21, Koenraad Lelong skrev: On 19-09-11 14:49, Mark Morgan Lloyd wrote: Koenraad Lelong wrote: On 04-09-10 12:40, Jeppe Johansen wrote: 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

Re: [fpc-pascal] ARM STM32F Processor

2011-09-19 Thread Jeppe Græsdal Johansen
Den 19-09-2011 22:20, Roberto P. skrev: Hi, I think you can get an unbranded (no IAR, no Keil, etc...) flash programming tool with a simple (but working) software from ST for about 30 euros. Look here: http://www.st.com/internet/evalboard/product/251168.jsp R# I'm pretty sure it's still the

Re: [fpc-pascal] arm controller unit

2011-09-26 Thread Jeppe Græsdal Johansen
Den 26-09-2011 15:50, Mattias Gaertner skrev: Hi, On target 'arm' sometimes the compiler uses the controller unit. For the codetools I need to know the exact conditions. What flags indicate that the controller unit is used? Mattias It's at the bottom of loaddefaultunits in pmodules:

Re: [fpc-pascal] What about complex numbers?

2011-10-05 Thread Jeppe Græsdal Johansen
Den 06-10-2011 00:30, Carlos Avila skrev: Hello Is complex number arithmetic possible in FPC? Another post recommends use unit so named ucomplex, but i can't find any detailed information of this in the documentation. But, amazingly, i sucessfully probed this small program: PROGRAM DUMMY; U

Re: [fpc-pascal] Making a cross-compiler for STM32

2011-10-11 Thread Jeppe Græsdal Johansen
Those errors seem to relate to some recent changes in the way heap management is done. Last I checked it worked just fine, but other things might have changed which broke it. I'll try to confirm if it's broken later on But if you try revision 19167 then those changes shouldn't be there. I'm f

Re: [fpc-pascal] Making a cross-compiler for STM32

2011-10-11 Thread Jeppe Græsdal Johansen
Den 11-10-2011 21:59, Koenraad Lelong skrev: On 11-10-11 15:56, Jeppe Græsdal Johansen wrote: Those errors seem to relate to some recent changes in the way heap management is done. Last I checked it worked just fine, but other things might have changed which broke it. I'll try to confi

Re: [fpc-pascal] Making a cross-compiler for STM32

2011-10-12 Thread Jeppe Græsdal Johansen
Den 12-10-2011 08:25, Koenraad Lelong skrev: On 12-10-11 08:12, Koenraad Lelong wrote: On 11-10-11 22:05, Jeppe Græsdal Johansen wrote: That's a problem, since that error was fixed in revision 19238. Btw. I just tested, and I had no problem building the svn trunk version using fpc 2.71.

SV: [fpc-pascal] Is there an online tool for browsing library documentation and source code for FPC and Lazarus?

2011-11-12 Thread Jeppe Græsdal Johansen
There is this page for RTL related units: http://www.freepascal.org/docs-html/rtl/index.html I don't know about packages. I think for packages, reading the unit source codes and looking at the examples is more efficient Is there an online tool for browsing librar

Re: [fpc-pascal] Name of a var

2011-11-21 Thread Jeppe Græsdal Johansen
Den 21-11-2011 13:56, Rainer Stratmann skrev: Is it possible to get information of the name of a var? For Example. var counter : longint; varname : shortstring; varname := nameofvar( counter ); The content of varname then is 'counter'. It would most likely be very easy to implement, but

Re: [fpc-pascal] OpenGL ES bitmap drawing

2011-11-25 Thread Jeppe Græsdal Johansen
Den 25-11-2011 17:53, Felipe Monteiro de Carvalho skrev: Hello, This is a kind of "take a look at my code please" question. Normally I avoid that kind of question, but in this case my cluelessness is big enough that it would really be excellent if someone could throw some light here. Well, basi

Re: [fpc-pascal] How to create this "union" ?

2011-12-26 Thread Jeppe Græsdal Johansen
Den 26-12-2011 15:41, ik skrev: Hello, I'm trying to translate the following to Pascal: struct xt_option_call { const char *arg, *ext_name; const struct xt_option_entry *entry; void *data; unsigned int xflags; bool invert; uint8_t nvals; union { u

Re: [fpc-pascal] How to create this "union" ?

2011-12-26 Thread Jeppe Græsdal Johansen
Den 26-12-2011 19:49, Jonas Maebe skrev: On 26 Dec 2011, at 19:42, Jeppe Græsdal Johansen wrote: union { struct xt_entry_match **match; struct xt_entry_target **target; }; void *xt_entry; void *udata; } ... case integer of 0: (match: ^Pxt_entry_match

Re: [fpc-pascal] Converting header with va_list

2012-01-18 Thread Jeppe Græsdal Johansen
Den 17-01-2012 16:19, Felipe Monteiro de Carvalho skrev: Hello, I need to convert this: [felipe@localhost android]$ gedit ~/Programas/android-ndk-r5/platforms/android-8/arch-arm/usr/include/jni.h void(*CallStaticVoidMethodV)(JNIEnv*, jclass, jmethodID, va_list); To Pascal. I tryed usi

Re: [fpc-pascal] fpc 2.6.0 for arm-embedded

2012-02-03 Thread Jeppe Græsdal Johansen
Den 03-02-2012 13:23, Koenraad Lelong skrev: Hi, I just had some time to look into this again. I downloaded the latest 2.6.0 sources and mostly followed http://wiki.freepascal.org/TARGET_Embedded to make a crosscompiler. In /usr/lib/fpc/2.6.0 there is a ppcrossarm with a date of today when I

Re: [fpc-pascal] Currency and ABS(-674.59)

2012-03-04 Thread Jeppe Græsdal Johansen
Den 04-03-2012 22:31, Zaher Dirkey skrev: I found this problem in Delphi and FPC, please test it and confirm if it is a bug. --- program test_abs_curr; uses sysutils; var a: Currency; begin a := 674.59; if a<>abs(-a) then writeln('not equal') else writeln('equ

Re: [fpc-pascal] Converting big-endian signed 16bits values to fpc integer

2012-04-15 Thread Jeppe Græsdal Johansen
Just use the BEtoN function. That will convert whatever big-endian number to your native endian. I don't know what speed it has, but it sure is elegant :) Den 16-04-2012 00:38, Giuliano Colla skrev: I'm dealing with a large number of data coming from an external device. They are big-endian 16

Re: [fpc-pascal] Wrong constructor returning the right object

2014-02-23 Thread Jeppe Græsdal Johansen
Den 23-02-2014 15:26, Mark Morgan Lloyd skrev: I think I've sorted this but I'd appreciate being kicked if it looks like I'm doing something badly wrong. What determines the constructor that's called when an object's created? I've got a couple of classes defined like this: TB5500BaseUnit=

Re: [fpc-pascal] Wrong constructor returning the right object

2014-02-23 Thread Jeppe Græsdal Johansen
Den 23-02-2014 17:03, Mark Morgan Lloyd skrev: Marco van de Voort wrote: In our previous episode, Mark Morgan Lloyd said: That logical, since the constructors are not an virtual; and override; pair. I find that if I explicitly decorate TB5500BaseUnit.Create() as virtual and TB5500SPOUnit.Cr

Re: [fpc-pascal] Armv7 fpc openocd v8

2014-05-17 Thread Jeppe Græsdal Johansen
can use "GNU remote debugger (gdbserver)" to connect to openocd. You'll need to point it at a GDB compiled for arm-elf. I'm not sure it will work though, but I think that was what that was developed for. Best Regards, Jeppe ___

Re: [fpc-pascal] Thread Safety of String

2014-06-04 Thread Jeppe Græsdal Johansen
It will never throw an exception, but it will never be thread safe either. Unless you are using the Interlocked* functions no datatype is threadsafe on a modern processor(except for reference counting of ansistrings, dynamic arrays, and interfaces; and all those use Interlocked* functions unde

Re: [fpc-pascal] FormatSettings not updated in Linux

2015-01-02 Thread Jeppe Græsdal Johansen
Den 02-01-2015 kl. 15:07 skrev Jonas Maebe: On 02/01/15 14:55, Bart wrote: On 1/2/15, Jonas Maebe wrote: The reason is that by design, FPC-compiled programs for Linux do not depend on libc and clocale introduces a dependency on libc. It's the same reason why you have to use the cthreads unit

Re: [fpc-pascal] fpc-arm-embedded bin doesn't run

2015-02-18 Thread Jeppe Græsdal Johansen
Den 17-02-2015 kl. 17:21 skrev turro75: Hi All, I'm trying to get the fpc working on a stm32f103c8 board (maple_mini_clone). following this http://j-software.dk/stm32f103.php I'm able to compile (fpc-2.6.4) and flash the bin in the flash but no way to see t

Re: [fpc-pascal] FPC ARM inline Assembler

2023-04-07 Thread Jeppe Johansen via fpc-pascal
be not all aspects of either syntax are supported. Especially NEON/Advanced SIMD stuff might not be supported. Best Regards, Jeppe ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

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

2024-08-10 Thread Jeppe Johansen via fpc-pascal
the EXE and the code signing certificate you will use. For InnoSetup it needs to be rebuilt since you also need to sign the uninstaller that it creates. Info here https://jrsoftware.org/ishelp/index.php?topic=setup_signtool Best Regards, Jeppe ___ fpc-