Execute file does not work for Raspberry Pi

Hi.
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.

http://developer.xojo.com/rpi-blinking-led-tutorial

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:
http://wiringpi.com/the-gpio-utility/

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.setmode(GPIO.BOARD)
GPIO.setup(11, GPIO.OUT)
while True:
  GPIO.output(11, True)
  time.sleep(2)
  GPIO.output(11, False)
  time.sleep(2)
$ 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.

  System.DebugLog("Test")
  GPIO.SetupGPIO
  
  Const kLEDPin = 0 // "#4" on the pinout
  
  // Set the pin to accept output
  GPIO.PinMode(kLEDPin, GPIO.OUTPUT)
  
  // Blink LED every 1/2 second
  While True
    // Turn the pin on (give it power)
    GPIO.DigitalWrite(kLEDPin, GPIO.ON)
    App.DoEvents(500)
    
    // Turn the pin off (no power)
    GPIO.DigitalWrite(kLEDPin, GPIO.OFF)
    App.DoEvents(500)
  Wend

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
https://forum.xojo.com/33281-raspberry-pi-1

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.

  System.DebugLog("Test")
  GPIO.SetupGPIO
  
  Const kLEDPin = 4 // "#4" on the pinout
  
  // Set the pin to accept output
  GPIO.PinMode(kLEDPin, GPIO.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)
    Else
      GPIO.DigitalWrite(kLEDPin, GPIO.OFF)
    end if
    
    App.DoEvents(500)
    status = Not(status)
  Wend

Regards.