Created Sat, 28 May 2011 02:43:08 +0000 by rb1980
Sat, 28 May 2011 02:43:08 +0000
Hi, I received one of your Max32 at MakerFaire (thank you) and am trying to get up and running with it. When I try to upload even just the Bare Minimum sketch, I get a compile error:
706882 [Thread-6] DEBUG processing.app.Base - DEBUG: Compiler.java: Logging on.
706883 [Thread-6] DEBUG processing.app.Base - DEBUG: Compiler.java: Start Compile(...).
706883 [Thread-6] DEBUG processing.app.Base - avrBasePath: {0}/hardware/pic32/compiler/pic32-tools/bin/
706883 [Thread-6] DEBUG processing.app.Base - corePaths: /home/rob/mpide-0022-chipkit-linux32-20110520/hardware/pic32/cores/pic32
706883 [Thread-6] DEBUG processing.app.Base - 0. getIncludes
706883 [Thread-6] DEBUG processing.app.Base - corePath: /home/rob/mpide-0022-chipkit-linux32-20110520/hardware/pic32/cores/pic32
706883 [Thread-6] DEBUG processing.app.Base - 1. compileSketch
706883 [Thread-6] DEBUG processing.app.Base - compileSketch: start
706884 [Thread-6] DEBUG processing.app.Base - getCommandCompilerCPP: start
706884 [Thread-6] DEBUG processing.app.Base - execAsynchronously: start
pic32-g++: error trying to exec 'cc1plus': execvp: No such file or directory
I have it here:
# locate cc1plus
/usr/lib/gcc/avr/4.3.4/cc1plus
/usr/lib/gcc/i486-linux-gnu/4.4/cc1plus
Do I need that library in my path?
Sun, 29 May 2011 03:20:47 +0000
hmm... well, adding that dir to my path got rid of that error, but now there's a slew of other errors on compile. I'm wondering: is it a problem that I have the Arduino IDE installed also?
65986 [Thread-12] DEBUG processing.app.Base - DEBUG: Compiler.java: Logging on.
65991 [Thread-12] DEBUG processing.app.Base - DEBUG: Compiler.java: Start Compile(...).
65991 [Thread-12] DEBUG processing.app.Base - avrBasePath: {0}/hardware/pic32/compiler/pic32-tools/bin/
65991 [Thread-12] DEBUG processing.app.Base - corePaths: /home/rob/mpide-0022-chipkit-linux32-20110520/hardware/pic32/cores/pic32
65991 [Thread-12] DEBUG processing.app.Base - 0. getIncludes
65991 [Thread-12] DEBUG processing.app.Base - corePath: /home/rob/mpide-0022-chipkit-linux32-20110520/hardware/pic32/cores/pic32
65991 [Thread-12] DEBUG processing.app.Base - 1. compileSketch
65991 [Thread-12] DEBUG processing.app.Base - compileSketch: start
65992 [Thread-12] DEBUG processing.app.Base - getCommandCompilerCPP: start
65992 [Thread-12] DEBUG processing.app.Base - execAsynchronously: start
cc1plus: error: unrecognized command line option "-mconfig-data-dir=/home/rob/mpide-0022-chipkit-linux32-20110520/hardware/pic32/compiler/pic32-tools/bin/../lib/gcc/pic32mx/4.5.1/../../../../pic32mx/lib/./proc/32MX795F512L"
cc1plus: error: unrecognized command line option "-msmart-io=0"
cc1plus: error: unrecognized command line option "-fremove-local-statics"
cc1plus: error: unrecognized command line option "-mno-smart-io"
cc1plus: error: unrecognized command line option "-mprocessor=32MX795F512L"
cc1plus: error: unrecognized command line option "-mips32r2"
cc1plus: error: unrecognized command line option "-mabi=32"
Were there some installation instructions I missed for the ChipKit IDE? (I didn't see any). All I did was untar the .tgz and run ./mpide
PS: this is on Ubuntu 10.04.2 LTS 32bit.
Sun, 29 May 2011 10:31:02 +0000
The two cc1plus files you found are for x86 and avr; you need the one for PIC32. In the Mac and Windows versions, all the binaries are included as part of MPIDE (or with Arudino), but for linux the Arduino code relies on a separate install of the AVR tools (last time I looked, anyway.) I'm not sure what Mpide expects on linux.
On my mac, the file is in: .../hardware/pic32/compiler/pic32-tools/pic32mx/bin/gcc/pic32mx/4.5.1/cc1plus
Mon, 30 May 2011 01:55:33 +0000
Found an issue that the path for Arduino avr-gcc was not being used so the system default avr-gcc is being called instead for sketch. I just filed the following issue for this: https://github.com/chipKIT32/chipKIT32-MAX/issues/44
Mon, 30 May 2011 02:36:34 +0000
Pardon on further review. The standard distribution for Ubuntu Linux Arduino 0022 uses the system avr-gcc instead of the bundled version.
sudo apt-get install avr-libc avrdude binutils-avr gcc-avr
That should fix the problem you're having.
Mon, 30 May 2011 17:32:33 +0000
Thanks for bearing with me on this. Your last suggestion didn't help, as all those packages were already installed and up to date.
$ sudo apt-get install avr-libc avrdude binutils-avr gcc-avr
Reading package lists... Done
Building dependency tree
Reading state information... Done
avr-libc is already the newest version.
avrdude is already the newest version.
binutils-avr is already the newest version.
binutils-avr set to manually installed.
gcc-avr is already the newest version.
gcc-avr set to manually installed.
I noticed that I had the "regular" Arduino 0018 IDE installed from this PPA: http://ppa.launchpad.net/arduino-ubuntu-team/ppa/ubuntu So I went ahead and removed it, and re-installed all of the packages you listed. I also found another cc1plus under ./hardware/pic32/compiler/pic32-tools/pic32mx/bin/gcc/pic32mx/4.5.1/cc1plus (perhaps locate hadn't indexed it yet before), so I added that dir to the path and chmod +x cc1plus.
All the previous errors are gone, but now when I try to compile I'm getting this:
3750 [Thread-3] DEBUG processing.app.Base - DEBUG: Compiler.java: Logging on.
3751 [Thread-3] DEBUG processing.app.Base - DEBUG: Compiler.java: Start Compile(...).
3761 [Thread-3] DEBUG processing.app.Base - avrBasePath: {0}/hardware/pic32/compiler/pic32-tools/bin/
3773 [Thread-3] DEBUG processing.app.Base - corePaths: /home/rob/mpide-0022-chipkit-linux32-20110520/hardware/pic32/cores/pic32
3773 [Thread-3] DEBUG processing.app.Base - 0. getIncludes
3773 [Thread-3] DEBUG processing.app.Base - corePath: /home/rob/mpide-0022-chipkit-linux32-20110520/hardware/pic32/cores/pic32
3773 [Thread-3] DEBUG processing.app.Base - 1. compileSketch
3773 [Thread-3] DEBUG processing.app.Base - compileSketch: start
3774 [Thread-3] DEBUG processing.app.Base - getCommandCompilerCPP: start
3781 [Thread-3] DEBUG processing.app.Base - execAsynchronously: start
as: unrecognized option '-O2'
Seems I'm a little closer...
Mon, 30 May 2011 17:54:13 +0000
PS: moderators, perhaps this thread should be moved under "multiplatform IDE"?
Mon, 30 May 2011 18:17:17 +0000
I think I got it! I had to:
chmod +x -R ./hardware/pic32/compiler/
Now the sketches are compling without error and I was able to upload one to the Max32. Bravo, I am off and running!
Tue, 31 May 2011 03:23:23 +0000
Thanks for working through that.
The build process has a command that explicitly sets those files as executable, and then everything gets compressed. Somewhere in the extraction process it lost the executable permissions.