[fpc-pascal] Can not cross compile from Win64 to Win32 using fpcup
I use fcpup to cross compile from Win64 to Win32 but failed. these was what I did: 1. download fpcupgui.exe, fpcup64.exe, CrossFPC_binutils_libs.7z from fpcup site. 2. rename fpcup64.exe to fpcup.exe 3. run fpcupgui.exe and successfully finished. using fpc svn version 2.6.4 using lazarus svn version 1.2.2 4. run fpcupgui.exe to cross compile from Win64 to Win32 fpcurl=http://svn.freepascal.org/svn/fpc/tags/release_2_6_4 lazurl=http://svn.freepascal.org/svn/lazarus/tags/lazarus_1_2_2/ fpcuplinkname="" lazlinkname="" cputarget=i386 ostarget=win32 only=FPCBuildOnly,LazarusBuildOnly 5. then I go some error: fpcdefs.inc(160,2) Error: User defined: Cross-compiling from systems without support for an 80 bit extended floating point type to i386 is not yet supported at this time 6. I found this on world: http://free-pascal-general.1045716.n5.nabble.com/Cross-compiling-Win64-gt-Win32-fails-td5710399.html It says I need some files (/rtl/inc/sfpux80.pp and the files it includes) but I don not found in fpc source files 7. Please help me to solve this. I think this can be fixed, because the Lazarus has its lazarus-1.2.2-fpc-2.6.4-cross-i386-win32-win64.exe, So can I? Please forgive my bad English, thanks! -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Can-not-cross-compile-from-Win64-to-Win32-using-fpcup-tp5719282.html Sent from the Free Pascal - General mailing list archive at Nabble.com. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] How To Rewrite/Replace Below MEM And MEMW
Hi, Could any one help on replacing or rewriting below MEM and MEMW function for 32 bit OS. - PROCEDURE draw_window_outline(top_left_x, top_left_y, width, height, style, fore, back : BYTE); VAR x,y: BYTE; offset : INTEGER; BEGIN IF (style<>255) AND (width>2) AND (height>2) THEN BEGIN offset:=(top_left_x-1)*2 +(top_left_y-1)*160; MEM[$B800:offset]:=top_left_corner[style]; MEM[$B800:offset+1]:=back*16+fore; FOR x:=1 TO (width-2) DO BEGIN MEM[$B800:offset+x*2]:=horizontal[style]; MEM[$B800:offset+x*2+1]:=back*16+fore; END; MEM[$B800:offset+(width-1)*2]:=top_right_corner[style]; MEM[$B800:offset+(width-1)*2+1]:=back*16+fore; FOR y:=1 TO (height-2) DO BEGIN MEM[$B800:offset+y*160]:=vertical[style]; MEM[$B800:offset+y*160+1]:=back*16+fore; MEM[$B800:offset+(width-1)*2+y*160]:=vertical[style]; MEM[$B800:offset+(width-1)*2+y*160+1]:=back*16+fore; END; offset:=(top_left_x-1)*2 +(top_left_y+height-2)*160; MEM[$B800:offset]:=bottom_left_corner[style]; MEM[$B800:offset+1]:=back*16+fore; FOR x:=1 TO (width-2) DO BEGIN MEM[$B800:offset+x*2]:=horizontal[style]; MEM[$B800:offset+x*2+1]:=back*16+fore; END; MEMW[$B800:offset+(width-1)*2]:=bottom_right_corner[style]; MEM[$B800:offset+(width-1)*2+1]:=back*16+fore; END; END; --- Regards, Nitin -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/How-To-Rewrite-Replace-Below-MEM-And-MEMW-tp5719283.html Sent from the Free Pascal - General mailing list archive at Nabble.com. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Can not cross compile from Win64 to Win32 using fpcup
On 20/05/2014 05:56, hawkx wrote: Thanks for your clear description - helps a lot. > 3. run fpcupgui.exe and successfully finished. > using fpc svn version 2.6.4 > using lazarus svn version 1.2.2 FPC 2.6.x does not support cross compiling from win64 to win32 due to the error you found below. AFAIR, it's been fixed in FPC trunk. > 7. Please help me to solve this. I think this can be fixed, because the > Lazarus has its lazarus-1.2.2-fpc-2.6.4-cross-i386-win32-win64.exe, So can > I? That's a cross compiler from 32 bit to 64 bit. I'd suggest doing the same with fpcup and using the 32 bit fpcup version to generate a 64 bit cross compiler which should work flawlessly. > Please forgive my bad English, thanks! No problems at all with your English ;) ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Can not cross compile from Win64 to Win32 using fpcup
On 20 May 2014, at 10:28, Reinier Olislagers wrote: On 20/05/2014 05:56, hawkx wrote: 3. run fpcupgui.exe and successfully finished. using fpc svn version 2.6.4 using lazarus svn version 1.2.2 FPC 2.6.x does not support cross compiling from win64 to win32 due to the error you found below. AFAIR, it's been fixed in FPC trunk. It's not supported in trunk either. Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Can not cross compile from Win64 to Win32 using fpcup
In our previous episode, Jonas Maebe said: > >> 3. run fpcupgui.exe and successfully finished. > >>using fpc svn version 2.6.4 > >>using lazarus svn version 1.2.2 > > FPC 2.6.x does not support cross compiling from win64 to win32 due to > > the error you found below. > > AFAIR, it's been fixed in FPC trunk. > > It's not supported in trunk either. To clarify, there are two issues: 1. Lazarus IDE not behaving properly without SEH (openfiledialog crashing etc) 2. FPC not supporting xx => i386 crosscompiling due to the x86 codegen using extended which is not support on non x86. (needs softfpu) ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How To Rewrite/Replace Below MEM And MEMW
On Tue, May 20, 2014 10:01, nitinjain wrote: Hi Nitin, > Could any one help on replacing or rewriting below MEM and MEMW function > for > 32 bit OS. . . > MEM[$B800:offset]:=top_left_corner[style]; . . Have you already tried the recommendations discussed in a recent thread here (including my e-mail sent on the 12th of May)? If yes, have you faced any issues which you need to resolve (which ones)? If not, is there something unclear in the previous e-mails which prevents you from using those recommendations and which you would need to clarify first? I'd be happy to help you, but I don't think that there's much on top of the rather straightforward translation of the Mem and MemW references to accesses of the VideoBuf pointer provided by unit Video which I already tried to describe. As you probably understand, the only difference between Mem and MemW in this context is the fact that in case of MemW you address the whole TVideoCell word element whereas in case of Mem you only change the upper or lower byte of that word. However, your code usually updates the two bytes one after the other anyway, so you can combine the two following Mem[] references to one assignment to VideoBuf^[]. If you need more, you'd need to be clearer in your needs. Regards Tomas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Identifier not found "MEMW"
Thanks, I used same (Video Unit) but throwing runtime error* "Program Received Signal SIGSEGV Segmentation fault"*. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Identifier-not-found-MEMW-tp5719166p5719288.html Sent from the Free Pascal - General mailing list archive at Nabble.com. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How To Rewrite/Replace Below MEM And MEMW
Thanks Tomas, Yes, I have allready followd the steps which you have given in last post (Video Unit), but it is throwing runtime error that is: *"Program Received Signal SIGSEGV Segmentation fault"*. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/How-To-Rewrite-Replace-Below-MEM-And-MEMW-tp5719283p5719289.html Sent from the Free Pascal - General mailing list archive at Nabble.com. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How To Rewrite/Replace Below MEM And MEMW
On Tue, May 20, 2014 12:10, nitinjain wrote: > Thanks Tomas, > > Yes, I have allready followd the steps which you have given in last post > (Video Unit), but it is throwing runtime error that is: *"Program Received > Signal SIGSEGV Segmentation fault"*. Have you managed to identify the exact code (line) giving the SIGESGV (e.g. in debugger or at least by compiling with -gl)? Can you post your (crashing) fully compilable source, so that others could check and test it? Tomas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Identifier not found "MEMW"
In our previous episode, nitinjain said: > I used same (Video Unit) but throwing runtime error* "Program Received > Signal SIGSEGV Segmentation fault"*. Did you follow all steps in http://stackoverflow.com/questions/23563834/freepascal-identifier-not-found-memw/23700057#comment36526285_23700057 and called initvideo? What target are you on? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Can not cross compile from Win64 to Win32 using fpcup
On 20/05/2014 09:28, Reinier Olislagers wrote: 7. Please help me to solve this. I think this can be fixed, because the Lazarus has its lazarus-1.2.2-fpc-2.6.4-cross-i386-win32-win64.exe, So can I? That's a cross compiler from 32 bit to 64 bit. I'd suggest doing the same with fpcup and using the 32 bit fpcup version to generate a 64 bit cross compiler which should work flawlessly. The Lazarus add on package (which allows the 64 bit IDE to compile 32 bit apps) technically is a normal 32 bit fpc, instead of a cross compiler. Only the ppc was renamed so it acts as if it was a cross compiler. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] fpc.cfg - how to set it so it uses arm embedded as the default target
Hi Folks I've got fpc to compile in a dos box for Arm Embedded using this script fpc -Parm -Tembedded -WpLPC1343FBD48 -Cparmv7m myprogram.pp how do it get the above commands into fpc.cfg ? so I can just type fpc myprogram.pp Kind Regards Justin ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpc.cfg - how to set it so it uses arm embedded as the default target
On 20 May 2014, at 14:32, Justin Smyth wrote: I’ve got fpc to compile in a dos box for Arm Embedded using this script fpc -Parm -Tembedded -WpLPC1343FBD48 -Cparmv7m myprogram.pp how do it get the above commands into fpc.cfg ? so I can just type fpc myprogram.pp On Windows, create a file called fpc.cfg in your "USERPROFILE" directory (can see what it is by typing "echo %USERPROFILE%" in a command line window) with the following contents: #include \path\to\default\fpc.cfg -Parm -Tembedded -WpLPC1343FBD48 -Cparmv7m The default fpc.cfg is located in the same directory as fpc.exe. Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] fpc.cfg - how to set it so it uses arm embedded as the default target
I've created this no change , when I run fpc I comes up trying to use ppc386.exe This is my path on my vm PATH=c:\users\sslvpn;C:\lazarusExtras\FPC\2.6.4\bin\arm-embedded;C:\LazarusE xtras\fpc\2.6.4\Source\rtl\units\arm-embedded;C:\LazarusExtras\fpc\2.6.4\Sou rce\rtl\embedded;C:\LazarusExtras\fpc\2.6.4\Source\rtl\embedded\arm;C:\Progr am Files (x86)\Notepad++;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\Wind owsPowerShell\v1.0\;C:\Program Files\OpenVPN\bin;C:\Program Files\TortoiseSVN\bin; And my fpc.cfg # # Config file generated by fpcmkcfg on 18/05/2014 - 23:21:56 # Example fpc.cfg for Free Pascal Compiler # # -- # Defines (preprocessor) # -- # # nested #IFNDEF, #IFDEF, #ENDIF, #ELSE, #DEFINE, #UNDEF are allowed # # -d is the same as #DEFINE # -u is the same as #UNDEF # # # Some examples (for switches see below, and the -? helppages) # # Try compiling with the -dRELEASE or -dDEBUG on the commandline # # For a release compile with optimizes and strip debuginfo #IFDEF RELEASE -O2 -Xs #WRITE Compiling Release Version #ENDIF # For a debug version compile with debuginfo and all codegeneration checks on #IFDEF DEBUG -gl -Crtoi #WRITE Compiling Debug Version #ENDIF # assembling #ifdef darwin # use pipes instead of temporary files for assembling -ap # path to Xcode 4.3+ utilities (no problem if it doesn't exist) -FD/Applications/Xcode.app/Contents/Developer/usr/bin #endif # # Parsing switches # # Pascal language mode # -Mfpc free pascal dialect (default) # -Mobjfpc switch some Delphi 2 extensions on # -Mdelphi tries to be Delphi compatible # -Mtp tries to be TP/BP 7.0 compatible # -Mgpc tries to be gpc compatible # -Mmacpas tries to be compatible to the macintosh pascal dialects # # Turn on Object Pascal extensions by default #-Mobjfpc # Assembler reader mode # -Rdefault use default assembler # -Ratt read AT&T style assembler # -Rintelread Intel style assembler # # All assembler blocks are AT&T styled by default #-Ratt # Semantic checking # -S2same as -Mobjfpc # -Scsupports operators like C (*=,+=,/= and -=) # -Sainclude assertion code. # -Sdsame as -Mdelphi # -Se error options. is a combination of the following: # : compiler stops after errors (default is 1) # w : compiler stops also after warnings # n : compiler stops also after notes # h : compiler stops also after hints # -Sgallow LABEL and GOTO # -ShUse ansistrings # -Sisupport C++ styled INLINE # -Skload fpcylix unit # -SI set interface style to # -SIcomCOM compatible interface (default) # -SIcorba CORBA compatible interface # -Smsupport macros like C (global) # -Sosame as -Mtp # -Spsame as -Mgpc # -Ssconstructor name must be init (destructor must be done) # -Sxenable exception keywords (default in Delphi/ObjFPC modes) # # Allow goto, inline, C-operators, C-vars -Sgic # --- # Code generation # --- # Uncomment the next line if you always want static/dynamic units by default # (can be overruled with -CD, -CS at the commandline) #-CS #-CD # Set the default heapsize to 8Mb #-Ch800 # Set default codegeneration checks (iocheck, overflow, range, stack) #-Ci #-Co #-Cr #-Ct # Optimizer switches # -Osgenerate smaller code # -Oa=N set alignment to N # -O1level 1 optimizations (quick optimizations, debuggable) # -O2level 2 optimizations (-O1 + optimizations which make debugging more difficult) # -O3level 3 optimizations (-O2 + optimizations which also may make the program slower rather than faster) # -Oo switch on optimalization x. See fpc -i for possible values # -OoNO switch off optimalization x. See fpc -i for possible values # -Op set target cpu for optimizing, see fpc -i for possible values #ifdef darwin #ifdef cpui386 -Cppentiumm -Oppentiumm #endif #endif # --- # Set Filenames and Paths # --- # Both slashes and backslashes are allowed in paths # path to the messagefile, not necessary anymore but can be used to override # the default language #-FrC:\LazarusExtras\fpc\2.6.4/msg/errore.msg #-FrC:\LazarusExtras\fpc\2.6.4/msg/errorn.msg #-FrC:\LazarusExtras\fpc\2.6.4/msg/errores.msg #-FrC:\LazarusExtras\fpc\2.6.4/msg/errord.msg #-FrC:\LazarusExtras\fpc\2.6.4/msg/errorr.msg # searchpath for units and other system dependent things -FuC:\LazarusExtras\fpc\2.6.4/units/$fpctarget -FuC:\LazarusExtras\fpc\2.6.4/units/$fpctarget/* -FuC:\LazarusExtras\fpc\2.6.4/units/$fpctarget/rtl -FuC:\LazarusExtras\fpc\2.6.4/Source/rtl/units/arm-embedded -FuC:\LazarusExtras\fpc\2.6.4/compiler/arm #IFDEF FPCAPACHE_1_3 -FuC:\LazarusExt
Re: [fpc-pascal] fpc.cfg - how to set it so it uses arm embedded as the default target
On 20 May 2014, at 15:15, Justin Smyth wrote: > I've created this no change , when I run fpc I comes up trying to use > ppc386.exe try running fpc with the -va parameter, then it will tell you where it looks for configuration files, which one it uses and the options it parses. Best pipe the output through "more" or to a file, as it will be a lot of text. Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] Segmentation Error using VideoBuf
Hi, I am trying use VideoBuf Variable available in 'Video' unit but getting error *"Program Received Signal SIGSEGV Segmentation fault". * -- PROCEDURE blank_window(top_left_x, top_left_y, width, height, colour : BYTE); VAR x_offset, y_offset : BYTE; code : WORD; BEGIN FOR y_offset:=top_left_y TO (top_left_y+height) DO BEGIN FOR x_offset:=top_left_x TO (top_left_x+width) DO BEGIN {* MEM[$B800:(x_offset-1)*2 +(y_offset-1)*160]:=32; MEM[$B800:(x_offset-1)*2 +(y_offset-1)*160+1]:=colour*16; *} * VideoBuf^[(x_offset-1)*2 +(y_offset-1)*ScreenWidth]:=Ord(32); VideoBuf^[(x_offset-1)*2 +(y_offset-1)*160+1]:=Ord(colour*16);* END; END; UpdateScreen(false); END; -- Thanks Sudarshan -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Segmentation-Error-using-VideoBuf-tp5719293.html Sent from the Free Pascal - General mailing list archive at Nabble.com. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpc.cfg - how to set it so it uses arm embedded as the default target
On 20 May 2014, at 15:19, Jonas Maebe wrote: > On 20 May 2014, at 15:15, Justin Smyth wrote: > >> I've created this no change , when I run fpc I comes up trying to use >> ppc386.exe > > try running fpc with the -va parameter, then it will tell you where it looks > for configuration files, which one it uses and the options it parses. Best > pipe the output through "more" or to a file, as it will be a lot of text. Nevermind: it's the ppc*.exe that parses the configuration file, not fpc.exe. There is no configuration file specifically for fpc.exe. One alternative is to call ppcrossarm instead of fpc. Another is to create e.g. a .bat file that calls fpc -Parm. The rest of the options you can put in a configuration file (although in that case, you obviously can put them just as well in the .bat file). Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpc.cfg - how to set it so it uses arm embedded as the default target
I get [0.003] Macro defined: WIN32 [0.003] Macro defined: MSWINDOWS [0.003] Macro defined: WINDOWS [0.003] Macro defined: FPC_WINLIKEWIDESTRING [0.003] Macro defined: FPC_NO_GENERIC_STACK_CHECK [0.003] Macro defined: FPC_HAS_WINLIKERESOURCES [0.003] Macro defined: WIN32 [0.003] Macro defined: FPC [0.003] Macro defined: VER2 [0.003] Macro defined: VER2_6 [0.003] Macro defined: VER2_6_5 [0.003] Macro defined: RESSTRSECTIONS [0.003] Macro defined: FPC_HASFIXED64BITVARIANT [0.003] Macro defined: FPC_HASINTERNALOLEVARIANT2VARIANTCAST [0.003] Macro defined: FPC_HAS_VARSETS [0.003] Macro defined: FPC_HAS_VALGRINDBOOL [0.003] Macro defined: FPC_HAS_STR_CURRENCY [0.003] Macro defined: FPC_REAL2REAL_FIXED [0.003] Macro defined: FPC_STRTOCHARARRAYPROC [0.003] Macro defined: FPC_STRTOSHORTSTRINGPROC [0.003] Macro defined: FPC_OBJFPC_EXTENDED_IF [0.003] Macro defined: FPC_HAS_OPERATOR_ENUMERATOR [0.003] Macro defined: FPC_HAS_CONSTREF [0.003] Macro defined: FPC_STATICRIPFIXED [0.003] Macro defined: FPC_HAS_INTERNAL_ABS_LONG [0.003] Macro defined: FPC_HAS_UNICODESTRING [0.003] Macro defined: FPC_RTTI_PACKSET1 [0.003] Macro defined: FPC_HAS_CEXTENDED [0.003] Macro defined: FPC_HAS_INTERNAL_ROX [0.003] Macro defined: FPC_HAS_INTERNAL_SAR [0.003] Macro defined: FPC_HAS_INTERNAL_BSX [0.003] Macro defined: FPC_HAS_MEMBAR [0.003] Macro defined: FPC_SETBASE_USED [0.003] Macro defined: INTERNAL_BACKTRACE [0.003] Macro defined: STR_CONCAT_PROCS [0.003] Macro defined: REGCALL [0.003] Macro defined: FPC_HAS_FEATURE_SUPPORT [0.003] Macro defined: CPU86 [0.003] Macro defined: CPU87 [0.003] Macro defined: CPU386 [0.003] Macro defined: CPUI386 [0.003] Macro defined: CPU32 [0.003] Macro defined: FPC_HAS_TYPE_EXTENDED [0.003] Macro defined: FPC_HAS_TYPE_DOUBLE [0.003] Macro defined: FPC_HAS_TYPE_SINGLE [0.004] Reading options from file fpc.cfg [0.004] Start of reading config file fpc.cfg [0.004] interpreting file option "#" [0.004] interpreting file option "# Config file generated by fpcmkcfg on 18/05/2014 - 23:21:56" [0.004] interpreting file option "# Example fpc.cfg for Free Pascal Compiler" [0.004] interpreting file option "#" [0.004] interpreting file option "# --" [0.004] interpreting file option "# Defines (preprocessor)" [0.004] interpreting file option "# --" [0.004] interpreting file option "#" [0.004] interpreting file option "# nested #IFNDEF, #IFDEF, #ENDIF, #ELSE, #DEFINE, #UNDEF are allowed" [0.004] interpreting file option "#" [0.004] interpreting file option "# -d is the same as #DEFINE" [0.004] interpreting file option "# -u is the same as #UNDEF" [0.004] interpreting file option "#" [0.004] interpreting file option "#" [0.004] interpreting file option "# Some examples (for switches see below, and the -? helppages)" [0.004] interpreting file option "#" [0.004] interpreting file option "# Try compiling with the -dRELEASE or -dDEBUG on the commandline" [0.004] interpreting file option "#" [0.004] interpreting file option "# For a release compile with optimizes and strip debuginfo" [0.004] interpreting file option "#IFDEF RELEASE" [0.004] interpreting file option "#WRITE Compiling Release Version" [0.004] interpreting file option "#ENDIF" [0.004] interpreting file option "# For a debug version compile with debuginfo and all codegeneration checks on" [0.004] interpreting file option "#IFDEF DEBUG" [0.004] interpreting file option "#WRITE Compiling Debug Version" [0.004] interpreting file option "#ENDIF" [0.004] interpreting file option "# assembling" [0.004] interpreting file option "#ifdef darwin" [0.004] interpreting file option "# use pipes instead of temporary files for assembling" [0.004] interpreting file option "# path to Xcode 4.3+ utilities (no problem if it doesn't exist)" [0.004] interpreting file option "#endif" [0.004] interpreting file option "# " [0.004] interpreting file option "# Parsing switches" [0.004] interpreting file option "# " [0.004] interpreting file option "# Pascal language mode" [0.004] interpreting file option "# -Mfpc free pascal dialect (default)" [0.004] interpreting file option "# -Mobjfpc switch some Delphi 2 extensions on" [0.004] interpreting file option "# -Mdelphi tries to be Delphi compatible" [0.006] interpreting file option "# -Mtp tries to be TP/BP 7.0 compatible" [0.006] interpreting file option "# -Mgpc tries to be gpc compatible" [0.006] interpreting file option "# -Mmacpas tries to be compatible to the macintosh pascal dialects" [0.006] interpreting file option "#" [0.006] interpreting file option "# Turn on Object Pascal extensions by default" [0.006] interpreting file option "#-Mobjfpc" [0.006] interpreting file option "# Assembler reader mode" [0.006] interpreting file option "# -Rdefault use default assembler" [0.006] interpreting file option "# -Ratt read AT&T style assembler" [0.006] interpreting file option "# -Rintelread
Re: [fpc-pascal] Segmentation Error using VideoBuf
On Tue, May 20, 2014 14:25, mokashe@gmail.com wrote: Hi, > I am trying use VideoBuf Variable available in 'Video' unit but getting > error *"Program Received Signal SIGSEGV Segmentation fault". * . . > {* MEM[$B800:(x_offset-1)*2 > +(y_offset-1)*160]:=32; >MEM[$B800:(x_offset-1)*2 > +(y_offset-1)*160+1]:=colour*16; *} > > * VideoBuf^[(x_offset-1)*2 > +(y_offset-1)*ScreenWidth]:=Ord(32); >VideoBuf^[(x_offset-1)*2 > +(y_offset-1)*160+1]:=Ord(colour*16);* As suggested in my post in the other thread about the Mem and MemW topic, the two consecutive accesses to Mem[] should be preferably converted to just one with VideoBuf, because the elements accessed by VideoBuf^ are words (which in turn consist from one byte for the character code and another byte for the colour attributes consisting of the background colour in the upper nibble and foreground colour in the lower nibble). Moreover, since the elements are words, you should not multiply the offset by two any longer. This in turn gives you: VideoBuf^[(x_offset-1) +(y_offset-1)*ScreenWidth]:=$20 or (colour * 16) shl 8; This works as intended (now disregarding stuff like missing checking of the provided parameters against ScreenWidth and ScreenHeight - calling the routine above with too big parameters would indeed still give you a SIGSEGV, but that's another story). Tomas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpc.cfg - how to set it so it uses arm embedded as the default target
I've been thinking about this , I've come up with a solution I'm going to be using this in lazarus , so in the project options when you select arm I think you need to be able to select the chip set to be used. The Chipset can be found by using ppcrossarm.exe -i That will list the chipset and then provide fpc / ppcrossarm.exe with -W Then I should be able to compile my project in lazarus -Original Message- From: fpc-pascal-boun...@lists.freepascal.org [mailto:fpc-pascal-boun...@lists.freepascal.org] On Behalf Of Justin Smyth Sent: Tuesday, 20 May 2014 11:30 PM To: 'FPC-Pascal users discussions' Subject: Re: [fpc-pascal] fpc.cfg - how to set it so it uses arm embedded as the default target I get [0.003] Macro defined: WIN32 [0.003] Macro defined: MSWINDOWS [0.003] Macro defined: WINDOWS [0.003] Macro defined: FPC_WINLIKEWIDESTRING [0.003] Macro defined: FPC_NO_GENERIC_STACK_CHECK [0.003] Macro defined: FPC_HAS_WINLIKERESOURCES [0.003] Macro defined: WIN32 [0.003] Macro defined: FPC [0.003] Macro defined: VER2 [0.003] Macro defined: VER2_6 [0.003] Macro defined: VER2_6_5 [0.003] Macro defined: RESSTRSECTIONS [0.003] Macro defined: FPC_HASFIXED64BITVARIANT [0.003] Macro defined: FPC_HASINTERNALOLEVARIANT2VARIANTCAST [0.003] Macro defined: FPC_HAS_VARSETS [0.003] Macro defined: FPC_HAS_VALGRINDBOOL [0.003] Macro defined: FPC_HAS_STR_CURRENCY [0.003] Macro defined: FPC_REAL2REAL_FIXED [0.003] Macro defined: FPC_STRTOCHARARRAYPROC [0.003] Macro defined: FPC_STRTOSHORTSTRINGPROC [0.003] Macro defined: FPC_OBJFPC_EXTENDED_IF [0.003] Macro defined: FPC_HAS_OPERATOR_ENUMERATOR [0.003] Macro defined: FPC_HAS_CONSTREF [0.003] Macro defined: FPC_STATICRIPFIXED [0.003] Macro defined: FPC_HAS_INTERNAL_ABS_LONG [0.003] Macro defined: FPC_HAS_UNICODESTRING [0.003] Macro defined: FPC_RTTI_PACKSET1 [0.003] Macro defined: FPC_HAS_CEXTENDED [0.003] Macro defined: FPC_HAS_INTERNAL_ROX [0.003] Macro defined: FPC_HAS_INTERNAL_SAR [0.003] Macro defined: FPC_HAS_INTERNAL_BSX [0.003] Macro defined: FPC_HAS_MEMBAR [0.003] Macro defined: FPC_SETBASE_USED [0.003] Macro defined: INTERNAL_BACKTRACE [0.003] Macro defined: STR_CONCAT_PROCS [0.003] Macro defined: REGCALL [0.003] Macro defined: FPC_HAS_FEATURE_SUPPORT [0.003] Macro defined: CPU86 [0.003] Macro defined: CPU87 [0.003] Macro defined: CPU386 [0.003] Macro defined: CPUI386 [0.003] Macro defined: CPU32 [0.003] Macro defined: FPC_HAS_TYPE_EXTENDED [0.003] Macro defined: FPC_HAS_TYPE_DOUBLE [0.003] Macro defined: FPC_HAS_TYPE_SINGLE [0.004] Reading options from file fpc.cfg [0.004] Start of reading config file fpc.cfg [0.004] interpreting file option "#" [0.004] interpreting file option "# Config file generated by fpcmkcfg on 18/05/2014 - 23:21:56" [0.004] interpreting file option "# Example fpc.cfg for Free Pascal Compiler" [0.004] interpreting file option "#" [0.004] interpreting file option "# --" [0.004] interpreting file option "# Defines (preprocessor)" [0.004] interpreting file option "# --" [0.004] interpreting file option "#" [0.004] interpreting file option "# nested #IFNDEF, #IFDEF, #ENDIF, #ELSE, #DEFINE, #UNDEF are allowed" [0.004] interpreting file option "#" [0.004] interpreting file option "# -d is the same as #DEFINE" [0.004] interpreting file option "# -u is the same as #UNDEF" [0.004] interpreting file option "#" [0.004] interpreting file option "#" [0.004] interpreting file option "# Some examples (for switches see below, and the -? helppages)" [0.004] interpreting file option "#" [0.004] interpreting file option "# Try compiling with the -dRELEASE or -dDEBUG on the commandline" [0.004] interpreting file option "#" [0.004] interpreting file option "# For a release compile with optimizes and strip debuginfo" [0.004] interpreting file option "#IFDEF RELEASE" [0.004] interpreting file option "#WRITE Compiling Release Version" [0.004] interpreting file option "#ENDIF" [0.004] interpreting file option "# For a debug version compile with debuginfo and all codegeneration checks on" [0.004] interpreting file option "#IFDEF DEBUG" [0.004] interpreting file option "#WRITE Compiling Debug Version" [0.004] interpreting file option "#ENDIF" [0.004] interpreting file option "# assembling" [0.004] interpreting file option "#ifdef darwin" [0.004] interpreting file option "# use pipes instead of temporary files for assembling" [0.004] interpreting file option "# path to Xcode 4.3+ utilities (no problem if it doesn't exist)" [0.004] interpreting file option "#endif" [0.004] interpreting file option "# " [0.004] interpreting file option "# Parsing switches" [0.004] interpreting file option "# " [0.004] interpreting file option "# Pascal language mode" [0.004] interpreting file option "# -Mfpc free pascal dialect (default)" [0.004] interpreting file option "# -Mobjfpc switch some Delphi 2 extensions on" [0.004] interpreting file option "# -Mdelphi tries to be Delphi com
Re: [fpc-pascal] Segmentation Error using VideoBuf
Thanks for Your Help, But facing the same issue using the last post code :) -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Segmentation-Error-using-VideoBuf-tp5719293p5719302.html Sent from the Free Pascal - General mailing list archive at Nabble.com. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal