Re: [fpc-pascal] Translation C to Pascal
On 2017-05-02 18:49, Marc Santhoff wrote: On Di, 2017-05-02 at 08:33 -0700, fredvs wrote: Hello. The best (IMHO) is c2pas32 --> http://www.astonshell.com/freeware/c2pas32/ Nice program, i fed the adc.c source from STMs fwlib for stm32f4 through and the generated code looks fine. There is some guessing on type casts, but I hope those can be cleared using simple scripting or the like. There was also a mailing list thread about this a few weeks/months ago, where I was discussing the idea with a few other people on the list. Another idea is to link in C source as .a files into your fpc program? If you want to write wrappers around the C code and use the C code directly as .a files from gcc generated... But depends.. what you need. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Translation C to Pascal
On Di, 2017-05-02 at 08:33 -0700, fredvs wrote: > Hello. > > The best (IMHO) is c2pas32 --> http://www.astonshell.com/freeware/c2pas32/ Nice program, i fed the adc.c source from STMs fwlib for stm32f4 through and the generated code looks fine. There is some guessing on type casts, but I hope those can be cleared using simple scripting or the like. > But it is old and translate into Delphi code, so still work after... Will see that when trying the compiler on it, not enough time for mkore than some preparations currently. Maybe switching to mode Delphi is fine, if anything is working for embedded targets. Many thanks, Marc ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Translation C to Pascal
Hello. The best (IMHO) is c2pas32 --> http://www.astonshell.com/freeware/c2pas32/ But it is old and translate into Delphi code, so still work after... Fre;D - Many thanks ;-) -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Translation-C-to-Pascal-tp5728396p5728403.html Sent from the Free Pascal - General mailing list archive at Nabble.com. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal