Re: [fpc-pascal] ARM-Cortex port
Am 26.08.2010 18:20, schrieb Geoffrey Barton: > > 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 >>> LM3S9B92, one of the TI Luminary processors. >> >> If you've any reusable startup code, we would be happy to include it in >> official fpc. > > certainly! where do you want it? > Just email it to me or create a bug report and attach it. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] ARM-Cortex port
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 LM3S9B92, one of the TI Luminary processors. If you've any reusable startup code, we would be happy to include it in official fpc. certainly! where do you want it? Geoffrey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal Supplying a patch on the bug tracker would probably be the best way ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] ARM-Cortex port
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 LM3S9B92, one of the TI Luminary processors. If you've any reusable startup code, we would be happy to include it in official fpc. certainly! where do you want it? Geoffrey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] ARM-Cortex port
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 > LM3S9B92, one of the TI Luminary processors. If you've any reusable startup code, we would be happy to include it in official fpc. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] ARM-Cortex port
Hi, On Tue, 24 Aug 2010 10:53:55 +0100, Geoffrey Barton wrote: >> >> Date: Mon, 23 Aug 2010 13:57:30 -0300 >> Thanks Jonas and Jeppe for your answers. I will probably wait then to >> switch (or try to convince the company to use an ARM-9) > > 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 LM3S9B92, one of the TI Luminary processors. Getting > interrupts working took some time. I think the next thing for me is to > try calling the rom code from FPC. Then it should be possible to re- > use all the library of C code supplied by TI and it will no longer be > necessary to try and fathom lines such as:- > > *((void (*)(void))(*(unsigned long *)0x2c)))(); > > which occurs in the USB example code :-) > I am not quite sure how to write that in FP, but I am sure someone > will have an idea. Something like this should work for that case: type TMyProcedure = procedure; // if the procedures/functions you want to invoke have parameters // use something like this: // // TMyFunction = function(arg1 : type1; arg2 : type2) : result_type; var x : TMyProcedure; begin x := TMyProcedure(0x2c); x; // to invoke it. Or "x()" if you prefer that end. Hth, Thomas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] ARM-Cortex port
Date: Mon, 23 Aug 2010 13:57:30 -0300 From: Andreas Berger Subject: Re: [fpc-pascal] ARM-Cortex port To: FPC-Pascal users discussions Message-ID: <4c72a87a.7020...@thebergerclan.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Thanks Jonas and Jeppe for your answers. I will probably wait then to switch (or try to convince the company to use an ARM-9) 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 LM3S9B92, one of the TI Luminary processors. Getting interrupts working took some time. I think the next thing for me is to try calling the rom code from FPC. Then it should be possible to re- use all the library of C code supplied by TI and it will no longer be necessary to try and fathom lines such as:- *((void (*)(void))(*(unsigned long *)0x2c)))(); which occurs in the USB example code :-) I am not quite sure how to write that in FP, but I am sure someone will have an idea. Geoffrey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] ARM-Cortex port
Thanks Jonas and Jeppe for your answers. I will probably wait then to switch (or try to convince the company to use an ARM-9) On 23/8/2010 11:21 AM, Jeppe Johansen wrote: 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 has been chosen - the Luminary (TI) ARM-Cortex processor. Will FPC run on this processor? Does anyone have experience? If FPC runs I may be able to convert my last C++ app to pascal. Thanks, Andreas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal From my findings Luminary is Cortex-M3 based, in which case there's needed a base code RTL for it. FPC will generate code for it, and it should generally work, but it's not very optimized yet(other than generic optimization), and there are many unsupported inline assembler instructions(primarily special system instructions). But there are ofcourse workarounds for the assembler code Currently there's only half working stub code for the STM32F103 Cortex-M3 based chip, but I'll gladly help if you have any questions Regards, Jeppe ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] ARM-Cortex port
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 has been chosen - the Luminary (TI) ARM-Cortex processor. Will FPC run on this processor? Does anyone have experience? If FPC runs I may be able to convert my last C++ app to pascal. Thanks, Andreas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal From my findings Luminary is Cortex-M3 based, in which case there's needed a base code RTL for it. FPC will generate code for it, and it should generally work, but it's not very optimized yet(other than generic optimization), and there are many unsupported inline assembler instructions(primarily special system instructions). But there are ofcourse workarounds for the assembler code Currently there's only half working stub code for the STM32F103 Cortex-M3 based chip, but I'll gladly help if you have any questions Regards, Jeppe ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] ARM-Cortex port
On 23 Aug 2010, at 16:09, Andreas Berger wrote: 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 has been chosen - the Luminary (TI) ARM-Cortex processor. "Cortex" is a whole family of ARM CPUs. FPC full supports the ARM Cortex "A" family of processor (A8, A9). The Luminary cpu is a Cortex- M3. These only support Thumb and Thumb-2. There is support for Thumb-2 (and in particular the Cortex-M3) in FPC trunk, but I don't know how well-tested or maintained it is (the support was added via third party patches). Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] ARM-Cortex port
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 has been chosen - the Luminary (TI) ARM-Cortex processor. Will FPC run on this processor? Does anyone have experience? If FPC runs I may be able to convert my last C++ app to pascal. Thanks, Andreas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal