Re: [fpc-devel] ppcrossarm dies when trying to build embedded rtl (svn 23683)
I, too, am unable to do make crossinstall for ARM using a 64 bit ppc on a 64 bit Debian. The arm cross ppc is built (and when I start it without parameter outputs the correct information). But when trying to crosscompile system.pp (seemingly the first RTL source file make crossinstall tries to cross-compile). (when doing so as root I get an out of memory from the OS, when doing so as normal user I get an timeout from make). OTOH, Andy (from the German forum) was able to do make crossinstall on a 32 bit Debian. Either this is a works only on Linux 32 Bit issue, or in my environment something is wrong that I did not see yet. -Michael ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
[fpc-devel] ppcrossarm dies when trying to build embedded rtl (svn 23683)
I am running on a mac, building svn 23683 svn 23681 (one before implementation of armv6m) compiles fine. commandline for building was: make clean buildbase CROSSINSTALL=1 OS_TARGET=embedded CPU_TARGET=arm SUBARCH=armv7m CROSSOPT=-gw2 -O- BINUTILSPREFIX=arm-none-eabi- make -C rtl all make -C embedded all /bin/mkdir -p /Users/ring/devel/fpc/rtl/units/arm-embedded /Users/ring/devel/fpc/compiler/ppcrossarm -Cparmv7m @rtl.cfg -Ur -Tembedded -Parm -XParm-none-eabi- -Xr -Ur -Xs -O2 -n -Fi../inc -Fi../arm -FE. -FU/Users/ring/devel/fpc/rtl/units/arm-embedded -darm -dRELEASE -gw2 -O- -Us -Sg system.pp Fatal: Compilation aborted An unhandled exception occurred at $: EAccessViolation: Access violation $ $00142333 $00144647 $00144B00 $001AF725 $001970A5 $0003295E make[3]: *** [system.ppu] Error 217 make[2]: *** [embedded_all] Error 2 make[1]: *** [rtl_all] Error 2 make: *** [base.build-stamp.arm-embedded] Error 2 [ ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] ppcrossarm dies when trying to build embedded rtl (svn 23683)
I have created a new patch, this time it uses the values of the two commandline parameters -Ch and -Cs to set the size of Stack and Heap. I am not sure if those params were for this use case but in my opinion it makes sense. Florian, could I ask you to apply the patch to trunk if what I am doing is is ok? Index: rtl/embedded/heapmgr.pp === --- rtl/embedded/heapmgr.pp(revision 23681) +++ rtl/embedded/heapmgr.pp(working copy) @@ -34,7 +34,13 @@ var Blocks: PHeapBlock = nil; + _heap_start : pointer; + _heapsize: longWord; external name '__heapsize'; + _stklen: longword; external name '__stklen'; + _bss_end: record end; external name '_bss_end'; + _stack_top: record end; external name '_stack_top'; + procedure InternalFreeMem(Addr: Pointer; Size: ptruint); forward; function FindSize(p: pointer): ptruint; @@ -242,6 +248,11 @@ initialization SetMemoryManager(MyMemoryManager); + _heap_start := @_stack_top - _heapsize - _stklen; + // Only initialize Heap when there is enough space available + if _heap_start = @_bss_end then +RegisterHeapBlock(_heap_start,_heapsize); + finalization //FinalizeHeap; end. Am 03.03.13 20:09, schrieb Michael Ring: I am running on a mac, building svn 23683 svn 23681 (one before implementation of armv6m) compiles fine. commandline for building was: make clean buildbase CROSSINSTALL=1 OS_TARGET=embedded CPU_TARGET=arm SUBARCH=armv7m CROSSOPT=-gw2 -O- BINUTILSPREFIX=arm-none-eabi- make -C rtl all make -C embedded all /bin/mkdir -p /Users/ring/devel/fpc/rtl/units/arm-embedded /Users/ring/devel/fpc/compiler/ppcrossarm -Cparmv7m @rtl.cfg -Ur -Tembedded -Parm -XParm-none-eabi- -Xr -Ur -Xs -O2 -n -Fi../inc -Fi../arm -FE. -FU/Users/ring/devel/fpc/rtl/units/arm-embedded -darm -dRELEASE -gw2 -O- -Us -Sg system.pp Fatal: Compilation aborted An unhandled exception occurred at $: EAccessViolation: Access violation $ $00142333 $00144647 $00144B00 $001AF725 $001970A5 $0003295E make[3]: *** [system.ppu] Error 217 make[2]: *** [embedded_all] Error 2 make[1]: *** [rtl_all] Error 2 make: *** [base.build-stamp.arm-embedded] Error 2 [ ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] ppcrossarm dies when trying to build embedded rtl (svn 23683)
Am 03.03.2013 21:27, schrieb Michael Ring: I have created a new patch, this time it uses the values of the two commandline parameters -Ch and -Cs to set the size of Stack and Heap. I am not sure if those params were for this use case but in my opinion it makes sense. Florian, could I ask you to apply the patch to trunk if what I am doing is is ok? It looks reasonable, but after some thinking I came to the conclusion that maybe the heap should be already allocated during linking, i.e. so heapmgr does not need to calculate an _heap_start. Index: rtl/embedded/heapmgr.pp === --- rtl/embedded/heapmgr.pp(revision 23681) +++ rtl/embedded/heapmgr.pp(working copy) @@ -34,7 +34,13 @@ var Blocks: PHeapBlock = nil; + _heap_start : pointer; + _heapsize: longWord; external name '__heapsize'; + _stklen: longword; external name '__stklen'; + _bss_end: record end; external name '_bss_end'; + _stack_top: record end; external name '_stack_top'; + procedure InternalFreeMem(Addr: Pointer; Size: ptruint); forward; function FindSize(p: pointer): ptruint; @@ -242,6 +248,11 @@ initialization SetMemoryManager(MyMemoryManager); + _heap_start := @_stack_top - _heapsize - _stklen; + // Only initialize Heap when there is enough space available + if _heap_start = @_bss_end then +RegisterHeapBlock(_heap_start,_heapsize); + finalization //FinalizeHeap; end. Am 03.03.13 20:09, schrieb Michael Ring: I am running on a mac, building svn 23683 svn 23681 (one before implementation of armv6m) compiles fine. commandline for building was: make clean buildbase CROSSINSTALL=1 OS_TARGET=embedded CPU_TARGET=arm SUBARCH=armv7m CROSSOPT=-gw2 -O- BINUTILSPREFIX=arm-none-eabi- make -C rtl all make -C embedded all /bin/mkdir -p /Users/ring/devel/fpc/rtl/units/arm-embedded /Users/ring/devel/fpc/compiler/ppcrossarm -Cparmv7m @rtl.cfg -Ur -Tembedded -Parm -XParm-none-eabi- -Xr -Ur -Xs -O2 -n -Fi../inc -Fi../arm -FE. -FU/Users/ring/devel/fpc/rtl/units/arm-embedded -darm -dRELEASE -gw2 -O- -Us -Sg system.pp Fatal: Compilation aborted An unhandled exception occurred at $: EAccessViolation: Access violation $ $00142333 $00144647 $00144B00 $001AF725 $001970A5 $0003295E make[3]: *** [system.ppu] Error 217 make[2]: *** [embedded_all] Error 2 make[1]: *** [rtl_all] Error 2 make: *** [base.build-stamp.arm-embedded] Error 2 [ ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] ppcrossarm dies when trying to build embedded rtl (svn 23683)
On 2013-03-03 14:09, Michael Ring wrote: I am running on a mac, building svn 23683 svn 23681 (one before implementation of armv6m) compiles fine. commandline for building was: make clean buildbase CROSSINSTALL=1 OS_TARGET=embedded CPU_TARGET=arm SUBARCH=armv7m CROSSOPT=-gw2 -O- BINUTILSPREFIX=arm-none-eabi- make -C rtl all make -C embedded all /bin/mkdir -p /Users/ring/devel/fpc/rtl/units/arm-embedded /Users/ring/devel/fpc/compiler/ppcrossarm -Cparmv7m @rtl.cfg -Ur -Tembedded -Parm -XParm-none-eabi- -Xr -Ur -Xs -O2 -n -Fi../inc -Fi../arm -FE. -FU/Users/ring/devel/fpc/rtl/units/arm-embedded -darm -dRELEASE -gw2 -O- -Us -Sg system.pp Fatal: Compilation aborted An unhandled exception occurred at $: EAccessViolation: Access violation $ $00142333 $00144647 $00144B00 $001AF725 $001970A5 $0003295E make[3]: *** [system.ppu] Error 217 make[2]: *** [embedded_all] Error 2 make[1]: *** [rtl_all] Error 2 make: *** [base.build-stamp.arm-embedded] Error 2 [ ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel Interesting, I have a similar problem with AVR32. -- For Linux Software visit http://home.comcast.net/~mcatudal ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] ppcrossarm dies when trying to build embedded rtl (svn 23683)
Am 03.03.2013 20:09, schrieb Michael Ring: $ $00142333 $00144647 $00144B00 $001AF725 $001970A5 $0003295E make[3]: *** [system.ppu] Error 217 make[2]: *** [embedded_all] Error 2 make[1]: *** [rtl_all] Error 2 make: *** [base.build-stamp.arm-embedded] Error 2 Fixed. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] ppcrossarm dies when trying to build embedded rtl (svn 23683)
Verified, works again on my mac, TnX! Michael Am 03.03.13 23:00, schrieb Florian Klämpfl: Am 03.03.2013 20:09, schrieb Michael Ring: $ $00142333 $00144647 $00144B00 $001AF725 $001970A5 $0003295E make[3]: *** [system.ppu] Error 217 make[2]: *** [embedded_all] Error 2 make[1]: *** [rtl_all] Error 2 make: *** [base.build-stamp.arm-embedded] Error 2 Fixed. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel