{"id":20820890,"url":"https://github.com/daelonsuzuka/easy-xc8","last_synced_at":"2025-06-14T14:38:19.414Z","repository":{"id":40383633,"uuid":"270487439","full_name":"DaelonSuzuka/Easy-XC8","owner":"DaelonSuzuka","description":"A simplified XC8 toolchain","archived":false,"fork":false,"pushed_at":"2024-04-28T19:27:27.000Z","size":89,"stargazers_count":3,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-07T16:01:49.499Z","etag":null,"topics":["makefile","microchip","pic18","xc8-compiler","xc8-toolchain"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/DaelonSuzuka.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,"zenodo":null}},"created_at":"2020-06-08T01:33:57.000Z","updated_at":"2024-05-24T20:38:45.000Z","dependencies_parsed_at":"2024-04-26T21:23:29.910Z","dependency_job_id":"fbc3de5c-7785-4243-b680-7d87403dfb69","html_url":"https://github.com/DaelonSuzuka/Easy-XC8","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DaelonSuzuka/Easy-XC8","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaelonSuzuka%2FEasy-XC8","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaelonSuzuka%2FEasy-XC8/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaelonSuzuka%2FEasy-XC8/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaelonSuzuka%2FEasy-XC8/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DaelonSuzuka","download_url":"https://codeload.github.com/DaelonSuzuka/Easy-XC8/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaelonSuzuka%2FEasy-XC8/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259833127,"owners_count":22918844,"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":["makefile","microchip","pic18","xc8-compiler","xc8-toolchain"],"created_at":"2024-11-17T22:10:37.409Z","updated_at":"2025-06-14T14:38:19.377Z","avatar_url":"https://github.com/DaelonSuzuka.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# What is this?\nEasy-XC8 is a hybrid python/makefile build system for working with 8-bit PIC microcontrollers from Microchip. This was developed for use with PIC18s, particularly the K42 family, but there's no reason it can't work with any chip supported by XC8.\n\n# Requirements\nPrograms:\n\n- GNU Make \u003e3.8.2 (other makes may work, but I'm not going to test them)\n- xc8 compiler (`xc8` must be on your path)\n- mplabx IPE (`ipecmd` or `ipecmd.sh` must be on your path)\n- python3 \u003e 3.6\n- python3-venv (not installed on ubuntu by default)\n- python3-pip (not installed on ubuntu by default)\n\n# Getting Started\n\nThis project is designed to be included in your project as a git \"submodule\", which will cause a copy of this repo to be downloaded into your project so it can be compiled like normal, but it doesn't add those files to your project's source control. This makes it easier to keep a common set of code in sync between multiple projects without error-prone copy/pasting.\n\nIn your repository, run:\n\nWindows:\n```\ngit submodule add https://github.com/DaelonSuzuka/Easy-XC8.git toolchain\npython toolchain/install.py\nmake config\n```\n\nLinux:\n```\ngit submodule add https://github.com/DaelonSuzuka/Easy-XC8.git toolchain\npython3 toolchain/install.py\nmake config\n```\n\nThis will:\n - add the submodule to your git repository, and download this repo to `./toolchain`. \n - create the minimum usable `Makefile` in the root directory of your project\n - create `project.yaml` using the project configuration wizard\n\nYou should now be ready to use the Easy-XC8 toolchain.\n\n# Make targets\n\n## Build targets\n\nBuild your project with\n\u003e $ make compile\n\nTake the resulting hex and upload it to your target hardware with\n\u003e $ make upload\n\nRemove all your build artifacts to start over\n\u003e $ make clean \n\n## Other targets\n\nGenerate documentation with Doxygen\n\u003e $ make docs\n\nRun the linter to check for errors\n\u003e $ make lint\n\nThis is a suprise tool that will help us later:\n\u003e $ make cog \n\n## venv targets\n\nHopefully, you won't have to use these on your own\n\nCreate the venv and install python packages in, but only runs if the venv if missing\n\u003e $ make venv\n\nDelete the venv\n\u003e $ make clean_venv\n\nDelete the venv, the recreate it\n\u003e $ make reset_venv\n\n\n# Scripts \n\n## `build.py`\n\nThis script wraps the xc8 compiler in (what I find to be) a more readable way than calling it directly from make. `build.py` automagically pulls the following information from `project.yaml` and feeds it to the compiler:\n\n- location of source files\n- location of output files\n- desired C standard(C90 vs C99)\n- list of preprocessor symbols to be defined\n- list of flags to be passed to the linker\n\nAdditional features:\n\n- recursively searches the source directory to build the list of files it passes to `xc8`. \n- designates the source directory and any subdirectories as 'include' directories(location the compiler will search for header files)\n\nPlanned features:\n\n- scan for a git repository(you _are_ using version control, aren't you?), grabs the current branch, commit hash, maybe some other data, and makes that information available as preprocessor symbols in your source code.\n- grab the version numbers from `project.yaml` and make them available as preprocessor symbols\n\n## `upload.py`\n\nThis script has an accompanying file(`upload.json`) that tells it how to interact with a variety of usb pic programmers. I've gotten it to work in linux by selecting `Pickit4-linux` as your programmer in project.yaml. Unfortunately, before this would work, I had to fix Microchip's `ipecmd.sh` that was supposed to be edited during installation with the path of MPLABX's local jvm. This was a pain.\n\n\n# venvs\n\nIn order to avoid polluting your system python environment, the scripts that do all the heavy lifting are run from a\nvirtual environment. This is an interesting topic all on its own and warrants a much more in-depth explanation than this one. \n\nFortunately, the makefile is _supposed_ to handle the entire venv process for you. If the venv is missing when you run a make target that needs it, it will automatically create the venv and install the necessary python packages into the venv, then run the make target. If the venv is already there, it just uses it without you having to do anything.\n\n# Future goals:\n\n- Include VS Code default settings and extension recommendations\n- Figure out how to explain wtf cog is\n- how to customize build.py\n- how to customize upload.py","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaelonsuzuka%2Feasy-xc8","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaelonsuzuka%2Feasy-xc8","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaelonsuzuka%2Feasy-xc8/lists"}