TRon - My main focus here was confirming that the "official" "main" (you know what I mean) contains a usable pico compiler so that DonAlfredo can switch over to using it rather than Michael's out of date one.
I am not quite sure what it is exactly you are trying to say there... trunk has been able to build for pico since the patches from MiR were accepted (well, plus-minus a few hiccups
), FPCUpDeluxe is able to build trunk and I have seen from Don Alfredo's post that he has addressed issues wrt embedded targets so that means that FPCUpdeluxe should be able to build a cross-compiler for you (
haven't tried yet though see edit). So unless Don A. is cheating and just copies over a pre-build when you select embedded raspi target instead of actually building it from trunk sources.....
But, imho it is always good to known and be able to manually build your binutils, compilers and cross-compilers.
edit: tried fpcupdeluxe and seems to work as expected (use the link to the wiki-page in my first reply that shows how to setup arm embedded using fpcupdeluxe). Though other than available instructions (1,2,3) make sure (at step 4) to select "none" for Arm target, "eabi" for ABI, and don't forget to select the right subarch. Do not let the (error) dialog that pops-up fool you, just press ok and it will try to download anything that is missing.
$ ./ppcrossarm -h
Free Pascal Compiler version 3.3.1-15371-g0fb4fca957-dirty [2024/03/05] for arm
But it sounds like you have an "in use" version already ? I could have saved some time ! There does not seem any great risk of a FPC release soon but it pays to be prepared !
Well, I have a cross-compiler that is able to compile... if it actually works, I have no idea
(fwiw: that is not too odd, I cross compile for many targets for which I either do not have the hardware/software or not the time to test myself) And yes, everything you are able to learn about new targets/features from the (trunk) compiler before the official release has been published is good. Very good even, because if you run into issues then they can be reported before the actual release and as a result /can/ be fixed *hint hint*
Actually, I approach that differently, and beyond the scope of this thread. I keep an env var, OLD_PATH, that has my path before I added my default FPC, so I can, in the middle of a script (eg starting Lazarus), build a new clean path to suit whatever compiler I want. I glossed over that ...
Ok, yes that is also a solution (I used to use that as well but kept forgetting the name of the environment variable and back then was still using windows that all of a sudden required you to have elevated access rights when wanting to change envars so switched over to using the (undocumented) -V option, but with a small twist to suit my needs). I'll leave it at that if it is out of scope.
-Wpraspi_pico appears in Michaels Lazarus example projects, under Custom Options, so, I expect its the right one to use.
Yeah but things do tend to change (in trunk) once in a while...
(btw I looked at the wrong record-field when I wrote down rppico, I had it corrected in my (previous) post while you prepared your reply). So you were right all along
In cpuinfo.pas, both 'RP2040' and 'RASPI_PICO' are listed ...
Ah ok, thank you for the information because tbh I haven't looked very close to the implementation details for the pico target. I trust your judgement on that.
I was pretty sure I saw -WpXXXX documented somewhere but I cannot find it now. I remember seeing it with a list of values and the words "embedded only". I suggest its absence is a FPC documentation bug, "-h" should show it IMHO ??
Oh, now I feel stupid (simply because I am
). You are absolutely right,
./ppcrossarm -h
Free Pascal Compiler version 3.3.1 [2024/03/04] for arm
Copyright (c) 1993-2024 by Florian Klaempfl and others
...
-WN Do not generate relocation code, needed for debugging (Windows)
-Wp<x> Specify the controller type; see fpc -i or fpc -iu for possible values
-WP<x> Minimum iOS deployment version: 3.0, 5.0.1, ... (Darwin)
I spare you (and other readers) the ridiculous amount of output produced by ./ppccrossarm -i and -iu