Re: [Lazarus] Compiler Options - Conditionally add a package dependency?
Guys, i suggest to create another thread to discuss namespace. This thread is a different topic, related to the IDE, while namespace is a compiler thing. Luiz Em 09/07/2015 16:12, "silvioprog" escreveu: > On Thu, Jul 9, 2015 at 4:05 PM, silvioprog wrote: > [...] > >> This option also enables the 'UseUnitScopeNames' directive, so you can >>> use a unit declaration like 'uses {$IFNDEF >>> UseUnitScopeNames}MyCompany.{$ENDIF}SysUtils'. >> >> > Oops, > > "... so you can use an unit declaration like 'uses {$IFNDEF > UseUnitScopeNames}MyCompany.{$ENDIF}SysUtils'", that is very useful for > keep support for legacy codes. > > -- > Silvio Clécio > My public projects - github.com/silvioprog > > -- > ___ > Lazarus mailing list > Lazarus@lists.lazarus.freepascal.org > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > > -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiler Options - Conditionally add a package dependency?
On Thu, 9 Jul 2015, silvioprog wrote: On Thu, Jul 9, 2015 at 2:58 PM, Michael Van Canneyt mich...@freepascal.org wrote: [...] We have support for dotted unit names. The only thing missing is a namespace directive. Is there any plan for implementing the -NS[1] compiler parameter? This option allows to use scoped unit names, that is very good for dotted unit names, e.g: MyCompany.SysUtils; // . That is what I am talking about, this is the missing piece. Patches welcome :-) Michael.-- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiler Options - Conditionally add a package dependency?
On Thu, Jul 9, 2015 at 4:05 PM, silvioprog wrote: [...] > This option also enables the 'UseUnitScopeNames' directive, so you can use >> a unit declaration like 'uses {$IFNDEF >> UseUnitScopeNames}MyCompany.{$ENDIF}SysUtils'. > > Oops, "... so you can use an unit declaration like 'uses {$IFNDEF UseUnitScopeNames}MyCompany.{$ENDIF}SysUtils'", that is very useful for keep support for legacy codes. -- Silvio Clécio My public projects - github.com/silvioprog -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiler Options - Conditionally add a package dependency?
On Thu, Jul 9, 2015 at 3:45 PM, Michael Van Canneyt wrote: > > > On Thu, 9 Jul 2015, Marcos Douglas wrote: > >> On Thu, Jul 9, 2015 at 2:58 PM, Michael Van Canneyt >> wrote: >>> >>> >>> >>> On Thu, 9 Jul 2015, Marcos Douglas wrote: >>> On Thu, Jul 9, 2015 at 12:58 PM, Michael Van Canneyt wrote: > > > > > On Thu, 9 Jul 2015, Graeme Geldenhuys wrote: > >> Hi, >> >> I have two independent packages. I would like my project to toggle >> between either one (but never both at the same time). Both have a unit >> with the exact same name, hence both packages can't be added to the >> dependency list at the same time. >> >> Is there a way with the Compiler Options -> Other (or Additions and >> Overrides) to include a specific package based on a compiler define? >> >> eg: >> if defined UsePackageA >>PackageDependecy.Add(PackageA) >> else >>PackageDependency.Add(PackageB) >> >> Well something like that at least. > > > > > I would even go further, and have a package included or not depending > on > the > OS. > Similar, I think it should be possible to include a unit in a package, > depending on the OS. > > In short, a set of conditions for package dependencies and contains > lists. I would even go further even more: If we have two units with the same name, would be better if were possible to create an alias namespace for each unit, like C# does. https://msdn.microsoft.com/en-us/library/aa664765(v=vs.71).aspx But you, guys, will talk about "an Unit is a namespace" -- we know this is true -- and this is not necessary... anyway. >>> >>> >>> >>> This is not correct. >>> >>> We have support for dotted unit names. The only thing missing is a >>> namespace >>> directive. >> >> >> I know we have support for dotted unit names -- and this is not so >> important, ie, what the difference between MyUnitName to my.unit.name? >> -- the real problem, IMHO, is the names collisions between packages. > > > I repeat: > "The only thing missing is a namespace directive." > > And then you have what you need. Ok. To get ideas, Graeme has created this years ago: http://wiki.lazarus.freepascal.org/Namespaces Regards, Marcos Douglas -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiler Options - Conditionally add a package dependency?
> > On Thu, Jul 9, 2015 at 2:58 PM, Michael Van Canneyt mich...@freepascal.org > wrote: [...] > We have support for dotted unit names. The only thing missing is a > namespace directive. Is there any plan for implementing the -NS[1] compiler parameter? This option allows to use scoped unit names, that is very good for dotted unit names, e.g: MyCompany.SysUtils; // . ... uses SysUtils; // this is an 'alias' for my 'MyCompany.SysUtils' unit ... $ fpc -NSMyCompany (it could be enabled via Lazarus package too) This option also enables the 'UseUnitScopeNames' directive, so you can use a unit declaration like 'uses {$IFNDEF UseUnitScopeNames}MyCompany.{$ENDIF}SysUtils'. P.S.: you can pass two or more scopes via this options, e.g: -NSMyCompany;OtherCompany;SomeLib [1] http://docwiki.embarcadero.com/RADStudio/XE8/en/Delphi_Compiler -- Silvio Clécio My public projects - github.com/silvioprog -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiler Options - Conditionally add a package dependency?
On Thu, 9 Jul 2015, Marcos Douglas wrote: On Thu, Jul 9, 2015 at 2:58 PM, Michael Van Canneyt wrote: On Thu, 9 Jul 2015, Marcos Douglas wrote: On Thu, Jul 9, 2015 at 12:58 PM, Michael Van Canneyt wrote: On Thu, 9 Jul 2015, Graeme Geldenhuys wrote: Hi, I have two independent packages. I would like my project to toggle between either one (but never both at the same time). Both have a unit with the exact same name, hence both packages can't be added to the dependency list at the same time. Is there a way with the Compiler Options -> Other (or Additions and Overrides) to include a specific package based on a compiler define? eg: if defined UsePackageA PackageDependecy.Add(PackageA) else PackageDependency.Add(PackageB) Well something like that at least. I would even go further, and have a package included or not depending on the OS. Similar, I think it should be possible to include a unit in a package, depending on the OS. In short, a set of conditions for package dependencies and contains lists. I would even go further even more: If we have two units with the same name, would be better if were possible to create an alias namespace for each unit, like C# does. https://msdn.microsoft.com/en-us/library/aa664765(v=vs.71).aspx But you, guys, will talk about "an Unit is a namespace" -- we know this is true -- and this is not necessary... anyway. This is not correct. We have support for dotted unit names. The only thing missing is a namespace directive. I know we have support for dotted unit names -- and this is not so important, ie, what the difference between MyUnitName to my.unit.name? -- the real problem, IMHO, is the names collisions between packages. I repeat: "The only thing missing is a namespace directive." And then you have what you need. Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiler Options - Conditionally add a package dependency?
On Thu, Jul 9, 2015 at 2:58 PM, Michael Van Canneyt wrote: > > > On Thu, 9 Jul 2015, Marcos Douglas wrote: > >> On Thu, Jul 9, 2015 at 12:58 PM, Michael Van Canneyt >> wrote: >>> >>> >>> >>> On Thu, 9 Jul 2015, Graeme Geldenhuys wrote: >>> Hi, I have two independent packages. I would like my project to toggle between either one (but never both at the same time). Both have a unit with the exact same name, hence both packages can't be added to the dependency list at the same time. Is there a way with the Compiler Options -> Other (or Additions and Overrides) to include a specific package based on a compiler define? eg: if defined UsePackageA PackageDependecy.Add(PackageA) else PackageDependency.Add(PackageB) Well something like that at least. >>> >>> >>> >>> I would even go further, and have a package included or not depending on >>> the >>> OS. >>> Similar, I think it should be possible to include a unit in a package, >>> depending on the OS. >>> >>> In short, a set of conditions for package dependencies and contains >>> lists. >> >> >> I would even go further even more: >> If we have two units with the same name, would be better if were >> possible to create an alias namespace for each unit, like C# does. >> >> https://msdn.microsoft.com/en-us/library/aa664765(v=vs.71).aspx >> >> But you, guys, will talk about "an Unit is a namespace" -- we know >> this is true -- and this is not necessary... anyway. > > > This is not correct. > > We have support for dotted unit names. The only thing missing is a namespace > directive. I know we have support for dotted unit names -- and this is not so important, ie, what the difference between MyUnitName to my.unit.name? -- the real problem, IMHO, is the names collisions between packages. Marcos Douglas -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiler Options - Conditionally add a package dependency?
On Thu, 9 Jul 2015, Marcos Douglas wrote: On Thu, Jul 9, 2015 at 12:58 PM, Michael Van Canneyt wrote: On Thu, 9 Jul 2015, Graeme Geldenhuys wrote: Hi, I have two independent packages. I would like my project to toggle between either one (but never both at the same time). Both have a unit with the exact same name, hence both packages can't be added to the dependency list at the same time. Is there a way with the Compiler Options -> Other (or Additions and Overrides) to include a specific package based on a compiler define? eg: if defined UsePackageA PackageDependecy.Add(PackageA) else PackageDependency.Add(PackageB) Well something like that at least. I would even go further, and have a package included or not depending on the OS. Similar, I think it should be possible to include a unit in a package, depending on the OS. In short, a set of conditions for package dependencies and contains lists. I would even go further even more: If we have two units with the same name, would be better if were possible to create an alias namespace for each unit, like C# does. https://msdn.microsoft.com/en-us/library/aa664765(v=vs.71).aspx But you, guys, will talk about "an Unit is a namespace" -- we know this is true -- and this is not necessary... anyway. This is not correct. We have support for dotted unit names. The only thing missing is a namespace directive. Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiler Options - Conditionally add a package dependency?
On Thu, Jul 9, 2015 at 12:58 PM, Michael Van Canneyt wrote: > > > On Thu, 9 Jul 2015, Graeme Geldenhuys wrote: > >> Hi, >> >> I have two independent packages. I would like my project to toggle >> between either one (but never both at the same time). Both have a unit >> with the exact same name, hence both packages can't be added to the >> dependency list at the same time. >> >> Is there a way with the Compiler Options -> Other (or Additions and >> Overrides) to include a specific package based on a compiler define? >> >> eg: >> if defined UsePackageA >>PackageDependecy.Add(PackageA) >> else >>PackageDependency.Add(PackageB) >> >> Well something like that at least. > > > I would even go further, and have a package included or not depending on the > OS. > Similar, I think it should be possible to include a unit in a package, > depending on the OS. > > In short, a set of conditions for package dependencies and contains lists. I would even go further even more: If we have two units with the same name, would be better if were possible to create an alias namespace for each unit, like C# does. https://msdn.microsoft.com/en-us/library/aa664765(v=vs.71).aspx But you, guys, will talk about "an Unit is a namespace" -- we know this is true -- and this is not necessary... anyway. Best regards, Marcos Douglas -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiler Options - Conditionally add a package dependency?
2015-07-09 12:58 GMT-03:00 Michael Van Canneyt : > > > On Thu, 9 Jul 2015, Graeme Geldenhuys wrote: > > >> >> Is there a way with the Compiler Options -> Other (or Additions and >> Overrides) to include a specific package based on a compiler define? >> >> >> > I would even go further, and have a package included or not depending on > the OS. > +1. I hit similar issue and tried to use the Conditionals script with the IDE Macro but could not get working . My idea was do the following, but did not work: if SomeCondition then begin UsageSrcPath += GetIDEValue('$PkgSrcPath(''apackagname'')'); end; In my specific case the condition was the avaibility of a package. See thread "Check if a package is available through macros" Luiz -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiler Options - Conditionally add a package dependency?
On 2015-07-09 16:58, Michael Van Canneyt wrote: > I would even go further, and have a package included or not depending > on the OS. Similar, I think it should be possible to include a unit > in a package, depending on the OS. +1 on both counts. I've hit the issue of your second point many years ago with fpGUI packages and had to resort to using two packages of the same name, but in different OS directories. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiler Options - Conditionally add a package dependency?
On Thu, 9 Jul 2015, Graeme Geldenhuys wrote: Hi, I have two independent packages. I would like my project to toggle between either one (but never both at the same time). Both have a unit with the exact same name, hence both packages can't be added to the dependency list at the same time. Is there a way with the Compiler Options -> Other (or Additions and Overrides) to include a specific package based on a compiler define? eg: if defined UsePackageA PackageDependecy.Add(PackageA) else PackageDependency.Add(PackageB) Well something like that at least. I would even go further, and have a package included or not depending on the OS. Similar, I think it should be possible to include a unit in a package, depending on the OS. In short, a set of conditions for package dependencies and contains lists. Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Compiler Options - Conditionally add a package dependency?
Hi, I have two independent packages. I would like my project to toggle between either one (but never both at the same time). Both have a unit with the exact same name, hence both packages can't be added to the dependency list at the same time. Is there a way with the Compiler Options -> Other (or Additions and Overrides) to include a specific package based on a compiler define? eg: if defined UsePackageA PackageDependecy.Add(PackageA) else PackageDependency.Add(PackageB) Well something like that at least. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiler Options
On Thu, Jul 17, 2014 at 11:33:37AM +0200, Sven Barth wrote: > > Some users installed fpc with system.ppu and no > > classes.ppu. That's why the test was added years ago. > > Hmm... It might be that this was when Classes was not yet part of the RTL. > This was changed some years back, so that unit should be available > automatically now (except for selected targets). With the recent clean up > of the RTL directory a few other units fall now under the category of > "might be missing"... Yes. Now that you say it I think too. The RTL is in some cases automatically found, while other units aren't. That role has mostly been replaced by unit contnrs. If RTL is found and the other packages not, the error is usually for contnrs. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiler Options
Whats required to change this behaviour ? If you can point me in the right direction it would be of great help. I’ve just gotta remember to switch from VB coding back to pascal I am so use to it , its not funny - I got a job doing VB programming here in Australia back in feb @ www.isis.co.uk Kind Regards Justin From: Sven Barth [mailto:pascaldra...@googlemail.com] Sent: Thursday, 17 July 2014 7:34 PM To: Lazarus mailing list Subject: Re: [Lazarus] Compiler Options Am 16.07.2014 22:01 schrieb "Mattias Gaertner" : > > On Wed, 16 Jul 2014 21:25:49 +0200 > Sven Barth wrote: > > >[...] > > It's likely better to rely on the system.ppu... :/ > > Some users installed fpc with system.ppu and no > classes.ppu. That's why the test was added years ago. Hmm... It might be that this was when Classes was not yet part of the RTL. This was changed some years back, so that unit should be available automatically now (except for selected targets). With the recent clean up of the RTL directory a few other units fall now under the category of "might be missing"... Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiler Options
Am 16.07.2014 22:01 schrieb "Mattias Gaertner" : > > On Wed, 16 Jul 2014 21:25:49 +0200 > Sven Barth wrote: > > >[...] > > It's likely better to rely on the system.ppu... :/ > > Some users installed fpc with system.ppu and no > classes.ppu. That's why the test was added years ago. Hmm... It might be that this was when Classes was not yet part of the RTL. This was changed some years back, so that unit should be available automatically now (except for selected targets). With the recent clean up of the RTL directory a few other units fall now under the category of "might be missing"... Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiler Options
On Wed, Jul 16, 2014 at 09:25:49PM +0200, Sven Barth wrote: > > installed right. > > For targets without Classes the test needs to be adapted. > > What targets do not have a classes.ppu? > > All targets that don't have a classes.pp in their corresponding RTL > directory (e.g. rtl/embedded, rtl/macos, rtl/atari, rtl/emx). Note: Unix > platforms like Linux, AIX, the BSDs etc. use the classes.pp in the unix > directory. Windows units use "win", OS/2 and emx also share some files iirc, as do amiga and morphos. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiler Options
On 16.07.2014 22:00, Mattias Gaertner wrote: On Wed, 16 Jul 2014 21:25:49 +0200 Sven Barth wrote: [...] It's likely better to rely on the system.ppu... :/ Some users installed fpc with system.ppu and no classes.ppu. That's why the test was added years ago. How did they manage that?! O.o Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiler Options
On Wed, 16 Jul 2014 21:25:49 +0200 Sven Barth wrote: >[...] > It's likely better to rely on the system.ppu... :/ Some users installed fpc with system.ppu and no classes.ppu. That's why the test was added years ago. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiler Options
On 16.07.2014 15:28, Mattias Gaertner wrote: On Wed, 16 Jul 2014 15:14:01 +0200 Sven Barth wrote: [...] Is there really no classes.ppu for your arm target? That's rather likely as Classes is simply too fat... On targets with classes the fat makes it a good indicator if fpc was installed right. For targets without Classes the test needs to be adapted. What targets do not have a classes.ppu? All targets that don't have a classes.pp in their corresponding RTL directory (e.g. rtl/embedded, rtl/macos, rtl/atari, rtl/emx). Note: Unix platforms like Linux, AIX, the BSDs etc. use the classes.pp in the unix directory. It's likely better to rely on the system.ppu... :/ Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiler Options
arm-embedded does not have classes.ppu, same with mipsel-embedded (but this target is not yet fully visible in trunk) arm and mipsel do have definitions in fpc/rtl/embedded/rtl.cfg : #ifdef CPUARM -SfSOFTFPU -SfCLASSES #ifdef CPUMIPSEL -SfSOFTFPU -SfCLASSES but even with those settings active classes does not get built: ppcrossarm -MObjFPC -Scghi -al -Ch1024 -Cs1024 -Tembedded -Parm $DEBUG -vewnhix -l -Cparmv7m -O- -WpSTM32F100XC -XParm-none-eabi- -FD/usr/local/bin -a test.pas Hint: Start of reading config file /etc/fpc.cfg Hint: End of reading config file /etc/fpc.cfg Free Pascal Compiler version 2.7.1 [2014/07/12] for arm Copyright (c) 1993-2014 by Florian Klaempfl and others Target OS: Embedded Compiling test.pas test.pas(3,3) Fatal: Can't find unit classes used by test Fatal: Compilation aborted - program test; uses classes; begin end. A find . -name "classes*" only shows me classes.ppu for the 'big' platforms i build from trunk, x86_64-darwin and i386-darwin, nothing for arm-embedded and mipsel-embedded Michael Am 16.07.14 15:28, schrieb Mattias Gaertner: On Wed, 16 Jul 2014 15:14:01 +0200 Sven Barth wrote: [...] Is there really no classes.ppu for your arm target? That's rather likely as Classes is simply too fat... On targets with classes the fat makes it a good indicator if fpc was installed right. For targets without Classes the test needs to be adapted. What targets do not have a classes.ppu? Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiler Options
On Wed, 16 Jul 2014 15:14:01 +0200 Sven Barth wrote: >[...] > > Is there really no classes.ppu for your arm target? > > That's rather likely as Classes is simply too fat... On targets with classes the fat makes it a good indicator if fpc was installed right. For targets without Classes the test needs to be adapted. What targets do not have a classes.ppu? Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiler Options
Am 16.07.2014 14:08 schrieb "Mattias Gaertner" : > > On Wed, 16 Jul 2014 21:45:55 +1000 > "Justin Smyth" wrote: > > > Thanks > > > > I am updating lazarus on my vm now. > > > > > > I am using trunk FPC 2.6.4 which has the mods for LPC 1343. ( embedded ) > > > > I've also made a custom version of GDBMiServerDebugger which adds support > > for connecting to EABI version of gdb using OpenOCD V8 > > > > > > Also another question , when I am targeting arm based arch , when I start up > > it complains it cant find classes.ppu - but the program compiles OK can this > > be supressed if a target is chosen that doesn't use it ? > > Is there really no classes.ppu for your arm target? That's rather likely as Classes is simply too fat... Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiler Options
No Classes for Embedded ARM. If I goto my source dir for Trunk FPC and do a search in RTL I can't find anything for classes.* Note I am using trunk FPC and not fixes_2_6 ( or what ever the lastest version is) as trunk FPC only supports my lpc board, it doesn't work in fixes_2_6 Kind Regards Justin -Original Message- From: Mattias Gaertner [mailto:nc-gaert...@netcologne.de] Sent: Wednesday, 16 July 2014 10:07 PM To: lazarus@lists.lazarus.freepascal.org Subject: Re: [Lazarus] Compiler Options On Wed, 16 Jul 2014 21:45:55 +1000 "Justin Smyth" wrote: > Thanks > > I am updating lazarus on my vm now. > > > I am using trunk FPC 2.6.4 which has the mods for LPC 1343. ( embedded > ) > > I've also made a custom version of GDBMiServerDebugger which adds > support for connecting to EABI version of gdb using OpenOCD V8 > > > Also another question , when I am targeting arm based arch , when I > start up it complains it cant find classes.ppu - but the program > compiles OK can this be supressed if a target is chosen that doesn't use it ? Is there really no classes.ppu for your arm target? Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiler Options
On Wed, 16 Jul 2014 21:45:55 +1000 "Justin Smyth" wrote: > Thanks > > I am updating lazarus on my vm now. > > > I am using trunk FPC 2.6.4 which has the mods for LPC 1343. ( embedded ) > > I've also made a custom version of GDBMiServerDebugger which adds support > for connecting to EABI version of gdb using OpenOCD V8 > > > Also another question , when I am targeting arm based arch , when I start up > it complains it cant find classes.ppu - but the program compiles OK can this > be supressed if a target is chosen that doesn't use it ? Is there really no classes.ppu for your arm target? Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiler Options
Thanks I am updating lazarus on my vm now. I am using trunk FPC 2.6.4 which has the mods for LPC 1343. ( embedded ) I've also made a custom version of GDBMiServerDebugger which adds support for connecting to EABI version of gdb using OpenOCD V8 Also another question , when I am targeting arm based arch , when I start up it complains it cant find classes.ppu - but the program compiles OK can this be supressed if a target is chosen that doesn't use it ? -Original Message- From: Michael Schnell [mailto:mschn...@lumino.de] Sent: Wednesday, 16 July 2014 8:04 PM To: lazarus@lists.lazarus.freepascal.org Subject: Re: [Lazarus] Compiler Options On 07/16/2014 11:57 AM, Marco van de Voort wrote: > (and that results in only a barebone RTL) I do like the term "barebone" a lot more than "embedded" for this option :-) -Michael -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiler Options
On 07/16/2014 11:57 AM, Marco van de Voort wrote: (and that results in only a barebone RTL) I do like the term "barebone" a lot more than "embedded" for this option :-) -Michael -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiler Options
On 07/16/2014 11:51 AM, Sven Barth wrote: The "official" FPC description: No OS, bare hardware. In case of ARM this also includes the possibility to load a controller file for certain boards we already support. To me this wording seems just as misleading as the old-style Linux "noMMU" meaning, as nowadays many embedded systems do run a full blown OS (mostly Linux). -Michael -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiler Options
On Wed, Jul 16, 2014 at 11:51:44AM +0200, Sven Barth wrote: > > Is there an "official" description what this is supposed to mean ? > > The "official" FPC description: No OS, bare hardware. (and that results in only a barebone RTL) -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiler Options
Am 16.07.2014 11:31 schrieb "Justin Smyth" : > > If you compile using trunk fpc I need to use -Cparmv7m > > > > -Op is target cpu optimization > > > > And –cp is for choice of instruction set. > > > > > > The –Op seems wrong to be used in this case, project options are for defining the cpu type not if optimizations are needed. > This was corrected yesterday in Lazarus. Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiler Options
Am 16.07.2014 11:11 schrieb "Michael Schnell" : > > On 07/15/2014 05:26 AM, Justin Smyyth wrote: >> >> "Target selected as embedded" > > Is there an "official" description what this is supposed to mean ? The "official" FPC description: No OS, bare hardware. In case of ARM this also includes the possibility to load a controller file for certain boards we already support. Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiler Options
If you compile using trunk fpc I need to use -Cparmv7m -Op is target cpu optimization And -cp is for choice of instruction set. The -Op seems wrong to be used in this case, project options are for defining the cpu type not if optimizations are needed. The two are listed from ppcrossarm.exe -h -Op Set target cpu for optimizing, see fpc -i for possible values -Cp Select instruction set, see fpc -i for possible values See what I mean, the -Op doesn't not make sense to be used from here, it should be -Cp Ideally I want to place a check box to allow the user (me) to change it from using -Op to -Cp , both are valid commands coming from using -h on the compiler. As for the arm based board , I am using a NXP LPC 1343 Risc Processor. http://www.wvshare.com/product/Open1343-Standard.htm that's the board in question Kind Regards Justin From: Michael Schnell [mailto:mschn...@lumino.de] Sent: Wednesday, 16 July 2014 6:43 PM To: lazarus@lists.lazarus.freepascal.org Subject: Re: [Lazarus] Compiler Options On 07/15/2014 05:26 AM, Justin Smyyth wrote: "Target selected as embedded" Is there an "official" description what this is supposed to mean ? Some years ago "embedded" in the Linux Kernel meant that the CPU does not feature a Memory management Unit. Nowadays, ARM CPUs without MMU seem rather outdated, while a lot of the newly designed "embedded boxes" (e.g. NAS devices) in fact do uses ARM CPUs with MMU. Hence IMHO the therm "embedded" to select a feature of an ARCH should be avoided. A -Michael -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiler Options
On 07/15/2014 05:26 AM, Justin Smyyth wrote: "Target selected as embedded" Is there an "official" description what this is supposed to mean ? Some years ago "embedded" in the Linux Kernel meant that the CPU does not feature a Memory management Unit. Nowadays, ARM CPUs without MMU seem rather outdated, while a lot of the newly designed "embedded boxes" (e.g. NAS devices) in fact do uses ARM CPUs with MMU. Hence IMHO the therm "embedded" to select a feature of an ARCH should be avoided. -Michael -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Compiler Options
The Compiler options found in the project options , for arm embedded when you have Target selected as embedded and cpu family as arm and target processor as ARMV7M are not correct , it comes up with -OpARMV7M instead of -Cparmv7m how can i change this ? is it stored in a XML file or where do i find this. Kind Regards Justin-- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiler Options: Apply conventions
On 08/09/12 12:58, Mattias Gaertner wrote: On Sat, 08 Sep 2012 12:27:28 +0300 patspiper wrote: What exactly is Compiler Options: Apply conventions? It is not documented in http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options. I added it: http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options#Apply_Conventions Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus Thanks! -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiler Options: Apply conventions
On Sat, 08 Sep 2012 12:27:28 +0300 patspiper wrote: > What exactly is Compiler Options: Apply conventions? It is not > documented in > http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options. I added it: http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options#Apply_Conventions Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiler Options: Apply conventions
patspiper wrote: What exactly is Compiler Options: Apply conventions? It is not documented in http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options. Affects things like e.g. 'lib' being applied as a prefix to a unix shared library. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Compiler Options: Apply conventions
What exactly is Compiler Options: Apply conventions? It is not documented in http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options. Stephano -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiler options
On 07/05/12 22:16, Mattias Gaertner wrote: On Mon, 07 May 2012 22:12:57 +0930 SteveG wrote: Project Options / Paths / Unit Output directory (-FU) Would anybody know if there exists a compiler substitution for the current username (under Linux) I would like the output dir set to eg: /tmp/curruser/project/etc (multiple users on a shared system) /tmp/$ENV(USER)/project/etc or maybe you want this: $ENV(HOME)/project/etc Mattias Thanks Mattias - exactly what I was after -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiler options
On Mon, 07 May 2012 22:12:57 +0930 SteveG wrote: > Project Options / Paths / Unit Output directory (-FU) > > Would anybody know if there exists a compiler substitution for the > current username (under Linux) > I would like the output dir set to eg: /tmp/curruser/project/etc > > (multiple users on a shared system) /tmp/$ENV(USER)/project/etc or maybe you want this: $ENV(HOME)/project/etc Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Compiler options
Project Options / Paths / Unit Output directory (-FU) Would anybody know if there exists a compiler substitution for the current username (under Linux) I would like the output dir set to eg: /tmp/curruser/project/etc (multiple users on a shared system) Thanks - SteveG -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Compiler options data loss
Hi all, On Saturday (2010-10-09 16:37:08 +) in svn revision 27634 I introduced a bug, so that projects with a separate session file (.lps) loose their compiler options. This was fixed in svn revision 27649. The daily snapshots contain the bug too. The version tomorrow will contain the fix. :( Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Compiler Options - Compiler Messages
Never mind! I found where to alter the compiler default message file. FPC.cfg, of course. I forgot to look this file. But i am still interested in some handy tool to edit these files !!! BTW, i have two more questions: - Some of these file looks outdated. The default "errore.msg" has 180Kb and date 07/09/2009 and portuguese versions have 152kb and date 01/08/2009. So i want to know if these files are updated when fpc is modified, or only "errore.msg" is updated. - There are 2 portuguese versions: errorptd.msg and errorptw.msg. The first one is a DOS version and the second is Win version. I just want to know if it is right to have 2 version of these files or not. Seems not right to mention DOS or Win, since FPC is multi-platform. Comments are welcomed. Thanks in advance, Marcelo. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Compiler Options - Compiler Messages
There is no option for this in Environment -> Desktop options. And about a tool to edit compiler message file, if someone knows please... A specific editor will be handy. Visually this file is hard to maintain with a plain text editor. Marcelo. dmitry boyarintsev wrote: >2009/10/6 Marcelo Borges de Paula : >> I know that if i check this option in Project->Compiler Options->Messages, >> the file is used only for current project. >Maybe the option should be in Environment -> Desktop options. >The same place where IDE's interface language is selected. > >> BTW, could someone tell me which tool is used to edit these files (*.msg) >> and confirm that the encoding to use with lazarus is UTF-8 ? > >Starting from revision r22056, msg file should be encoded with Utf8 >for Lazarus, no matter what the OS is. >I'm not sure if there's any special tool for editting .msg file, but >any texteditor (capable of saving plain text file) can be used. > >thanks, >dmitry -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiler Options - Compiler Messages
2009/10/6 Marcelo Borges de Paula : > I know that if i check this option in Project->Compiler Options->Messages, > the file is used only for current project. Maybe the option should be in Environment -> Desktop options. The same place where IDE's interface language is selected. > BTW, could someone tell me which tool is used to edit these files (*.msg) > and confirm that the encoding to use with lazarus is UTF-8 ? Starting from revision r22056, msg file should be encoded with Utf8 for Lazarus, no matter what the OS is. I'm not sure if there's any special tool for editting .msg file, but any texteditor (capable of saving plain text file) can be used. thanks, dmitry -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Compiler Options - Compiler Messages
Hello all, I want to know how to make a particular compiler message file (.msg), the default to all projects. Is it possible ? I know that if i check this option in Project->Compiler Options->Messages, the file is used only for current project. BTW, could someone tell me which tool is used to edit these files (*.msg) and confirm that the encoding to use with lazarus is UTF-8 ? Thanks in advance. Marcelo.-- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus