sudar / Arduino-Makefile

Makefile for Arduino sketches. It defines the workflows for compiling code, flashing it to Arduino and even communicating through Serial.
http://hardwarefun.com/tutorials/compiling-arduino-sketches-using-makefile
GNU Lesser General Public License v2.1
2.01k stars 449 forks source link

Arduino-Makefile cannot find samd boards.txt #657

Open rohoog opened 3 years ago

rohoog commented 3 years ago

I'm trying to use the arduino-mk on fedora30 (arduino 1.8.5). I have successfully built the rpm using the SPEC file. I have the standard installation of arduino IDE from fedora: ARDUINO_DIR = /usr/share/arduino. I added ARCHITECTURE = samd The board.txt files are in: [~]$ rpm -ql arduino-core | grep boards.txt /etc/arduino/boards.txt /usr/share/arduino/hardware/arduino/avr/boards.txt [~]$ find .arduino1* -name boards.txt .arduino15/packages/arduino/hardware/avr/1.8.3/boards.txt .arduino15/packages/arduino/hardware/samd/1.8.9/boards.txt

Yes, 1.8.5 uses the .arduino15 user conf folder and indeed the M0 boards were not included in the standard installation, it needed to be added using library manager. I tried adding ARDUINO_PACKAGE_DIR = ~/.arduino15/packages/arduino , but that doesn't help.

How should this use-case be handled?

rohoog commented 3 years ago

I have now 'hardcoded' the BOARDS_TXT variable to the correct location. This gets me a little further, but the cpu model is passed to the g++ command line as -mmcu=cortex-m0plus, but -mmcu is not a recognised command line option for gcc/g++; it should be -mcpu=cortex-m0plus.

rohoog commented 3 years ago

OK I see I need to include Sam.mk instead of Arduino.mk... And I have to not define this BOARDS_TXT variable.