Open-Bionics / Beetroot

BETA - Release of the Open Bionics Brunel robotic hand control firmware for the Chestnut board
42 stars 28 forks source link

'SerialUSB' was not declared in this scope #19

Open aaronwoodcox opened 4 years ago

aaronwoodcox commented 4 years ago

I recently updated my Arduino IDE and am now continously hitting a SerialUSB error when compiling. I have since completely uninstalled and then installed the latest Arudino IDE (1.8.13) and latest OpenBionics and SAMD boards, following the Beetroot README.md instructions. I am still encountering the same issue. Where does the SerialUSB definition come from? Is there some dependency issue between the Chestnut board definition and latest IDE or board definitions? Certainly would appreciate any help or suggestions folks might have. Thanks!

Here's the error: /home/aaron/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -c -g -Os -Wall -Wextra -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -DF_CPU=48000000L -DARDUINO=10813 -DARDUINO_SAMD_CHESTNUT -DARDUINO_ARCH_SAMD -DSAMD21G18A -DUSB_VID=0x1209 -DUSB_PID=0xAA0B -DUSBCON "-DUSB_MANUFACTURER=\"Open Bionics\"" "-DUSB_PRODUCT=\"Chestnut\"" -I/home/aaron/.arduino15/packages/arduino/tools/CMSIS/4.5.0/CMSIS/Include/ -I/home/aaron/.arduino15/packages/arduino/tools/CMSIS-Atmel/1.1.0/CMSIS/Device/ATMEL/ -I/home/aaron/.arduino15/packages/openbionics/hardware/samd/1.2.22/cores/arduino -I/home/aaron/.arduino15/packages/openbionics/hardware/samd/1.2.22/variants/chestnut -I/home/aaron/.arduino15/packages/openbionics/hardware/samd/1.2.22/libraries/Wire -I/home/aaron/Arduino/libraries/FingerLib/src /tmp/arduino_build_383486/sketch/EMGControl.cpp -o /tmp/arduino_build_383486/sketch/EMGControl.cpp.o In file included from /tmp/arduino_build_383486/sketch/Globals.h:35:0, from /tmp/arduino_build_383486/sketch/EMGControl.cpp:16: /tmp/arduino_build_383486/sketch/Utils.h: In function 'void serialprintPGM(const char*)': Utils.h:58:18: error: 'SerialUSB' was not declared in this scope

define MYSERIAL SerialUSB

              ^
aaronwoodcox commented 4 years ago

I rolled back Open Bionics from 1.2.22 to 1.2.21 and (although now hitting sam.h issus -- see other open bug for workaround) no longer hitting any SerialUSB problems. Note of potential interest, the 1.2.21 release has the following file where SerialUSB is defined: ./openbionics/hardware/samd/1.2.21/cores/arduino/USB/USBAPI.h:181:extern Serial_ SerialUSB; Unless I am missing something, I do not see any similar definition in the Open Bionics 1.2.22 release. Please advise?

AuroraRAS commented 3 years ago

Copy folder .arduino15/packages/openbionics/hardware/samd/1.2.21/cores/arduino/USB to 1.2.22,

and append that lines to Arduino.h in 1.2.22 package:

// USB Device
#include "USB/USBDesc.h"
#include "USB/USBCore.h"
#include "USB/USBAPI.h"
#include "USB/USB_host.h"

It's seems working.

Fi-Un-ghi-Tu commented 6 months ago

Please bear with weakness in software. Mr Aaron, What did you do in the end? Dear AuroraRAS what do you mean by "append" and whick line should be appended.

It is not quite clear what this is or what needs to be done with it: // USB Device

include "USB/USBDesc.h"

include "USB/USBCore.h"

include "USB/USBAPI.h"

include "USB/USB_host.h"