chipKIT® Development Platform

Inspired by Arduino™

Fubarino SD from microchip shipped with PIC32MX795F512H

Created Wed, 25 Dec 2013 08:59:14 +0000 by juppiter78


juppiter78

Wed, 25 Dec 2013 08:59:14 +0000

Hello at all, I just purchased two fubarino sd from microchip. They shipped with PIC32MX795F512H version. I use Mac Osx (10.9), so i downloaded the mac versione of mpide. In the conf file there isn't the micro definition. I tried to change the L version to H, this enable Mpide to communicate with the board, but there is no serial echo from fubarino. It takes serial commands but nothing is displayed in return. I think there is something different in the definition but i'm not so smart to understand what to change inside the conf file. Can someone help me?

Alessandro


majenko

Wed, 25 Dec 2013 09:13:41 +0000

Which conference file do you mean? Also, which version of this IDE are you running?


juppiter78

Wed, 25 Dec 2013 09:24:23 +0000

The configuration file i refer is avrdude.conf

I tried mpide-0023-macosx-20130715.dmg and also installed mpide-0023-macosx-20131118-test.dmg version but there isn't the PIC32MX795F512H version only the L version. The FTDI driver is fully functional.

Thanks Alessandro


majenko

Wed, 25 Dec 2013 09:52:12 +0000

You're quite right, there is no H in the Mac version of that file. The problem is that the Mac uses a different copy of the file to all the other operating systems as it doesn't have the parallel port support in avrdude that the other OS versions have. It seems to have got left behind.

I shall just quickly look at updating it - one mo...


majenko

Wed, 25 Dec 2013 09:56:09 +0000

Ok, try this avrdude.conf file out and see if it works better for you.


juppiter78

Wed, 25 Dec 2013 20:27:06 +0000

It works! Thank a lot

Alessandro


ricklon

Thu, 26 Dec 2013 04:56:42 +0000

Sorry I missed that in the Mac OS X avrdude file. I'll get that updated and into a new build.

Matt, and Allesandro thanks for figuring that out.

--Rick


bhclowers

Thu, 02 Jan 2014 00:09:24 +0000

I was initially relieved to see this post when I received my Fubarino SD from chipKit, however, after putting the revised configuration file in the directory I still wind up with an error:

/Applications/Mpide.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf:15327 unrecognized character: "h"

I think that SublimeText2 counts line numbers differently than MPIDE as I don't see a "h" at this line. Does anyone have an idea how I might fix this problem when trying to upload a simple sketch?

mpide 0023-macosx-20131118-test OSX 10.9.1

Happy New Year,

Brian


bhclowers

Fri, 03 Jan 2014 23:33:49 +0000

Recognizing that this is the holiday season I have been trying to post this message for a number of days now:

I recently received a Fubarino SD with the 512H chip and have modified the avr configuration file appropriately. This allows me to move farther along the uploading progress but I keep getting the following error when trying to upload:

/Applications/Mpide.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf:15327 unrecognized character: "h"

When I examine the file at line 15327 I do not see a "h" but believe the compiler and SublimeText2 simply count line numbers differently. Does anyone have a solution?

OSX 10.9.1 MPIDE 0023-macos-20131118-test

Any help would be appreciated,

Brian


juppiter78

Sat, 04 Jan 2014 07:44:53 +0000

I realized it worked for me because i did not substitute the file but i copied the part definition from the file in this post, and pasted in the original configuration file shipped with the official build (made it with sublime text 2 also). When i tried the file attached, i found the same issue you are reporting, so i reverted back to the working one.

This workaround should work also for you.

[UPDATE] Attached my working version of avrdude.conf

Happy coding


majenko

Sat, 04 Jan 2014 11:44:00 +0000

I cannot recreate the problem on Linux using the first posted avrdude.conf file. Like you I can't find a stray "h".

I am thinking there may be something either specific to the Mac version of avrdude that doesn't like something else in the file, or there's something the Mac doesn't like about the file modified on Linux - which I find hard to believe since the Mac is BSD at heart...


bhclowers

Mon, 06 Jan 2014 03:30:22 +0000

Thanks for the updated conf file. I used this file on the mac and it worked without problem. Cheers and I appreciate the help. I wish this gremlin was more apparent but to be clear it was the second conf file posted to this forum that works on the mac.

Happy New Year,

Brian


beargun

