Build to Linux (ubuntu 9.04)

38 views
Skip to first unread message

Jesper Vandborg

unread,
Sep 8, 2009, 7:15:11 AM9/8/09
to pickit-devel
Just as a heads up, this is one of my first time doing a make.

I follow this how to
http://mcuee.blogspot.com/2007/06/pickit-2-under-linux-mini-howto.html

but when I do the make I get these errors

gcc -g -Wall -D_GNU_SOURCE -I/usr/local/include -DLINUX -DUSE_DETACH -
DCLAIM_USB -o pk2main.o -c pk2main.c
In file included from pk2main.c:31:
pk2.h:42:17: error: usb.h: No such file or directory
In file included from pk2main.c:33:
pk2usb.h:32: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘*’ token
pk2main.c: In function ‘enterBootLoader’:
pk2main.c:1307: error: ‘deviceHandle’ undeclared (first use in this
function)
pk2main.c:1307: error: (Each undeclared identifier is reported only
once
pk2main.c:1307: error: for each function it appears in.)
pk2main.c: In function ‘resetFW’:
pk2main.c:1473: error: ‘deviceHandle’ undeclared (first use in this
function)
pk2main.c:1475: warning: implicit declaration of function
‘usb_release_interface’
pk2main.c: In function ‘bootLoadMode’:
pk2main.c:1548: error: ‘deviceHandle’ undeclared (first use in this
function)
pk2main.c: In function ‘main’:
pk2main.c:2040: error: ‘deviceHandle’ undeclared (first use in this
function)
make: *** [pk2main.o] Error 1

Xiaofan Chen

unread,
Sep 8, 2009, 10:00:29 AM9/8/09
to pickit...@googlegroups.com
On Tue, Sep 8, 2009 at 7:15 PM, Jesper Vandborg<gald...@gmail.com> wrote:
>
> Just as a heads up, this is one of my first time doing a make.
>
> I follow this how to
> http://mcuee.blogspot.com/2007/06/pickit-2-under-linux-mini-howto.html
>
> but when I do the make I get these errors
>
> gcc -g -Wall -D_GNU_SOURCE -I/usr/local/include -DLINUX -DUSE_DETACH -
> DCLAIM_USB -o pk2main.o  -c pk2main.c
> In file included from pk2main.c:31:
> pk2.h:42:17: error: usb.h: No such file or directory

Firstly it is recommended now to use pk2cmd for Linux. pk2-2.0x
does not support PICKit 2 firmware v2.x.

pk2cmd is here:
http://www.microchip.com/pickit2

Secondly you need to install libusb-dev package (for both pk2cmd
and pk2).
sudo apt-get install libusb-dev

--
Xiaofan http://mcuee.blogspot.com

Xiaofan Chen

unread,
Sep 8, 2009, 10:05:37 AM9/8/09
to pickit...@googlegroups.com

You may also read this blog entry.
http://mcuee.blogspot.com/2008/04/pk2cmd-linux-port-under-ubuntu.html

Please follow the comments by Peter Restall on the udev rules.

--
Xiaofan http://mcuee.blogspot.com

Reply all
Reply to author
Forward
0 new messages