Skip to content

TMK Core

hasu@tmk edited this page Feb 18, 2021 · 4 revisions

MEMO

See #173 as well.

Sync between tmk_core and tmk_keyboard

2021-02-10

Update tmk_core

Push split branch from tmk_keyboard to tmk_core local working repo

$ git subtree push -P tmk_core ~/TMK_CORE_UPDATE/tmk_core/ core_210209
git push using:  /home/noname/TMK_CORE_UPDATE/tmk_core core_210209
Enumerating objects: 1698, done.
Counting objects: 100% (1290/1290), done.
Delta compression using up to 4 threads
Compressing objects: 100% (744/744), done.
Writing objects: 100% (1085/1085), 226.97 KiB | 9.46 MiB/s, done.
Total 1085 (delta 770), reused 340 (delta 329)
remote: Resolving deltas: 100% (770/770), completed with 100 local objects.
To /home/noname/TMK_CORE_UPDATE/tmk_core/
 * [new branch]        1b3fe95435592189f7f1d431fda17f5a9a556f0b -> core_210209

Merge the split branch into master

$ cd ~/TMK_CORE_UPDATE/tmk_core
$ git checkout master
$ git merge core_210209

Push local master to remote repo of tmk_core

$ git push origin

Update tmk_keyboard/tmk_core

git subtree pull -P tmk_core --squash ~/TMK_CORE_UPDATE/tmk_core/ master

How to contribute your change to TMK Core

TBD

Use TMK Core in your own project

1. How to embed

a. git submodule

In order to set up the submodule in your project, first add a new submodule:

git submodule add https://github.com/tmk/tmk_core tmk_core

Then pull, sync and update the submodule:

git pull
git submodule sync --recursive
git submodule update --init --recursive

When you want to update the subtree in your repository to match the master on tmk_core, follow the same steps as above.

If you want to clone a repository from GitHub that has submodule(s) in it, pass --recursive when cloning, like so:
git clone --recursive https://github.com/<username>/<repository>

b. git subtree

In order to set up the subtree in your project, first add the core repository as a remote:

git remote add -f core https://github.com/tmk/tmk_core

Then add the core as a subtree (directory) in your local repository:

git subtree add -P tmk_core core master --squash

When you want to update the subtree in your repository to match the master on tmk_core, do this:

git subtree pull -P tmk_core core master --squash

c. Just copy

Download a zipped version of the [tmk_core][1] repository using this link:
https://github.com/tmk/tmk_core/archive/master.zip

Extract the zip in your project's directory, then rename the folder to tmk_core.

2. Edit Makefile

TBD

You will have to designate correct path of tmk_core in your Makefile.

TMK_DIR is used for this purpose in Makefile of tmk_keyboard, for example.

TMK_DIR = ./tmk_core
Clone this wiki locally