Recent

Author Topic: Compile units on RPI - Raspbian Debian Wheezy, Command line Parameters?  (Read 2812 times)

pascalbythree

  • Jr. Member
  • **
  • Posts: 68
It is possible to compile a few units, who access the GPIO port. Using the commandline.

Like hwwiringPi.Pas and the RPI_HAL.PAS

ALso working on a few i2c and PWM examples, written in Freepascal. And the LNet example lserver.pp to wireless over TCP/IP control the GPIO pin on my Rasberry model B.

I use the compile command: sudo fpc ./hwiringpi.pas
But: i do not use any extra command line parameters. Is this a way to solve this problem?

Greets, Wouter van Wegen
-->woutervanwegen@mijnplinq.nl

pi@raspberrypi ~ $ sudo fpc hwiringpi.pas
Free Pascal Compiler version 2.6.0-9+rpi1+wsf1 [2015/04/28] for arm
Copyright (c) 1993-2011 by Florian Klaempfl and others
Target OS: Linux for ARMHF
Compiling hwiringpi.pas
Assembling hwiringpi
92 lines compiled, 0.4 sec
pi@raspberrypi ~ $

pi@raspberrypi ~ $ sudo fpc raspberry.pas
Free Pascal Compiler version 2.6.0-9+rpi1+wsf1 [2015/04/28] for arm
Copyright (c) 1993-2011 by Florian Klaempfl and others
Target OS: Linux for ARMHF
Compiling raspberry.pas
Assembling raspberry
raspberry.pas(19,34) Error: Can't open resource file "/home/pi/raspberry.res"
raspberry.pas(19,34) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/bin/ppcarm returned an error exitcode (normal if you did not specify a source file to be compiled)
pi@raspberrypi ~ $

Or do i have to take the .RES error litterally and create one of those? Please help


https://github.com/AkselMeola/Pascal-projects-on-Raspberry/blob/master/Morse-code-translator/hwiringpi.pas
« Last Edit: August 11, 2015, 08:55:16 pm by pascalbythree »

ghamm

  • New Member
  • *
  • Posts: 19
Re: Compile units on RPI - Raspbian Debian Wheezy, Command line Parameters?
« Reply #1 on: September 25, 2015, 06:45:04 pm »
I have written some other libs for free pascal and Pi.. They are a work in progress, but Im using them. I could never get the others to compile right.. You can find me on facebook if you search "Raspberry Free Pascal"