换了1.6.10的arduino,可以编译了,可是编译can例子的时候,出现问题:
Arduino:1.6.10 (Windows 7), 开发板:"NuMaker UNO"
In file included from C:\Users\Administrator\AppData\Local\Arduino15\packages\nuvoton\hardware\nuvoton\1.6.10\cores\nuvoton/Arduino.h:26:0,
from sketch\send.ino.cpp:1:
C:\Users\Administrator\AppData\Local\Arduino15\packages\nuvoton\hardware\nuvoton\1.6.10\system/NUC131/Device/Nuvoton/NUC131/Include/NUC131.h:11065:29: error: expected identifier before '(' token
#define CAN ((CAN_T *) CAN0_BASE)
^
C:\Users\Administrator\AppData\Local\Arduino15\packages\nuvoton\hardware\nuvoton\1.6.10\libraries\CAN_BUS/can_.h:13:7: note: in expansion of macro 'CAN'
class CAN
^
C:\Users\Administrator\AppData\Local\Arduino15\packages\nuvoton\hardware\nuvoton\1.6.10\system/NUC131/Device/Nuvoton/NUC131/Include/NUC131.h:11065:37: error: expected ')' before '*' token
#define CAN ((CAN_T *) CAN0_BASE)
^
C:\Users\Administrator\AppData\Local\Arduino15\packages\nuvoton\hardware\nuvoton\1.6.10\libraries\CAN_BUS/can_.h:13:7: note: in expansion of macro 'CAN'
class CAN
^
C:\Users\Administrator\AppData\Local\Arduino15\packages\nuvoton\hardware\nuvoton\1.6.10\system/NUC131/Device/Nuvoton/NUC131/Include/NUC131.h:11065:37: error: expected ')' before '*' token
#define CAN ((CAN_T *) CAN0_BASE)
^
C:\Users\Administrator\AppData\Local\Arduino15\packages\nuvoton\hardware\nuvoton\1.6.10\libraries\CAN_BUS/can_.h:13:7: note: in expansion of macro 'CAN'
class CAN
^
C:\Users\Administrator\AppData\Local\Arduino15\packages\nuvoton\hardware\nuvoton\1.6.10\system/NUC131/Device/Nuvoton/NUC131/Include/NUC131.h:11065:37: error: expected ')' before '*' token
#define CAN ((CAN_T *) CAN0_BASE)
^
C:\Users\Administrator\AppData\Local\Arduino15\packages\nuvoton\hardware\nuvoton\1.6.10\libraries\CAN_BUS\examples\send\send.ino:5:1: note: in expansion of macro 'CAN'
CAN CAN_0;
^
C:\Users\Administrator\AppData\Local\Arduino15\packages\nuvoton\hardware\nuvoton\1.6.10\system/NUC131/Device/Nuvoton/NUC131/Include/NUC131.h:11065:37: error: expected ')' before '*' token
#define CAN ((CAN_T *) CAN0_BASE)
^
C:\Users\Administrator\AppData\Local\Arduino15\packages\nuvoton\hardware\nuvoton\1.6.10\libraries\CAN_BUS\examples\send\send.ino:5:1: note: in expansion of macro 'CAN'
CAN CAN_0;
^
C:\Users\Administrator\AppData\Local\Arduino15\packages\nuvoton\hardware\nuvoton\1.6.10\libraries\CAN_BUS\examples\send\send.ino: In function 'void setup()':
send:13: error: 'CAN_0' was not declared in this scope
if(CAN_OK == CAN_0.begin(CAN_500KBPS)) // init can bus : baudrate = 500k
^
C:\Users\Administrator\AppData\Local\Arduino15\packages\nuvoton\hardware\nuvoton\1.6.10\libraries\CAN_BUS\examples\send\send.ino: In function 'void loop()':
send:30: error: 'CAN_0' was not declared in this scope
CAN_0.sendMsgBuf(0x00, 0, 8, stmp);
^
exit status 1
'CAN_0' was not declared in this scope
Using proxy DIRECT
Using proxy DIRECT
Using proxy DIRECT
Using proxy DIRECT
Using proxy DIRECT
在文件 -> 首选项开启
“编译过程中显示详细输出”选项
这份报告会包含更多信息。
怎样解决?
另外:arduino都支持哪些芯片? |