Execute file does not work for Raspberry Pi

I built on the Xojo’s sample project “LED Blink for Raspberry Pi”. Build was successful, and I send a directory to Raspberry Pi using SCP. And I was install “Wiring Pi”.

The code is like this tutorial video.


I execute a executable file, but the file exit soon, not continue. I think file can execute, so Architecture is fine ( I selected ARM 32bit).

$ sudo ./LEDBlink

And I use a System.DebugLog method, but the program was no output.

How to debug or execute file? Any idea?

I would try first if wiringPi was installed successfully. You could try out some of the gpio utility methods:

If that looks ok, add a few print commands to your app that give you a clue where the app fails, if it does so.
And make sure you got the wiring set according to the selected pin in your app. Check the LED to see if it will light up at all.

Can you run ldd on the executable and see if you miss a shared library?

what kind/model of raspberry pi do you use ?

Thank you so much for replies.

When I use gpio command like below, that was moving.

$ gpio mode 0 out
$ gpio write 0 1
$ gpio write 0 0

And if I use Python, also it was moving.

$ cat ~/test.py
#!/usr/bin/env python
import RPi.GPIO as GPIO
import time
GPIO.setup(11, GPIO.OUT)
while True:
  GPIO.output(11, True)
  GPIO.output(11, False)
$ gpio -v
gpio version: 2.32
Copyright (c) 2012-2015 Gordon Henderson
This is free software with ABSOLUTELY NO WARRANTY.
For details type: gpio -warranty

Raspberry Pi Details:
  Type: Model B+, Revision: 02, Memory: 512MB, Maker: Sony 
  * Device tree is enabled.
  * This Raspberry Pi supports user-level GPIO access.
    -> See the man-page for more details
    -> ie. export WIRINGPI_GPIOMEM=1

And RasPi is B+.

My files tree is like:

 tree .
??? LEDBlink
??? LEDBlink Libs
    ??? libc++.so.1
    ??? XojoConsoleFrameworkARM.so

1 directory, 3 files

My Xojo’s source file is like below. I tryed to any GPIO pin numbers such as 0, 11, 4 or something.

  Const kLEDPin = 0 // "#4" on the pinout
  // Set the pin to accept output
  // Blink LED every 1/2 second
  While True
    // Turn the pin on (give it power)
    GPIO.DigitalWrite(kLEDPin, GPIO.ON)
    // Turn the pin off (no power)
    GPIO.DigitalWrite(kLEDPin, GPIO.OFF)

Build is fine, but excute finished soon and no display any debug message.

You sure you set the target to ARM? The rest looks completely fine.

Yes, I’m setting the target to ARM…

If someone bulit the program that completely executable, give me it. I want to determine what is wrong on my systems.

That is your problem. I think Xojo requires a RPi B2 or RPi B3.

That’d be it
The B+ is basically the same as a Pi 1 which is not supported

Oh, thank you! I’ll try again using B2!

Thank you guys!
I’m fine by changing Raspberry Pi 2 Model B.

My code is below.

  Const kLEDPin = 4 // "#4" on the pinout
  // Set the pin to accept output
  Dim status as Boolean
  // Blink LED every 1/2 second
  While True
    // Turn the pin on (give it power)
    if status = True then
      GPIO.DigitalWrite(kLEDPin, GPIO.ON)
      GPIO.DigitalWrite(kLEDPin, GPIO.OFF)
    end if
    status = Not(status)