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

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 jonas.ma...@elis.ugent.be 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

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

Re: [fpc-pascal] Armv7 fpc openocd v8

2014-05-17 Thread Jeppe Græsdal Johansen
Den 17-05-2014 01:33, Justin Smyth skrev: Hi everyone, I have recently got open ocd v8 to talk to my nxp lpc 1343 via a stlinkv2 , should fpc ( 2.6.4 or higher support this type of CPU and does anyone have any ideas how to hook up gdb to openocd ? I am thinking of using Lazarus to step

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

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

2014-01-14 Thread Jeppe Græsdal Johansen
] .Ll2: . .Lj9: .long -32840 .Lj7: .long 32768 .Lj10: .long 32840 .Lt2: Am 13.01.14 15:15, schrieb 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

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 reinierolislag...@gmail.com Dato: man., jan. 13, 2014 13:44 Emne: [fpc-pascal] ARM Linux crosscompiler: compiles but... executable gives

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] 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 http://free-pascal-general.1045716.n5.nabble.com/file/n5717549/coret.pas test_threads.pas

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

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

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

2013-06-11 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

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

2013-04-18 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

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 http://github.com/silvioprog Here's a version which I think

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

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

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] 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 ___

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

2012-10-29 Thread Jeppe Græsdal Johansen
Den 30-10-2012 01:04, ik skrev: Hello, There are many places such as GitHub, Google Code, Sourceforge etc, that hosts a lot of open source projects, libraries etc for FPC/Pascal. On the other hand we have fppkg that can have repositories and able to allow us remote download and install of code.

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

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

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

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 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: [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] 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] 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

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,

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

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

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. What

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 confirm

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;

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] 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