femtoduino / ArduinoCore-atsamd21e18a

Arduino Core and Bootloader for the ATMEL SAM D21/R21 (E Variant) chips.
https://femto.io
29 stars 15 forks source link

Compilation error #11

Closed allenyin closed 7 years ago

allenyin commented 7 years ago

Hi Femtoduino,

I got the FemtoBeacon starter kit from Tindie (https://www.tindie.com/products/femtoduino/femtobeacon-kit-starter/?pt=full_prod_search). Trying to use it through Arduino IDE on Ubuntu14.04. I followed the instructions outlined to:

1) Download and install Arduino 1.8.1 2) Installed through board manager "Atmel SAM D21/R21 core (ATSAMD21E18A/ATSAMR21E18A)" by Femtoduino" (stable release) 3) Copied the LwMesh ("https://github.com/femtoduino/library-atmel-lwm/tree/at86rf233") to the Arduino libaries/ directory . 4) Copied the folders in libraries/ directory of FreeIMU-Updates repo (https://github.com/femtoduino/FreeIMU-Updates) to Arduino's libraries/ directory. In FreeIMU/FreeIMU.h, the board is set to #define MPU9250_5611.

The problems I see: 1) Plugging in the Femto-beacon RF-dongle, lsusb does not detect the device. 2) Plugging in the Femto-beacon coin itself, lsusb sees it as Bus 003 Device 007: ID 03eb:6124 Atmel Corp. at91sam SAMBA bootloader. However, when I tried to compile example files (I have tried FemtoBeacon_RF_MESH_IMU_Coin, FemtoBeacon_Rf_FreeIMU_raw, and FemtoBeacon_Rf_FreeIMU_YPR), all give me the following error:

In file included from /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/bootloaders/zero_osc32k/ATMEL/samr21/include/samr21.h:37:0,
                 from /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/bootloaders/zero_osc32k/ATMEL/samr.h:37,
                 from /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/bootloaders/zero_osc32k/ATMEL/sam.h:589,
                 from /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/Arduino.h:48,
                 from sketch/FemtoBeacon_Rf_FreeIMU_raw.ino.cpp:1:
/home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/bootloaders/zero_osc32k/ATMEL/samr21/include/samr21e18a.h:240:26: fatal error: core_cm0plus.h: No such file or directory
 #include <core_cm0plus.h>
                          ^
compilation terminated.
exit status 1
Error compiling for board Atmel ATSAMR21E18A (Native USB Port).

Note that I've done this through both Native USB Port and Programming Port.

I'm not sure where core_cm0plus.h is or where I can find it. Please help.

Thanks, Allen

zrecore commented 7 years ago

Hi Allen, have you installed the Arduino SAM Boards (ARM Cortex M0+) board package yet?

On Feb 22, 2017 7:01 PM, "Allen Yin" notifications@github.com wrote:

Hi Femtoduino,

