Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2011-12

fpc 2.6.0-rc1 for arm-embedded

26 messages · 8 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Koenraad Lelong

Hi,

I had some problems making or using a compiler for arm-embedded so I tried the new 2.6.0-rc1.
Compiling with :
make clean buildbase installbase CROSSINSTALL=1 CROSSOPT="-CfSoft -XParm-elf-" OS_TARGET=embedded CPU_TARGET=arm PREFIX=/usr/ SUBARCH=armv7m went fine.
Compiling a test-app with
/usr/lib/fpc/2.6.0/ppcrossarm -B -al -Tembedded -Wpstm32f103re -Cfsoft -Cparmv7m -XParm-elf- test-1.pas
gave me following warnings :
/usr/bin/arm-elf-ld: Warning:
/usr/lib/fpc/2.6.0/units/arm-embedded/rtl/system.o does not support interworking, whereas test-1.elf does
/usr/bin/arm-elf-ld: Warning:
/usr/lib/fpc/2.6.0/units/arm-embedded/rtl/stm32f103.o does not support interworking, whereas test-1.elf does

I think Googling tells me my application will not run. Am I doing something wrong ?

Thanks for any hints.

Koenraad Lelong

Koenraad Lelong
to Den Jean
Den Jean wrote 10 lines
On Thursday 08 December 2011 13:49:16 Koenraad Lelong wrote: > /usr/lib/fpc/2.6.0/units/arm-embedded/rtl/system.o does not support > interworking, whereas test-1.elf does does this thread help ? http://lists.freepascal.org/lists/fpc-devel/2011-August/025615.html

Hi,

Thanks,

I tried the commands of John Clymer after downloading and installing Codesourcery. The compiler and my test-application compiled fine. I flashed my device but there I don't see anything.
At the moment I can't debug with JTAG, so I'll have to fix that first before I can say more.

Regards,

Koenraad Lelong.

Koenraad Lelong
to Koenraad Lelong
Koenraad Lelong wrote 24 lines
On 09-12-11 00:09, Den Jean wrote: > On Thursday 08 December 2011 13:49:16 Koenraad Lelong wrote: > > > /usr/lib/fpc/2.6.0/units/arm-embedded/rtl/system.o does not support > > > interworking, whereas test-1.elf does > > does this thread help ? > > http://lists.freepascal.org/lists/fpc-devel/2011-August/025615.html > Hi, Thanks, I tried the commands of John Clymer after downloading and installing Codesourcery. The compiler and my test-application compiled fine. I flashed my device but there I don't see anything. At the moment I can't debug with JTAG, so I'll have to fix that first before I can say more. Regards, Koenraad Lelong.

Hi,

I got SWD running so I can debug.
Unfortunately, I still can't go on.
When I start the program with the remote gdb I get an error :

