Re: [Lazarus] Possible Codetools issue for embedded targets in main branch
On Fri, 07 Oct 2022 07:31:37 + Alfred via lazarus wrote: > If I am free to make this request, the most easy method (for me) > would be a boolean setting in miscellaneousoptions.xml. > Something with the name "Force-rescan" that gets reset when the > rescan has been performed when Lazarus has been started and the > rescan is finished. > I know I ask a lot, but this would serve me well ... ;-) If you just need a rescan on start, you can simply delete fpcdefines.xml Mattias -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Possible Codetools issue for embedded targets in main branch
If I am free to make this request, the most easy method (for me) would be a boolean setting in miscellaneousoptions.xml. Something with the name "Force-rescan" that gets reset when the rescan has been performed when Lazarus has been started and the rescan is finished. I know I ask a lot, but this would serve me well ... ;-) Greetings, Alfred. -- Original Message -- From "Mattias Gaertner" To lazarus@lists.lazarus-ide.org Cc "Alfred" Date 10/7/2022 8:19:12 AM Subject Re: [Lazarus] Possible Codetools issue for embedded targets in main branch On Fri, 07 Oct 2022 06:00:28 + Alfred via lazarus wrote: Sidenote request, as fpcupdeluxe maintainer. It would be nice if the rescan procedure would be reacheable from the outside. Fpcupdeluxe would like to use it when updating/installing sources. Thanks. Outside means here IPC or a public method? Mattias -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Possible Codetools issue for embedded targets in main branch
On Fri, 07 Oct 2022 06:00:28 + Alfred via lazarus wrote: > Sidenote request, as fpcupdeluxe maintainer. > It would be nice if the rescan procedure would be reacheable from the > outside. > Fpcupdeluxe would like to use it when updating/installing sources. > Thanks. Outside means here IPC or a public method? Mattias -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Possible Codetools issue for embedded targets in main branch
Sidenote request, as fpcupdeluxe maintainer. It would be nice if the rescan procedure would be reacheable from the outside. Fpcupdeluxe would like to use it when updating/installing sources. Thanks. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Possible Codetools issue for embedded targets in main branch
On Thu, 6 Oct 2022 22:47:19 +0200 Michael Ring via lazarus wrote: > While investigating further I suddenly saw that the unit was detected. > > So I did a complete fresh install via fpcupdeluxe, opened a project > for rp2040, saw the error. > > Then I selected 'rescan fpc source directory' and the issue was gone. > > So not sure if this is an issue or not, it definitely does not fully > work as expected. Your cache was outdated. When you update the FPC sources and some units are added/removed/moved, you should use the rescan. Mattias -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Possible Codetools issue for embedded targets in main branch
While investigating further I suddenly saw that the unit was detected. So I did a complete fresh install via fpcupdeluxe, opened a project for rp2040, saw the error. Then I selected 'rescan fpc source directory' and the issue was gone. So not sure if this is an issue or not, it definitely does not fully work as expected. Michael Am 06.10.22 um 21:59 schrieb Michael Ring via lazarus: I today looked at an issue posted in the lazarus forum: https://forum.lazarus.freepascal.org/index.php/topic,60790.0.html the user is unable to use ctrl-space for help because codetools cannot find the required unit rp2040. I could not reproduce the issue with my older installation of lazarus-trunk but when I upgraded to latest trunk from today I saw the same issue. Possible reason is that lazarus cannot extract the info about the unit source file from the output of the -ix format of fpc I commented out a few log entries and got this result: TFindDeclarationTool.FindUnitSource Self="/Users/ring/devel/pico-fpcexamples/blinky/blinky.lpr" AnUnitName="RP2040" AnUnitInFilename="" TCTDirectoryCache.FindUnitSourceInCompletePath AUnitName="RP2040" InFilename="" Directory="/Users/ring/devel/pico-fpcexamples/blinky/" TCTDirectoryCache.FindUnitSourceInCompletePath unit RP2040 not found in SrcPath="/Users/ring/devel/pico-fpcexamples/blinky;/Users/ring/devel/pico-fpcexamples/units" Directory="/Users/ring/devel/pico-fpcexamples/blinky/" searchin in unitset ... TCTDirectoryCache.FindUnitInUnitSet Directory="/Users/ring/devel/pico-fpcexamples/blinky/" UnitSet="CompilerFilename=/Users/ring/fpcupdeluxe/fpc/bin/x86_64-darwin/fpc.sh TargetOS=embedded TargetCPU=arm Options= FPCSrcDir=/Users/ring/fpcupdeluxe/fpcsrc/ Stamp=1" AUnitName="RP2040" TFPCUnitSetCache.GetUnitSrcFile Unit="RP2040" SrcSearchRequiresPPU=False SkipPPUCheckIfTargetIsSourceOnly=True TFPCUnitSetCache.GetUnitSrcFile Unit="RP2040" Result= TCTDirectoryCache.FindUnitInUnitSet Directory="/Users/ring/devel/pico-fpcexamples/blinky/" UnitSet="CompilerFilename=/Users/ring/fpcupdeluxe/fpc/bin/x86_64-darwin/fpc.sh#10TargetOS=embedded#10TargetCPU=arm#10Options=#10FPCSrcDir=/Users/ring/fpcupdeluxe/fpcsrc/#10Stamp=1" AUnitName="RP2040" Result="" TCTDirectoryCache.FindUnitSourceInCompletePath unit RP2040 not found in unitlinks. Directory="/Users/ring/devel/pico-fpcexamples/blinky/" TCTDirectoryCache.FindCompiledUnitInUnitSet Directory="/Users/ring/devel/pico-fpcexamples/blinky/" UnitSet="CompilerFilename=/Users/ring/fpcupdeluxe/fpc/bin/x86_64-darwin/fpc.sh TargetOS=embedded TargetCPU=arm Options= FPCSrcDir=/Users/ring/fpcupdeluxe/fpcsrc/ Stamp=1" AUnitName="RP2040.ppu" TCTDirectoryCache.FindCompiledUnitInUnitSet Directory="/Users/ring/devel/pico-fpcexamples/blinky/" UnitSet="CompilerFilename=/Users/ring/fpcupdeluxe/fpc/bin/x86_64-darwin/fpc.sh#10TargetOS=embedded#10TargetCPU=arm#10Options=#10FPCSrcDir=/Users/ring/fpcupdeluxe/fpcsrc/#10Stamp=1" AUnitName="RP2040.ppu" Result="" ### TCodeToolManager.HandleException: [20170421200056] "unit not found: RP2040" in "/Users/ring/devel/pico-fpcexamples/blinky/blinky.lpr" when I manually run the -ix command with my fpc I receive the hits I would expect: ~/fpcupdeluxe/fpc/bin/x86_64-darwin/fpc -Tembedded -Parm -ix | grep -i rp2040 and I also find the unit in my fpcsrc directory: find /Users/ring/fpcupdeluxe/fpcsrc -name "rp2040*" /Users/ring/fpcupdeluxe/fpcsrc/rtl/embedded/arm/rp2040.pp I am stuck because I cannot find the correct implementation for TCTGetCompiledUnitFromSet althoug I searched through all sources for (const UnitSet, AnUnitName: string) Michael Please note that you will not find unit rp2040 in official trunk, only in my version but the same issue should be there for any other existing embedded comtrollerunit -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Possible Codetools issue for embedded targets in main branch
I today looked at an issue posted in the lazarus forum: https://forum.lazarus.freepascal.org/index.php/topic,60790.0.html the user is unable to use ctrl-space for help because codetools cannot find the required unit rp2040. I could not reproduce the issue with my older installation of lazarus-trunk but when I upgraded to latest trunk from today I saw the same issue. Possible reason is that lazarus cannot extract the info about the unit source file from the output of the -ix format of fpc I commented out a few log entries and got this result: TFindDeclarationTool.FindUnitSource Self="/Users/ring/devel/pico-fpcexamples/blinky/blinky.lpr" AnUnitName="RP2040" AnUnitInFilename="" TCTDirectoryCache.FindUnitSourceInCompletePath AUnitName="RP2040" InFilename="" Directory="/Users/ring/devel/pico-fpcexamples/blinky/" TCTDirectoryCache.FindUnitSourceInCompletePath unit RP2040 not found in SrcPath="/Users/ring/devel/pico-fpcexamples/blinky;/Users/ring/devel/pico-fpcexamples/units" Directory="/Users/ring/devel/pico-fpcexamples/blinky/" searchin in unitset ... TCTDirectoryCache.FindUnitInUnitSet Directory="/Users/ring/devel/pico-fpcexamples/blinky/" UnitSet="CompilerFilename=/Users/ring/fpcupdeluxe/fpc/bin/x86_64-darwin/fpc.sh TargetOS=embedded TargetCPU=arm Options= FPCSrcDir=/Users/ring/fpcupdeluxe/fpcsrc/ Stamp=1" AUnitName="RP2040" TFPCUnitSetCache.GetUnitSrcFile Unit="RP2040" SrcSearchRequiresPPU=False SkipPPUCheckIfTargetIsSourceOnly=True TFPCUnitSetCache.GetUnitSrcFile Unit="RP2040" Result= TCTDirectoryCache.FindUnitInUnitSet Directory="/Users/ring/devel/pico-fpcexamples/blinky/" UnitSet="CompilerFilename=/Users/ring/fpcupdeluxe/fpc/bin/x86_64-darwin/fpc.sh#10TargetOS=embedded#10TargetCPU=arm#10Options=#10FPCSrcDir=/Users/ring/fpcupdeluxe/fpcsrc/#10Stamp=1" AUnitName="RP2040" Result="" TCTDirectoryCache.FindUnitSourceInCompletePath unit RP2040 not found in unitlinks. Directory="/Users/ring/devel/pico-fpcexamples/blinky/" TCTDirectoryCache.FindCompiledUnitInUnitSet Directory="/Users/ring/devel/pico-fpcexamples/blinky/" UnitSet="CompilerFilename=/Users/ring/fpcupdeluxe/fpc/bin/x86_64-darwin/fpc.sh TargetOS=embedded TargetCPU=arm Options= FPCSrcDir=/Users/ring/fpcupdeluxe/fpcsrc/ Stamp=1" AUnitName="RP2040.ppu" TCTDirectoryCache.FindCompiledUnitInUnitSet Directory="/Users/ring/devel/pico-fpcexamples/blinky/" UnitSet="CompilerFilename=/Users/ring/fpcupdeluxe/fpc/bin/x86_64-darwin/fpc.sh#10TargetOS=embedded#10TargetCPU=arm#10Options=#10FPCSrcDir=/Users/ring/fpcupdeluxe/fpcsrc/#10Stamp=1" AUnitName="RP2040.ppu" Result="" ### TCodeToolManager.HandleException: [20170421200056] "unit not found: RP2040" in "/Users/ring/devel/pico-fpcexamples/blinky/blinky.lpr" when I manually run the -ix command with my fpc I receive the hits I would expect: ~/fpcupdeluxe/fpc/bin/x86_64-darwin/fpc -Tembedded -Parm -ix | grep -i rp2040 and I also find the unit in my fpcsrc directory: find /Users/ring/fpcupdeluxe/fpcsrc -name "rp2040*" /Users/ring/fpcupdeluxe/fpcsrc/rtl/embedded/arm/rp2040.pp I am stuck because I cannot find the correct implementation for TCTGetCompiledUnitFromSet althoug I searched through all sources for (const UnitSet, AnUnitName: string) Michael Please note that you will not find unit rp2040 in official trunk, only in my version but the same issue should be there for any other existing embedded comtrollerunit -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus