Author Topic: Anyone running Linux with any success?  (Read 10246 times)

chris.stolpe

  • RFduino Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Anyone running Linux with any success?
« on: November 11, 2013, 09:04:19 AM »
I downloaded the 1.5.2 version of the IDE and added in RFDuino305.zip.
My hacks:
  • it wouldn't compile because it didn't find the nrf51.h include. I simply copied it from RFDuino/system/RFDuino/include to RFDuino/cores/arduino to get it to compile
  • the avrdude program would not execute. I assumed it was a Mac binary and copied the avrdude from hardware/tools to hardware/arduino/RFDuino
  • then when avrdude ran it didn't like the avrdude.conf so I copied the RFDuino section of the config and added it to the end of the hardware/tools/avrdude.conf and then copied it to hardware/arduino
  • Now it appears to have a problem uploading the sketch. I see the rx/tx lights flicker but it appears to wait for a bit and then gives an error: avrdude: stk500_recv(): programmer is not responding
I can still upload sketches to a Arduino UNO so the basic IDE is OK. I haven't looked a github yet. Maybe there are customizations to avrdude and I have to compile it under Linux?

lann

  • RFduino Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Anyone running Linux with any success?
« Reply #1 on: November 11, 2013, 05:02:21 PM »
I'm pretty sure the avrdude bundled with the rfduino code is patched; this commit references "rfduino extensions":
***removed***

Since avrdude is GPL, those extensions need to be released: ***removed***

Also, I think problem 1 is caused by filename case problems in the rfduino code. Windows and OSX filesystems are case-insensitive IIRC, while most standard Linux filesystems are case-sensitive.
« Last Edit: December 17, 2013, 09:21:32 PM by RFadmin »

jcrew

  • RFduino Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Anyone running Linux with any success?
« Reply #2 on: November 13, 2013, 09:07:07 PM »
I am interested if anyone has any luck, as well.  I am running 64 bit linux.  I have an Uno that I work with generally.  Interested to see what I can do with the RFduino, but I am stuck here, on the avrdude issue, as well.

Cylindric

  • RFduino Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Anyone running Linux with any success?
« Reply #3 on: November 17, 2013, 03:44:59 PM »
Anyone had any luck with this on a Linux machine yet?

I've downloaded Arduino 1.5.4 and extracted the RFDuino files into the hardware/arduino directory, but cannot successfully 'verify' any sketches.

I just get an error in the console:

Code: [Select]
Cannot run program "/home/mark/Documents/arduino/arduino-1.5.4-64/hardware/tools/g++_arm_none_eabi/bin/arm-none-eabi-g++": error=2, No such file or directory

Here's what comes out in the detailed error:

Code: [Select]
Arduino: 1.5.4 (Linux), Board: "RFduino"

/home/mark/Documents/arduino/arduino-1.5.4-64/hardware/tools/g++_arm_none_eabi/bin/arm-none-eabi-g++ -c -g -Os -w -ffunction-sections
-fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -Dprintf=iprintf -mcpu=cortex-m0 -DF_CPU=16000000
-DARDUINO=154 -mthumb -I/home/mark/Documents/arduino/arduino-1.5.4-64/hardware/arduino/RFduino/cores/arduino
-I/home/mark/Documents/arduino/arduino-1.5.4-64/hardware/arduino/RFduino/variants/RFduino
-I/home/mark/Documents/arduino/arduino-1.5.4-64/hardware/arduino/RFduino/system/RFduino
-I/home/mark/Documents/arduino/arduino-1.5.4-64/hardware/arduino/RFduino/system/RFduino/Include
-I/home/mark/Documents/arduino/arduino-1.5.4-64/hardware/arduino/RFduino/system/CMSIS/CMSIS/Include
/tmp/build2839609590416601929.tmp/sketch_nov17a.cpp -o /tmp/build2839609590416601929.tmp/sketch_nov17a.cpp.o

Only thing I saw there that was odd is that the system/RFduino/Include folder mentioned there is actually a lower-case "i" in the actual folder. Changing that makes no difference though.

Non-RFDuino files compile okay.

matsk

  • RFduino Jr. Member
  • **
  • Posts: 59
  • Karma: +1/-0
    • View Profile
    • Tinnio IT Konsulting
Re: Anyone running Linux with any success?
« Reply #4 on: November 18, 2013, 02:44:31 AM »
Check if:
/home/mark/Documents/arduino/arduino-1.5.4-64/hardware/tools/g++_arm_none_eabi/bin/arm-none-eabi-g++
is executable.

Cylindric

  • RFduino Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Anyone running Linux with any success?
« Reply #5 on: November 19, 2013, 01:18:23 AM »
It is. The message is output from that command, it's not saying that command does not exist.

kd2djv

  • RFduino Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Anyone running Linux with any success?
« Reply #6 on: November 20, 2013, 04:49:15 PM »
If anyone is still having the "avrdude" issue, I found a clunky workaround until they decide to release the patch. I installed WINE, renamed the Mac OSX binary (avrdude), and created a script named "avrdude" as follows:

Code: [Select]
#!/bin/bash

/usr/bin/wine /opt/arduino/hardware/arduino/RFduino/avrdude.exe "$@"

Make sure you change "/opt/arduino" to whatever your install path is. It's not pretty, but it works, and I can successfully upload sketches to the RFduino and so on. Hope this Helps!  8)

