[fpc-pascal] FPC and ANSI C

Valdas Jankūnas zmuogs at gmail.com
Sun Sep 5 19:56:32 CEST 2010


Hello,

is there way to share constants between FPC and ANSI C?

  I writing firmware for device (with Atmel 8bit) using ANSI C, also I 
writing software for PC (to communicate with that device) using Free 
Pascal. Both firmware and software using some same numeric constants 
(used in communication protocol), for example in firmware:
    #define SEND_DATA 1
in software:
    const SEND_DATA = 1;
  My problem is that I always must synchronise values in both sources.
  So, I want that C compiler will read constants from FPC source, or FPC 
compiler read from C source, or both compilers reads from some custom 
file. Is this possible? How implement this?

  Thanks for suggestions.

-- 
   Valdas Jankūnas



More information about the fpc-pascal mailing list