Candemo.pde

Post Reply
eldoori
Posts: 6
Joined: Thu Jul 21, 2016 2:24 pm

Candemo.pde

Post by eldoori » Tue Aug 30, 2016 2:20 pm

Hi all,

I am trying to use the chipKIT MAX32/chipKIT Network Shield combo for the CAN bus, however the CANdemo.pde does not compile for some reason. I get a lot of "has no member named" and "not declared in this scope" errors. What I did whas to download the libraries from the network shield resource centre (https://reference.digilentinc.com/chipk ... ld_network) and paste them in the mpide sketchbook. I also tried to compile it using the Arduino IDE, however the plib.h library is not embedded in the IDE.

These are all the errors I get:

C:\Users\eldoo\Documents\mpide\libraries\chipKITCAN\chipKITCAN.cpp: In function 'void Can1InterruptHandler()':
C:\Users\eldoo\Documents\mpide\libraries\chipKITCAN\chipKITCAN.cpp:95:14: error: 'volatile struct __IFS1bits_t' has no member named 'CAN1IF'
C:\Users\eldoo\Documents\mpide\libraries\chipKITCAN\chipKITCAN.cpp: At global scope:
C:\Users\eldoo\Documents\mpide\libraries\chipKITCAN\chipKITCAN.cpp:115:58: error: Vector number must be an integer between 0 and 255
C:\Users\eldoo\Documents\mpide\libraries\chipKITCAN\chipKITCAN.cpp: In function 'void Can2InterruptHandler()':
C:\Users\eldoo\Documents\mpide\libraries\chipKITCAN\chipKITCAN.cpp:121:14: error: 'volatile struct __IFS1bits_t' has no member named 'CAN2IF'
C:\Users\eldoo\Documents\mpide\libraries\chipKITCAN\chipKITCAN.cpp: In member function 'void CAN::attachInterrupt(void (*)())':
C:\Users\eldoo\Documents\mpide\libraries\chipKITCAN\chipKITCAN.cpp:191:30: error: 'INT_CAN_1_VECTOR' was not declared in this scope
C:\Users\eldoo\Documents\mpide\libraries\chipKITCAN\chipKITCAN.cpp:193:19: error: 'INT_CAN1' was not declared in this scope
C:\Users\eldoo\Documents\mpide\libraries\chipKITCAN\chipKITCAN.cpp:202:30: error: 'INT_CAN_2_VECTOR' was not declared in this scope
C:\Users\eldoo\Documents\mpide\libraries\chipKITCAN\chipKITCAN.cpp:204:19: error: 'INT_CAN2' was not declared in this scope
C:\Users\eldoo\Documents\mpide\libraries\chipKITCAN\chipKITCAN.cpp: In member function 'void CAN::detachInterrupt()':
C:\Users\eldoo\Documents\mpide\libraries\chipKITCAN\chipKITCAN.cpp:232:19: error: 'INT_CAN1' was not declared in this scope
C:\Users\eldoo\Documents\mpide\libraries\chipKITCAN\chipKITCAN.cpp:241:19: error: 'INT_CAN2' was not declared in this scope

Thank you in advance!

User avatar
majenko
Site Admin
Posts: 2164
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: Candemo.pde

Post by majenko » Tue Aug 30, 2016 3:34 pm

Make sure you have the right board selected in the IDE. That *looks* like it should compile fine, though I haven't actually tested it yet (too busy rebuilding a mail server right now).
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

eldoori
Posts: 6
Joined: Thu Jul 21, 2016 2:24 pm

Re: Candemo.pde

Post by eldoori » Wed Aug 31, 2016 3:18 pm

Thanks again majenko, I do have a different problem now. When I set up a CAN connection to my laptop I can send and reveive from the laptop's side but I can only send from the chipKIT side, the receive doesn't work.

I have a problem much simular to this post: http://www.chipkit.net/forum/viewtopic.php?f=18&t=3122

I have tried his approach, however it didn't work. Do you have any idea what I can do.

Thanks!

Post Reply