Cylindric

  • RFduino Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Anyone running Linux with any success?
« Reply #7 on: November 21, 2013, 01:29:23 AM »
Hah, so that solution to "how do I run this on Linux" is "don't run it on linux".

montgoss

  • RFduino Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Anyone running Linux with any success?
« Reply #8 on: November 26, 2013, 05:20:53 PM »
I think the correct solution, instead of copying files around, is to edit boards.txt in arduino-1.5.4/hardware/arduino/RFduino.  You've got to correct RFduino.build.variant_system_include.  The "include" for the RFduino path needs to be lower case.
So, the line would read as follows:
Code: [Select]
RFduino.build.variant_system_include="-I{build.system.path}/RFduino" "-I{build.system.path}/RFduino/include" "-I{build.system.path}/CMSIS/CMSIS/Include"
That allows you to compile with no issues.

However, avrdude throws the error "arduino-1.5.4/hardware/arduino/RFduino/avrdude: Syntax error: word unexpected (expecting ")")". 
This is apparently a RFduino specific version of avrdude that has a bug of some sort.  As you saw, using a standard version fails. Hopefully an update will fix this shortly...

Carl Bellingan

  • RFduino Newbie
  • *
  • Posts: 3
  • Karma: +1/-0
    • View Profile
Re: Anyone running Linux with any success?
« Reply #9 on: November 29, 2013, 10:18:40 AM »
I'm having exactly the same problem under Ubuntu 12.04.
The interesting thing is that if I comment out the line "is_at90s1200     = yes" in the avrdude.conf, I can get a list of supported parts with:

 hardware/arduino/RFduino/avrdude -C hardware/arduino/RFduino/avrdude.conf -c avrisp

But if I put the line back, it also bails with:

 error at hardware/arduino/RFduino/avrdude.conf:1316 unrecognized character: "i"

So this just feels like a mismatch between avrdude and the config supplied?

Another question, the nrf51 has a cortex m0 under the hood, does anyone know what avr partno that corresponds to?

Carl Bellingan

  • RFduino Newbie
  • *
  • Posts: 3
  • Karma: +1/-0
    • View Profile
Re: Anyone running Linux with any success?
« Reply #10 on: December 01, 2013, 06:33:22 AM »
+1 for the wine hack, works like a charm  ;D

RFadmin

  • Administrator
  • *****
  • Posts: 77
  • Karma: +9/-2
    • View Profile
Re: Anyone running Linux with any success?
« Reply #11 on: December 03, 2013, 10:27:55 PM »
We haven't used the RFduino with Linux yet...thanks for the WINE tip!

montgoss

  • RFduino Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Anyone running Linux with any success?
« Reply #12 on: December 04, 2013, 05:40:02 AM »
We haven't used the RFduino with Linux yet...thanks for the WINE tip!
Can you at least release the source for avrdude?  Maybe the community can work out the bugs for Linux.  That's one of the biggest benefits of open-source...

barrystaes

  • RFduino Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Anyone running Linux with any success?
« Reply #13 on: December 07, 2013, 07:57:05 AM »
We haven't used the RFduino with Linux yet...thanks for the WINE tip!

I have the same problem.
Please get your product working on a Linux system..!

Reproduce:
  • Running the latest CrunchBang linux distro, (x86 32bit non-pae)
  • Downloaded Arduino IDE 1.5.5 from arduino.cc,
  • Enabled the Arduino IDE to recognize the COM, (see #! forum)
  • Switched the Arduino IDE to RFDuino via Tools>Board
  • Loaded example ColorWheel and verify (OK),
  • Upload gives compile error "/home/barry/downloads/arduino-1.5.5/hardware/arduino/RFduino/cores/arduino/syscalls.c:61: fatal error: nrf51.h: No such file or directory compilation terminated."
I found the file in /arduino/RFduino/system/include/nrf51.h though.

The line in syscalls.c? likely is "#include "nrf51.h" and it indeed seems missing.

My first experience with RFDuino is not to write home about.. offered documentation and troubleshooting are either missing, or hard to find and below par. The least i expected is a clear guidance in the package i received pointing to how to connect it to my PC.. there is no paper with explanation, there is no website mentioned.
« Last Edit: December 07, 2013, 09:26:00 AM by barrystaes »

lemouchon

  • RFduino Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Anyone running Linux with any success?
« Reply #14 on: January 25, 2014, 07:53:58 AM »
Ok what i did on ubuntu:

create ~/.wine/dosdevices/com1

with ln -sf /dev/ttyUSB1 ~/.wine/dosdevices/com1

where /dev/ttyUSBX depend of your environement.


then rename

arduino-1.5.5/hardware/arduino/RFduino/RFDLoader
to  arduino-1.5.5/hardware/arduino/RFduino/RFDLoader.old

then create

the following RFDLoader file

vim  RFDLoader

put this
Code: [Select]
#!/bin/bash
rm  ~/.wine/dosdevices/com1
ln -sf $2 ~/.wine/dosdevices/com1
/usr/bin/wine /home/philippe/src/arduino-1.5.5/hardware/arduino/RFduino/RFDLoader.exe $1 com1 $3

Code: [Select]
chmod +x RFDLoader

where  /home/philippe/src/arduino-1.5.5/ should be replaced by your own path.

with this you can flash your rfduino under unbuntu. Hope that this can help.


« Last Edit: January 30, 2014, 01:22:22 AM by lemouchon »

 

anything