[fpc-devel] Public access of FPC features and settings

Michael Ring mail at michael-ring.org
Sun Mar 7 17:09:16 CET 2021


for this command:

~/fpcupdeluxe-embedded/fpc/bin/aarch64-darwin/fpc -Tembedded -Parm 
-WpDISCOVERYF411VE -ix

it would be good to also get back the controllerunitstr that belongs to 
DISCOVERYF411VE


or, when size does not matter much include the unit already in the more 
generalized call:

~/fpcupdeluxe-embedded/fpc/bin/aarch64-darwin/fpc -Tembedded -Parm -ix

....

<controllertype name="DISCOVERYF411VE" unit="STM32F411XE"/>

<controllertype name="STM32F429VG" unit="STM32F429XX"/>

....

Michael


Am 07.03.21 um 15:12 schrieb Florian Klämpfl via fpc-devel:
> Am 07.03.21 um 12:05 schrieb Alfred via fpc-devel:
>> Hello,
>>
>> As a follow-up on a Lazarus feature request.
>>
>> Among other applications, Lazarus uses some hard-coded list that 
>> represent FPC features. Like supported MCU and boards. It would be 
>> (much) more convenient to parse the FPC output itself to supply this 
>> info. And that could be made easy by using XML as FPC output.
>>
>> Besides the above, I would welcome more features to be available 
>> through FPC itself.
>> FPC uses system files, located in "compiler/systems". With all kinds 
>> of settings. Like alignment and calling convention and linker to use.
>> FPC uses search-paths. Some user defined through fpc.cfg, some 
>> build-in. See all -F... compiler settings.
>> It would be nice to be able to get info through FPC itself about 
>> these settings and paths.
>> As maintainer of fpcupdeluxe, often I need to parse fpc.cfg by hand. 
>> Or look into a file like fpmkunit.pp to find the valid FPC targets. 
>> Or parse the Makefile to find all available subarchs when building a 
>> cross-compiler.
>>
>> For a start, I would favor a XML/JSON output of fpc -i. Would be very 
>> nice to use its output.
>
> I added a first experimental implementation in r48897. It does not 
> cover full -i, so far only to show how it could look like. Any comments?
>
> fpc -ix writes to the console
> fpc -ixfpc_info.xml to fpc_info.xml
>
>
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


More information about the fpc-devel mailing list