[fpc-pascal] Is this the correct way to configure fpc for multiple arm-embedded subarchs?

Tomas Hajny XHajT03 at hajny.biz
Thu Jul 5 00:20:09 CEST 2018


On Wed, July 4, 2018 22:42, Christo wrote:
> On Wed, 2018-07-04 at 11:57 +0200, Tomas Hajny wrote:
>> The .ini file should be translated to .inc using the data2inc utility
>> (included with FPC as well) and then incorporated into the binary. This
>> should happen automatically, but let's make sure it was the case for you
>> as well.
>
> The .inc file is not regenerated when running make in the fpcm directory.
> At first the data2inc utility couldn't be found, fixed that by specifying
> DATA2INC=path/to/data2inc. This still didn't regenerate the .inc file.

Did you try removing the fpcmake.inc before running make?


>  Tried 
> to generate only the .inc file by calling data2inc manually passing
> unmodified
> fpcmake.ini as input - this resulted in a parsing error:
>
> ~/fpc/3.1.1/utils/fpcm $ ../bin/x86_64-linux/data2inc fpcmake.ini
> fpcmake.inc
> processing file : fpcmake.ini
> Some error with a \xxx constant or a stale (unescaped) backslash
> Error in line : 35 Somewhere near :'OVERR'

If you look into fpmake.pp in the same directory, you'll find out that the
proper command line for calling data2inc should be:

data2inc -b -s fpcmake.ini fpcmake.inc fpcmakeini

(add paths as necessary, e.g. the path to data2inc if not on PATH)


> Data2inc also gives an error when reading data2inc.exm, which seems
> strange.

I guess that this is again due to wrong parameters, but that's really just
a guess. Anyway, running 'data2inc data2inc.exm demo.inc' as suggested
within data2inc.exm works for me (using data2inc from the 3.0.4
installation, but that shouldn't make a difference).


> Same error when testing data2inc of 3.0.4 (compiled from source). I've
> already 
> deleted, restored and rebuild the utils directory of trunk but get the
> same error.
>
> This is really strange because data2inc seems like a very mature tool.

Indeed - I'm pretty sure that it should work when using the right parameters.

Invoking of data2inc from fpmake may not be as mature though (as suggested
by your experience with running make in the fpcm directory). I don't have
time for debugging




More information about the fpc-pascal mailing list