femtoduino / femto-beacon

FemtoBeacon - Atmel SAM R21 (ARM Cortex M0+, SAM D21 with built in AT86RF233)
MIT License
63 stars 17 forks source link

Help on using femto-beacon #3

Closed allenyin closed 7 years ago

allenyin commented 7 years ago

Hi Femtoduino,

I bought a FemtoBeacon starter kit from Tindie (https://www.tindie.com/products/femtoduino/femtobeacon-kit-starter/?pt=full_prod_search).

I am a bit confused about the steps needed to start using them. Trying to get the /examples/sam-r21-imu to work as a start on Ubuntu14.04 in bare metal, here is what I have done so far: 1) Downloaded the Atmel Software Framework, made the symlinks as mentioned in /examples/sam-r21-imu/README.md 2) Checked out and sym-linked the MPU9250 repo 3) Installed gcc-arm-none-eabi 4) Changed in config.mk: PRJ_PATH=libraries/xdk-asf-3.33.0 5) Changed in Makefile: MAKEFILE_PATH=libraries/xdk-asf-3.33.0/sam0/utils/make/Makefile.sam.in

When I do make within the /examples/sam-r21-imu directory, I get the following error

CC      sam_r21_imu.o
In file included from libraries/xdk-asf-3.33.0/common2/services/delay/sam0/systick_counter.h:50:0,
                 from libraries/xdk-asf-3.33.0/common2/services/delay/delay.h:64,
                 from asf.h:60,
                 from sam_r21_imu.c:2:
libraries/xdk-asf-3.33.0/sam0/drivers/system/clock/clock.h:51:27: fatal error: clock_feature.h: No such file or directory
 #include <clock_feature.h>
                           ^
compilation terminated.
make: *** [sam_r21_imu.o] Error 1

I have yet to install openocd and BOSSA, but this error seems to be not related to those, probably because a change in ASF...is there a patch to this?

On another note, is installing eclipse c++ absolutely necessary?

zrecore commented 7 years ago

If you are going to use baremetal C with the Atmel Software Framework, I would suggest going directly to the ASF examples related to the SAM R21 examples on their website. I've been using the Arduino core and bootloader instead. (See https://github.com/femtoduino/ArduinoCore-atsamd21e18a )

allenyin commented 7 years ago

Ok, for the sake of learning, could you point me to some resources for writing libraries adapting MCUs to work within the Arduino framework?

zrecore commented 7 years ago

@allenyin I don't know of any. I had to figure it out by grabbing a copy of the official Arduino Zero core, and asking questions in the Arduino developers google group. I really wish I knew of one, or at least had enough time/resources to make one.