Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seeduino XIAO not building. #672

Open
mikijov opened this issue Oct 23, 2021 · 0 comments
Open

Seeduino XIAO not building. #672

mikijov opened this issue Oct 23, 2021 · 0 comments

Comments

@mikijov
Copy link

mikijov commented Oct 23, 2021

Hi. I am trying to use Arduino-Makefile to build Seeduino XIAO code. While having years of programming experience, I am 1 day old on arduino, so I am stumbling a bit. I am on Arch linux BTW.

I made a simple blink.ino, and Makefile.

ARDUINO_DIR = /usr/share/arduino
ARDMK_DIR = ~/project/Arduino-Makefile
ARDUINO_PACKAGE_DIR = /home/miki/.arduino15/packages

ARDMK_VENDOR = Seeeduino
BOARD_TAG    = seeed_XIAO_m0
ARDUINO_LIBS =

include $(ARDMK_DIR)/Sam.mk

This does not build as several directories are properly calculated/detected. Please see the diff below that allowed me to build.

I was thinking of submitting this as a PR, but I fear this will break other configurations. Can someone suggest how Arduino-Makefile usually deal with differences in directory structures.

diff --git a/Sam.mk b/Sam.mk
index 2e19730..41f8333 100644
--- a/Sam.mk
+++ b/Sam.mk
@@ -72,7 +72,7 @@ else
 endif

 ifndef CMSIS_VER
-    CMSIS_VER := $(wildcard $(ARDUINO_PACKAGE_DIR)/$(ARDMK_VENDOR)/tools/CMSIS/4.*)
+    CMSIS_VER := $(wildcard $(ARDUINO_PACKAGE_DIR)/$(ARDMK_VENDOR)/tools/CMSIS/5.*)
     ifneq ($(CMSIS_VER),)
         CMSIS_VER := $(shell basename $(CMSIS_VER))
         $(call show_config_variable,CMSIS_VER,[AUTODETECTED],(from ARDUINO_PACKAGE_DIR))
@@ -104,7 +104,7 @@ endif

 ifndef CMSIS_ATMEL_DIR
     ifeq ($(findstring samd, $(strip $(ARCHITECTURE))), samd)
-        CMSIS_ATMEL_DIR := $(ARDUINO_PACKAGE_DIR)/$(ARDMK_VENDOR)/tools/CMSIS-Atmel/$(CMSIS_ATMEL_VER)/CMSIS
+        CMSIS_ATMEL_DIR := $(ARDUINO_PACKAGE_DIR)/$(ARDMK_VENDOR)/tools/CMSIS-Atmel/$(CMSIS_ATMEL_VER)/CMSIS-Atmel/CMSIS
     else
         CMSIS_ATMEL_DIR = $(ALTERNATE_CORE_PATH)/system/CMSIS
     endif
@@ -137,7 +137,7 @@ endif
 CPPFLAGS += -I$(CMSIS_DIR)/Include/
 CPPFLAGS += -I$(CMSIS_ATMEL_DIR)/Device/ATMEL
 # path for Cortex library
-LIB_PATH  =  $(CMSIS_DIR)/Lib/GCC
+LIB_PATH  =  $(CMSIS_DIR)/DSP/Lib/GCC
 BOOTLOADER_PARENT = $(ALTERNATE_CORE_PATH)/bootloaders

 ifndef VARIANT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant