{"id":14971649,"url":"https://github.com/kevinfrei/arduino2make","last_synced_at":"2026-02-27T20:09:54.048Z","repository":{"id":57684930,"uuid":"201082453","full_name":"kevinfrei/Arduino2Make","owner":"kevinfrei","description":"A tool to input Arduino platform configuration files and produce a GNU Makefile that can be include'd","archived":false,"fork":false,"pushed_at":"2023-10-07T21:26:33.000Z","size":4949,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-04-25T03:02:01.931Z","etag":null,"topics":["adafruit","arduino","arduino-boards","arduino-ide","arduino-platform","developer-tools","gnu-makefile","makefile","makefile-generation"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kevinfrei.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-07T15:57:37.000Z","updated_at":"2024-07-19T04:50:19.326Z","dependencies_parsed_at":"2024-07-19T05:11:05.413Z","dependency_job_id":null,"html_url":"https://github.com/kevinfrei/Arduino2Make","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinfrei%2FArduino2Make","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinfrei%2FArduino2Make/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinfrei%2FArduino2Make/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinfrei%2FArduino2Make/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kevinfrei","download_url":"https://codeload.github.com/kevinfrei/Arduino2Make/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240325103,"owners_count":19783607,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adafruit","arduino","arduino-boards","arduino-ide","arduino-platform","developer-tools","gnu-makefile","makefile","makefile-generation"],"created_at":"2024-09-24T13:45:36.593Z","updated_at":"2026-02-27T20:09:54.042Z","avatar_url":"https://github.com/kevinfrei.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Arduino2Proj\n\nThis is a tool to input Arduino platform configuration files and produce a GNU\nMakefile that can be include'd by your little project. It's been tested on\nprojects using:\n\n- Adafruit Feather nRF52832\n- Adafruit Feather nRF52840 Express\n- Adafruit ItsyBitsy nRF52840\n- Adafruit Feather RP2040\n- Adafruit Keeboar RP2040\n- Teensy 3.2\n- Teensy 4.0\n- Teensy 4.1\n\n## Usage\n\nFirst, you need to install the [bun runtime](https://bun.sh). Once that's\ninstalled, create a makefile include-able file by doing this:\n\n```sh\nbunx @freik/arduino2proj folder/with/platform/board/txt/files other/folders with/libraries\n\u003e include.win.mk\n```\n\n(You'll need to create different files for Windows, Linux, and MacOS) Then from\nyour Makefile:\n\n```makefile\n# Some 'location' details\nifeq ($(OS),Windows_NT)\n\tARD=${HOME}/AppData/Local\n\tSERIAL_PORT=COM9\nelse ifeq ($(shell uname -s), Darwin)\n\tARD=/Applications/Arduino.app/Contents/Java/hardware\n\tSERIAL_PORT=$(shell ls /dev/cu.usbmodem5*)\nelse\n  $(error Linux support untested, but probably works like Darwin)\nendif\n\n# Some Teensy inputs:\n# Your MPU will have different inputs required\n# When you try to build, the include.*.mk files will tell you the vars you need to define\nIN_SPEED=24\nIN_USB=serialhid\nIN_OPT=osstd\nIN_KEYS=en-us\nEXTRA_TIME_LOCAL=0\nBOARD_NAME=teensy31\nTOOLS_PATH=${ARD}/tools/arm\nRUNTIME_HARDWARE_PATH=${ARD}/teensy\nCMD_PATH=${ARD}/tools\nSERIAL_PORT_LABEL=${SERIAL_PORT}\nSERIAL_PORT_PROTOCOL=serial\n# These seem common for everything...\nPROJ_NAME=filename\nBUILD_PATH=output-dir\n\n# My custom flags\nCOMPILER_CPP_EXTRA_FLAGS=-DDEBUG=2 -DTEENSY\n\n# Libraries to use:\nLIB_WIRE=1\nLIB_SPI=1\n\n# Include path commands\nUSER_INCLUDES=-Iinclude\n\n# C++ source files (can also set S and C files this way)\nUSER_CPP_SRCS=file0.cpp file1.cpp\n\nifeq ($(OS),Windows_NT)\n  include teensy.win.mk\nelse ifeq ($(shell uname -s), Darwin)\n  include teensy.mac.mk\nelse\n  include teensy.lin.mk\nendif\n```\n\nI started this because building in the Arduino IDE is quite slow, for a variety\nof reasons that I could go into. Anyway, I write C++ to run on my devices, not\n`.ino` files, so I don't need half of what causes the speed problems (#include\nfile detection), and the other half seems silly.\n\nCurrently this thing works acceptably for my building my keyboard firmware\n(https://github.com/kevinfrei/FreiKey). I've got both the generated include\nfiles, as well as the make files for the various keyboards I've made there. Feel\nfree to check it out.\n\nI also used it for a little test project for a pull request test you can see\nhere: (https://github.com/kevinfrei/ST7789_135_240_test)\n\n## Currently\n\nIt seems to work reliably for my needs. I also added some custom modification\nstuff that I should document somewhere. Here's how I use it in my firmware:\n(https://github.com/kevinfrei/FreiKey/blob/main/src/adafruit-make-config.json)\n\nIt creates a `compile_commands.json` file that you can use to get fully accurate\nVS Code auto-complete, which is pretty excellent.\n\nI can build using 24 cores in a few seconds, and then I flash the firmware.\nWorks like a charm from my Windows, Linux, and Mac systems.\n\nI don't intend to deal with the bootloader stuff. That happens rarely enough it\ndoesn't seem worth the effort. Just use the Arduino IDE if you have to deal with\nthe bootloader.\n\n## TODO:\n\n- Switch from GNU Makefiles to CMake stuff (or just add CMake support?)\n- Add ability to pull stuff from a board index json file\n- Add ability to pull down libs from a library index file, not just local\n- Get it working on the AdaFruit AVR stuff\n  - I've never actually used Arduino-branded hardware :/\n- Make the thing also spit out VSCode settings! This would be awesome (and not\n  particularly difficult, at this point, either)\n  - Bonus points: Make it an actual target, so the Makefile will update it!\n- And, finally, eventually, make some tests, probably. Jest seems reasonable.\n  Seriously, I've found it pretty darned useful in a few other projects...\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevinfrei%2Farduino2make","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkevinfrei%2Farduino2make","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevinfrei%2Farduino2make/lists"}