Sat, 18 Jan 2014 18:07:29 +0000

Did you get Serial to work Alessandro? I too have the problem that the Fubarino SD accepts serial, but I'm unable to receive any serial data from it. I can light up an led by sending a serial command.

When I plug the Fubarino into a Linux or Windows PC, it works fine (with the same sketch I uploaded on the Mac).

Connecting directly to the serial, using either the screen or cu command, gives the same behavior. Sending data works, but no data is being received back.


majenko

Mon, 20 Jan 2014 01:02:12 +0000

Do you fancy trying with UECIDE - that'll rule out if it's a bug in your version of the MPIDE core that has been cured in the git version.


beargun

Mon, 20 Jan 2014 14:24:35 +0000

I had already tried UECIDE. Tested it again, today, just to be sure. But no luck. Same result. Sending data works, but no output from the Fubarino is showing in the Serial Terminal.


majenko

Mon, 20 Jan 2014 15:52:09 +0000

One thing to remember with boards like the Fubarino - they don't reset when you open the serial.

If your serial printing is done in setup() or shortly after startup, you will probably never see it as it's output it before you even open the serial terminal.

With these boards you can check the status of the serial connection and only do things when it's connected.

I often add:

while (!Serial);
delay(1000);

to the top of my code for these boards. That will basically stop the sketch until the serial port is opened by the computer (while (!Serial);), then delay for a second (delay(1000);) to allow the window to open fully. Only then will it start the sketch.


beargun

Mon, 20 Jan 2014 17:03:13 +0000

On serial input I flash a led, and echo the value back using Serial.println();. The led flashes, but nothing is received.

I tried while (!Serial);, but the code never goes past this while loop. So Serial is never true.

delay(10000) before and after the Serial.begin(9600) also has no effect

(Serial0 works fine with a ftdi breakout board)

I'm stumped. The hardware and sketch are fine, as they work on other OSes. It not the driver as avrdude is able to read and write to the fubarino. Really weird.


majenko

Mon, 20 Jan 2014 17:45:10 +0000

This sketch works perfectly on my Fubarino SD with 795 chip, using UECIDE and the "Fubarino SD" board selected:

void setup() {
  Serial.begin(9600);
  pinMode(PIN_LED1, OUTPUT);
  digitalWrite(PIN_LED1, LOW);
}

void loop() {
  if (Serial.available() > 0) {
    digitalWrite(PIN_LED1, HIGH);
    Serial.print("Pressed 0x");
    Serial.println(Serial.read(), HEX);
    delay(10);
    digitalWrite(PIN_LED1, LOW);
  }
}

beargun

Tue, 21 Jan 2014 18:03:15 +0000

Thanks for your example code majenko. Still the same problem though. Led blinks when sending data. No data is received.

Thanks for all the efforts. I'm going the put in on a shelf for now, and come back to it when I've installed MacOS Mavericks (when I have some spare time). My guess is that there is probably something wrong with my install.


ricklon

Wed, 22 Jan 2014 17:37:22 +0000

This is fixed in the latest test build. I just posted. Please try the 2014-01-21 test build.


hughanderson

Thu, 30 Jan 2014 13:35:26 +0000

Hi,

I have this problem too. I can program the board correctly from my MAC using mpide, but I cannot use the Serial output from the USB/Serial driver.

I program in a simple program to send data to the USB Serial port each second. After programming on the MAC, I can plug the Fubarino SD into a Windows box, and It recognizes the serial port and displays the data from the Fubarino.

But - the USB/Serial Stk500v2 Serial output does not appear to be readable on the MAC. The mac is showing a /dev/tty.usbmodemXXX and /dev/cu.usbmodemXXXX If the program initializes the serial port, but it shows nothing in the mpide terminal, or in Zterm.

Actually I do not think this is specific to the 512H version of the Fubarino. I just plugged in a Seeed one (The "L" version), and it behaves the same way.

Does anyone have ideas? Mavericks? USB/Serial drivers on the MAC? USB/Serial library in the compiler?

I am using the most recent version of mpide, and my OS is up-to-date.

Cheers Hugh


hughanderson

Sun, 02 Feb 2014 02:04:45 +0000

*** UPDATE to this issue

The peculiar behaviour on a MAC has now been confirmed, and raised here:

https://github.com/chipKIT32/chipKIT32-MAX/issues/402

Cheers Hugh