(gdb) target extend localhost:4242
Remote debugging using localhost:4242
0x0800085c in ?? ()
(gdb) x/20i 0x800085c
=> 0x800085c: ldr r1, [pc, #60] ; 0x80008a0 0x8000860: ldr r2, [pc, #60] ; 0x80008a4
0x8000864: ldr r3, [pc, #60] ; 0x80008a8
0x8000868: cmp r2, r3
0x800086c: ldrls r0, [r1], #4
0x8000870: strls r0, [r2], #4
0x8000874: bls 0x8000868
0x8000878: ldr r1, [pc, #24] ; 0x8000898
0x800087c: ldr r2, [pc, #24] ; 0x800089c
0x8000880: mov r0, #0
0x8000884: cmp r1, r2
0x8000888: strls r0, [r1], #4
0x800088c: bls 0x8000884
0x8000890: b 0x8001870
0x8000894: b 0x8000854
0x8000898: andcs r0, r0, r12, rrx
0x800089c: strhcs r0, [r0], -r4
0x80008a0: stmdaeq r0, {r3, r4, r5, r6, r11, r12} 0x80008a4: andcs r0, r0, r0
0x80008a8: andcs r0, r0, r12, rrx
(gdb) run
The program being debugged has been started already. Start it from the beginning? (y or n) y
Starting program:
Cannot access memory at address 0x2000ff98
0x0800085c in ?? ()

The first lines are the disassembly of the code, which is the same as my disassembled elf-file.
Then the run stops with an error-message about the memory-access. The message is right, the chip only has 8K of RAM. I was looking if the stackpointer is maybe mis-configured, but I can't find where this happens. I don't know what the last line means, is that the procedure where the error happened ?

Any suggestions ?

Thanks in advance,

Koenraad Lelong.

Koenraad Lelong
to Koenraad Lelong

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 run ppcrossarm -i.
But when I try

fpc -Parm -Tembedded -Wplpc2124 -Cparmv7m

I get an error :

Error: ppcarm can't be executed, error message: Failed to execute "ppcarm", error code: 127

Is this expexted ? If yes, then the wiki should be updated. If it matters, I'm using OpesSuse 12.1.

Another thing that puzzles me : the wiki says to use SUBARCH=armv7m for cortex-m3. ppcrossarm -i says there are cpu instruction sets for ARMV3
ARMV4
ARMV5
ARMV6
ARMV7
ARMV7M
CORTEXM3
Should I use SUBARCH=cortexm3 to compile the compiler to use it with STM32-processors, which are cortex-m3 ? Or should I just compile the applications with -Cpcortexm3 ?

Thanks for any info.

Regards,

Koenraad Lelong.

Mark Morgan Lloyd
to Koenraad Lelong
Koenraad Lelong wrote 18 lines
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 run ppcrossarm -i. But when I try fpc -Parm -Tembedded -Wplpc2124 -Cparmv7m I get an error : Error: ppcarm can't be executed, error message: Failed to execute "ppcarm", error code: 127 Is this expexted ? If yes, then the wiki should be updated. If it matters, I'm using OpesSuse 12.1.

Since nobody else has responded: what does fpc -h|head give you? That error 127 can be caused by the symlink from (e.g.) /usr/local/bin/ppcarm pointing to a file that doesn't exist.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]
Jeppe Græsdal Johansen
to Koenraad Lelong: I just had some time to look into this again. I downloaded the latest 2.6.0 sources and…
Koenraad Lelong wrote 8 lines
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 run ppcrossarm -i. But when I try

For anything arm-embedded, it would probably be a better idea to use the latest SVN version. Simply because arm-embedded is a much less used and tested branch, the functionality might be slower to get into releases. In SVN trunk the distinction between Cortex-M3 and ARMv7M is removed and everything has been changed to ARMv7M. This is why the wiki page only mentions ARMv7M.

Show quoted text 8 lines
fpc -Parm -Tembedded -Wplpc2124 -Cparmv7m I get an error : Error: ppcarm can't be executed, error message: Failed to execute "ppcarm", error code: 127 Is this expexted ? If yes, then the wiki should be updated.

No, fpc should be trying to call ppcrossarm(since you are crosscompiling, I guess. I suppose you don't work on an ARM host). I don't know why it doesn't do that in your case, might be related to the way it was originally built for your platform.

Show quoted text 23 lines
If it matters, I'm using OpesSuse 12.1. Another thing that puzzles me : the wiki says to use SUBARCH=armv7m for cortex-m3. ppcrossarm -i says there are cpu instruction sets for ARMV3 ARMV4 ARMV5 ARMV6 ARMV7 ARMV7M CORTEXM3 Should I use SUBARCH=cortexm3 to compile the compiler to use it with STM32-processors, which are cortex-m3 ? Or should I just compile the applications with -Cpcortexm3 ? Thanks for any info. Regards, Koenraad Lelong. _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Graeme Geldenhuys
to Koenraad Lelong: I just had some time to look into this again. I downloaded the latest 2.6.0 sources and…
Koenraad Lelong wrote 11 lines
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 run ppcrossarm -i. But when I try fpc -Parm -Tembedded -Wplpc2124 -Cparmv7m I get an error :

For a much easier cross-compiling experience, try using Paul Breneman's downloads. He has packages the FPC arm cross-compiler is a very small archive. Simply unzip and run - and it works no problems. As a bonus, he also includes fpGUI (for GUI development) with his cross-compiler archives.

http://www.turbocontrol.com/easyfpgui.htm

Regards,   - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net
Koenraad Lelong
to Graeme Geldenhuys
Graeme Geldenhuys wrote 8 lines
For a much easier cross-compiling experience, try using Paul Breneman's downloads. He has packages the FPC arm cross-compiler is a very small archive. Simply unzip and run - and it works no problems. As a bonus, he also includes fpGUI (for GUI development) with his cross-compiler archives. http://www.turbocontrol.com/easyfpgui.htm

I downloaded that package, and I tried it on my x86_64 Ubuntu-laptop. ppcarm can't be executed, "file ppcarm" shows this : ppcarm: ELF 32-bit LSB executable, ARM, version 1, statically linked, stripped
AFAIK this means it's a binary to run on an arm-system, so it's not a crosscompiler and I do not have an arm-system at hand that can run a compiler.

I think there is some misunderstanding. What I'm trying to do is make software for an embedded system. There is no OS. The controller I'm targetting has 128K of flash-rom and 8K of RAM.

I do have a working crosscompiler (I think), only I have to call it via /usr/lib/fpc/2.6.0/ppcrossarm ..., instead of via fpc ... The code seems not to work, but that could be my own RTL, which I copied from SMT32F103RE. I'm working on that.

Regards,

Koenraad Lelong.

Rainer Stratmann
to Koenraad Lelong
Koenraad Lelong wrote
I do have a working crosscompiler (I think), only I have to call it via /usr/lib/fpc/2.6.0/ppcrossarm ..., instead of via fpc ... The code seems not to work, but that could be my own RTL, which I copied from SMT32F103RE. I'm working on that.

I am also interested in crosscompiling for embedded ARM. How did you install the crosscompiler on Linux OS? Is there an easy way of doing this?
Is it in the debian packages precompiled and ready for use?

Graeme Geldenhuys
to Koenraad Lelong: I downloaded that package, and I tried it on my x86_64 Ubuntu-laptop. ppcarm can't be…
Koenraad Lelong wrote 8 lines
I downloaded that package, and I tried it on my x86_64 Ubuntu-laptop. ppcarm can't be executed, "file ppcarm" shows this : ppcarm: ELF 32-bit LSB executable, ARM, version 1, statically linked, stripped AFAIK this means it's a binary to run on an arm-system, so it's not a crosscompiler and I do not have an arm-system at hand that can run a compiler.

Strange. Last time I downloaded Paul's Windows archive he released, it was indeed a cross-compiler for x86 (32-bit) to ARM (and not a native arm executable). I could then compile my mobile application under Windows 2000, then copy my compiled application to my ARM / WinCE based PDA and run in there.

Of the various download links on Paul's website, which one did you download?

Regards,   - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net
Koenraad Lelong
to Rainer Stratmann: I am also interested in crosscompiling for embedded ARM. How did you install the…
Rainer Stratmann wrote
I am also interested in crosscompiling for embedded ARM. How did you install the crosscompiler on Linux OS? Is there an easy way of doing this? Is it in the debian packages precompiled and ready for use?

On a Suse 12.1 virtual machine I downloaded the binutils from CodeSourcery and installed them. I downloaded and installed fpc 2.6.0 and it's sources. In the "root" of the sources I did (as superuser) : make clean buildbase installbase CROSSINSTALL=1 OS_TARGET=embedded CPU_TARGET=arm SUBARCH=armv7m
CROSSBINDIR=/home/koenraad/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin BINUTILSPREFIX=arm-none-eabi- CROSSOPT="-CfSoft" PREFIX=/usr I'm afraid there are no ready make packages for crosscompiling. I would be interested too. But fpc has a way to make packages (at least rpm) for fpc for linux so I think it should be possible to make them for crosscompiling too.

Regards,

Koenraad Lelong.

Koenraad Lelong
to Graeme Geldenhuys: Strange. Last time I downloaded Paul's Windows archive he released, it was indeed a…
Graeme Geldenhuys wrote 10 lines
Strange. Last time I downloaded Paul's Windows archive he released, it was indeed a cross-compiler for x86 (32-bit) to ARM (and not a native arm executable). I could then compile my mobile application under Windows 2000, then copy my compiled application to my ARM / WinCE based PDA and run in there. Of the various download links on Paul's website, which one did you download?

http://www.turbocontrol.com/EasyfpGUI-fpc-2.2.2.arm-linux-052111.zip Like I said, I think these systems are for systems with a full Operating System (Linux, WinCE ...).

I'm trying to make software for a bare microcontroller.

Koenraad.

Koenraad Lelong
to Koenraad Lelong: I downloaded that package, and I tried it on my x86_64 Ubuntu-laptop. ppcarm can't be…
Show quoted text 5 lines
I do have a working crosscompiler (I think), only I have to call it via /usr/lib/fpc/2.6.0/ppcrossarm ..., instead of via fpc ... The code seems not to work, but that could be my own RTL, which I copied from SMT32F103RE. I'm working on that.

After some debugging, I think my compiler does not work. I'm pretty certain it outputs arm-code in stead of the needed thumb2 code.

I just tried to make a crosscompiler using svn 20278, which fails :

make rtl_all FPC=/home/koenraad/devel/fpc-svn/compiler/ppcrossarm RELEASE=1 make[1]: Map '/home/koenraad/devel/fpc-svn' wordt binnengegaan make -C rtl all
make[2]: Map '/home/koenraad/devel/fpc-svn/rtl' wordt binnengegaan make -C embedded all
make[3]: Map '/home/koenraad/devel/fpc-svn/rtl/embedded' wordt binnengegaan /bin/mkdir -p /home/koenraad/devel/fpc-svn/rtl/units/arm-embedded /home/koenraad/devel/fpc-svn/compiler/ppcrossarm -Cparmv7m @rtl.cfg -Ur -Tembedded -Parm -XParm-none-eabi- -Xr -Ur -Xs -O2 -n -Fi../inc -Fi../arm
-FD/home/koenraad/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin -FE. -FU/home/koenraad/devel/fpc-svn/rtl/units/arm-embedded -darm -dRELEASE -CfSoft -Us -Sg system.pp
text.inc(1897,3) Fatal: Unknown compilerproc "fpc_ansistr_assign". Check if you use the correct run time library.
Fatal: Compilation aborted
make[3]: *** [system.ppu] Fout 1
make[3]: Map '/home/koenraad/devel/fpc-svn/rtl/embedded' wordt verlaten make[2]: *** [embedded_all] Fout 2
make[2]: Map '/home/koenraad/devel/fpc-svn/rtl' wordt verlaten make[1]: *** [rtl_all] Fout 2
make[1]: Map '/home/koenraad/devel/fpc-svn' wordt verlaten make: *** [base.build-stamp.arm-embedded] Fout 2

Any thoughts ?

Thanks,

Koenraad.

Jonas Maebe
to Koenraad Lelong
Koenraad Lelong wrote
After some debugging, I think my compiler does not work. I'm pretty certain it outputs arm-code in stead of the needed thumb2 code.

The error below indicates the compiler does not get to emitting any kind of code at all.

Show quoted text 19 lines
I just tried to make a crosscompiler using svn 20278, which fails : make rtl_all FPC=/home/koenraad/devel/fpc-svn/compiler/ppcrossarm RELEASE=1 make[1]: Map '/home/koenraad/devel/fpc-svn' wordt binnengegaan make -C rtl all make[2]: Map '/home/koenraad/devel/fpc-svn/rtl' wordt binnengegaan make -C embedded all make[3]: Map '/home/koenraad/devel/fpc-svn/rtl/embedded' wordt binnengegaan /bin/mkdir -p /home/koenraad/devel/fpc-svn/rtl/units/arm-embedded /home/koenraad/devel/fpc-svn/compiler/ppcrossarm -Cparmv7m @rtl.cfg - Ur -Tembedded -Parm -XParm-none-eabi- -Xr -Ur -Xs -O2 -n -Fi../inc - Fi../arm -FD/home/koenraad/CodeSourcery/ Sourcery_CodeBench_Lite_for_ARM_EABI/bin -FE. -FU/home/koenraad/ devel/fpc-svn/rtl/units/arm-embedded -darm -dRELEASE -CfSoft -Us -Sg system.pp text.inc(1897,3) Fatal: Unknown compilerproc "fpc_ansistr_assign". Check if you use the correct run time library.

This means you are trying to compile an FPC 2.6.x (or 2.4.x) RTL using an FPC 2.7.x starting compiler, or an FPC 2.7.x RTL using an FPC 2.7.x compiler built from a different 2.7.x revision.

Always first build a native compiler for the version you want to use (starting with the previous release relative to that version), and use the resulting native compiler to build a cross-compiler from those same sources.

Jonas

Koenraad Lelong
to Jonas Maebe
Jonas Maebe wrote 8 lines
On 08 Feb 2012, at 15:31, Koenraad Lelong wrote: > After some debugging, I think my compiler does not work. I'm pretty > certain it outputs arm-code in stead of the needed thumb2 code. The error below indicates the compiler does not get to emitting any kind of I say above is from a crosscompiler made with 2.6.0.

Below is what I get when I try to make a new crosscompiler, using svn 20278.

> I just tried to make a crosscompiler using svn 20278, which fails : >

...

Show quoted text 10 lines
This means you are trying to compile an FPC 2.6.x (or 2.4.x) RTL using an FPC 2.7.x starting compiler, or an FPC 2.7.x RTL using an FPC 2.7.x compiler built from a different 2.7.x revision. Always first build a native compiler for the version you want to use (starting with the previous release relative to that version), and use the resulting native compiler to build a cross-compiler from those same sources.

That's what I think I did.
I had fpc 2.6.0 installed.
I downloaded fpc trunk via svn.
In the root of the download I did "make clean build install" (as root). I renamed /usr/lib64/fpc/2.6.0 to -2.6.0- so it would not be found. I renamed /usr/bin/ppcx64 to ppcx64-2.6.0.
I made a link from /usr/lib/fpc/2.7.0/ppcx64 to /usr/bin/ppcx64. I modified /etc/fpc.cfg to use /usr/lib/fpc/2.7.0... fpc -i shows 2.7.1
In the root of the download I tried to make the crosscompiler and then I got the error.

Is there a way to verify there are no files left ? I tried fpc -vt but that seems not the tool.

Thanks,

Koenraad.

Koenraad Lelong
to Koenraad Lelong
Koenraad Lelong wrote 16 lines
On 08-02-12 15:42, Jonas Maebe wrote: > > On 08 Feb 2012, at 15:31, Koenraad Lelong wrote: > >> After some debugging, I think my compiler does not work. I'm pretty >> certain it outputs arm-code in stead of the needed thumb2 code. > > The error below indicates the compiler does not get to emitting any kind > of code at all. What I say above is from a crosscompiler made with 2.6.0. Below is what I get when I try to make a new crosscompiler, using svn 20278. > >> I just tried to make a crosscompiler using svn 20278, which fails : >>

I did another experiment.
I make a zip-file with a 2.7.1 compiler and its sources. I installled this on a brand new virtual machine with OpenSuse, so no fpc 2.6.0 available. With this I compiled the compiler itself (no install). This went fine, so I expect the installation was OK. Then I tried to make the crosscompiler. This failed with the same error as before :

make rtl_all FPC=/home/koenraad/devel/fpc-svn/compiler/ppcrossarm RELEASE=1 make[1]: Map '/home/koenraad/devel/fpc-svn' wordt binnengegaan make -C rtl all
make[2]: Map '/home/koenraad/devel/fpc-svn/rtl' wordt binnengegaan make -C embedded all
make[3]: Map '/home/koenraad/devel/fpc-svn/rtl/embedded' wordt binnengegaan /bin/mkdir -p /home/koenraad/devel/fpc-svn/rtl/units/arm-embedded /home/koenraad/devel/fpc-svn/compiler/ppcrossarm -Cparmv7m @rtl.cfg -Ur -Tembedded -Parm -XParm-none-eabi- -Xr -Ur -Xs -O2 -n -Fi../inc -Fi../arm
-FD/home/koenraad/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin -FE. -FU/home/koenraad/devel/fpc-svn/rtl/units/arm-embedded -darm -dRELEASE -CfSoft -Us -Sg system.pp
text.inc(1897,3) Fatal: Unknown compilerproc "fpc_ansistr_assign". Check if you use the correct run time library.
Fatal: Compilation aborted
make[3]: *** [system.ppu] Fout 1
make[3]: Map '/home/koenraad/devel/fpc-svn/rtl/embedded' wordt verlaten make[2]: *** [embedded_all] Fout 2
make[2]: Map '/home/koenraad/devel/fpc-svn/rtl' wordt verlaten make[1]: *** [rtl_all] Fout 2
make[1]: Map '/home/koenraad/devel/fpc-svn' wordt verlaten make: *** [base.build-stamp.arm-embedded] Fout 2

What am I doing wrong ? All suggestions to help resolve this are welcomed.

Thanks,

Koenraad Lelong.

Rainer Stratmann
to Koenraad Lelong
Koenraad Lelong wrote 5 lines
I did another experiment. I make a zip-file with a 2.7.1 compiler and its sources. I installled this on a brand new virtual machine with OpenSuse, so no fpc 2.6.0 available. With this I compiled the compiler itself (no install). This went fine, so I expect the installation was OK. ...

This means that there is a simple install solution for Linux? All in one directory?

Jonas Maebe
to Koenraad Lelong: I did another experiment. I make a zip-file with a 2.7.1 compiler and its sources. I…
Koenraad Lelong wrote 29 lines
make rtl_all FPC=/home/koenraad/devel/fpc-svn/compiler/ppcrossarm RELEASE=1 make[1]: Map '/home/koenraad/devel/fpc-svn' wordt binnengegaan make -C rtl all make[2]: Map '/home/koenraad/devel/fpc-svn/rtl' wordt binnengegaan make -C embedded all make[3]: Map '/home/koenraad/devel/fpc-svn/rtl/embedded' wordt binnengegaan /bin/mkdir -p /home/koenraad/devel/fpc-svn/rtl/units/arm-embedded /home/koenraad/devel/fpc-svn/compiler/ppcrossarm -Cparmv7m @rtl.cfg - Ur -Tembedded -Parm -XParm-none-eabi- -Xr -Ur -Xs -O2 -n -Fi../inc - Fi../arm -FD/home/koenraad/CodeSourcery/ Sourcery_CodeBench_Lite_for_ARM_EABI/bin -FE. -FU/home/koenraad/ devel/fpc-svn/rtl/units/arm-embedded -darm -dRELEASE -CfSoft -Us -Sg system.pp text.inc(1897,3) Fatal: Unknown compilerproc "fpc_ansistr_assign". Check if you use the correct run time library. Fatal: Compilation aborted make[3]: *** [system.ppu] Fout 1 make[3]: Map '/home/koenraad/devel/fpc-svn/rtl/embedded' wordt verlaten make[2]: *** [embedded_all] Fout 2 make[2]: Map '/home/koenraad/devel/fpc-svn/rtl' wordt verlaten make[1]: *** [rtl_all] Fout 2 make[1]: Map '/home/koenraad/devel/fpc-svn' wordt verlaten make: *** [base.build-stamp.arm-embedded] Fout 2 What am I doing wrong ? All suggestions to help resolve this are welcomed.

Now I see: that compilerproc is only included in the RTL if FPC_HAS_FEATURE_ANSISTRINGS is defined. The embedded target by default probably does not include support for ansistrings (since they in turn depend on the heap manager). One helper for readstr(ansistring) is however always included in the RTL currently, and the ansistring assignment it contains results in a helper call (fpc_ansistr_assign) since the introduction of the new ansistrings with code page support (in the past it didn't, which is why that did not cause a problem previously).

So it should be simply a matter of adding some extra {$ifdef FPC_HAS_FEATURE_ANSISTRINGS} defines around that code.

Jonas

Koenraad Lelong
to Jonas Maebe
Jonas Maebe wrote 13 lines
Now I see: that compilerproc is only included in the RTL if FPC_HAS_FEATURE_ANSISTRINGS is defined. The embedded target by default probably does not include support for ansistrings (since they in turn depend on the heap manager). One helper for readstr(ansistring) is however always included in the RTL currently, and the ansistring assignment it contains results in a helper call (fpc_ansistr_assign) since the introduction of the new ansistrings with code page support (in the past it didn't, which is why that did not cause a problem previously). So it should be simply a matter of adding some extra {$ifdef FPC_HAS_FEATURE_ANSISTRINGS} defines around that code.

I think I have it fixed. I modified rtl/inc/text.inc, see the enclosed file. But how do I make a proper patch ? Now I did this : diff fpc-svn/rtl/inc/text.inc.org fpc-svn/rtl/inc/text.inc

I only did make a crosscompiler, so it is not fully tested. And AFAIK the crosscompiler makes thumb2 code now :-) Now I have to make an rtl for the processor I'm using.

Thanks.

Koenraad

Sven Barth
to Koenraad Lelong: I think I have it fixed. I modified rtl/inc/text.inc, see the enclosed file. But how do I…
Koenraad Lelong wrote 18 lines
On 10-02-12 11:30, Jonas Maebe wrote: > > Now I see: that compilerproc is only included in the RTL if > FPC_HAS_FEATURE_ANSISTRINGS is defined. The embedded target by default > probably does not include support for ansistrings (since they in turn > depend on the heap manager). One helper for readstr(ansistring) is > however always included in the RTL currently, and the ansistring > assignment it contains results in a helper call (fpc_ansistr_assign) > since the introduction of the new ansistrings with code page support (in > the past it didn't, which is why that did not cause a problem > previously). > > So it should be simply a matter of adding some extra {$ifdef > FPC_HAS_FEATURE_ANSISTRINGS} defines around that code. > I think I have it fixed. I modified rtl/inc/text.inc, see the enclosed file. But how do I make a proper patch ? Now I did this : diff fpc-svn/rtl/inc/text.inc.org fpc-svn/rtl/inc/text.inc

If your "fpc-svn" directory is a real svn checkout you can just do a "svn diff > your-patch.diff". Alternatively you can use should add "-aur" as argument to diff (in front of the filenames).

Regards,
Sven

Koenraad Lelong
to Sven Barth
Sven Barth wrote
If your "fpc-svn" directory is a real svn checkout you can just do a "svn diff > your-patch.diff". Alternatively you can use should add "-aur" as argument to diff (in front of the filenames).

Enclosed the new patch. This all compiles, but needs to be verified and tested.
Or should I make a bugreport ?

Regards,

Koenraad.

Sven Barth
to Koenraad Lelong
Koenraad Lelong wrote 8 lines
On 10-02-12 13:58, Sven Barth wrote: > If your "fpc-svn" directory is a real svn checkout you can just do a > "svn diff > your-patch.diff". Alternatively you can use should add > "-aur" as argument to diff (in front of the filenames). Enclosed the new patch. This all compiles, but needs to be verified and tested. Or should I make a bugreport ?

Oh, I didn't know you did other changes as well. Then you should do a "svn diff rtl/inc/text.inc" and make a bugreport for that :)

Regards,
Sven

Koenraad Lelong
to Sven Barth
Sven Barth wrote 13 lines
Am 10.02.2012 14:46, schrieb Koenraad Lelong: > On 10-02-12 13:58, Sven Barth wrote: >> If your "fpc-svn" directory is a real svn checkout you can just do a >> "svn diff > your-patch.diff". Alternatively you can use should add >> "-aur" as argument to diff (in front of the filenames). > > Enclosed the new patch. This all compiles, but needs to be verified and > tested. > Or should I make a bugreport ? Oh, I didn't know you did other changes as well. Then you should do a "svn diff rtl/inc/text.inc" and make a bugreport for that :)

http://bugs.freepascal.org/view.php?id=21260

I tagged it "major" because without the patch you can't make a crosscompiler. Maybe too strong ;-) ?

The other modifications are for the controller I want to use. But I can't test this until later.

Koenraad.

Sven Barth
to Koenraad Lelong
Koenraad Lelong wrote 23 lines
On 10-02-12 15:33, Sven Barth wrote: > Am 10.02.2012 14:46, schrieb Koenraad Lelong: >> On 10-02-12 13:58, Sven Barth wrote: >>> If your "fpc-svn" directory is a real svn checkout you can just do a >>> "svn diff > your-patch.diff". Alternatively you can use should add >>> "-aur" as argument to diff (in front of the filenames). >> >> Enclosed the new patch. This all compiles, but needs to be verified and >> tested. >> Or should I make a bugreport ? > > Oh, I didn't know you did other changes as well. Then you should do a > "svn diff rtl/inc/text.inc" and make a bugreport for that :) > http://bugs.freepascal.org/view.php?id=21260 I tagged it "major" because without the patch you can't make a crosscompiler. Maybe too strong ;-) ? The other modifications are for the controller I want to use. But I can't test this until later.

I thought so, but they don't belong to this bug report ;)

Regards,
Sven