
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
@freik/arduino2proj
Advanced tools
This is a tool to input Arduino platform configuration files and produce a GNU Makefile that can be include'd by your little project. It's been tested on projects using:
First, you need to install the bun runtime. Once that's installed, create a makefile include-able file by doing this:
bunx @freik/arduino2proj folder/with/platform/board/txt/files other/folders with/libraries
> include.win.mk
(You'll need to create different files for Windows, Linux, and MacOS) Then from your Makefile:
# Some 'location' details
ifeq ($(OS),Windows_NT)
ARD=${HOME}/AppData/Local
SERIAL_PORT=COM9
else ifeq ($(shell uname -s), Darwin)
ARD=/Applications/Arduino.app/Contents/Java/hardware
SERIAL_PORT=$(shell ls /dev/cu.usbmodem5*)
else
$(error Linux support untested, but probably works like Darwin)
endif
# Some Teensy inputs:
# Your MPU will have different inputs required
# When you try to build, the include.*.mk files will tell you the vars you need to define
IN_SPEED=24
IN_USB=serialhid
IN_OPT=osstd
IN_KEYS=en-us
EXTRA_TIME_LOCAL=0
BOARD_NAME=teensy31
TOOLS_PATH=${ARD}/tools/arm
RUNTIME_HARDWARE_PATH=${ARD}/teensy
CMD_PATH=${ARD}/tools
SERIAL_PORT_LABEL=${SERIAL_PORT}
SERIAL_PORT_PROTOCOL=serial
# These seem common for everything...
PROJ_NAME=filename
BUILD_PATH=output-dir
# My custom flags
COMPILER_CPP_EXTRA_FLAGS=-DDEBUG=2 -DTEENSY
# Libraries to use:
LIB_WIRE=1
LIB_SPI=1
# Include path commands
USER_INCLUDES=-Iinclude
# C++ source files (can also set S and C files this way)
USER_CPP_SRCS=file0.cpp file1.cpp
ifeq ($(OS),Windows_NT)
include teensy.win.mk
else ifeq ($(shell uname -s), Darwin)
include teensy.mac.mk
else
include teensy.lin.mk
endif
I started this because building in the Arduino IDE is quite slow, for a variety
of reasons that I could go into. Anyway, I write C++ to run on my devices, not
.ino files, so I don't need half of what causes the speed problems (#include
file detection), and the other half seems silly.
Currently this thing works acceptably for my building my keyboard firmware (https://github.com/kevinfrei/FreiKey). I've got both the generated include files, as well as the make files for the various keyboards I've made there. Feel free to check it out.
I also used it for a little test project for a pull request test you can see here: (https://github.com/kevinfrei/ST7789_135_240_test)
It seems to work reliably for my needs. I also added some custom modification stuff that I should document somewhere. Here's how I use it in my firmware: (https://github.com/kevinfrei/FreiKey/blob/main/src/adafruit-make-config.json)
It creates a compile_commands.json file that you can use to get fully accurate
VS Code auto-complete, which is pretty excellent.
I can build using 24 cores in a few seconds, and then I flash the firmware. Works like a charm from my Windows, Linux, and Mac systems.
I don't intend to deal with the bootloader stuff. That happens rarely enough it doesn't seem worth the effort. Just use the Arduino IDE if you have to deal with the bootloader.
FAQs
Arduino platform and library to Makefile conversion tool
We found that @freik/arduino2proj demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.