I'm using my chipkit pro mx4 to try to talk to a pmodOLEDrgb. I'm having trouble just getting off the ground.
I have Adruino IDE 1.6.9 with the chipkit 1.4.0 package installed (manually, the auto install was a spectacular failure) on a windows 7 64bit machine.
I have the right board selected (blink sketch works), but if I include the DSPI library it fails to compile. I'm hoping someone has some ideas for me to try.
(BTW, I'm reasonably competent at C, mostly an FPGA guy, looking to learn the Arduino dialect and love playing with PMODs).
In file included from C:\Program Files (x86)\Arduino\hardware\chipkit-core\pic32\cores\pic32/pins_arduino.h:263:0,
from C:\Program Files (x86)\Arduino\hardware\chipkit-core\pic32\cores\pic32/WProgram.h:9,
from C:\Program Files (x86)\Arduino\hardware\chipkit-core\pic32\libraries\DSPI/DSPI.h:41,
from C:\Program Files (x86)\Arduino\hardware\chipkit-core\pic32\libraries\DSPI\DSPI.cpp:46:
C:\Program Files (x86)\Arduino\hardware\chipkit-core\pic32\libraries\DSPI\DSPI.cpp: In constructor 'DSPI0::DSPI0()':
C:\Program Files (x86)\Arduino\hardware\chipkit-core\pic32\variants\Cerebot_MX4cK/Board_Defs.h:334:22: error: '_SPI2_IPL_IPC' was not declared in this scope
#define _DSPI0_IPL _SPI2_IPL_IPC
^
C:\Program Files (x86)\Arduino\hardware\chipkit-core\pic32\libraries\DSPI\DSPI.cpp:1072:10: note: in expansion of macro '_DSPI0_IPL'
C:\Program Files (x86)\Arduino\hardware\chipkit-core\pic32\variants\Cerebot_MX4cK/Board_Defs.h:335:22: error: '_SPI2_SPL_IPC' was not declared in this scope
#define _DSPI0_SPL _SPI2_SPL_IPC
^
C:\Program Files (x86)\Arduino\hardware\chipkit-core\pic32\libraries\DSPI\DSPI.cpp:1072:38: note: in expansion of macro '_DSPI0_SPL'
exit status 255
Error compiling for board chipKIT Pro MX4.
---------------
I see Board_Defs.h has the references to _SPI2_IPL_IPC and _SPI2_SPL_IPC, but there is no path to those symbol definitions in System_Defs.h given the defines for the __32MX460F512L__ in cpudefs.h. I have not yet found where symbols like _SPI2_BASE_ADDRESS are defined; clearly they are or the compile would bomb out earlier.
I haven't figured out how pic32 interrupts work to add the necessary #define myself.
BTW, if I select the MX4 instead it compiles fine (too bad I don't have one of those).
Question
kennethryan
Hi,
I'm using my chipkit pro mx4 to try to talk to a pmodOLEDrgb. I'm having trouble just getting off the ground.
I have Adruino IDE 1.6.9 with the chipkit 1.4.0 package installed (manually, the auto install was a spectacular failure) on a windows 7 64bit machine.
I have the right board selected (blink sketch works), but if I include the DSPI library it fails to compile. I'm hoping someone has some ideas for me to try.
(BTW, I'm reasonably competent at C, mostly an FPGA guy, looking to learn the Arduino dialect and love playing with PMODs).
Thanks in advance!
ken
----------------
Here is the sketch:
#include <DSPI.h>
void setup() {
}
void loop() {
}
Pretty simple.
------------------
Here is the compiler output:
In file included from C:\Program Files (x86)\Arduino\hardware\chipkit-core\pic32\cores\pic32/pins_arduino.h:263:0,
from C:\Program Files (x86)\Arduino\hardware\chipkit-core\pic32\cores\pic32/WProgram.h:9,
from C:\Program Files (x86)\Arduino\hardware\chipkit-core\pic32\libraries\DSPI/DSPI.h:41,
from C:\Program Files (x86)\Arduino\hardware\chipkit-core\pic32\libraries\DSPI\DSPI.cpp:46:
C:\Program Files (x86)\Arduino\hardware\chipkit-core\pic32\libraries\DSPI\DSPI.cpp: In constructor 'DSPI0::DSPI0()':
C:\Program Files (x86)\Arduino\hardware\chipkit-core\pic32\variants\Cerebot_MX4cK/Board_Defs.h:334:22: error: '_SPI2_IPL_IPC' was not declared in this scope
#define _DSPI0_IPL _SPI2_IPL_IPC
^
C:\Program Files (x86)\Arduino\hardware\chipkit-core\pic32\libraries\DSPI\DSPI.cpp:1072:10: note: in expansion of macro '_DSPI0_IPL'
ipl = ((_DSPI0_IPL & 0x07) << 2) + (_DSPI0_SPL & 0x03);
^
C:\Program Files (x86)\Arduino\hardware\chipkit-core\pic32\variants\Cerebot_MX4cK/Board_Defs.h:335:22: error: '_SPI2_SPL_IPC' was not declared in this scope
#define _DSPI0_SPL _SPI2_SPL_IPC
^
C:\Program Files (x86)\Arduino\hardware\chipkit-core\pic32\libraries\DSPI\DSPI.cpp:1072:38: note: in expansion of macro '_DSPI0_SPL'
ipl = ((_DSPI0_IPL & 0x07) << 2) + (_DSPI0_SPL & 0x03);
^
exit status 255
Error compiling for board chipKIT Pro MX4.
---------------
I see Board_Defs.h has the references to _SPI2_IPL_IPC and _SPI2_SPL_IPC, but there is no path to those symbol definitions in System_Defs.h given the defines for the __32MX460F512L__ in cpudefs.h. I have not yet found where symbols like _SPI2_BASE_ADDRESS are defined; clearly they are or the compile would bomb out earlier.
I haven't figured out how pic32 interrupts work to add the necessary #define myself.
BTW, if I select the MX4 instead it compiles fine (too bad I don't have one of those).
Link to comment
Share on other sites
7 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.