I got the FemtoBeacon starter kit from Tindie (https://www.tindie.com/ products/femtoduino/femtobeacon-kit-starter/?pt=full_prod_search). Trying to use it through Arduino IDE on Ubuntu14.04. I followed the instructions outlined to:

  1. Download and install Arduino 1.8.1
  2. Installed through board manager "Atmel SAM D21/R21 core (ATSAMD21E18A/ATSAMR21E18A)" by Femtoduino" (stable release)
  3. Copied the LwMesh ("https://github.com/femtoduino/library-atmel-lwm/ tree/at86rf233") to the Arduino libaries/ directory .
  4. Copied the folders in libraries/ directory of FreeIMU-Updates repo ( https://github.com/femtoduino/FreeIMU-Updates https://github.com/femtoduino/FreeIMU-Updates) to Arduino's libraries/ directory. In FreeIMU/FreeIMU.h, the board is set to #define MPU9250_5611 .

The problems I see:

  1. Plugging in the Femto-beacon RF-dongle, lsusb does not detect the device.
  2. Plugging in the Femto-beacon coin itself, lsusb sees it as Bus 003 Device 007: ID 03eb:6124 Atmel Corp. at91sam SAMBA bootloader. However, when I tried to compile example files (I have tried FemtoBeacon_RF_MESH_IMU_Coin, FemtoBeacon_Rf_FreeIMU_raw, and FemtoBeacon_Rf_FreeIMU_YPR), all give me the following error:

In file included from /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/bootloaders/zero_osc32k/ATMEL/samr21/include/samr21.h:37:0, from /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/bootloaders/zero_osc32k/ATMEL/samr.h:37, from /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/bootloaders/zero_osc32k/ATMEL/sam.h:589, from /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/Arduino.h:48, from sketch/FemtoBeacon_Rf_FreeIMU_raw.ino.cpp:1: /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/bootloaders/zero_osc32k/ATMEL/samr21/include/samr21e18a.h:240:26: fatal error: core_cm0plus.h: No such file or directory

include

                      ^

compilation terminated. exit status 1 Error compiling for board Atmel ATSAMR21E18A (Native USB Port).

Note that I've done this through both Native USB Port and Programming Port.

I'm not sure where core_cm0plus.h is or where I can find it. Please help.

Thanks, Allen

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/femtoduino/ArduinoCore-atsamd21e18a/issues/11, or mute the thread https://github.com/notifications/unsubscribe-auth/AAaLbCpusHqj37JgCkvKEdvG71uVqHVeks5rfPaUgaJpZM4MJe8e .

allenyin commented 7 years ago

Ah no, I missed that step.

After installing Arduino SAMD Boards (32-bits ARM Cortex-M0+), lsusb still can't detect the dongle.

Compiling the previous code now gives me different error:

In file included from /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/USBCore.cpp:21:0:
/home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h: In member function 'bool USBDevice_SAMD21G18x::epBank0IsStalled(ep_t)':
/home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h:94:96: error: 'volatile struct USB_DEVICE_EPINTFLAG_Type::<anonymous>' has no member named 'STALL0'
  inline bool epBank0IsStalled(ep_t ep)           { return usb.DeviceEndpoint[ep].EPINTFLAG.bit.STALL0; }
                                                                                                ^
/home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h: In member function 'bool USBDevice_SAMD21G18x::epBank1IsStalled(ep_t)':
/home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h:95:96: error: 'volatile struct USB_DEVICE_EPINTFLAG_Type::<anonymous>' has no member named 'STALL1'
  inline bool epBank1IsStalled(ep_t ep)           { return usb.DeviceEndpoint[ep].EPINTFLAG.bit.STALL1; }
                                                                                                ^
/home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h: In member function 'bool USBDevice_SAMD21G18x::epBank0IsTransferComplete(ep_t)':
/home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h:96:96: error: 'volatile struct USB_DEVICE_EPINTFLAG_Type::<anonymous>' has no member named 'TRCPT0'
  inline bool epBank0IsTransferComplete(ep_t ep)  { return usb.DeviceEndpoint[ep].EPINTFLAG.bit.TRCPT0; }
                                                                                                ^
/home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h: In member function 'bool USBDevice_SAMD21G18x::epBank1IsTransferComplete(ep_t)':
/home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h:97:96: error: 'volatile struct USB_DEVICE_EPINTFLAG_Type::<anonymous>' has no member named 'TRCPT1'
  inline bool epBank1IsTransferComplete(ep_t ep)  { return usb.DeviceEndpoint[ep].EPINTFLAG.bit.TRCPT1; }
                                                                                                ^
/home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h: In member function 'void USBDevice_SAMD21G18x::epBank0EnableStalled(ep_t)':
/home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h:106:93: error: 'volatile struct USB_DEVICE_EPINTENSET_Type::<anonymous>' has no member named 'STALL0'
  inline void epBank0EnableStalled(ep_t ep)          { usb.DeviceEndpoint[ep].EPINTENSET.bit.STALL0 = 1; }
                                                                                             ^
/home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h: In member function 'void USBDevice_SAMD21G18x::epBank1EnableStalled(ep_t)':
/home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h:107:93: error: 'volatile struct USB_DEVICE_EPINTENSET_Type::<anonymous>' has no member named 'STALL1'
  inline void epBank1EnableStalled(ep_t ep)          { usb.DeviceEndpoint[ep].EPINTENSET.bit.STALL1 = 1; }
                                                                                             ^
/home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h: In member function 'void USBDevice_SAMD21G18x::epBank0EnableTransferComplete(ep_t)':
/home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h:108:93: error: 'volatile struct USB_DEVICE_EPINTENSET_Type::<anonymous>' has no member named 'TRCPT0'
  inline void epBank0EnableTransferComplete(ep_t ep) { usb.DeviceEndpoint[ep].EPINTENSET.bit.TRCPT0 = 1; }
                                                                                             ^
/home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h: In member function 'void USBDevice_SAMD21G18x::epBank1EnableTransferComplete(ep_t)':
/home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h:109:93: error: 'volatile struct USB_DEVICE_EPINTENSET_Type::<anonymous>' has no member named 'TRCPT1'
  inline void epBank1EnableTransferComplete(ep_t ep) { usb.DeviceEndpoint[ep].EPINTENSET.bit.TRCPT1 = 1; }
                                                                                             ^
/home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h: In member function 'void USBDevice_SAMD21G18x::epBank0DisableStalled(ep_t)':
/home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h:112:94: error: 'volatile struct USB_DEVICE_EPINTENCLR_Type::<anonymous>' has no member named 'STALL0'
  inline void epBank0DisableStalled(ep_t ep)          { usb.DeviceEndpoint[ep].EPINTENCLR.bit.STALL0 = 1; }
                                                                                              ^
/home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h: In member function 'void USBDevice_SAMD21G18x::epBank1DisableStalled(ep_t)':
/home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h:113:94: error: 'volatile struct USB_DEVICE_EPINTENCLR_Type::<anonymous>' has no member named 'STALL1'
  inline void epBank1DisableStalled(ep_t ep)          { usb.DeviceEndpoint[ep].EPINTENCLR.bit.STALL1 = 1; }
                                                                                              ^
/home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h: In member function 'void USBDevice_SAMD21G18x::epBank0DisableTransferComplete(ep_t)':
/home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h:114:94: error: 'volatile struct USB_DEVICE_EPINTENCLR_Type::<anonymous>' has no member named 'TRCPT0'
  inline void epBank0DisableTransferComplete(ep_t ep) { usb.DeviceEndpoint[ep].EPINTENCLR.bit.TRCPT0 = 1; }
                                                                                              ^
/home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h: In member function 'void USBDevice_SAMD21G18x::epBank1DisableTransferComplete(ep_t)':
/home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h:115:94: error: 'volatile struct USB_DEVICE_EPINTENCLR_Type::<anonymous>' has no member named 'TRCPT1'
  inline void epBank1DisableTransferComplete(ep_t ep) { usb.DeviceEndpoint[ep].EPINTENCLR.bit.TRCPT1 = 1; }
                                                                                              ^
/home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h: In member function 'void USBDevice_SAMD21G18x::epBank0SetStallReq(ep_t)':
/home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h:125:85: error: 'volatile struct USB_DEVICE_EPSTATUSSET_Type::<anonymous>' has no member named 'STALLRQ0'
  inline void epBank0SetStallReq(ep_t ep)   { usb.DeviceEndpoint[ep].EPSTATUSSET.bit.STALLRQ0 = 1; }
                                                                                     ^
/home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h: In member function 'void USBDevice_SAMD21G18x::epBank1SetStallReq(ep_t)':
/home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h:126:85: error: 'volatile struct USB_DEVICE_EPSTATUSSET_Type::<anonymous>' has no member named 'STALLRQ1'
  inline void epBank1SetStallReq(ep_t ep)   { usb.DeviceEndpoint[ep].EPSTATUSSET.bit.STALLRQ1 = 1; }
                                                                                     ^
/home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h: In member function 'void USBDevice_SAMD21G18x::epBank0ResetStallReq(ep_t)':
/home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h:127:85: error: 'volatile struct USB_DEVICE_EPSTATUSCLR_Type::<anonymous>' has no member named 'STALLRQ0'
  inline void epBank0ResetStallReq(ep_t ep) { usb.DeviceEndpoint[ep].EPSTATUSCLR.bit.STALLRQ0 = 1; }
                                                                                     ^
/home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h: In member function 'void USBDevice_SAMD21G18x::epBank1ResetStallReq(ep_t)':
/home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h:128:85: error: 'volatile struct USB_DEVICE_EPSTATUSCLR_Type::<anonymous>' has no member named 'STALLRQ1'
  inline void epBank1ResetStallReq(ep_t ep) { usb.DeviceEndpoint[ep].EPSTATUSCLR.bit.STALLRQ1 = 1; }
                                                                                     ^
Multiple libraries were found for "I2Cdev.h"
 Used: /home/allenyin/Arduino/libraries/I2Cdev
 Not used: /home/allenyin/Arduino/libraries/MotionDriver
exit status 1
Error compiling for board Atmel ATSAMR21E18A (Programming Port).

I'm missing some sort of definitions again?

zrecore commented 7 years ago

Make sure to select "Atmel ATSAMR21E18A (Native USB)" as the board type.

zrecore commented 7 years ago

...also, remove the MotionDriver library

On Feb 22, 2017 7:29 PM, "Alex Albino" webmaster@alexventure.com wrote:

Make sure to select "Atmel ATSAMR21E18A (Native USB)" as the board type.

On Feb 22, 2017 7:17 PM, "Allen Yin" notifications@github.com wrote:

Ah no, I missed that step.

After installing Arduino SAMD Boards (32-bits ARM Cortex-M0+), lsusb still can't detect the dongle.

Compiling the previous code now gives me different error:

In file included from /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/USBCore.cpp:21:0: /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h: In member function 'bool USBDevice_SAMD21G18x::epBank0IsStalled(ep_t)': /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h:94:96: error: 'volatile struct USB_DEVICE_EPINTFLAG_Type::' has no member named 'STALL0' inline bool epBank0IsStalled(ep_t ep) { return usb.DeviceEndpoint[ep].EPINTFLAG.bit.STALL0; } ^ /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h: In member function 'bool USBDevice_SAMD21G18x::epBank1IsStalled(ep_t)': /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h:95:96: error: 'volatile struct USB_DEVICE_EPINTFLAG_Type::' has no member named 'STALL1' inline bool epBank1IsStalled(ep_t ep) { return usb.DeviceEndpoint[ep].EPINTFLAG.bit.STALL1; } ^ /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h: In member function 'bool USBDevice_SAMD21G18x::epBank0IsTransferComplete(ep_t)': /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h:96:96: error: 'volatile struct USB_DEVICE_EPINTFLAG_Type::' has no member named 'TRCPT0' inline bool epBank0IsTransferComplete(ep_t ep) { return usb.DeviceEndpoint[ep].EPINTFLAG.bit.TRCPT0; } ^ /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h: In member function 'bool USBDevice_SAMD21G18x::epBank1IsTransferComplete(ep_t)': /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h:97:96: error: 'volatile struct USB_DEVICE_EPINTFLAG_Type::' has no member named 'TRCPT1' inline bool epBank1IsTransferComplete(ep_t ep) { return usb.DeviceEndpoint[ep].EPINTFLAG.bit.TRCPT1; } ^ /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h: In member function 'void USBDevice_SAMD21G18x::epBank0EnableStalled(ep_t)': /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h:106:93: error: 'volatile struct USB_DEVICE_EPINTENSET_Type::' has no member named 'STALL0' inline void epBank0EnableStalled(ep_t ep) { usb.DeviceEndpoint[ep].EPINTENSET.bit.STALL0 = 1; } ^ /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h: In member function 'void USBDevice_SAMD21G18x::epBank1EnableStalled(ep_t)': /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h:107:93: error: 'volatile struct USB_DEVICE_EPINTENSET_Type::' has no member named 'STALL1' inline void epBank1EnableStalled(ep_t ep) { usb.DeviceEndpoint[ep].EPINTENSET.bit.STALL1 = 1; } ^ /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h: In member function 'void USBDevice_SAMD21G18x::epBank0EnableTransferComplete(ep_t)': /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h:108:93: error: 'volatile struct USB_DEVICE_EPINTENSET_Type::' has no member named 'TRCPT0' inline void epBank0EnableTransferComplete(ep_t ep) { usb.DeviceEndpoint[ep].EPINTENSET.bit.TRCPT0 = 1; } ^ /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h: In member function 'void USBDevice_SAMD21G18x::epBank1EnableTransferComplete(ep_t)': /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h:109:93: error: 'volatile struct USB_DEVICE_EPINTENSET_Type::' has no member named 'TRCPT1' inline void epBank1EnableTransferComplete(ep_t ep) { usb.DeviceEndpoint[ep].EPINTENSET.bit.TRCPT1 = 1; } ^ /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h: In member function 'void USBDevice_SAMD21G18x::epBank0DisableStalled(ep_t)': /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h:112:94: error: 'volatile struct USB_DEVICE_EPINTENCLR_Type::' has no member named 'STALL0' inline void epBank0DisableStalled(ep_t ep) { usb.DeviceEndpoint[ep].EPINTENCLR.bit.STALL0 = 1; } ^ /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h: In member function 'void USBDevice_SAMD21G18x::epBank1DisableStalled(ep_t)': /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h:113:94: error: 'volatile struct USB_DEVICE_EPINTENCLR_Type::' has no member named 'STALL1' inline void epBank1DisableStalled(ep_t ep) { usb.DeviceEndpoint[ep].EPINTENCLR.bit.STALL1 = 1; } ^ /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h: In member function 'void USBDevice_SAMD21G18x::epBank0DisableTransferComplete(ep_t)': /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h:114:94: error: 'volatile struct USB_DEVICE_EPINTENCLR_Type::' has no member named 'TRCPT0' inline void epBank0DisableTransferComplete(ep_t ep) { usb.DeviceEndpoint[ep].EPINTENCLR.bit.TRCPT0 = 1; } ^ /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h: In member function 'void USBDevice_SAMD21G18x::epBank1DisableTransferComplete(ep_t)': /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h:115:94: error: 'volatile struct USB_DEVICE_EPINTENCLR_Type::' has no member named 'TRCPT1' inline void epBank1DisableTransferComplete(ep_t ep) { usb.DeviceEndpoint[ep].EPINTENCLR.bit.TRCPT1 = 1; } ^ /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h: In member function 'void USBDevice_SAMD21G18x::epBank0SetStallReq(ep_t)': /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h:125:85: error: 'volatile struct USB_DEVICE_EPSTATUSSET_Type::' has no member named 'STALLRQ0' inline void epBank0SetStallReq(ep_t ep) { usb.DeviceEndpoint[ep].EPSTATUSSET.bit.STALLRQ0 = 1; } ^ /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h: In member function 'void USBDevice_SAMD21G18x::epBank1SetStallReq(ep_t)': /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h:126:85: error: 'volatile struct USB_DEVICE_EPSTATUSSET_Type::' has no member named 'STALLRQ1' inline void epBank1SetStallReq(ep_t ep) { usb.DeviceEndpoint[ep].EPSTATUSSET.bit.STALLRQ1 = 1; } ^ /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h: In member function 'void USBDevice_SAMD21G18x::epBank0ResetStallReq(ep_t)': /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h:127:85: error: 'volatile struct USB_DEVICE_EPSTATUSCLR_Type::' has no member named 'STALLRQ0' inline void epBank0ResetStallReq(ep_t ep) { usb.DeviceEndpoint[ep].EPSTATUSCLR.bit.STALLRQ0 = 1; } ^ /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h: In member function 'void USBDevice_SAMD21G18x::epBank1ResetStallReq(ep_t)': /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h:128:85: error: 'volatile struct USB_DEVICE_EPSTATUSCLR_Type::' has no member named 'STALLRQ1' inline void epBank1ResetStallReq(ep_t ep) { usb.DeviceEndpoint[ep].EPSTATUSCLR.bit.STALLRQ1 = 1; } ^ Multiple libraries were found for "I2Cdev.h" Used: /home/allenyin/Arduino/libraries/I2Cdev Not used: /home/allenyin/Arduino/libraries/MotionDriver exit status 1 Error compiling for board Atmel ATSAMR21E18A (Programming Port).

I'm missing some sort of definitions again?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/femtoduino/ArduinoCore-atsamd21e18a/issues/11#issuecomment-281881619, or mute the thread https://github.com/notifications/unsubscribe-auth/AAaLbGGMkihh3pTNoOEz0PzWIQNyw4ATks5rfPoygaJpZM4MJe8e .

allenyin commented 7 years ago

Removed the MotionDriver library, using Atmel ATSAMR21E18A (Native USB Port) as the board type.

Got pretty much the same errors (minus the Motiondriver and I2Cdev.h). The last few lines shown below:

/home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h: In member function 'void USBDevice_SAMD21G18x::epBank1ResetStallReq(ep_t)':
/home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h:128:85: error: 'volatile struct USB_DEVICE_EPSTATUSCLR_Type::<anonymous>' has no member named 'STALLRQ1'
  inline void epBank1ResetStallReq(ep_t ep) { usb.DeviceEndpoint[ep].EPSTATUSCLR.bit.STALLRQ1 = 1; }
                                                                                     ^
exit status 1
Error compiling for board Atmel ATSAMR21E18A (Native USB Port).
zrecore commented 7 years ago

Try using Arduino SAMD Boards (32-bits ARM Cortex M0+) version 1.6.11 ... Instead of 1.6.12

I suspect their 1.6.12 package causes breaking changes with my customizations.

On Feb 22, 2017 7:53 PM, "Allen Yin" notifications@github.com wrote:

Removed the MotionDriver library, using Atmel ATSAMR21E18A (Native USB Port) as the board type.

Got pretty much the same errors (minus the Motiondriver and I2Cdev.h). The last few lines shown below:

/home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h: In member function 'void USBDevice_SAMD21G18x::epBank1ResetStallReq(ep_t)': /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/1.7.6/cores/arduino_osc32k/USB/SAMD21_USBDevice.h:128:85: error: 'volatile struct USB_DEVICE_EPSTATUSCLR_Type::' has no member named 'STALLRQ1' inline void epBank1ResetStallReq(ep_t ep) { usb.DeviceEndpoint[ep].EPSTATUSCLR.bit.STALLRQ1 = 1; } ^ exit status 1 Error compiling for board Atmel ATSAMR21E18A (Native USB Port).

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/femtoduino/ArduinoCore-atsamd21e18a/issues/11#issuecomment-281887330, or mute the thread https://github.com/notifications/unsubscribe-auth/AAaLbPjKgwckZ53isdxp9IexvCtMDcZEks5rfQK7gaJpZM4MJe8e .

allenyin commented 7 years ago

So I did a clean install of Arduino 1.8.11, used Arduino SAMD Boards version 1.6.11, but then changed from stable-release to hourly build.

Now I can detect both the coin and the dongle when plugged in.

Running the FemtoBeacon_Rf_FreeIMU_raw with the coin plugged in, I can compile and upload the code successfully. The serial monitor and plotter gives me real-time IMU results after a slight delay. Good news!

I am also able to compile and upload to the FemtoBeacon Dongle. Although I am unsure of which (if any) of the example code can be used to check the Dongle's functionality.


One last question on running the FemtoBeacon Dongle with multiple FemtoBeacon Coins..I'm guessing the coins need to be uploaded the FemtoBeacon_Rf_Wireless_Data or FemtoBeacon_Rf_MESH_IMU_Coin while the Dongle with FemtoBeacon_Rf_MESH_IMU_Dongle?

For both FemtoBeacon_Rf_MESH_IMU_Coin and FemtoBeacon_Rf_MESH_IMU_Dongle, compilation gives the following error:

In file included from /home/allenyin/Arduino/libraries/at88rf233/src/lwm/sys/../nwk/../nwk/nwkRoute.h:55:0,
                 from /home/allenyin/Arduino/libraries/at88rf233/src/lwm/sys/../nwk/nwk.h:57,
                 from /home/allenyin/Arduino/libraries/at88rf233/src/lwm/sys/sys.h:56,
                 from /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/9.9.9-Hourly/libraries/FemtoBeacon_Rf/FemtoBeacon_Rf_MESH_IMU_Coin/FemtoBeacon_Rf_MESH_IMU_Coin.ino:29:
/home/allenyin/Arduino/libraries/at88rf233/src/lwm/sys/../nwk/../nwk/../sys/sysTypes.h:115:24: fatal error: avr/io.h: No such file or directory
     #include <avr/io.h>
                        ^
compilation terminated.
Using library Wire at version 1.0 in folder: /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/9.9.9-Hourly/libraries/Wire 
Using library SPI at version 1.0 in folder: /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/9.9.9-Hourly/libraries/SPI 
Using library at88rf233 at version 1.1.1 in folder: /home/allenyin/Arduino/libraries/at88rf233 
exit status 1
Error compiling for board Atmel ATSAMR21E18A (Native USB Port).

Using Arduino SAMD Boards (32-bits ARM Cortex M0+) version 1.6.11 does not solve the compilation error...but the linking process doesn't seem very transparent to me..

Thanks for all the help!

zrecore commented 7 years ago

I have "Arduino AVR Boards" version 1.6.7 installed. I'll update the installation instructions on https://femtoduino.com

Install that version of AVR boards and give it a go.

zrecore commented 7 years ago

The MESH IMU Coin and MESH IMU Dongle examples go together.

On Feb 22, 2017 10:25 PM, wrote:

I have "Arduino AVR Boards" version 1.6.7 installed. I'll update the installation instructions on https://femtoduino.com

Install that version of AVR boards and give it a go.

On Feb 22, 2017 10:23 PM, "Allen Yin" notifications@github.com wrote:

So I did a clean install of Arduino 1.8.11, used Arduino SAMD Boards version 1.6.11, but then changed from stable-release to hourly build.

Now I can detect both the coin and the dongle when plugged in.

Running the FemtoBeacon_Rf_FreeIMU_raw with the coin plugged in, I can compile and upload the code successfully. The serial monitor and plotter gives me real-time IMU results after a slight delay. Good news! I am also able to compile and upload to the FemtoBeacon Dongle. Although I am unsure of which (if any) of the example code can be used to check the Dongle's functionality.

One last question on running the FemtoBeacon Dongle with multiple FemtoBeacon Coins..I'm guessing the coins need to be uploaded the FemtoBeacon_Rf_Wireless_Data or FemtoBeacon_Rf_MESH_IMU_Coin while the Dongle with FemtoBeacon_Rf_MESH_IMU_Dongle?

For both FemtoBeacon_Rf_MESH_IMU_Coin and FemtoBeacon_Rf_MESH_IMU_Dongle, compilation gives the following error:

In file included from /home/allenyin/Arduino/libraries/at88rf233/src/lwm/sys/../nwk/../nwk/nwkRoute.h:55:0, from /home/allenyin/Arduino/libraries/at88rf233/src/lwm/sys/../nwk/nwk.h:57, from /home/allenyin/Arduino/libraries/at88rf233/src/lwm/sys/sys.h:56, from /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/9.9.9-Hourly/libraries/FemtoBeacon_Rf/FemtoBeacon_Rf_MESH_IMU_Coin/FemtoBeacon_Rf_MESH_IMU_Coin.ino:29: /home/allenyin/Arduino/libraries/at88rf233/src/lwm/sys/../nwk/../nwk/../sys/sysTypes.h:115:24: fatal error: avr/io.h: No such file or directory

include <avr/io.h>

                    ^

compilation terminated. Using library Wire at version 1.0 in folder: /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/9.9.9-Hourly/libraries/Wire Using library SPI at version 1.0 in folder: /home/allenyin/.arduino15/packages/femtoduino/hardware/samd/9.9.9-Hourly/libraries/SPI Using library at88rf233 at version 1.1.1 in folder: /home/allenyin/Arduino/libraries/at88rf233 exit status 1 Error compiling for board Atmel ATSAMR21E18A (Native USB Port).

I will try using version 1.6.11 to see if it goes away...but the linking process doesn't seem very transparent to me..

Thanks for all the help!

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/femtoduino/ArduinoCore-atsamd21e18a/issues/11#issuecomment-281905897, or mute the thread https://github.com/notifications/unsubscribe-auth/AAaLbEVbfp7-SbvLXTG5HP1rMn9HtLNPks5rfSXQgaJpZM4MJe8e .

allenyin commented 7 years ago

Ok, solved the problem -- turns out I checked out the wrong branch of the femtoduino fork of library-atmel-lwm.

I am now able to get the MESH IMU Coin and MESH IMU Dongle examples to work.

In your instructions on https://femtoduino.com/examples/setup, you mention installing the RTCZero library. What functionality does this serve?

zrecore commented 7 years ago

We modified the Arduino Zero Real-Time clock library to use the Ultra-Low Power 32KHz clock (OSCULP32K), as there is no external 32KHz pins (XOSC32K), and the internal OSC32K clock is notoriously jittery on all SAM R21 chips.

The MESH Coin sketch uses it to timestamp data samples, and sleep/wake the FemtoBeacon RF module and ARM Chip when the destination node is unavailable, sleeping for 10 seconds at a time, and only streaming data when a connection is available.