Based on the work from jpakkane on repo Author: Gonzalo Aguilar Delgado

Blink project by Arduino Staff

Meson sample project for Arduino development

This repository contains the sample blink application for Arduino. The source was directly taken from great and simple project

I just added some more settings and dependency management.

Check settings and use your owner

You will need to create the proper configuration file for each arduino module. We provide the Adafruit Feather clone lora32u4 II. But is easy to create new ones by looking at the Arduino IDE hardware settings.

Only compile an upload supported at the momment.

Compile and flash

Compile it with the following commands.

meson --cross-file arduino_lora32u4II_cross.txt build-lora32u4 \ 
cd build-lora32u4

The result can be uploaded with the following command, but check settings first to see if right port is used:

ninja ardup

This command will rebuild the binary before uploading if it is out of date.

Porting to other Arduino models

This project hardcodes Adafruit Feather 32u4 II clone. If you have a different model, change the compiler specifications and flags in the cross file. There does not seem to be a way to easily get these programmatically so you have to copy them by hand from Arduino IDE invocations to a cross file.

The code also assumes a Linux environment and that your Arduino is in the serial port /dev/ttyACM1. If your setup is different, change the options.