Compare commits
479 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 746ae2a09f | |||
| b93485e087 | |||
| 88d29263de | |||
| ac86fa6ccb | |||
| f5a656911e | |||
|
|
310b00319a | ||
|
|
0bf3456292 | ||
|
|
2ab727b423 | ||
|
|
ecdcfea8a4 | ||
|
|
f73d3a1c22 | ||
|
|
53a1065219 | ||
|
|
2b8156cad8 | ||
|
|
c564d04b22 | ||
|
|
65e1e5e25a | ||
|
|
0a28a395fc | ||
|
|
08e567797e | ||
|
|
0e53bee212 | ||
|
|
d8d8a543c0 | ||
|
|
97cff6438e | ||
|
|
7755c57478 | ||
|
|
8aea024ed2 | ||
|
|
e5a7ded3d1 | ||
|
|
d9d8a91817 | ||
|
|
262eb4a695 | ||
|
|
b4cd3fab9b | ||
|
|
3e87ed851a | ||
|
|
60dade7e18 | ||
|
|
6c0ebc3223 | ||
|
|
a857780e42 | ||
|
|
6e77dece04 | ||
|
|
a57fedec70 | ||
|
|
95003cf55d | ||
|
|
4486f607da | ||
|
|
0caf0144dc | ||
|
|
3686b2a6ff | ||
|
|
bf286b944e | ||
|
|
19cdca27e7 | ||
|
|
657f998afa | ||
|
|
d6d5178d87 | ||
|
|
06d1643b4f | ||
|
|
3058438d88 | ||
|
|
10150c4eca | ||
|
|
196dfe3d15 | ||
|
|
d08de0e31d | ||
|
|
e948af3df4 | ||
|
|
fc300fff0c | ||
|
|
16c5cac395 | ||
|
|
e2e14ac73b | ||
|
|
cfb15b6902 | ||
|
|
92752a5963 | ||
|
|
6b74a01a0b | ||
|
|
b92bf86b99 | ||
|
|
8f98bf3d2f | ||
|
|
a712ac6c8a | ||
|
|
f54967ddab | ||
|
|
4832384cf3 | ||
|
|
f310e26c8e | ||
|
|
afb434a4bd | ||
|
|
ff14aa8842 | ||
|
|
0ed9c62602 | ||
|
|
1373380221 | ||
|
|
3f8314474a | ||
|
|
da5e668ad2 | ||
|
|
5e382c67e9 | ||
|
|
9076a3a6c0 | ||
|
|
6ab0c2eb72 | ||
|
|
2e73bb9ea1 | ||
|
|
e5ac605b4c | ||
|
|
fb220038b7 | ||
|
|
464c56f599 | ||
|
|
a59b43b433 | ||
|
|
ceb2f3de00 | ||
|
|
5cd4030a93 | ||
|
|
21ae72dd9e | ||
|
|
dba61c6a42 | ||
|
|
f61acc483b | ||
|
|
fb38e4099b | ||
|
|
5fe19abe06 | ||
|
|
06e34fdcbc | ||
|
|
cc6666b96d | ||
|
|
a22dfdd917 | ||
|
|
8b69a25dda | ||
|
|
6f2b45c27c | ||
|
|
98f7d512de | ||
|
|
c5cf738fd0 | ||
|
|
af31ae210a | ||
|
|
44799995b9 | ||
|
|
3f5f83a19b | ||
|
|
bc4f35e578 | ||
|
|
e9309aab16 | ||
|
|
f004b84399 | ||
|
|
58f8120611 | ||
|
|
5b71fb7aaa | ||
|
|
9d0f41bf5e | ||
|
|
47a3a8ad80 | ||
|
|
b4908bf2ac | ||
|
|
846342e851 | ||
|
|
3196abe574 | ||
|
|
5f0bae1840 | ||
|
|
c3a38c8b59 | ||
|
|
1f9d31cad4 | ||
|
|
b89de6655e | ||
|
|
4a1b747197 | ||
|
|
eca87d2f62 | ||
|
|
2e2b9d08a9 | ||
|
|
b4c2204e50 | ||
|
|
4c0546de6c | ||
|
|
bea4c34a51 | ||
|
|
bdc6232780 | ||
|
|
1d2d1c5049 | ||
|
|
67f07abd0d | ||
|
|
4bfcd6e02c | ||
|
|
7eb190489b | ||
|
|
640c034111 | ||
|
|
a6f12848ed | ||
|
|
47f6a27e48 | ||
|
|
9cc383a91d | ||
|
|
a441cdf5d2 | ||
|
|
8297dd5c48 | ||
|
|
225a481938 | ||
|
|
5572952dc8 | ||
|
|
7d011237f8 | ||
|
|
1a47c6e629 | ||
|
|
047a232e7e | ||
|
|
28f5999cbb | ||
|
|
fe7505a2df | ||
|
|
b6ac16074c | ||
|
|
0bf205c5d2 | ||
|
|
e4a99a9400 | ||
|
|
1e9b5833eb | ||
|
|
79b052fca7 | ||
|
|
baee0b5682 | ||
|
|
6153d54f59 | ||
|
|
0a6ebe2903 | ||
|
|
1fbbeb0f33 | ||
|
|
456f0e9e58 | ||
|
|
0248a0e79f | ||
|
|
0e5ec29433 | ||
|
|
2d7cd68459 | ||
|
|
5ac10fabcb | ||
|
|
b11017609d | ||
|
|
c3a5d258e5 | ||
|
|
a2866feb77 | ||
|
|
8c50192d6c | ||
|
|
63d82d92db | ||
|
|
1bced1be13 | ||
|
|
86196d438c | ||
|
|
d722b3d173 | ||
|
|
2ef5c49090 | ||
|
|
5a137392ee | ||
|
|
27d12ea31f | ||
|
|
9ba09ec8eb | ||
|
|
014addd777 | ||
|
|
4562a17155 | ||
|
|
950843ca2c | ||
|
|
9600f46f83 | ||
|
|
ef7589d83a | ||
|
|
84f48ed055 | ||
|
|
ebef301e27 | ||
|
|
5b8b8d93e4 | ||
|
|
d48049535e | ||
|
|
5bd479ab8e | ||
|
|
372151848a | ||
|
|
5b32c0da43 | ||
|
|
edf34de4b5 | ||
|
|
8c7eb079ec | ||
|
|
6612f7cced | ||
|
|
7606f311c8 | ||
|
|
9fe73233af | ||
|
|
cba1ef97b6 | ||
|
|
c69f664e85 | ||
|
|
6c895988de | ||
|
|
f16a004583 | ||
|
|
c870f335a7 | ||
|
|
b6f59563c7 | ||
|
|
409bd01af6 | ||
|
|
b9b5eb2c76 | ||
|
|
11a8ffbaf5 | ||
|
|
9938f14d20 | ||
|
|
217259ba63 | ||
|
|
e5afa33b79 | ||
|
|
d3dfc9bd2c | ||
|
|
8f6251bc4d | ||
|
|
b93f211502 | ||
|
|
69411e53e9 | ||
|
|
39819e6058 | ||
|
|
bd97bba4b5 | ||
|
|
4214f3e0b6 | ||
|
|
6eceb6ad30 | ||
|
|
994e2f6b79 | ||
|
|
baa5e8f037 | ||
|
|
cbd5f1b500 | ||
|
|
c1dc4be8c8 | ||
|
|
1bd8c7dca8 | ||
|
|
d72ea4dde5 | ||
|
|
5d621880ec | ||
|
|
5c3e2966c4 | ||
|
|
d21fe30139 | ||
|
|
224d9eae42 | ||
|
|
8c02f3db53 | ||
|
|
02bbeb7177 | ||
|
|
cdfabaec42 | ||
|
|
0e9525ce9a | ||
|
|
633a6cec77 | ||
|
|
d35a7cc644 | ||
|
|
76a91c010b | ||
|
|
54b0a595bc | ||
|
|
4b9aa0860c | ||
|
|
df8792a60d | ||
|
|
5988fce59b | ||
|
|
314eb0d771 | ||
|
|
c1f5a96e1b | ||
|
|
64592d7032 | ||
|
|
c6b180b8f5 | ||
|
|
0155447c6a | ||
|
|
04f4053bde | ||
|
|
09a58b607c | ||
|
|
be82530412 | ||
|
|
6e11c0b8af | ||
|
|
9fade6368c | ||
|
|
ff99c2e734 | ||
|
|
6d356114a8 | ||
|
|
3041132959 | ||
|
|
2877773cac | ||
|
|
a061febd01 | ||
|
|
e3773fd5c0 | ||
|
|
a92835454d | ||
|
|
64e5fa7ecb | ||
|
|
d1894fb62a | ||
|
|
fe7065be4a | ||
|
|
e7b3127af1 | ||
|
|
724378cf6c | ||
|
|
14eb9c6ec0 | ||
|
|
9a8b1ef8b9 | ||
|
|
2cc94bd1fc | ||
|
|
ad8de4dd56 | ||
|
|
5e97ad1b3c | ||
|
|
fe06ed0a4b | ||
|
|
d449123fab | ||
|
|
4d483e7896 | ||
|
|
b1cbeefa28 | ||
|
|
9be3cf4865 | ||
|
|
65006cc376 | ||
|
|
fc01b29823 | ||
|
|
462595ef03 | ||
|
|
b0d85795f4 | ||
|
|
2c91ef51db | ||
|
|
a54e7ac0a8 | ||
|
|
64f54c268b | ||
|
|
d889d51a7d | ||
|
|
b284e9fa58 | ||
|
|
1a0da7971a | ||
|
|
53a82a5f57 | ||
|
|
10985abcdb | ||
|
|
e60a282742 | ||
|
|
a691b16ebe | ||
|
|
c38114648a | ||
|
|
3fc4419f4f | ||
|
|
033bdf6491 | ||
|
|
18e3ba9558 | ||
|
|
3fb552cc55 | ||
|
|
d093c84fb4 | ||
|
|
95d7197394 | ||
|
|
989774ced9 | ||
|
|
0e29276a56 | ||
|
|
5b90d78518 | ||
|
|
d2eb4b43c7 | ||
|
|
a545324693 | ||
|
|
27b02c32b5 | ||
|
|
01e92e57f4 | ||
|
|
51b2631012 | ||
|
|
66c877f7bd | ||
|
|
7c1431f0ab | ||
|
|
772078f8f6 | ||
|
|
46244b8f5f | ||
|
|
5fc59f40bc | ||
|
|
460cd3c602 | ||
|
|
e391d6dac8 | ||
|
|
41afff5ea4 | ||
|
|
187ae2821b | ||
|
|
cb52c273b4 | ||
|
|
5a523e64d8 | ||
|
|
970f622bff | ||
|
|
293438fa61 | ||
|
|
455c1a30cb | ||
|
|
58e4919c0e | ||
|
|
dd7b0a6e3b | ||
|
|
59396baf76 | ||
|
|
8d9340c05b | ||
|
|
0930a000fa | ||
|
|
332560d2d2 | ||
|
|
0344a79f65 | ||
|
|
4577b118bc | ||
|
|
ad8aca5793 | ||
|
|
8bb9711793 | ||
|
|
3cb0490e5e | ||
|
|
58fa1ed6a4 | ||
|
|
9aa78ef5bf | ||
|
|
7c4c354828 | ||
|
|
c3407e1410 | ||
|
|
492243f801 | ||
|
|
6f0b1adc14 | ||
|
|
b917a97e93 | ||
|
|
bf69f28ed1 | ||
|
|
6854fa68dc | ||
|
|
14b6e49692 | ||
|
|
10802f3f73 | ||
|
|
66252eabf0 | ||
|
|
0c4c736552 | ||
|
|
aa4105bdc3 | ||
|
|
101abffec4 | ||
|
|
b8268f55a3 | ||
|
|
2214f00667 | ||
|
|
a2fae5bbef | ||
|
|
47e026006e | ||
|
|
379d827982 | ||
|
|
d9d26814e8 | ||
|
|
611c36fe00 | ||
|
|
e9cd3a96c2 | ||
|
|
8856c484b6 | ||
|
|
b97841fdae | ||
|
|
69143bed9c | ||
|
|
ebd0e3b762 | ||
|
|
ec8301ae62 | ||
|
|
3d4d78387e | ||
|
|
c2582729f2 | ||
|
|
9d66f5ff76 | ||
|
|
06ebed5537 | ||
|
|
02d6fb4628 | ||
|
|
1b9ec89e20 | ||
|
|
7002e7de52 | ||
|
|
1e61a39210 | ||
|
|
5509cbb5f8 | ||
|
|
f650032fef | ||
|
|
fd787f74e9 | ||
|
|
75fe7904b6 | ||
|
|
b4ac82d2c0 | ||
|
|
9670523310 | ||
|
|
7763d8a32b | ||
|
|
3d9170402b | ||
|
|
b0192085bb | ||
|
|
c90261d549 | ||
|
|
5a756edf8b | ||
|
|
46ce16b8d4 | ||
|
|
d2acfba659 | ||
|
|
ac75d0ca8b | ||
|
|
10beb751ac | ||
|
|
e0528e1714 | ||
|
|
0afb3ab687 | ||
|
|
58fd3a78cf | ||
|
|
f1ed699fa2 | ||
|
|
43646beca8 | ||
|
|
308a71e4a3 | ||
|
|
ecf1f1ac32 | ||
|
|
b34fb9daa3 | ||
|
|
195f40949f | ||
|
|
b68c6bed18 | ||
|
|
ab24e78a5b | ||
|
|
4892d64795 | ||
|
|
c10d6440ce | ||
|
|
c109a9e202 | ||
|
|
5d59540c51 | ||
|
|
e12e219b4e | ||
|
|
3ab2ac18fc | ||
|
|
6e2eca7829 | ||
|
|
8f4fc1da8e | ||
|
|
5de0e5ac60 | ||
|
|
13a718f871 | ||
|
|
15d09552a4 | ||
|
|
0b100feb32 | ||
|
|
1742437f8b | ||
|
|
5093a0c0a6 | ||
|
|
7e524d97b1 | ||
|
|
2e53331a0f | ||
|
|
c6d60780f4 | ||
|
|
8666a495d8 | ||
|
|
33bbf44199 | ||
|
|
cc49118868 | ||
|
|
f8fd99f588 | ||
|
|
fa8c9dc907 | ||
|
|
0911e67bf6 | ||
|
|
57a7cee62a | ||
|
|
1af28a79db | ||
|
|
6881f8e340 | ||
|
|
00cd1f65e8 | ||
|
|
2c9a6c0bd2 | ||
|
|
0c94cbb256 | ||
|
|
275bfee860 | ||
|
|
8a655e3cfd | ||
|
|
8521619783 | ||
|
|
62184240df | ||
|
|
0b210ac68e | ||
|
|
56f7753afc | ||
|
|
a0803875c4 | ||
|
|
f5716bdadc | ||
|
|
b76b3c0e4f | ||
|
|
2661c3d909 | ||
|
|
c854e98d84 | ||
|
|
72d8e49717 | ||
|
|
0fd95b71b2 | ||
|
|
4d83bc2e75 | ||
|
|
cf7b05ab72 | ||
|
|
055f1945d0 | ||
|
|
fa4a3abf84 | ||
|
|
96c7ccd758 | ||
|
|
76d319ec19 | ||
|
|
aab0e8473f | ||
|
|
4a4c471b9e | ||
|
|
fcd75b2af2 | ||
|
|
f318c6872e | ||
|
|
ae1240c103 | ||
|
|
e75d366245 | ||
|
|
da20cdacc4 | ||
|
|
5a986d367e | ||
|
|
f6b66283a7 | ||
|
|
6ad425cbf9 | ||
|
|
33e501cd83 | ||
|
|
fa558abef3 | ||
|
|
25a2b3af93 | ||
|
|
43587c2e1f | ||
|
|
c51542795f | ||
|
|
7eb83173ed | ||
|
|
5581dd26b5 | ||
|
|
1ac637af0f | ||
|
|
36951d1a34 | ||
|
|
5190265a2c | ||
|
|
40bf252852 | ||
|
|
85e92d21b4 | ||
|
|
fd43e81e46 | ||
|
|
c994a97d03 | ||
|
|
d59ba83d99 | ||
|
|
c1b887cea8 | ||
|
|
bd53b73685 | ||
|
|
beb7c3d4ee | ||
|
|
17571a5feb | ||
|
|
83e782d74a | ||
|
|
312f56048b | ||
|
|
494621a841 | ||
|
|
94af52892c | ||
|
|
5862a34f18 | ||
|
|
9b9e5ed1b5 | ||
|
|
4393377365 | ||
|
|
1570364741 | ||
|
|
738a240860 | ||
|
|
43b48aa643 | ||
|
|
61a0540007 | ||
|
|
f2e313dd0a | ||
|
|
b239d0da50 | ||
|
|
23459e3791 | ||
|
|
6a54944cb1 | ||
|
|
a52df9da7e | ||
|
|
28f98f179a | ||
|
|
5798f9e4fb | ||
|
|
4fe5ce45ac | ||
|
|
a212c254a9 | ||
|
|
235e18d706 | ||
|
|
7c91f8f6d1 | ||
|
|
c8cfe53136 | ||
|
|
f1f47ece14 | ||
|
|
a0dba2fa66 | ||
|
|
0f34b01189 | ||
|
|
5a449ad5c5 | ||
|
|
0d6a5ae902 | ||
|
|
2f7f7b1cd2 | ||
|
|
2eb25ce05c | ||
|
|
6e47707037 | ||
|
|
0932c14a2c | ||
|
|
e57c2c21ca | ||
|
|
a5ce90779c | ||
|
|
e9bf3dc355 | ||
|
|
8cb8654459 | ||
|
|
745e8e1cf0 | ||
|
|
5341109845 | ||
|
|
ff0e5b0aa3 | ||
|
|
c4e79d8ed2 | ||
|
|
6780c8177c | ||
|
|
71d6db0f35 | ||
|
|
9b9bdbc03d | ||
|
|
bb5c118e97 |
25
.drone.yml
Normal file
25
.drone.yml
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: default
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: submodules
|
||||||
|
image: docker:git
|
||||||
|
commands:
|
||||||
|
- git submodule update --recursive --init
|
||||||
|
- name: build left, debug
|
||||||
|
image: hardwario/gcc-arm-embedded:7-2017-q4-major
|
||||||
|
commands:
|
||||||
|
- make -j2 -C left DEBUG=1
|
||||||
|
- name: build left
|
||||||
|
image: hardwario/gcc-arm-embedded:7-2017-q4-major
|
||||||
|
commands:
|
||||||
|
- make -j2 -C left DEBUG=0
|
||||||
|
- name: build right, debug
|
||||||
|
image: hardwario/gcc-arm-embedded:7-2017-q4-major
|
||||||
|
commands:
|
||||||
|
- make -j2 -C right DEBUG=1
|
||||||
|
- name: build right
|
||||||
|
image: hardwario/gcc-arm-embedded:7-2017-q4-major
|
||||||
|
commands:
|
||||||
|
- make -j2 -C right DEBUG=0
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
|||||||
package-lock.json
|
package-lock.json
|
||||||
node_modules
|
node_modules
|
||||||
|
build_make
|
||||||
|
|||||||
43
.travis.yml
43
.travis.yml
@@ -1,25 +1,22 @@
|
|||||||
language: generic
|
language: c
|
||||||
|
|
||||||
|
os:
|
||||||
|
- linux
|
||||||
|
- osx
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- $HOME/Library/Caches/Homebrew/Cask
|
# Cache for the gcc archives
|
||||||
install: eclipse -noSplash
|
- $HOME/gcc-cache/
|
||||||
-application org.eclipse.equinox.p2.director
|
|
||||||
-repository http://gnuarmeclipse.sourceforge.net/updates
|
install:
|
||||||
-installIUs ilg.gnuarmeclipse.managedbuild.cross.feature.group
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then GCC_NAME="gcc-arm-none-eabi-7-2017-q4-major-mac.tar.bz2"; else GCC_NAME="gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2"; fi
|
||||||
-profileProperties org.eclipse.update.install.features=true
|
- if test ! -e $HOME/gcc-cache/$GCC_NAME ; then wget "https://developer.arm.com/-/media/Files/downloads/gnu-rm/7-2017q4/$GCC_NAME" -O $HOME/gcc-cache/$GCC_NAME ; fi
|
||||||
script: eclipse -noSplash
|
- tar -xf $HOME/gcc-cache/$GCC_NAME -C $HOME
|
||||||
-application org.eclipse.cdt.managedbuilder.core.headlessbuild
|
- export PATH=$PATH:$HOME/gcc-arm-none-eabi-7-2017-q4-major/bin
|
||||||
-import $TRAVIS_BUILD_DIR/left/build
|
|
||||||
-import $TRAVIS_BUILD_DIR/right/build
|
script:
|
||||||
-build all
|
- make -C left clean && make -j2 -C left DEBUG=1
|
||||||
matrix:
|
- make -C left clean && make -j2 -C left DEBUG=0
|
||||||
include:
|
- make -C right clean && make -j2 -C right DEBUG=1
|
||||||
- os: linux
|
- make -C right clean && make -j2 -C right DEBUG=0
|
||||||
sudo: required
|
|
||||||
before_install:
|
|
||||||
- curl https://nixos.org/nix/install | sh && . ~/.nix-profile/etc/profile.d/nix.sh
|
|
||||||
- nix-env -i gcc-arm-embedded-4.8-2014q1-20140314
|
|
||||||
- nix-env -i eclipse-cpp
|
|
||||||
- os: osx
|
|
||||||
env: PATH="$PATH:/Applications/Eclipse CPP.app/Contents/MacOS"
|
|
||||||
before_install: brew update && brew bundle -v
|
|
||||||
|
|||||||
297
CHANGELOG.md
297
CHANGELOG.md
@@ -5,17 +5,274 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is loosely based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
The format is loosely based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
||||||
and this project adheres to the [UHK Versioning](VERSIONING.md) conventions.
|
and this project adheres to the [UHK Versioning](VERSIONING.md) conventions.
|
||||||
|
|
||||||
|
## [8.6.0] - 2018-08-23
|
||||||
|
|
||||||
|
Device Protocol: 4.5.0 | Module Protocol: 4.**1.0** | User Config: 4.1.**1** | Hardware Config: 1.0.0
|
||||||
|
|
||||||
|
- Make the config parser accept mouse button 4 to 8. `USERCONFIG:PATCH`
|
||||||
|
- Implement API for modules to send pointer movements to the master. `MODULEPROTOCOL:MINOR`
|
||||||
|
- Fix empty macro playback.
|
||||||
|
|
||||||
|
## [8.5.4] - 2018-01-05
|
||||||
|
|
||||||
|
Device Protocol: 4.5.0 | Module Protocol: 4.0.0 | User Config: 4.1.0 | Hardware Config: 1.0.0
|
||||||
|
|
||||||
|
- Make the modifiers of shortcut keys stick only as long as the layer switcher key of a shortcut key is being held.
|
||||||
|
|
||||||
|
## [8.5.3] - 2018-10-20
|
||||||
|
|
||||||
|
Device Protocol: 4.5.0 | Module Protocol: 4.0.0 | User Config: 4.1.0 | Hardware Config: 1.0.0
|
||||||
|
|
||||||
|
- Re-enable the I2C watchdog of the left keyboard half which was accidentally disabled starting from firmware 8.4.3. This should fix the freezes of the left keyboard half.
|
||||||
|
|
||||||
|
## [8.5.2] - 2018-10-06
|
||||||
|
|
||||||
|
Device Protocol: 4.5.0 | Module Protocol: 4.0.0 | User Config: 4.1.0 | Hardware Config: 1.0.0
|
||||||
|
|
||||||
|
- Don't suppress keys upon keymap change.
|
||||||
|
|
||||||
|
## [8.5.1] - 2018-10-04
|
||||||
|
|
||||||
|
Device Protocol: 4.5.0 | Module Protocol: 4.0.0 | User Config: 4.1.0 | Hardware Config: 1.0.0
|
||||||
|
|
||||||
|
- Reset UsbReportUpdateSemaphore if it gets stuck for 100ms. This should fix occasional freezes.
|
||||||
|
|
||||||
|
## [8.5.0] - 2018-10-04
|
||||||
|
|
||||||
|
Device Protocol: 4.**5.0** | Module Protocol: 4.0.0 | User Config: 4.1.0 | Hardware Config: 1.0.0
|
||||||
|
|
||||||
|
- Send primary role modifiers consistently.
|
||||||
|
- Only allow layer switcher keys to deactivate toggled layers.
|
||||||
|
- Deactivate secondary roles when switching keymaps.
|
||||||
|
- Use the correct scancode so that commas are outputted for macros.
|
||||||
|
- Move the pointer not by 1 but by 5 pixels when testing the USB stack to make the pointer easier to see.
|
||||||
|
- Expose UsbReportUpdateSemaphore via UsbCommand_{Get,Set}Variable() `DEVICEPROTOCOL:MINOR`
|
||||||
|
- Extract CurrentTime and remove Timer_{Get,Set}CurrentTime()
|
||||||
|
|
||||||
|
## [8.4.5] - 2018-08-21
|
||||||
|
|
||||||
|
Device Protocol: 4.4.0 | Module Protocol: 4.0.0 | User Config: 4.1.0 | Hardware Config: 1.0.0
|
||||||
|
|
||||||
|
- Suppress pressed keys when the layer or keymap changes.
|
||||||
|
|
||||||
|
## [8.4.4] - 2018-08-14
|
||||||
|
|
||||||
|
Device Protocol: 4.4.0 | Module Protocol: 4.0.0 | User Config: 4.1.0 | Hardware Config: 1.0.0
|
||||||
|
|
||||||
|
- Don't wake the host if a key is held down through the beginning of sleep.
|
||||||
|
- Ensure that secondary roles are triggered consistently.
|
||||||
|
|
||||||
|
## [8.4.3] - 2018-08-12
|
||||||
|
|
||||||
|
Device Protocol: 4.4.0 | Module Protocol: 4.0.0 | User Config: 4.1.0 | Hardware Config: 1.0.0
|
||||||
|
|
||||||
|
- Compensate "double tap to lock layer" timeouts for the timer fix to make them as long as before 8.3.3
|
||||||
|
|
||||||
|
## [8.4.2] - 2018-08-02
|
||||||
|
|
||||||
|
Device Protocol: 4.4.0 | Module Protocol: 4.0.0 | User Config: 4.1.0 | Hardware Config: 1.0.0
|
||||||
|
|
||||||
|
- Fix various bugs related to secondary role handling and sticky modifier states.
|
||||||
|
|
||||||
|
## [8.4.1] - 2018-07-31
|
||||||
|
|
||||||
|
Device Protocol: 4.4.0 | Module Protocol: 4.0.0 | User Config: 4.1.0 | Hardware Config: 1.0.0
|
||||||
|
|
||||||
|
- Make some improvements to the sleep/wake code.
|
||||||
|
|
||||||
|
## [8.4.0] - 2018-07-24
|
||||||
|
|
||||||
|
Device Protocol: 4.**4.0** | Module Protocol: 4.0.0 | User Config: 4.1.0 | Hardware Config: 1.0.0
|
||||||
|
|
||||||
|
- Rewrite the key debouncer and set the press and release timeouts to 50ms.
|
||||||
|
- Add hardcoded test keymap.
|
||||||
|
- Make debounce timeouts configurable via USB. `DEVICEPROTOCOL:MINOR`
|
||||||
|
- Make the hardcoded test keymap able to trigger via USB. `DEVICEPROTOCOL:MINOR`
|
||||||
|
- Allow the USB stack test mode to be activated via USB. `DEVICEPROTOCOL:MINOR`
|
||||||
|
|
||||||
|
## [8.3.3] - 2018-07-03
|
||||||
|
|
||||||
|
Device Protocol: 4.3.1 | Module Protocol: 4.0.0 | User Config: 4.1.0 | Hardware Config: 1.0.0
|
||||||
|
|
||||||
|
- Implement the macro engine.
|
||||||
|
- Fix the timer which makes it tick twice as fast as before.
|
||||||
|
- Fix the nondeterministic bug that made USB hang.
|
||||||
|
- Restore the Windows related commits of firmware 8.3.1 because the USB hang bug has been fixed.
|
||||||
|
- Restore debouncing to 100ms until it gets really fixed.
|
||||||
|
|
||||||
|
## [8.3.2] - 2018-06-27
|
||||||
|
|
||||||
|
Device Protocol: 4.3.1 | Module Protocol: 4.0.0 | User Config: 4.1.0 | Hardware Config: 1.0.0
|
||||||
|
|
||||||
|
- Make the debouncer debounce not only on key presses but also on key releases, and change the debounce interval from 100ms to the suggested 5ms of MX switches.
|
||||||
|
- Revert the Windows related commits of firmware 8.3.1 because they introduced a nondeterministic bug that made USB hang.
|
||||||
|
- Add base layer key mappings for the left and right add-ons for testing purposes.
|
||||||
|
|
||||||
|
## [8.3.1] - 2018-06-07
|
||||||
|
|
||||||
|
Device Protocol: 4.3.1 | Module Protocol: 4.0.0 | User Config: 4.1.0 | Hardware Config: 1.0.0
|
||||||
|
|
||||||
|
- Fix media key repetition bug on Windows.
|
||||||
|
- Fix bug that made Windows unable to sleep when the UHK was plugged in.
|
||||||
|
- Fix bug that made Chrome Remote Desktop blocked from interacting on Windows.
|
||||||
|
- Fix bug that made locked layers not release. This bug was introduced in the previous release.
|
||||||
|
|
||||||
|
## [8.3.0] - 2018-06-03
|
||||||
|
|
||||||
|
Device Protocol: 4.3.1 | Module Protocol: 4.0.0 | User Config: 4.**1.0** | Hardware Config: 1.0.0
|
||||||
|
|
||||||
|
- Make the config parser handle switch layer actions with hold on double tap disabled. `USERCONFIG:MINOR`
|
||||||
|
- Set key debounce timeout from 80ms to 100ms. This should further reduce key chattering.
|
||||||
|
|
||||||
|
## [8.2.5] - 2018-05-27
|
||||||
|
|
||||||
|
Device Protocol: 4.3.1 | Module Protocol: 4.0.0 | User Config: 4.0.1 | Hardware Config: 1.0.0
|
||||||
|
|
||||||
|
- Now really fix the bug that made the hardware and user configuration not load from the EEPROM on some hosts right after firmware update.
|
||||||
|
|
||||||
|
## [8.2.4] - 2018-05-21
|
||||||
|
|
||||||
|
Device Protocol: 4.3.**1** | Module Protocol: 4.0.0 | User Config: 4.0.1 | Hardware Config: 1.0.0
|
||||||
|
|
||||||
|
- Fix the bug that made the hardware and user configuration not load from the EEPROM on some hosts right after firmware update.
|
||||||
|
- Set the signature of the hardware config to "FTY" in the RAM when the keyboard is in factory reset mode, allowing Agent to be aware of the factory reset state. `DEVICEPROTOCOL:PATCH`
|
||||||
|
- Load the hardware and user configuration from the EEPROM even in factory reset mode.
|
||||||
|
- Set key debounce timeout from 60ms to 80ms. This should further reduce key chattering.
|
||||||
|
|
||||||
|
## [8.2.3] - 2018-05-15
|
||||||
|
|
||||||
|
Device Protocol: 4.3.0 | Module Protocol: 4.0.0 | User Config: 4.0.1 | Hardware Config: 1.0.0
|
||||||
|
|
||||||
|
- Don't switch keymaps instead of playing macros.
|
||||||
|
- Make saving the user configuration faster by only writing the part of the EEPROM which actually contains the user configuration.
|
||||||
|
|
||||||
|
## [8.2.2] - 2018-05-09
|
||||||
|
|
||||||
|
Device Protocol: 4.3.0 | Module Protocol: 4.0.0 | User Config: 4.0.**1** | Hardware Config: 1.0.0
|
||||||
|
|
||||||
|
- Parse long media macro actions. `USERCONFIG:PATCH`
|
||||||
|
- Fix vendor-specific USB usage page entry. This makes the HIDAPI Linux/hidraw driver able to access interface 0.
|
||||||
|
|
||||||
|
## [8.2.1] - 2018-05-02
|
||||||
|
|
||||||
|
Device Protocol: 4.3.0 | Module Protocol: 4.0.0 | User Config: 4.0.0 | Hardware Config: 1.0.0
|
||||||
|
|
||||||
|
- Don't suppress modifier keys upon releasing a layer.
|
||||||
|
- Restore Caps Lock indicator when saving the configuration.
|
||||||
|
|
||||||
|
## [8.2.0] - 2018-04-20
|
||||||
|
|
||||||
|
Device Protocol: 4.**3.0** | Module Protocol: 4.0.0 | User Config: 4.0.0 | Hardware Config: 1.0.0
|
||||||
|
|
||||||
|
- Change the scheduling of USB reports which changes mouse pointer speeds.
|
||||||
|
- Disable LEDs while the host sleeps.
|
||||||
|
- Make any key wake up the host while it sleeps.
|
||||||
|
- Add UsbCommand_SwitchKeymap(). `DEVICEPROTOCOL:MINOR`
|
||||||
|
- Make GCC optimize the release builds for execution speed (-O3).
|
||||||
|
|
||||||
|
## [8.1.5] - 2018-04-04
|
||||||
|
|
||||||
|
Device Protocol: 4.2.0 | Module Protocol: 4.0.0 | User Config: 4.0.0 | Hardware Config: 1.0.0
|
||||||
|
|
||||||
|
- Set key debounce timeout from 30ms to 60ms. This should eliminate key chattering.
|
||||||
|
- Use the correct scancode for the menu key of the factory keymap.
|
||||||
|
|
||||||
|
## [8.1.4] - 2018-03-05
|
||||||
|
|
||||||
|
Device Protocol: 4.2.0 | Module Protocol: 4.0.0 | User Config: 4.0.0 | Hardware Config: 1.0.0
|
||||||
|
|
||||||
|
- Set key debounce timeout from 20ms to 30ms. This should eliminate key chattering.
|
||||||
|
- Set double tap lock layer timeout from 250ms to 150ms. This should minimize the chance of locking layers accidentally by double tapping their keys.
|
||||||
|
|
||||||
|
## [8.1.3] - 2018-02-18
|
||||||
|
|
||||||
|
Device Protocol: 4.2.0 | Module Protocol: 4.0.0 | User Config: 4.0.0 | Hardware Config: 1.0.0
|
||||||
|
|
||||||
|
- Fix system keyboard descriptor, so it is byte-aligned.
|
||||||
|
- Set key debounce timeout from 15ms to 20ms. This should at least reduce and hopefully eliminate key chattering.
|
||||||
|
|
||||||
|
## [8.1.2] - 2018-02-13
|
||||||
|
|
||||||
|
Device Protocol: 4.2.0 | Module Protocol: 4.0.0 | User Config: 4.0.0 | Hardware Config: 1.0.0
|
||||||
|
|
||||||
|
- Detect Caps Lock USB state and light up the Caps Lock icon of the LED display accordingly.
|
||||||
|
- Set key debounce timeout from 10ms to 15ms. This should at least reduce and hopefully eliminate key chattering.
|
||||||
|
|
||||||
|
## [8.1.1] - 2018-02-11
|
||||||
|
|
||||||
|
Device Protocol: 4.2.0 | Module Protocol: 4.0.0 | User Config: 4.0.0 | Hardware Config: 1.0.0
|
||||||
|
|
||||||
|
- Lock layers every time when double-tapping their layer switcher keys, regardless of how many times the layer switcher key was tapped before.
|
||||||
|
- Only lock layers via double-tapping if the second tap gets released within 100ms.
|
||||||
|
|
||||||
|
## [8.1.0] - 2018-01-15
|
||||||
|
|
||||||
|
Device Protocol: 4.**2**.0 | Module Protocol: 4.0.0 | User Config: 4.0.0 | Hardware Config: 1.0.0
|
||||||
|
|
||||||
|
- Enable left-half watchdog in reinit mode which seems to prevent freezes.
|
||||||
|
- Slow down main bus I2C baud rate to 30kHz when BusPal is on to make firmware transfer more robust.
|
||||||
|
- Implement UsbCommandId_GetSlaveI2cErrors. `DEVICEPROTOCOL:MINOR`
|
||||||
|
- Implement UsbCommandId_SetI2cBaudRate. `DEVICEPROTOCOL:MINOR`
|
||||||
|
- Implement DevicePropertyId_CurrentKbootCommand. `DEVICEPROTOCOL:MINOR`
|
||||||
|
- Implement DevicePropertyId_I2cMainBusBaudRate. `DEVICEPROTOCOL:MINOR`
|
||||||
|
- Implement DevicePropertyId_Uptime. `DEVICEPROTOCOL:MINOR`
|
||||||
|
|
||||||
|
## [8.0.1] - 2017-12-25
|
||||||
|
|
||||||
|
Device Protocol: 4.1.0 | Module Protocol: 4.0.0 | User Config: 4.0.0 | Hardware Config: 1.0.0
|
||||||
|
|
||||||
|
- Implement I2C watchdog for the left keyboard half which should resolve the occasional hangs of the left keyboard half.
|
||||||
|
|
||||||
|
## [8.0.0] - 2017-12-15
|
||||||
|
|
||||||
|
Device Protocol: 4.**1.0** | Module Protocol: **4.0.0** | User Config: 4.0.0 | Hardware Config: 1.0.0
|
||||||
|
|
||||||
|
- Make the modules transfer the module protocol version and firmware version composed of a major, a minor and a patch number. `MODULEPROTOCOL:MAJOR`
|
||||||
|
- Query module key count and pointer count in separate messages instead of a combined message for improved clarity. `MODULEPROTOCOL:MAJOR`
|
||||||
|
- Add new UsbCommand_GetModuleProperties() device protocol command. `DEVICEPROTOCOL:MINOR`
|
||||||
|
|
||||||
|
## [7.0.0] - 2017-12-14
|
||||||
|
|
||||||
|
Device Protocol: **4.0.0** | Module Protocol: 3.0.0 | User Config: 4.0.0 | Hardware Config: 1.0.0
|
||||||
|
|
||||||
|
- Make UsbCommand_JumpToModuleBootloader() more robust by not making it dependent on the state of the module driver.
|
||||||
|
- Don't make horizontal scrolling and vertical scrolling affect each other.
|
||||||
|
- Expose version numbers via the get property interface. `DEVICEPROTOCOL:MINOR`
|
||||||
|
- Add DevicePropertyId_ConfigSizes. `DEVICEPROTOCOL:MINOR`
|
||||||
|
- Remove DevicePropertyId_HardwareConfigSize and DevicePropertyId_UserConfigSize. `DEVICEPROTOCOL:MAJOR`
|
||||||
|
|
||||||
|
## [6.0.0] - 2017-12-12
|
||||||
|
|
||||||
|
Device Protocol: **3.0.0** | Module Protocol: 3.0.0 | User Config: 4.0.0 | Hardware Config: 1.0.0
|
||||||
|
|
||||||
|
- Change the value of almost every Device Protocol commands because there were unused intervals between them. `DEVICEPROTOCOL:MAJOR`
|
||||||
|
- Disable LED display icons by default.
|
||||||
|
- Update LED brightness levels upon applying the configuration.
|
||||||
|
|
||||||
|
## [5.0.1] - 2017-12-09
|
||||||
|
|
||||||
|
Device Protocol: 2.0.0 | Module Protocol: 3.0.0 | User Config: 4.0.0 | Hardware Config: 1.0.0
|
||||||
|
|
||||||
|
- Make key presses continue to emit scancodes even if a USB interface (typically the mouse interface) is not polled by the host anymore.
|
||||||
|
- Make scrolling always immediately react to keypresses regardless of the previous internal scroll state.
|
||||||
|
|
||||||
|
## [5.0.0] - 2017-12-04
|
||||||
|
|
||||||
|
Device Protocol: 2.0.0 | Module Protocol: 3.0.0 | User Config: **4.0.0** | Hardware Config: 1.0.0
|
||||||
|
|
||||||
|
- Move pointerRole from keymaps to module configurations as pointerMode. Add angularShift, modLayerPointerFunction, fnLayerPointerFunction, and mouseLayerPointerFunction to module configurations. `USERCONFIG:MAJOR`
|
||||||
|
|
||||||
## [4.0.0] - 2017-11-30
|
## [4.0.0] - 2017-11-30
|
||||||
|
|
||||||
Data Model: 3.0.0 (major bump) | USB Protocol: 2.0.0 (unchanged) | Slave Protocol: 3.0.0 (unchanged)
|
Device Protocol: 2.0.0 | Module Protocol: 3.0.0 | User Config: **3.0.0** | Hardware Config: 1.0.0
|
||||||
|
|
||||||
- Implement mouse movement and scrolling deceleration and acceleration.
|
- Implement mouse movement and scrolling deceleration and acceleration.
|
||||||
- Toggle layers upon double tapping their keys. Make the double tap timeout configurable.
|
- Toggle layers upon double tapping their keys. Make the double tap timeout configurable.
|
||||||
- Make the parser read additional user configuration properties: dataModelMajorVersion, dataModelMinorVersion, dataModelPatchVersion, doubleTapSwitchLayerTimeout, iconsAndLayerTextsBrightness, alphanumericSegmentsBrightness, keyBacklightBrightness, mouseMoveInitialSpeed, mouseMoveAcceleration, mouseMoveDeceleratedSpeed, mouseMoveBaseSpeed, mouseMoveAcceleratedSpeed, mouseScrollInitialSpeed, mouseScrollAcceleration, mouseScrollDeceleratedSpeed, mouseScrollBaseSpeed, mouseScrollAcceleratedSpeed. `DATAMODEL:MAJOR`
|
- Make the parser read additional user configuration properties: userConfigMajorVersion, userConfigMinorVersion, userConfigPatchVersion, doubleTapSwitchLayerTimeout, iconsAndLayerTextsBrightness, alphanumericSegmentsBrightness, keyBacklightBrightness, mouseMoveInitialSpeed, mouseMoveAcceleration, mouseMoveDeceleratedSpeed, mouseMoveBaseSpeed, mouseMoveAcceleratedSpeed, mouseScrollInitialSpeed, mouseScrollAcceleration, mouseScrollDeceleratedSpeed, mouseScrollBaseSpeed, mouseScrollAcceleratedSpeed. `USERCONFIG:MAJOR`
|
||||||
|
|
||||||
## [3.0.0] - 2017-11-15
|
## [3.0.0] - 2017-11-15
|
||||||
|
|
||||||
Data Model: 2.0.0 (major bump) | USB Protocol: 2.0.0 (major bump) | Slave Protocol: 3.0.0 (major bump)
|
Device Protocol: **2.0.0** | Module Protocol: **3.0.0** | User Config: **2.0.0** | Hardware Config: 1.0.0
|
||||||
|
|
||||||
- Detect the use of USB interfaces and only wait for the ones that are actually used by the host.
|
- Detect the use of USB interfaces and only wait for the ones that are actually used by the host.
|
||||||
- Implement key debouncer.
|
- Implement key debouncer.
|
||||||
@@ -23,49 +280,49 @@ Data Model: 2.0.0 (major bump) | USB Protocol: 2.0.0 (major bump) | Slave Protoc
|
|||||||
- Make pressing the reset button revert to the factory preset.
|
- Make pressing the reset button revert to the factory preset.
|
||||||
- Revert to the factory default state when the reset button is pressed upon firmware startup. Display FTY on the display in this case.
|
- Revert to the factory default state when the reset button is pressed upon firmware startup. Display FTY on the display in this case.
|
||||||
- Make the LED display show the abbreviation of the current keymap even when it gets reinitialized by the I2C watchdog.
|
- Make the LED display show the abbreviation of the current keymap even when it gets reinitialized by the I2C watchdog.
|
||||||
- Swap SlaveCommand_RequestKeyStates and SlaveCommand_JumpToBootloader, thereby making SlaveCommand_JumpToBootloader the lower number because it's more essential and shouldn't change in the future. `SLAVEPROTOCOL:MAJOR`
|
- Swap SlaveCommand_RequestKeyStates and SlaveCommand_JumpToBootloader, thereby making SlaveCommand_JumpToBootloader the lower number because it's more essential and shouldn't change in the future. `MODULEPROTOCOL:MAJOR`
|
||||||
- Suppress pressed keys upon layer switcher key release.
|
- Suppress pressed keys upon layer switcher key release.
|
||||||
- Handle secondary role modifiers and layer switchers.
|
- Handle secondary role modifiers and layer switchers.
|
||||||
- Make UsbCommand_JumpToSlaveBootloader expect a slave slot id instead of a uhkModuleDriverId. `USBPROTOCOL:MAJOR`
|
- Make UsbCommand_JumpToSlaveBootloader expect a slave slot id instead of a uhkModuleDriverId. `DEVICEPROTOCOL:MAJOR`
|
||||||
- Set UsbResponse_InvalidCommand upon encountering with an invalid USB command. `USBPROTOCOL:MINOR`
|
- Set UsbResponse_InvalidCommand upon encountering with an invalid USB command. `DEVICEPROTOCOL:MINOR`
|
||||||
- Remove UsbCommandId_ReadMergeSensor now that it can be queried via UsbCommandId_GetKeyboardState. `USBPROTOCOL:MAJOR`
|
- Remove UsbCommandId_ReadMergeSensor now that it can be queried via UsbCommandId_GetKeyboardState. `DEVICEPROTOCOL:MAJOR`
|
||||||
- Make the getAdcValue and getDebugInfo USB commands utilize the first byte of the response to provide status as dictated by the UHK protocol. `USBPROTOCOL:MAJOR`
|
- Make the getAdcValue and getDebugInfo USB commands utilize the first byte of the response to provide status as dictated by the UHK protocol. `DEVICEPROTOCOL:MAJOR`
|
||||||
- Switch keymap only upon keypress.
|
- Switch keymap only upon keypress.
|
||||||
- Handle layer toggle actions.
|
- Handle layer toggle actions.
|
||||||
- Keep the active layer active even if another layer switcher key gets pressed while holding it.
|
- Keep the active layer active even if another layer switcher key gets pressed while holding it.
|
||||||
- Read the new UserConfig.userConfigLength user config field. `DATAMODEL:MAJOR`
|
- Read the new UserConfig.userConfigLength user config field. `USERCONFIG:MAJOR`
|
||||||
- Change Ctrl and Alt back according to the official UHK factory keymap.
|
- Change Ctrl and Alt back according to the official UHK factory keymap.
|
||||||
- Update system keyboard HID descriptor which doesn't make the pointer go to the top left corner on OSX anymore.
|
- Update system keyboard HID descriptor which doesn't make the pointer go to the top left corner on OSX anymore.
|
||||||
- Scan keyboard matrices in a more efficient manner from timer interrupts instead of the main loop.
|
- Scan keyboard matrices in a more efficient manner from timer interrupts instead of the main loop.
|
||||||
- Add UsbCommand_SendKbootCommand. `USBPROTOCOL:MINOR`
|
- Add UsbCommand_SendKbootCommand. `DEVICEPROTOCOL:MINOR`
|
||||||
- Make the reenumerate USB command accept a timeout value. `USBPROTOCOL:MINOR`
|
- Make the reenumerate USB command accept a timeout value. `DEVICEPROTOCOL:MINOR`
|
||||||
- Make the config parser read the device name. `DATAMODEL:MAJOR`
|
- Make the config parser read the device name. `USERCONFIG:MAJOR`
|
||||||
- Update release file format containing device and module directories and hex files instead of srec.
|
- Update release file format containing device and module directories and hex files instead of srec.
|
||||||
- Remove obsolete ARM GCC build files.
|
- Remove obsolete ARM GCC build files.
|
||||||
|
|
||||||
## [2.1.0] - 2017-10-13
|
## [2.1.0] - 2017-10-13
|
||||||
|
|
||||||
Data Model: 1.0.0 (unchanged) | USB Protocol: 1.2.0 (minor bump) | Slave Protocol: 2.1.0 (minor bump)
|
Device Protocol: 1.**2.0** | Module Protocol: 2.**1.0** | User Config: 1.0.0 | Hardware Config: 1.0.0
|
||||||
|
|
||||||
- Add jumpToSlaveBootloader USB and slave protocol command. `USBPROTOCOL:MINOR` `SLAVEPROTOCOL:MINOR`
|
- Add jumpToSlaveBootloader USB and Module Protocol command. `DEVICEPROTOCOL:MINOR` `MODULEPROTOCOL:MINOR`
|
||||||
- Fix generic HID descriptor enumeration error.
|
- Fix generic HID descriptor enumeration error.
|
||||||
|
|
||||||
## [2.0.0] - 2017-10-10
|
## [2.0.0] - 2017-10-10
|
||||||
|
|
||||||
Data Model: 1.0.0 (unchanged) | USB Protocol: 1.1.0 (minor bump) | Slave Protocol: 2.0.0 (major bump)
|
Device Protocol: 1.**1.0** | Module Protocol: **2.0.0** | User Config: 1.0.0 | Hardware Config: 1.0.0
|
||||||
|
|
||||||
- Read the hardware and user configuration area of the EEPROM upon startup and set the default keymap.
|
- Read the hardware and user configuration area of the EEPROM upon startup and set the default keymap.
|
||||||
- Greatly improve the I2C watchdog and drivers. Communication between the halves or the add-ons should never fail again.
|
- Greatly improve the I2C watchdog and drivers. Communication between the halves or the add-ons should never fail again.
|
||||||
- Implement generic enumeration sequence and per-slave state for UHK modules, allowing add-ons to be added. `SLAVEPROTOCOL:MAJOR`
|
- Implement generic enumeration sequence and per-slave state for UHK modules, allowing add-ons to be added. `MODULEPROTOCOL:MAJOR`
|
||||||
- Make the master cache the output fields of slave modules, allowing for more frequent input updates.
|
- Make the master cache the output fields of slave modules, allowing for more frequent input updates.
|
||||||
- Optimize I2C protocol scheduler resulting in increased roustness and more efficient use of I2C bandwidth.
|
- Optimize I2C protocol scheduler resulting in increased roustness and more efficient use of I2C bandwidth.
|
||||||
- Add I2C message headers containing a length header, allowing for variable-length messages and a CRC16-CCITT checksum, allowing for robust communication. `SLAVEPROTOCOL:MAJOR`
|
- Add I2C message headers containing a length header, allowing for variable-length messages and a CRC16-CCITT checksum, allowing for robust communication. `MODULEPROTOCOL:MAJOR`
|
||||||
- Add mechanism to dump the internal state of the KL03 via SPI for debugging purposes.
|
- Add mechanism to dump the internal state of the KL03 via SPI for debugging purposes.
|
||||||
- Add merge sensor state and attached module IDs to GetDebugInfo(). `USBPROTOCOL:PATCH`
|
- Add merge sensor state and attached module IDs to GetDebugInfo(). `DEVICEPROTOCOL:PATCH`
|
||||||
- Throw ParserError_InvalidKeymapCount if keymapCount == 0. `DATAMODEL:PATCH`
|
- Throw ParserError_InvalidKeymapCount if keymapCount == 0. `USERCONFIG:PATCH`
|
||||||
|
|
||||||
## [1.0.0] - 2017-08-30
|
## [1.0.0] - 2017-08-30
|
||||||
|
|
||||||
Data Model: 1.0.0 | USB Protocol: 1.0.0 | Slave Protocol: 1.0.0
|
Device Protocol: 1.0.0 | Module Protocol: 1.0.0 | User Config: 1.0.0 | Hardware Config: 1.0.0
|
||||||
|
|
||||||
- First Release
|
- First Release
|
||||||
|
|||||||
@@ -1,3 +1,17 @@
|
|||||||
|
# Signing the CLA
|
||||||
|
|
||||||
|
Before contributing to this project, you must sign [the CLA](/cla/cla-1.0.0.md).
|
||||||
|
|
||||||
|
To sign the CLA, add your GitHub username to the end of the CLA. Make sure that the usernames remain alphabetically sorted.
|
||||||
|
|
||||||
|
Then create a pull request with the title:
|
||||||
|
|
||||||
|
> Sign CLA
|
||||||
|
|
||||||
|
and with the body:
|
||||||
|
|
||||||
|
> I have read the Agreement, and fully agree to it by signing it with my GitHub username.
|
||||||
|
|
||||||
# Coding standards
|
# Coding standards
|
||||||
|
|
||||||
## Literal structure
|
## Literal structure
|
||||||
|
|||||||
8
ISSUE_TEMPLATE
Normal file
8
ISSUE_TEMPLATE
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
Before submitting a new issue, make sure to do the following:
|
||||||
|
|
||||||
|
1. If you're using Karabiner Elements on your Mac, close it!
|
||||||
|
2. Install the latest Agent:
|
||||||
|
https://github.com/UltimateHackingKeyboard/agent/releases/latest
|
||||||
|
3. Use Agent to update to the latest firmware:
|
||||||
|
https://github.com/UltimateHackingKeyboard/firmware/releases/latest
|
||||||
|
4. Try to reproduce the issue, and only report it if it still persists.
|
||||||
33
README.md
33
README.md
@@ -4,24 +4,41 @@
|
|||||||
|
|
||||||
This repository hosts the firmware of the [Ultimate Hacking Keyboard](https://ultimatehackingkeyboard.com/).
|
This repository hosts the firmware of the [Ultimate Hacking Keyboard](https://ultimatehackingkeyboard.com/).
|
||||||
|
|
||||||
## Cloning the repository
|
If you want to use the latest firmware version for your UHK, then instead of going through the pain of building the firmware, simply download the [latest release of Agent](https://github.com/UltimateHackingKeyboard/agent/releases/latest) and update to the latest firmware version within Agent with a click of a button.
|
||||||
|
|
||||||
Please make sure to clone this repo with:
|
If you're one of the brave few who wants to hack the firmware then read on.
|
||||||
|
|
||||||
|
1. Make sure to clone this repo with:
|
||||||
|
|
||||||
`git clone --recursive git@github.com:UltimateHackingKeyboard/firmware.git`
|
`git clone --recursive git@github.com:UltimateHackingKeyboard/firmware.git`
|
||||||
|
|
||||||
This will download the dependent submodules, which are required to build the firmware.
|
2. Download and install MCUXpresso IDE for [Linux](https://storage.googleapis.com/ugl-static/mcuxpresso-ide/mcuxpressoide-11.0.1_2563.x86_64.deb.bin), [Mac](https://storage.googleapis.com/ugl-static/mcuxpresso-ide/MCUXpressoIDE_11.0.1_2563.pkg), or [Windows](https://storage.googleapis.com/ugl-static/mcuxpresso-ide/MCUXpressoIDE_11.0.1_2563.exe).
|
||||||
|
|
||||||
## Importing the firmware
|
3. Install the GNU ARM Eclipse Plugins for in McuXpresso IDE. This is needed to make indexing work, and to avoid the "Orphaned configuration" error message in project properties.
|
||||||
|
1. Visit the [latest release](https://github.com/gnu-mcu-eclipse/eclipse-plugins/releases/latest).
|
||||||
|
2. Download the zip file.
|
||||||
|
3. In MCUXpresso IDE, go to Help > "Install New Software...", then a new dialog will appear.
|
||||||
|
4. Click the "Add..." button, then a new dialog will appear.
|
||||||
|
5. Click the "Archive..." button and choose the downloaded zip file.
|
||||||
|
6. Go with the flow and install the plugin.
|
||||||
|
|
||||||
Install [Kinetis Design Studio](http://www.nxp.com/products/software-and-tools/run-time-software/kinetis-software-and-tools/ides-for-kinetis-mcus/kinetis-design-studio-integrated-development-environment-ide:KDS_IDE) (KDS), import the project by invoking *File -> Import -> General -> Existing Projects into Workspace*, select the *left* or *right* directory depending on the desired firmware, then click on the *Finish* button.
|
4. In the IDE, import this project by invoking *File -> Import -> General -> Existing Projects into Workspace*, select the *left* or *right* directory depending on the desired firmware, then click on the *Finish* button.
|
||||||
|
|
||||||
## Building and flashing the firmware
|
5. In order to be able to flash the firmware via USB from the IDE, you must build [Agent](https://github.com/UltimateHackingKeyboard/agent) which is Git submodule of the this repo and located in the `lib/agent` directory.
|
||||||
|
|
||||||
For the left keyboard half, make sure to power it via the right keyboard half (which must be powered via USB). Also connect the left keyboard half to your SEGGER J-Link USB debug probe (which must also be connected via USB). Then in KDS, click on *Run -> Run Configurations*, select *GDB SEGGER J-Link Debugging -> uhk-left release jlink*, and click on the *Debug* button.
|
6. Finally, in the IDE, click on *Run -> External Tools -> External Tools Configurations*, then select a release firmware to be flashed such as *uhk60-right_release_kboot*, and click on the *Run* button.
|
||||||
|
|
||||||
For the right keyboard half, flash [the bootloader](https://github.com/UltimateHackingKeyboard/bootloader) first. Then in KDS, click on *Run -> Run Configurations*, select *C/C++ Application -> uhk-right release blhost*, and click on the *Debug* button. Please note that this update method only works on Linux out of the box. On other operating systems, you have to execute the relevant commands of the [blhost-unix.sh](right/build/kds/blhost-unix.sh) script.
|
Going forward, it's easier to flash the firmware of your choice by using the downwards toolbar icon which is located rightwards of the *green play + toolbox icon*.
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
Want to contribute? Let us show you [how](/CONTRIBUTING.md).
|
Want to contribute? Let us show you [how](/CONTRIBUTING.md).
|
||||||
|
|
||||||
|
## Custom Firmwares
|
||||||
|
|
||||||
|
The following list contains unofficial forks of the firmware. These forks provide functionality unavailable in the official firmware, but come without guarantees of any kind:
|
||||||
|
|
||||||
|
- [https://github.com/kareltucek/firmware](https://github.com/kareltucek/firmware) - firmware featuring macro engine extended by a set of custom commands, allowing more advanced configurations including custom layer switching logic, doubletap bindings, alternative secondary roles etc.
|
||||||
|
|
||||||
|
- [https://github.com/p4elkin/firmware](https://github.com/p4elkin/firmware) - firmware fork which comes with an alternative implementation of the secondary key role mechanism making it possible to use the feature for keys actively involved in typing (e.g. alphanumeric ones).
|
||||||
|
|
||||||
|
|||||||
108
cla/cla-1.0.0.md
Normal file
108
cla/cla-1.0.0.md
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
# Contributor Agreement
|
||||||
|
## Individual Contributor Exclusive License Agreement version 1.0.0
|
||||||
|
|
||||||
|
Thank you for your interest in contributing to Ultimate Gadget Laboratories Kft.'s Ultimate Hacking Keyboard firmware ("We" or "Us").
|
||||||
|
|
||||||
|
The purpose of this contributor agreement ("Agreement") is to clarify and document the rights granted by contributors to Us.
|
||||||
|
|
||||||
|
By signing this Agreement, you agree that the following terms apply to all of your past, present and future contributions to the project.
|
||||||
|
|
||||||
|
## How to use this Contributor Agreement
|
||||||
|
|
||||||
|
If You are an employee and have created the Contribution as part of your employment, You need to have Your employer approve this Agreement or sign the Entity version of this document. If You do not own the Copyright in the entire work of authorship, any other author of the Contribution should also sign this – in any event, please contact Us at support@UltimateHackingKeyboard.com
|
||||||
|
|
||||||
|
## 1. Definitions
|
||||||
|
|
||||||
|
**"You"** means the individual Copyright owner who Submits a Contribution to Us.
|
||||||
|
|
||||||
|
**"Contribution"** means any original work of authorship, including any original modifications or additions to an existing work of authorship, Submitted by You to Us, in which You own the Copyright.
|
||||||
|
|
||||||
|
**"Copyright"** means all rights protecting works of authorship, including copyright, moral and neighboring rights, as appropriate, for the full term of their existence.
|
||||||
|
|
||||||
|
**"Material"** means the software or documentation made available by Us to third parties. When this Agreement covers more than one software project, the Material means the software or documentation to which the Contribution was Submitted. After You Submit the Contribution, it may be included in the Material.
|
||||||
|
|
||||||
|
**"Submit"** means any act by which a Contribution is transferred to Us by You by means of tangible or intangible media, including but not limited to electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, Us, but excluding any transfer that is conspicuously marked or otherwise designated in writing by You as "Not a Contribution."
|
||||||
|
|
||||||
|
**"Documentation"** means any non-software portion of a Contribution.
|
||||||
|
|
||||||
|
## 2. License grant
|
||||||
|
|
||||||
|
### 2.1 Copyright license to Us
|
||||||
|
|
||||||
|
Subject to the terms and conditions of this Agreement, You hereby grant to Us a worldwide, royalty-free, exclusive, perpetual and irrevocable (except as stated in Section 8.2) license, with the right to transfer an unlimited number of non-exclusive licenses or to grant sublicenses to third parties, under the Copyright covering the Contribution to use the Contribution by all means, including, but not limited to:
|
||||||
|
|
||||||
|
* publish the Contribution,
|
||||||
|
* modify the Contribution,
|
||||||
|
* prepare derivative works based upon or containing the Contribution and/or to combine the Contribution with other Materials,
|
||||||
|
* reproduce the Contribution in original or modified form,
|
||||||
|
* distribute, to make the Contribution available to the public, display and publicly perform the Contribution in original or modified form.
|
||||||
|
|
||||||
|
### 2.2 Moral rights
|
||||||
|
|
||||||
|
Moral Rights remain unaffected to the extent they are recognized and not waivable by applicable law.
|
||||||
|
|
||||||
|
### 2.3 Copyright license back to You
|
||||||
|
|
||||||
|
Upon such grant of rights to Us, We immediately grant to You a worldwide, royalty-free, non-exclusive, perpetual and irrevocable license, with the right to transfer an unlimited number of non-exclusive licenses or to grant sublicenses to third parties, under the Copyright covering the Contribution to use the Contribution by all means, including, but not limited to:
|
||||||
|
|
||||||
|
* publish the Contribution,
|
||||||
|
* modify the Contribution,
|
||||||
|
* prepare derivative works based upon or containing the Contribution and/or to combine the Contribution with other Materials,
|
||||||
|
* reproduce the Contribution in original or modified form,
|
||||||
|
* distribute, to make the Contribution available to the public, display and publicly perform the Contribution in original or modified form.
|
||||||
|
|
||||||
|
This license back is limited to the Contribution and does not provide any rights to the Material.
|
||||||
|
|
||||||
|
## 3. Patents
|
||||||
|
|
||||||
|
### 3.1 Patent license
|
||||||
|
|
||||||
|
Subject to the terms and conditions of this Agreement You hereby grant to Us and to recipients of Materials distributed by Us a worldwide, royalty-free, non-exclusive, perpetual and irrevocable (except as stated in Section 3.2) patent license, with the right to transfer an unlimited number of non-exclusive licenses or to grant sublicenses to third parties, to make, have made, use, sell, offer for sale, import and otherwise transfer the Contribution and the Contribution in combination with any Material (and portions of such combination). This license applies to all patents owned or controlled by You, whether already acquired or hereafter acquired, that would be infringed by making, having made, using, selling, offering for sale, importing or otherwise transferring of Your Contribution(s) alone or by combination of Your Contribution(s) with any Material.
|
||||||
|
|
||||||
|
### 3.2 Revocation of patent license
|
||||||
|
|
||||||
|
You reserve the right to revoke the patent license stated in section 3.1 if We make any infringement claim that is targeted at your Contribution and not asserted for a Defensive Purpose. An assertion of claims of the Patents shall be considered for a "Defensive Purpose" if the claims are asserted against an entity that has filed, maintained, threatened, or voluntarily participated in a patent infringement lawsuit against Us or any of Our licensees.
|
||||||
|
|
||||||
|
## 4. Disclaimer
|
||||||
|
|
||||||
|
THE CONTRIBUTION IS PROVIDED "AS IS". MORE PARTICULARLY, ALL EXPRESS OR IMPLIED WARRANTIES INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTY OF SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE EXPRESSLY DISCLAIMED BY YOU TO US AND BY US TO YOU. TO THE EXTENT THAT ANY SUCH WARRANTIES CANNOT BE DISCLAIMED, SUCH WARRANTY IS LIMITED IN DURATION AND EXTENT TO THE MINIMUM PERIOD AND EXTENT PERMITTED BY LAW.
|
||||||
|
|
||||||
|
## 5. Consequential damage waiver
|
||||||
|
|
||||||
|
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT WILL YOU OR WE BE LIABLE FOR ANY LOSS OF PROFITS, LOSS OF ANTICIPATED SAVINGS, LOSS OF DATA, INDIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL AND EXEMPLARY DAMAGES ARISING OUT OF THIS AGREEMENT REGARDLESS OF THE LEGAL OR EQUITABLE THEORY (CONTRACT, TORT OR OTHERWISE) UPON WHICH THE CLAIM IS BASED.
|
||||||
|
|
||||||
|
## 6. Approximation of disclaimer and damage waiver
|
||||||
|
|
||||||
|
IF THE DISCLAIMER AND DAMAGE WAIVER MENTIONED IN SECTION 4. AND SECTION 5. CANNOT BE GIVEN LEGAL EFFECT UNDER APPLICABLE LOCAL LAW, REVIEWING COURTS SHALL APPLY LOCAL LAW THAT MOST CLOSELY APPROXIMATES AN ABSOLUTE WAIVER OF ALL CIVIL OR CONTRACTUAL LIABILITY IN CONNECTION WITH THE CONTRIBUTION.
|
||||||
|
|
||||||
|
## 7. Term
|
||||||
|
|
||||||
|
7.1 This Agreement shall come into effect upon Your acceptance of the terms and conditions.
|
||||||
|
|
||||||
|
7.2 In the event of a termination of this Agreement Sections 4, 5, 6, 7 and 8 shall survive such termination and shall remain in full force thereafter. For the avoidance of doubt, (sub)licenses that have already been granted for Contributions at the date of the termination shall remain in full force after the termination of this Agreement.
|
||||||
|
|
||||||
|
## 8. Miscellaneous
|
||||||
|
|
||||||
|
8.1 This Agreement and all disputes, claims, actions, suits or other proceedings arising out of this agreement or relating in any way to it shall be governed by the laws of Hungary excluding its private international law provisions.
|
||||||
|
|
||||||
|
8.2 This Agreement sets out the entire agreement between You and Us for Your Contributions to Us and overrides all other agreements or understandings.
|
||||||
|
|
||||||
|
8.3 In case of Your death, this agreement shall continue with Your heirs. In case of more than one heir, all heirs must exercise their rights through a commonly authorized person.
|
||||||
|
|
||||||
|
8.4 If any provision of this Agreement is found void and unenforceable, such provision will be replaced to the extent possible with a provision that comes closest to the meaning of the original provision and that is enforceable. The terms and conditions set forth in this Agreement shall apply notwithstanding any failure of essential purpose of this Agreement or any limited remedy to the maximum extent possible under law.
|
||||||
|
|
||||||
|
8.5 You agree to notify Us of any facts or circumstances of which you become aware that would make this Agreement inaccurate in any respect.
|
||||||
|
|
||||||
|
## 9. Signatures
|
||||||
|
|
||||||
|
I have read this Agreement, and fully agree to it by signing it with my GitHub username:
|
||||||
|
|
||||||
|
- @eltang
|
||||||
|
- @kareltucek
|
||||||
|
- @Lauszus
|
||||||
|
- @mondalaci
|
||||||
|
- @santiagogf89
|
||||||
|
- @tastyger
|
||||||
|
- @xdever
|
||||||
|
- @stephengroat
|
||||||
|
- @ert78gb
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
cask 'gcc-arm-embedded' do
|
|
||||||
version '4_8-2014q3'
|
|
||||||
sha256 '6b30901738b09a8d22fdfff99e991217444b80ac492a6163af5c06a3baaa3487'
|
|
||||||
|
|
||||||
# launchpad.net/gcc-arm-embedded/ was verified as official when first introduced to the cask
|
|
||||||
url "https://launchpad.net/gcc-arm-embedded/4.8/4.8-2014-q3-update/+download/gcc-arm-none-eabi-#{version}-20140805-mac.tar.bz2"
|
|
||||||
name 'GCC ARM Embedded'
|
|
||||||
homepage 'https://developer.arm.com/open-source/gnu-toolchain/gnu-rm'
|
|
||||||
|
|
||||||
binary "gcc-arm-none-eabi-#{version}/bin/arm-none-eabi-addr2line"
|
|
||||||
binary "gcc-arm-none-eabi-#{version}/bin/arm-none-eabi-ar"
|
|
||||||
binary "gcc-arm-none-eabi-#{version}/bin/arm-none-eabi-as"
|
|
||||||
binary "gcc-arm-none-eabi-#{version}/bin/arm-none-eabi-c++"
|
|
||||||
binary "gcc-arm-none-eabi-#{version}/bin/arm-none-eabi-c++filt"
|
|
||||||
binary "gcc-arm-none-eabi-#{version}/bin/arm-none-eabi-cpp"
|
|
||||||
binary "gcc-arm-none-eabi-#{version}/bin/arm-none-eabi-elfedit"
|
|
||||||
binary "gcc-arm-none-eabi-#{version}/bin/arm-none-eabi-g++"
|
|
||||||
binary "gcc-arm-none-eabi-#{version}/bin/arm-none-eabi-gcc"
|
|
||||||
binary "gcc-arm-none-eabi-#{version}/bin/arm-none-eabi-gcc-ar"
|
|
||||||
binary "gcc-arm-none-eabi-#{version}/bin/arm-none-eabi-gcc-nm"
|
|
||||||
binary "gcc-arm-none-eabi-#{version}/bin/arm-none-eabi-gcc-ranlib"
|
|
||||||
binary "gcc-arm-none-eabi-#{version}/bin/arm-none-eabi-gcov"
|
|
||||||
binary "gcc-arm-none-eabi-#{version}/bin/arm-none-eabi-gdb"
|
|
||||||
binary "gcc-arm-none-eabi-#{version}/bin/arm-none-eabi-gprof"
|
|
||||||
binary "gcc-arm-none-eabi-#{version}/bin/arm-none-eabi-ld"
|
|
||||||
binary "gcc-arm-none-eabi-#{version}/bin/arm-none-eabi-ld.bfd"
|
|
||||||
binary "gcc-arm-none-eabi-#{version}/bin/arm-none-eabi-nm"
|
|
||||||
binary "gcc-arm-none-eabi-#{version}/bin/arm-none-eabi-objcopy"
|
|
||||||
binary "gcc-arm-none-eabi-#{version}/bin/arm-none-eabi-objdump"
|
|
||||||
binary "gcc-arm-none-eabi-#{version}/bin/arm-none-eabi-ranlib"
|
|
||||||
binary "gcc-arm-none-eabi-#{version}/bin/arm-none-eabi-readelf"
|
|
||||||
binary "gcc-arm-none-eabi-#{version}/bin/arm-none-eabi-size"
|
|
||||||
binary "gcc-arm-none-eabi-#{version}/bin/arm-none-eabi-strings"
|
|
||||||
binary "gcc-arm-none-eabi-#{version}/bin/arm-none-eabi-strip"
|
|
||||||
end
|
|
||||||
58
keycluster/Makefile
Normal file
58
keycluster/Makefile
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
# Copyright (C) 2018 Kristian Lauszus. All rights reserved.
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# Contact information
|
||||||
|
# -------------------
|
||||||
|
# Kristian Lauszus
|
||||||
|
# Web : http://www.lauszus.com
|
||||||
|
# e-mail : lauszus@gmail.com
|
||||||
|
|
||||||
|
# Set project name.
|
||||||
|
PROJECT_NAME = uhk_keycluster
|
||||||
|
|
||||||
|
# Defines the part type that this project uses.
|
||||||
|
PART = MKL03Z32VFK4
|
||||||
|
|
||||||
|
# Defines the linker script to use for the application.
|
||||||
|
LDSCRIPT = ../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/gcc/MKL03Z32xxx4_flash.ld
|
||||||
|
|
||||||
|
# Size of the heap and stack.
|
||||||
|
HEAP_SIZE = 0
|
||||||
|
STACK_SIZE = 0x0050
|
||||||
|
|
||||||
|
# Set the compiler CPU and FPU options.
|
||||||
|
CPU = -mcpu=cortex-m0plus
|
||||||
|
FPU = -mfloat-abi=soft
|
||||||
|
|
||||||
|
# Command for flashing the key cluster module.
|
||||||
|
FLASH_CMD = node ../lib/agent/packages/usb/update-module-firmware.js leftModule $(PROJECT_OBJ:.axf=.bin)
|
||||||
|
|
||||||
|
# Path to the JLink script used for the key cluster module.
|
||||||
|
JLINK_SCRIPT = ../scripts/flash-keycluster.jlink
|
||||||
|
|
||||||
|
# Source files.
|
||||||
|
SOURCE = $(wildcard src/*.c) \
|
||||||
|
../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/system_MKL03Z4.c \
|
||||||
|
../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/gcc/startup_MKL03Z4.S \
|
||||||
|
../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/drivers/fsl_clock.c \
|
||||||
|
../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/drivers/fsl_gpio.c \
|
||||||
|
../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/drivers/fsl_i2c.c \
|
||||||
|
../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/drivers/fsl_lptmr.c \
|
||||||
|
../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/drivers/fsl_spi.c \
|
||||||
|
../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/drivers/fsl_tpm.c \
|
||||||
|
$(wildcard ../shared/*.c) \
|
||||||
|
$(wildcard ../shared/slave/*.c)
|
||||||
|
|
||||||
|
# Header files.
|
||||||
|
IPATH = src \
|
||||||
|
../lib/KSDK_2.0_MKL03Z8xxx4/CMSIS/Include \
|
||||||
|
../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4 \
|
||||||
|
../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/drivers \
|
||||||
|
../shared
|
||||||
|
|
||||||
|
# Include main Makefile.
|
||||||
|
include ../scripts/Makedefs.mk
|
||||||
3
keycluster/README.md
Normal file
3
keycluster/README.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# Key cluster module firmware
|
||||||
|
|
||||||
|
This directory contains the firmware of the key cluster module.
|
||||||
350
keycluster/build/.cproject
Normal file
350
keycluster/build/.cproject
Normal file
@@ -0,0 +1,350 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||||
|
<cconfiguration id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1792027861">
|
||||||
|
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1792027861" moduleId="org.eclipse.cdt.core.settings" name="uhk60-keycluster_debug">
|
||||||
|
<externalSettings/>
|
||||||
|
<extensions>
|
||||||
|
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
</extensions>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||||
|
<configuration artifactExtension="elf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="${cross_rm} -rf" description="" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1792027861" name="uhk60-keycluster_debug" parent="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug">
|
||||||
|
<folderInfo id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1792027861." name="/" resourcePath="">
|
||||||
|
<toolChain id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.debug.439601044" name="Cross ARM GCC" superClass="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.debug">
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.780228407" name="Optimization Level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level" value="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.most" valueType="enumerated"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength.1547417078" name="Message length (-fmessage-length=0)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength" value="true" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar.765602671" name="'char' is signed (-fsigned-char)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar" value="true" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections.910567930" name="Function sections (-ffunction-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections" value="true" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.datasections.243581182" name="Data sections (-fdata-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.datasections" value="true" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.allwarn.416266830" name="Enable all common warnings (-Wall)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.allwarn" value="true" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level.1613409592" name="Debug level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level" value="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level.default" valueType="enumerated"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format.556186202" name="Debug format" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format" value="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format.default" valueType="enumerated"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name.873832382" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name" value="Custom" valueType="string"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.1923839154" name="Architecture" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.architecture" value="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.arm" valueType="enumerated"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.family.292907889" name="ARM family" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.family" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.mcpu.cortex-m0plus" valueType="enumerated"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset.1510156849" name="Instruction set" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset.thumb" valueType="enumerated"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix.1110645397" name="Prefix" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix" value="arm-none-eabi-" valueType="string"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.c.1996567256" name="C compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.c" value="gcc" valueType="string"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp.2014665560" name="C++ compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp" value="g++" valueType="string"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.objcopy.867581768" name="Hex/Bin converter" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.objcopy" value="objcopy" valueType="string"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.objdump.315789427" name="Listing generator" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.objdump" value="objdump" valueType="string"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.size.348642956" name="Size command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.size" value="size" valueType="string"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.make.670689833" name="Build command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.make" value="make" valueType="string"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm.654501139" name="Remove command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm" value="rm" valueType="string"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash.967248865" name="Create flash image" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash" value="true" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize.1390211406" name="Print size" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize" value="true" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.useglobalpath.228343129" name="Use global path" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.useglobalpath" value="true" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.unit.1173170148" name="FPU Type" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.unit" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.unit.default" valueType="enumerated"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi.1949324826" name="Float ABI" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi.soft" valueType="enumerated"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar.1370140886" name="Archiver" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar" value="ar" valueType="string"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.nocommon.9959419695" name="No common unitialized (-fno-common)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.nocommon" value="true" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.freestanding.2882966171" name="Assume freestanding environment (-ffreestanding)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.freestanding" value="true" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.nobuiltin.9288453635" name="Disable builtin (-fno-builtin)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.nobuiltin" value="true" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.lto.2986114257" name="Link-time optimizer (-flto)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.lto" value="true" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.nowarn.7864424720" name="Inhibit all warnings (-w)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.nowarn" value="false" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.extrawarn.6408004182" name="Enable extra warnings (-Wextra)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.extrawarn" value="false" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.conversion.8753144693" name="Warn on implicit conversions (-Wconversion)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.conversion" value="false" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.pointerarith.7561379406" name="Warn if pointer arithmetic (-Wpointer-arith)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.pointerarith" value="false" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.shadow.5875269774" name="Warn if shadowed variable (-Wshadow)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.shadow" value="false" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.logicalop.8232620757" name="Warn if suspicious logical ops (-Wlogical-op)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.logicalop" value="false" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.agreggatereturn.5398426966" name="Warn if struct is returned (-Wagreggate-return)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.agreggatereturn" value="false" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.floatequal.4503086702" name="Warn if floats are compared as equal (-Wfloat-equal)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.floatequal" value="false" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.toerrors.4431038008" name="Generate errors instead of warnings (-Werror)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.toerrors" value="false" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.unitialized.8290768044" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.unitialized" value="false" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.missingdeclaration.378454944" name="Warn on undeclared global function (-Wmissing-declaration)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.missingdeclaration" value="false" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.badfunctioncast.2943267007" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.badfunctioncast" value="false" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createlisting.9995899345" name="Create extended listing" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createlisting" value="false" valueType="boolean"/>
|
||||||
|
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform.1777290613" isAbstract="false" osList="all" superClass="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform"/>
|
||||||
|
<builder buildPath="${workspace_loc:/uhk-keycluster}/../" id="ilg.gnuarmeclipse.managedbuild.cross.builder.1406291427" incrementalBuildTarget="all DEBUG=1" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" stopOnErr="false" superClass="ilg.gnuarmeclipse.managedbuild.cross.builder"/>
|
||||||
|
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.2007968129" name="Cross ARM GNU Assembler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler">
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor.1246588554" name="Use preprocessor" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor" value="true" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths.2122094274" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.defs.1822362302" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.defs" valueType="definedSymbols">
|
||||||
|
<listOptionValue builtIn="false" value="DEBUG"/>
|
||||||
|
<listOptionValue builtIn="false" value="__STARTUP_CLEAR_BSS"/>
|
||||||
|
</option>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.nostdinc.8788969731" name="Do not search system directories (-nostdinc)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.nostdinc" value="false" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.other.1923601167" name="Other assembler flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.other" value=" -mapcs " valueType="string"/>
|
||||||
|
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input.2014783385" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input"/>
|
||||||
|
</tool>
|
||||||
|
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.1397207158" name="Cross ARM C Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler">
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths.336878990" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths" useByScannerDiscovery="false" valueType="includePath">
|
||||||
|
<listOptionValue builtIn="false" value="../../../lib/KSDK_2.0_MKL03Z8xxx4/CMSIS/Include"/>
|
||||||
|
<listOptionValue builtIn="false" value="../../../lib/KSDK_2.0_MKL03Z8xxx4/devices"/>
|
||||||
|
<listOptionValue builtIn="false" value="../../../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/drivers"/>
|
||||||
|
<listOptionValue builtIn="false" value=".."/>
|
||||||
|
<listOptionValue builtIn="false" value="../../../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/utilities"/>
|
||||||
|
<listOptionValue builtIn="false" value="../../.."/>
|
||||||
|
<listOptionValue builtIn="false" value="../../../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4"/>
|
||||||
|
<listOptionValue builtIn="false" value="../../../shared"/>
|
||||||
|
</option>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std.933718024" name="Language standard" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std" useByScannerDiscovery="true" value="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std.gnu99" valueType="enumerated"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs.7934865376" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs" useByScannerDiscovery="false" valueType="definedSymbols">
|
||||||
|
<listOptionValue builtIn="false" value="DEBUG"/>
|
||||||
|
<listOptionValue builtIn="false" value="CPU_MKL03Z32VFK4"/>
|
||||||
|
<listOptionValue builtIn="false" value="PRINTF_FLOAT_ENABLE=0"/>
|
||||||
|
<listOptionValue builtIn="false" value="SCANF_FLOAT_ENABLE=0"/>
|
||||||
|
<listOptionValue builtIn="false" value="PRINTF_ADVANCED_ENABLE=0"/>
|
||||||
|
<listOptionValue builtIn="false" value="SCANF_ADVANCED_ENABLE=0"/>
|
||||||
|
<listOptionValue builtIn="false" value="FRDM_KL03Z"/>
|
||||||
|
<listOptionValue builtIn="false" value="FREEDOM"/>
|
||||||
|
</option>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.nostdinc.1704317783" name="Do not search system directories (-nostdinc)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.nostdinc" useByScannerDiscovery="true" value="false" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.other.1560348183" name="Other compiler flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.other" useByScannerDiscovery="true" value=" -mapcs " valueType="string"/>
|
||||||
|
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.1895544709" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input"/>
|
||||||
|
</tool>
|
||||||
|
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.435207489" name="Cross ARM C++ Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler">
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs.2050754817" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs" useByScannerDiscovery="false" valueType="definedSymbols">
|
||||||
|
<listOptionValue builtIn="false" value="UHK_PCB_MAJOR_VERSION=7"/>
|
||||||
|
</option>
|
||||||
|
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.1699166727" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input"/>
|
||||||
|
</tool>
|
||||||
|
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker.1681324840" name="Cross ARM C Linker" outputPrefix="" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker">
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.gcsections.1850945755" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.gcsections" value="true" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.usenewlibnano.1816597929" name="Use newlib-nano (--specs=nano.specs)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.usenewlibnano" value="true" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.scriptfile.1573832003" name="Script files (-T)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.scriptfile"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.libs.2061142742" name="Libraries (-l)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.libs"/>
|
||||||
|
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker.input.1168552163" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker.input">
|
||||||
|
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||||
|
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||||
|
</inputType>
|
||||||
|
</tool>
|
||||||
|
<tool commandLinePattern="${COMMAND} ${cross_toolchain_flags} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} -Xlinker --start-group ${INPUTS} -Xlinker --end-group" id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.1475612095" name="Cross ARM C++ Linker" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker">
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.gcsections.42905068" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.gcsections" value="true" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.usenewlibnano.1816597929" name="Use newlib-nano (--specs=nano.specs)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.usenewlibnano" value="true" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.otherobjs.6905766738" name="Other objects" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.otherobjs"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.scriptfile.4021849263" name="Script files (-T)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.scriptfile" valueType="stringList">
|
||||||
|
<listOptionValue builtIn="false" value="../../../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/gcc/MKL03Z32xxx4_flash.ld"/>
|
||||||
|
</option>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nostart.6846138787" name="Do not use standard start files (-nostartfiles)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nostart" value="false" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nodeflibs.8043932112" name="Do not use default libraries (-nodefaultlibs)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nodeflibs" value="false" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.libs.2257416827" name="Libraries (-l)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.libs" valueType="libs">
|
||||||
|
<listOptionValue builtIn="false" value="m"/>
|
||||||
|
<listOptionValue builtIn="false" value="g"/>
|
||||||
|
<listOptionValue builtIn="false" value="gcc"/>
|
||||||
|
<listOptionValue builtIn="false" value="nosys"/>
|
||||||
|
</option>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.cref.6563555683" name="Cross reference (-Xlinker --cref)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.cref" value="false" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.printgcsections.8052175158" name="Print removed sections (-Xlinker --print-gc-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.printgcsections" value="false" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.strip.4023108413" name="Omit all symbol information (-s)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.strip" value="false" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.other.255052480" name="Other linker flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.other" value="-mapcs -Xlinker -static -Xlinker -z -Xlinker muldefs -Xlinker -defsym=__heap_size__=0" valueType="string"/>
|
||||||
|
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.input.658447495" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.input">
|
||||||
|
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||||
|
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||||
|
</inputType>
|
||||||
|
</tool>
|
||||||
|
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.archiver.717958418" name="Cross ARM GNU Archiver" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.archiver"/>
|
||||||
|
<tool command="${cross_prefix}${cross_objcopy}${cross_suffix}" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT}" id="ilg.gnuarmeclipse.managedbuild.cross.tool.createflash.1498748442" name="Cross ARM GNU Create Flash Image" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.createflash">
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createflash.choice.396105459" name="Output file format (-O)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createflash.choice" value="ilg.gnuarmeclipse.managedbuild.cross.option.createflash.choice.binary" valueType="enumerated"/>
|
||||||
|
</tool>
|
||||||
|
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.createlisting.1921141825" name="Cross ARM GNU Create Listing" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.createlisting">
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.source.1147761851" name="Display source (--source|-S)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.source" value="true" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.allheaders.326654770" name="Display all headers (--all-headers|-x)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.allheaders" value="true" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.demangle.2012585764" name="Demangle names (--demangle|-C)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.demangle" value="true" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.linenumbers.1639985926" name="Display line numbers (--line-numbers|-l)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.linenumbers" value="true" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.wide.795915960" name="Wide lines (--wide|-w)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.wide" value="true" valueType="boolean"/>
|
||||||
|
</tool>
|
||||||
|
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.printsize.204256629" name="Cross ARM GNU Print Size" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.printsize">
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.printsize.format.48990078" name="Size format" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.printsize.format"/>
|
||||||
|
</tool>
|
||||||
|
</toolChain>
|
||||||
|
</folderInfo>
|
||||||
|
<fileInfo id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1792027861.1146590441" name="fsl_clock.h" rcbsApplicability="disable" resourcePath="drivers/fsl_clock.h" toolsToInvoke=""/>
|
||||||
|
</configuration>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||||
|
<storageModule moduleId="ilg.gnuarmeclipse.managedbuild.packs"/>
|
||||||
|
</cconfiguration>
|
||||||
|
<cconfiguration id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1939339834.1792647078">
|
||||||
|
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1939339834.1792647078" moduleId="org.eclipse.cdt.core.settings" name="uhk60-keycluster_release">
|
||||||
|
<externalSettings/>
|
||||||
|
<extensions>
|
||||||
|
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
</extensions>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||||
|
<configuration artifactExtension="elf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" cleanCommand="${cross_rm} -rf" description="" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1939339834.1792647078" name="uhk60-keycluster_release" parent="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release">
|
||||||
|
<folderInfo id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1939339834.1792647078." name="/" resourcePath="">
|
||||||
|
<toolChain id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.release.1802192936" name="Cross ARM GCC" superClass="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.release">
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.918206081" name="Optimization Level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level" value="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.size" valueType="enumerated"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength.1247972134" name="Message length (-fmessage-length=0)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength" value="true" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar.1651670889" name="'char' is signed (-fsigned-char)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar" value="true" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections.1807399992" name="Function sections (-ffunction-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections" value="true" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.datasections.1522408084" name="Data sections (-fdata-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.datasections" value="true" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.allwarn.881879429" name="Enable all common warnings (-Wall)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.allwarn" value="true" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level.417088354" name="Debug level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level" value="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level.none" valueType="enumerated"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format.471396471" name="Debug format" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format" value="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format.default" valueType="enumerated"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name.378484607" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name" value="Custom" valueType="string"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.1093394082" name="Architecture" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.architecture" value="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.arm" valueType="enumerated"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.family.1818095636" name="ARM family" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.family" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.mcpu.cortex-m0plus" valueType="enumerated"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset.336711378" name="Instruction set" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset.thumb" valueType="enumerated"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix.1351526286" name="Prefix" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix" value="arm-none-eabi-" valueType="string"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.c.1438555896" name="C compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.c" value="gcc" valueType="string"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp.1588534593" name="C++ compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp" value="g++" valueType="string"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.objcopy.1663641144" name="Hex/Bin converter" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.objcopy" value="objcopy" valueType="string"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.objdump.200920623" name="Listing generator" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.objdump" value="objdump" valueType="string"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.size.362080964" name="Size command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.size" value="size" valueType="string"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.make.2009924231" name="Build command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.make" value="make" valueType="string"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm.1536468905" name="Remove command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm" value="rm" valueType="string"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash.925865305" name="Create flash image" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash" value="true" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize.1208668505" name="Print size" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize" value="true" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.useglobalpath.1166058417" name="Use global path" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.useglobalpath" value="true" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar.1139561820" name="Archiver" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar" value="ar" valueType="string"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi.671070963" name="Float ABI" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi.soft" valueType="enumerated"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.nocommon.1275482104" name="No common unitialized (-fno-common)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.nocommon" value="true" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.freestanding.407638415" name="Assume freestanding environment (-ffreestanding)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.freestanding" value="true" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.nobuiltin.1259530104" name="Disable builtin (-fno-builtin)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.nobuiltin" value="true" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.lto.809059548" name="Link-time optimizer (-flto)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.lto" value="true" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.nowarn.1208094284" name="Inhibit all warnings (-w)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.nowarn" value="false" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.extrawarn.67984531" name="Enable extra warnings (-Wextra)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.extrawarn" value="false" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.conversion.593444999" name="Warn on implicit conversions (-Wconversion)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.conversion" value="false" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.pointerarith.813635782" name="Warn if pointer arithmetic (-Wpointer-arith)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.pointerarith" value="false" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.shadow.1455227593" name="Warn if shadowed variable (-Wshadow)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.shadow" value="false" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.logicalop.1717005013" name="Warn if suspicious logical ops (-Wlogical-op)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.logicalop" value="false" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.agreggatereturn.383697767" name="Warn if struct is returned (-Wagreggate-return)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.agreggatereturn" value="false" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.floatequal.628316174" name="Warn if floats are compared as equal (-Wfloat-equal)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.floatequal" value="false" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.toerrors.1624700406" name="Generate errors instead of warnings (-Werror)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.toerrors" value="false" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.unitialized.3064955983.625210850" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.unitialized" value="false" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.missingdeclaration.907753672" name="Warn on undeclared global function (-Wmissing-declaration)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.missingdeclaration" value="false" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.badfunctioncast.6545741443.1540890614" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.badfunctioncast" value="false" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createlisting.1382191896" name="Create extended listing" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createlisting" value="false" valueType="boolean"/>
|
||||||
|
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform.2107171855" isAbstract="false" osList="all" superClass="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform"/>
|
||||||
|
<builder buildPath="${workspace_loc:/uhk-keycluster}/../" id="ilg.gnuarmeclipse.managedbuild.cross.builder.1689719605" incrementalBuildTarget="all DEBUG=0" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" stopOnErr="false" superClass="ilg.gnuarmeclipse.managedbuild.cross.builder"/>
|
||||||
|
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.1477971290" name="Cross ARM GNU Assembler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler">
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor.334227408" name="Use preprocessor" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor" value="true" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths.1702866230" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.defs.1072633432" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.defs" valueType="definedSymbols">
|
||||||
|
<listOptionValue builtIn="false" value="__STARTUP_CLEAR_BSS"/>
|
||||||
|
</option>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.nostdinc.415052570" name="Do not search system directories (-nostdinc)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.nostdinc" value="false" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.other.1359123195" name="Other assembler flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.other" value=" -mapcs " valueType="string"/>
|
||||||
|
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input.1499693341" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input"/>
|
||||||
|
</tool>
|
||||||
|
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.1046326518" name="Cross ARM C Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler">
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths.746372967" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths" useByScannerDiscovery="false" valueType="includePath">
|
||||||
|
<listOptionValue builtIn="false" value="../../../lib/KSDK_2.0_MKL03Z8xxx4/CMSIS/Include"/>
|
||||||
|
<listOptionValue builtIn="false" value="../../../lib/KSDK_2.0_MKL03Z8xxx4/devices"/>
|
||||||
|
<listOptionValue builtIn="false" value="../../../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/drivers"/>
|
||||||
|
<listOptionValue builtIn="false" value=".."/>
|
||||||
|
<listOptionValue builtIn="false" value="../../../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/utilities"/>
|
||||||
|
<listOptionValue builtIn="false" value="../../.."/>
|
||||||
|
<listOptionValue builtIn="false" value="../../../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4"/>
|
||||||
|
<listOptionValue builtIn="false" value="../../../shared"/>
|
||||||
|
</option>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std.1703504273" name="Language standard" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std" useByScannerDiscovery="true" value="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std.gnu99" valueType="enumerated"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs.220715196" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs" useByScannerDiscovery="false" valueType="definedSymbols">
|
||||||
|
<listOptionValue builtIn="false" value="NDEBUG"/>
|
||||||
|
<listOptionValue builtIn="false" value="CPU_MKL03Z32VFK4"/>
|
||||||
|
<listOptionValue builtIn="false" value="PRINTF_FLOAT_ENABLE=0"/>
|
||||||
|
<listOptionValue builtIn="false" value="SCANF_FLOAT_ENABLE=0"/>
|
||||||
|
<listOptionValue builtIn="false" value="PRINTF_ADVANCED_ENABLE=0"/>
|
||||||
|
<listOptionValue builtIn="false" value="SCANF_ADVANCED_ENABLE=0"/>
|
||||||
|
<listOptionValue builtIn="false" value="FRDM_KL03Z"/>
|
||||||
|
<listOptionValue builtIn="false" value="FREEDOMx"/>
|
||||||
|
</option>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.nostdinc.1784976960" name="Do not search system directories (-nostdinc)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.nostdinc" useByScannerDiscovery="true" value="false" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.other.182809566" name="Other compiler flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.other" useByScannerDiscovery="true" value=" -mapcs " valueType="string"/>
|
||||||
|
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.2141870622" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input"/>
|
||||||
|
</tool>
|
||||||
|
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.1055651769" name="Cross ARM C++ Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler">
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs.1344565144" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs" useByScannerDiscovery="false" valueType="definedSymbols">
|
||||||
|
<listOptionValue builtIn="false" value="UHK_PCB_MAJOR_VERSION=7"/>
|
||||||
|
</option>
|
||||||
|
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.1785701410" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input"/>
|
||||||
|
</tool>
|
||||||
|
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker.1248876094" name="Cross ARM C Linker" outputPrefix="" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker">
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.gcsections.205211813" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.gcsections" value="true" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.usenewlibnano.764117584" name="Use newlib-nano (--specs=nano.specs)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.usenewlibnano" value="true" valueType="boolean"/>
|
||||||
|
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker.input.424272008" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker.input">
|
||||||
|
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||||
|
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||||
|
</inputType>
|
||||||
|
</tool>
|
||||||
|
<tool commandLinePattern="${COMMAND} ${cross_toolchain_flags} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} -Xlinker --start-group ${INPUTS} -Xlinker --end-group" id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.20615499" name="Cross ARM C++ Linker" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker">
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.gcsections.1664132146" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.gcsections" value="true" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.usenewlibnano.1704968656" name="Use newlib-nano (--specs=nano.specs)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.usenewlibnano" value="true" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.otherobjs.359701763" name="Other objects" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.otherobjs"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.scriptfile.51816293" name="Script files (-T)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.scriptfile" valueType="stringList">
|
||||||
|
<listOptionValue builtIn="false" value="../../../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/gcc/MKL03Z32xxx4_flash.ld"/>
|
||||||
|
</option>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nostart.554768103" name="Do not use standard start files (-nostartfiles)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nostart" value="false" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nodeflibs.1987989417" name="Do not use default libraries (-nodefaultlibs)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nodeflibs" value="false" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.libs.1653206096" name="Libraries (-l)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.libs" valueType="libs">
|
||||||
|
<listOptionValue builtIn="false" value="m"/>
|
||||||
|
<listOptionValue builtIn="false" value="g"/>
|
||||||
|
<listOptionValue builtIn="false" value="gcc"/>
|
||||||
|
<listOptionValue builtIn="false" value="nosys"/>
|
||||||
|
</option>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.cref.1514842438" name="Cross reference (-Xlinker --cref)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.cref" value="false" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.printgcsections.1127263805" name="Print removed sections (-Xlinker --print-gc-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.printgcsections" value="false" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.strip.549891305" name="Omit all symbol information (-s)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.strip" value="false" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.other.1551896832" name="Other linker flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.other" value="-mapcs -Xlinker -static -Xlinker -z -Xlinker muldefs" valueType="string"/>
|
||||||
|
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.input.772761405" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.input">
|
||||||
|
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||||
|
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||||
|
</inputType>
|
||||||
|
</tool>
|
||||||
|
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.archiver.1579053840" name="Cross ARM GNU Archiver" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.archiver"/>
|
||||||
|
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.createflash.1400319152" name="Cross ARM GNU Create Flash Image" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.createflash">
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createflash.choice.1328839591" name="Output file format (-O)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createflash.choice" value="ilg.gnuarmeclipse.managedbuild.cross.option.createflash.choice.binary" valueType="enumerated"/>
|
||||||
|
</tool>
|
||||||
|
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.createlisting.733953661" name="Cross ARM GNU Create Listing" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.createlisting">
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.source.1802395103" name="Display source (--source|-S)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.source" value="true" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.allheaders.1353511477" name="Display all headers (--all-headers|-x)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.allheaders" value="true" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.demangle.562396163" name="Demangle names (--demangle|-C)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.demangle" value="true" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.linenumbers.1889527374" name="Display line numbers (--line-numbers|-l)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.linenumbers" value="true" valueType="boolean"/>
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.wide.2076712477" name="Wide lines (--wide|-w)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.wide" value="true" valueType="boolean"/>
|
||||||
|
</tool>
|
||||||
|
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.printsize.843351449" name="Cross ARM GNU Print Size" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.printsize">
|
||||||
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.printsize.format.1881713953" name="Size format" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.printsize.format"/>
|
||||||
|
</tool>
|
||||||
|
</toolChain>
|
||||||
|
</folderInfo>
|
||||||
|
</configuration>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||||
|
<storageModule moduleId="ilg.gnuarmeclipse.managedbuild.packs"/>
|
||||||
|
</cconfiguration>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||||
|
<project id="k64f.ilg.gnuarmeclipse.managedbuild.cross.target.elf.1537007018" name="Executable" projectType="ilg.gnuarmeclipse.managedbuild.cross.target.elf"/>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders">
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
|
||||||
|
<storageModule moduleId="scannerConfiguration">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
|
<scannerConfigBuildInfo instanceId="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1792027861;ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1792027861.;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.435207489;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.1699166727">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
|
</scannerConfigBuildInfo>
|
||||||
|
<scannerConfigBuildInfo instanceId="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1939339834;ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1939339834.;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.955273220;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.1711058916">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
|
</scannerConfigBuildInfo>
|
||||||
|
<scannerConfigBuildInfo instanceId="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1939339834;ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1939339834.;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.270191615;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.1469754472">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
|
</scannerConfigBuildInfo>
|
||||||
|
<scannerConfigBuildInfo instanceId="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1792027861;ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1792027861.;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.1397207158;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.1895544709">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
|
</scannerConfigBuildInfo>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
|
||||||
|
<storageModule moduleId="refreshScope" versionNumber="2">
|
||||||
|
<configuration configurationName="uhk60-keycluster_release">
|
||||||
|
<resource resourceType="PROJECT" workspacePath="/uhk-keycluster"/>
|
||||||
|
</configuration>
|
||||||
|
<configuration configurationName="uhk60-keycluster_debug">
|
||||||
|
<resource resourceType="PROJECT" workspacePath="/uhk-keycluster"/>
|
||||||
|
</configuration>
|
||||||
|
</storageModule>
|
||||||
|
</cproject>
|
||||||
4
keycluster/build/.gitignore
vendored
Normal file
4
keycluster/build/.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
/.settings/
|
||||||
|
/uhk60-keycluster_debug/
|
||||||
|
/uhk60-keycluster_release/
|
||||||
|
/uhk60-keycluster_release/
|
||||||
155
keycluster/build/.project
Normal file
155
keycluster/build/.project
Normal file
@@ -0,0 +1,155 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>uhk-keycluster</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>com.freescale.processorexpert.core.expertprojectbuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||||
|
<triggers>clean,full,incremental,</triggers>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||||
|
<triggers>full,incremental,</triggers>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>com.freescale.processorexpert.core.expertprojectnature</nature>
|
||||||
|
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||||
|
<nature>org.eclipse.cdt.core.ccnature</nature>
|
||||||
|
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||||
|
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||||
|
</natures>
|
||||||
|
<linkedResources>
|
||||||
|
<link>
|
||||||
|
<name>Makedefs.mk</name>
|
||||||
|
<type>1</type>
|
||||||
|
<locationURI>PARENT-2-PROJECT_LOC/scripts/Makedefs.mk</locationURI>
|
||||||
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>Makefile</name>
|
||||||
|
<type>1</type>
|
||||||
|
<locationURI>PARENT-1-PROJECT_LOC/Makefile</locationURI>
|
||||||
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>drivers</name>
|
||||||
|
<type>2</type>
|
||||||
|
<locationURI>virtual:/virtual</locationURI>
|
||||||
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>shared</name>
|
||||||
|
<type>2</type>
|
||||||
|
<locationURI>PARENT-2-PROJECT_LOC/shared</locationURI>
|
||||||
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>src</name>
|
||||||
|
<type>2</type>
|
||||||
|
<locationURI>PARENT-1-PROJECT_LOC/src</locationURI>
|
||||||
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>startup</name>
|
||||||
|
<type>2</type>
|
||||||
|
<locationURI>virtual:/virtual</locationURI>
|
||||||
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>drivers/fsl_clock.c</name>
|
||||||
|
<type>1</type>
|
||||||
|
<locationURI>PARENT-2-PROJECT_LOC/lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/drivers/fsl_clock.c</locationURI>
|
||||||
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>drivers/fsl_clock.h</name>
|
||||||
|
<type>1</type>
|
||||||
|
<locationURI>PARENT-2-PROJECT_LOC/lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/drivers/fsl_clock.h</locationURI>
|
||||||
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>drivers/fsl_gpio.c</name>
|
||||||
|
<type>1</type>
|
||||||
|
<locationURI>PARENT-2-PROJECT_LOC/lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/drivers/fsl_gpio.c</locationURI>
|
||||||
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>drivers/fsl_gpio.h</name>
|
||||||
|
<type>1</type>
|
||||||
|
<locationURI>PARENT-2-PROJECT_LOC/lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/drivers/fsl_gpio.h</locationURI>
|
||||||
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>drivers/fsl_i2c.c</name>
|
||||||
|
<type>1</type>
|
||||||
|
<locationURI>PARENT-2-PROJECT_LOC/lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/drivers/fsl_i2c.c</locationURI>
|
||||||
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>drivers/fsl_i2c.h</name>
|
||||||
|
<type>1</type>
|
||||||
|
<locationURI>PARENT-2-PROJECT_LOC/lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/drivers/fsl_i2c.h</locationURI>
|
||||||
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>drivers/fsl_lptmr.c</name>
|
||||||
|
<type>1</type>
|
||||||
|
<locationURI>PARENT-2-PROJECT_LOC/lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/drivers/fsl_lptmr.c</locationURI>
|
||||||
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>drivers/fsl_lptmr.h</name>
|
||||||
|
<type>1</type>
|
||||||
|
<locationURI>PARENT-2-PROJECT_LOC/lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/drivers/fsl_lptmr.h</locationURI>
|
||||||
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>drivers/fsl_port.h</name>
|
||||||
|
<type>1</type>
|
||||||
|
<locationURI>PARENT-2-PROJECT_LOC/lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/drivers/fsl_port.h</locationURI>
|
||||||
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>drivers/fsl_smc.c</name>
|
||||||
|
<type>1</type>
|
||||||
|
<locationURI>PARENT-2-PROJECT_LOC/lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/drivers/fsl_smc.c</locationURI>
|
||||||
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>drivers/fsl_smc.h</name>
|
||||||
|
<type>1</type>
|
||||||
|
<locationURI>PARENT-2-PROJECT_LOC/lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/drivers/fsl_smc.h</locationURI>
|
||||||
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>drivers/fsl_spi.c</name>
|
||||||
|
<type>1</type>
|
||||||
|
<locationURI>PARENT-2-PROJECT_LOC/lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/drivers/fsl_spi.c</locationURI>
|
||||||
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>drivers/fsl_spi.h</name>
|
||||||
|
<type>1</type>
|
||||||
|
<locationURI>PARENT-2-PROJECT_LOC/lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/drivers/fsl_spi.h</locationURI>
|
||||||
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>drivers/fsl_tpm.c</name>
|
||||||
|
<type>1</type>
|
||||||
|
<locationURI>PARENT-2-PROJECT_LOC/lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/drivers/fsl_tpm.c</locationURI>
|
||||||
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>drivers/fsl_tpm.h</name>
|
||||||
|
<type>1</type>
|
||||||
|
<locationURI>PARENT-2-PROJECT_LOC/lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/drivers/fsl_tpm.h</locationURI>
|
||||||
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>startup/startup_MKL03Z4.S</name>
|
||||||
|
<type>1</type>
|
||||||
|
<locationURI>PARENT-2-PROJECT_LOC/lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/gcc/startup_MKL03Z4.S</locationURI>
|
||||||
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>startup/system_MKL03Z4.c</name>
|
||||||
|
<type>1</type>
|
||||||
|
<locationURI>PARENT-2-PROJECT_LOC/lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/system_MKL03Z4.c</locationURI>
|
||||||
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>startup/system_MKL03Z4.h</name>
|
||||||
|
<type>1</type>
|
||||||
|
<locationURI>PARENT-2-PROJECT_LOC/lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/system_MKL03Z4.h</locationURI>
|
||||||
|
</link>
|
||||||
|
</linkedResources>
|
||||||
|
</projectDescription>
|
||||||
82
keycluster/build/uhk60-keycluster_debug_jlink.launch
Normal file
82
keycluster/build/uhk60-keycluster_debug_jlink.launch
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<launchConfiguration type="ilg.gnuarmeclipse.debug.gdbjtag.jlink.launchConfigurationType">
|
||||||
|
<booleanAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.doConnectToRunning" value="false"/>
|
||||||
|
<booleanAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.doContinue" value="true"/>
|
||||||
|
<booleanAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.doDebugInRam" value="false"/>
|
||||||
|
<booleanAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.doFirstReset" value="true"/>
|
||||||
|
<booleanAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.doGdbServerAllocateConsole" value="true"/>
|
||||||
|
<booleanAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.doGdbServerAllocateSemihostingConsole" value="true"/>
|
||||||
|
<booleanAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.doGdbServerInitRegs" value="true"/>
|
||||||
|
<booleanAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.doGdbServerLocalOnly" value="true"/>
|
||||||
|
<booleanAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.doGdbServerSilent" value="false"/>
|
||||||
|
<booleanAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.doGdbServerVerifyDownload" value="true"/>
|
||||||
|
<booleanAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.doSecondReset" value="true"/>
|
||||||
|
<booleanAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.doStartGdbServer" value="true"/>
|
||||||
|
<booleanAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.enableFlashBreakpoints" value="true"/>
|
||||||
|
<booleanAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.enableSemihosting" value="true"/>
|
||||||
|
<booleanAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.enableSemihostingIoclientGdbClient" value="true"/>
|
||||||
|
<booleanAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.enableSemihostingIoclientTelnet" value="true"/>
|
||||||
|
<booleanAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.enableSwo" value="false"/>
|
||||||
|
<intAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.firstResetSpeed" value="30"/>
|
||||||
|
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.firstResetType" value=""/>
|
||||||
|
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.gdbClientOtherCommands" value="set mem inaccessible-by-default off"/>
|
||||||
|
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.gdbClientOtherOptions" value=""/>
|
||||||
|
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.gdbServerConnection" value="usb"/>
|
||||||
|
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.gdbServerConnectionAddress" value=""/>
|
||||||
|
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.gdbServerDebugInterface" value="swd"/>
|
||||||
|
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.gdbServerDeviceEndianness" value="little"/>
|
||||||
|
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.gdbServerDeviceName" value="MKL03Z32xxx4"/>
|
||||||
|
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.gdbServerDeviceSpeed" value="30"/>
|
||||||
|
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.gdbServerExecutable" value="${jlink_path}/${jlink_gdbserver}"/>
|
||||||
|
<intAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.gdbServerGdbPortNumber" value="2331"/>
|
||||||
|
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.gdbServerLog" value=""/>
|
||||||
|
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.gdbServerOther" value="-s"/>
|
||||||
|
<intAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.gdbServerSwoPortNumber" value="2332"/>
|
||||||
|
<intAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.gdbServerTelnetPortNumber" value="2333"/>
|
||||||
|
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.interfaceSpeed" value="auto"/>
|
||||||
|
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.otherInitCommands" value=""/>
|
||||||
|
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.otherRunCommands" value=""/>
|
||||||
|
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.secondResetType" value=""/>
|
||||||
|
<intAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.swoEnableTargetCpuFreq" value="0"/>
|
||||||
|
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.swoEnableTargetPortMask" value="0x1"/>
|
||||||
|
<intAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.swoEnableTargetSwoFreq" value="0"/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageFileName" value=""/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageOffset" value=""/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.ipAddress" value="localhost"/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.jtagDevice" value="GNU ARM J-Link"/>
|
||||||
|
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadImage" value="true"/>
|
||||||
|
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadSymbols" value="true"/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.pcRegister" value=""/>
|
||||||
|
<intAttribute key="org.eclipse.cdt.debug.gdbjtag.core.portNumber" value="2331"/>
|
||||||
|
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setPcRegister" value="false"/>
|
||||||
|
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setResume" value="false"/>
|
||||||
|
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setStopAt" value="true"/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.stopAt" value="main"/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsFileName" value=""/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsOffset" value=""/>
|
||||||
|
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForImage" value="false"/>
|
||||||
|
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForSymbols" value="false"/>
|
||||||
|
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useProjBinaryForImage" value="true"/>
|
||||||
|
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useProjBinaryForSymbols" value="true"/>
|
||||||
|
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useRemoteTarget" value="true"/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.debug.mi.core.commandFactory" value="Standard (Windows)"/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.debug.mi.core.protocol" value="mi"/>
|
||||||
|
<booleanAttribute key="org.eclipse.cdt.debug.mi.core.verboseMode" value="false"/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="${cross_prefix}gdb${cross_suffix}"/>
|
||||||
|
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.UPDATE_THREADLIST_ON_SUSPEND" value="false"/>
|
||||||
|
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_REGISTER_GROUPS" value=""/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="uhk60-keycluster_debug/uhk-keycluster.elf"/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="uhk-keycluster"/>
|
||||||
|
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="false"/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1792027861"/>
|
||||||
|
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||||
|
<listEntry value="/uhk-keycluster"/>
|
||||||
|
</listAttribute>
|
||||||
|
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||||
|
<listEntry value="4"/>
|
||||||
|
</listAttribute>
|
||||||
|
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <memoryBlockExpressionList context="Context string"/> "/>
|
||||||
|
<stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>
|
||||||
|
</launchConfiguration>
|
||||||
7
keycluster/build/uhk60-keycluster_debug_kboot.launch
Normal file
7
keycluster/build/uhk60-keycluster_debug_kboot.launch
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<launchConfiguration type="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType">
|
||||||
|
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LAUNCH_CONFIGURATION_BUILD_SCOPE" value="${none}"/>
|
||||||
|
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="/usr/bin/make"/>
|
||||||
|
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-j8 DEBUG=1 flash"/>
|
||||||
|
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/uhk-keycluster}/../"/>
|
||||||
|
</launchConfiguration>
|
||||||
82
keycluster/build/uhk60-keycluster_release_jlink.launch
Normal file
82
keycluster/build/uhk60-keycluster_release_jlink.launch
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<launchConfiguration type="ilg.gnuarmeclipse.debug.gdbjtag.jlink.launchConfigurationType">
|
||||||
|
<booleanAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.doConnectToRunning" value="false"/>
|
||||||
|
<booleanAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.doContinue" value="true"/>
|
||||||
|
<booleanAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.doDebugInRam" value="false"/>
|
||||||
|
<booleanAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.doFirstReset" value="true"/>
|
||||||
|
<booleanAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.doGdbServerAllocateConsole" value="true"/>
|
||||||
|
<booleanAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.doGdbServerAllocateSemihostingConsole" value="true"/>
|
||||||
|
<booleanAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.doGdbServerInitRegs" value="true"/>
|
||||||
|
<booleanAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.doGdbServerLocalOnly" value="true"/>
|
||||||
|
<booleanAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.doGdbServerSilent" value="false"/>
|
||||||
|
<booleanAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.doGdbServerVerifyDownload" value="true"/>
|
||||||
|
<booleanAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.doSecondReset" value="true"/>
|
||||||
|
<booleanAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.doStartGdbServer" value="true"/>
|
||||||
|
<booleanAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.enableFlashBreakpoints" value="true"/>
|
||||||
|
<booleanAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.enableSemihosting" value="true"/>
|
||||||
|
<booleanAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.enableSemihostingIoclientGdbClient" value="false"/>
|
||||||
|
<booleanAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.enableSemihostingIoclientTelnet" value="false"/>
|
||||||
|
<booleanAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.enableSwo" value="true"/>
|
||||||
|
<intAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.firstResetSpeed" value="30"/>
|
||||||
|
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.firstResetType" value=""/>
|
||||||
|
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.gdbClientOtherCommands" value="set mem inaccessible-by-default off"/>
|
||||||
|
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.gdbClientOtherOptions" value=""/>
|
||||||
|
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.gdbServerConnection" value="usb"/>
|
||||||
|
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.gdbServerConnectionAddress" value=""/>
|
||||||
|
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.gdbServerDebugInterface" value="swd"/>
|
||||||
|
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.gdbServerDeviceEndianness" value="little"/>
|
||||||
|
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.gdbServerDeviceName" value="MKL03Z32xxx4"/>
|
||||||
|
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.gdbServerDeviceSpeed" value="30"/>
|
||||||
|
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.gdbServerExecutable" value="${jlink_path}/${jlink_gdbserver}"/>
|
||||||
|
<intAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.gdbServerGdbPortNumber" value="2331"/>
|
||||||
|
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.gdbServerLog" value=""/>
|
||||||
|
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.gdbServerOther" value="-s"/>
|
||||||
|
<intAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.gdbServerSwoPortNumber" value="2332"/>
|
||||||
|
<intAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.gdbServerTelnetPortNumber" value="2333"/>
|
||||||
|
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.interfaceSpeed" value="auto"/>
|
||||||
|
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.otherInitCommands" value=""/>
|
||||||
|
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.otherRunCommands" value=""/>
|
||||||
|
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.secondResetType" value=""/>
|
||||||
|
<intAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.swoEnableTargetCpuFreq" value="0"/>
|
||||||
|
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.swoEnableTargetPortMask" value="0x1"/>
|
||||||
|
<intAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.jlink.swoEnableTargetSwoFreq" value="0"/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageFileName" value=""/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageOffset" value=""/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.ipAddress" value="localhost"/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.jtagDevice" value="GNU ARM J-Link"/>
|
||||||
|
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadImage" value="true"/>
|
||||||
|
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadSymbols" value="true"/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.pcRegister" value=""/>
|
||||||
|
<intAttribute key="org.eclipse.cdt.debug.gdbjtag.core.portNumber" value="2331"/>
|
||||||
|
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setPcRegister" value="false"/>
|
||||||
|
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setResume" value="false"/>
|
||||||
|
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setStopAt" value="true"/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.stopAt" value="main"/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsFileName" value=""/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsOffset" value=""/>
|
||||||
|
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForImage" value="false"/>
|
||||||
|
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForSymbols" value="false"/>
|
||||||
|
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useProjBinaryForImage" value="true"/>
|
||||||
|
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useProjBinaryForSymbols" value="true"/>
|
||||||
|
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useRemoteTarget" value="true"/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.debug.mi.core.commandFactory" value="Standard (Windows)"/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.debug.mi.core.protocol" value="mi"/>
|
||||||
|
<booleanAttribute key="org.eclipse.cdt.debug.mi.core.verboseMode" value="false"/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="${cross_prefix}gdb${cross_suffix}"/>
|
||||||
|
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.UPDATE_THREADLIST_ON_SUSPEND" value="false"/>
|
||||||
|
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_REGISTER_GROUPS" value=""/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="uhk60-keycluster_release/uhk-keycluster.elf"/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="uhk-keycluster"/>
|
||||||
|
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="false"/>
|
||||||
|
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1939339834.1792647078"/>
|
||||||
|
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||||
|
<listEntry value="/uhk-keycluster"/>
|
||||||
|
</listAttribute>
|
||||||
|
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||||
|
<listEntry value="4"/>
|
||||||
|
</listAttribute>
|
||||||
|
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <memoryBlockExpressionList context="Context string"/> "/>
|
||||||
|
<stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>
|
||||||
|
</launchConfiguration>
|
||||||
7
keycluster/build/uhk60-keycluster_release_kboot.launch
Normal file
7
keycluster/build/uhk60-keycluster_release_kboot.launch
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<launchConfiguration type="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType">
|
||||||
|
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LAUNCH_CONFIGURATION_BUILD_SCOPE" value="${none}"/>
|
||||||
|
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="/usr/bin/make"/>
|
||||||
|
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-j8 DEBUG=0 flash"/>
|
||||||
|
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/uhk-keycluster}/../"/>
|
||||||
|
</launchConfiguration>
|
||||||
61
keycluster/src/blackberry_trackball.c
Normal file
61
keycluster/src/blackberry_trackball.c
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
#include "fsl_gpio.h"
|
||||||
|
#include "fsl_port.h"
|
||||||
|
#include "blackberry_trackball.h"
|
||||||
|
|
||||||
|
pointer_delta_t BlackBerryTrackball_PointerDelta;
|
||||||
|
|
||||||
|
void BlackberryTrackball_Init(void)
|
||||||
|
{
|
||||||
|
CLOCK_EnableClock(BLACKBERRY_TRACKBALL_LEFT_CLOCK);
|
||||||
|
PORT_SetPinMux(BLACKBERRY_TRACKBALL_LEFT_PORT, BLACKBERRY_TRACKBALL_LEFT_PIN, kPORT_MuxAsGpio);
|
||||||
|
PORT_SetPinInterruptConfig(BLACKBERRY_TRACKBALL_LEFT_PORT, BLACKBERRY_TRACKBALL_LEFT_PIN, kPORT_InterruptEitherEdge);
|
||||||
|
NVIC_EnableIRQ(BLACKBERRY_TRACKBALL_LEFT_IRQ);
|
||||||
|
|
||||||
|
CLOCK_EnableClock(BLACKBERRY_TRACKBALL_RIGHT_CLOCK);
|
||||||
|
PORT_SetPinMux(BLACKBERRY_TRACKBALL_RIGHT_PORT, BLACKBERRY_TRACKBALL_RIGHT_PIN, kPORT_MuxAsGpio);
|
||||||
|
PORT_SetPinInterruptConfig(BLACKBERRY_TRACKBALL_RIGHT_PORT, BLACKBERRY_TRACKBALL_RIGHT_PIN, kPORT_InterruptEitherEdge);
|
||||||
|
NVIC_EnableIRQ(BLACKBERRY_TRACKBALL_RIGHT_IRQ);
|
||||||
|
|
||||||
|
CLOCK_EnableClock(BLACKBERRY_TRACKBALL_UP_CLOCK);
|
||||||
|
PORT_SetPinMux(BLACKBERRY_TRACKBALL_UP_PORT, BLACKBERRY_TRACKBALL_UP_PIN, kPORT_MuxAsGpio);
|
||||||
|
PORT_SetPinInterruptConfig(BLACKBERRY_TRACKBALL_UP_PORT, BLACKBERRY_TRACKBALL_UP_PIN, kPORT_InterruptEitherEdge);
|
||||||
|
NVIC_EnableIRQ(BLACKBERRY_TRACKBALL_UP_IRQ);
|
||||||
|
|
||||||
|
CLOCK_EnableClock(BLACKBERRY_TRACKBALL_DOWN_CLOCK);
|
||||||
|
PORT_SetPinMux(BLACKBERRY_TRACKBALL_DOWN_PORT, BLACKBERRY_TRACKBALL_DOWN_PIN, kPORT_MuxAsGpio);
|
||||||
|
PORT_SetPinInterruptConfig(BLACKBERRY_TRACKBALL_DOWN_PORT, BLACKBERRY_TRACKBALL_DOWN_PIN, kPORT_InterruptEitherEdge);
|
||||||
|
NVIC_EnableIRQ(BLACKBERRY_TRACKBALL_DOWN_IRQ);
|
||||||
|
}
|
||||||
|
|
||||||
|
void handleTrackball(void)
|
||||||
|
{
|
||||||
|
if (PORT_GetPinsInterruptFlags(BLACKBERRY_TRACKBALL_LEFT_PORT) & (1 << BLACKBERRY_TRACKBALL_LEFT_PIN)) {
|
||||||
|
BlackBerryTrackball_PointerDelta.x++;
|
||||||
|
GPIO_ClearPinsInterruptFlags(BLACKBERRY_TRACKBALL_LEFT_GPIO, 1U << BLACKBERRY_TRACKBALL_LEFT_PIN);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (PORT_GetPinsInterruptFlags(BLACKBERRY_TRACKBALL_RIGHT_PORT) & (1 << BLACKBERRY_TRACKBALL_RIGHT_PIN)) {
|
||||||
|
BlackBerryTrackball_PointerDelta.x--;
|
||||||
|
GPIO_ClearPinsInterruptFlags(BLACKBERRY_TRACKBALL_RIGHT_GPIO, 1U << BLACKBERRY_TRACKBALL_RIGHT_PIN);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (PORT_GetPinsInterruptFlags(BLACKBERRY_TRACKBALL_UP_PORT) & (1 << BLACKBERRY_TRACKBALL_UP_PIN)) {
|
||||||
|
BlackBerryTrackball_PointerDelta.y++;
|
||||||
|
GPIO_ClearPinsInterruptFlags(BLACKBERRY_TRACKBALL_UP_GPIO, 1U << BLACKBERRY_TRACKBALL_UP_PIN);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (PORT_GetPinsInterruptFlags(BLACKBERRY_TRACKBALL_DOWN_PORT) & (1 << BLACKBERRY_TRACKBALL_DOWN_PIN)) {
|
||||||
|
BlackBerryTrackball_PointerDelta.y--;
|
||||||
|
GPIO_ClearPinsInterruptFlags(BLACKBERRY_TRACKBALL_DOWN_GPIO, 1U << BLACKBERRY_TRACKBALL_DOWN_PIN);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void BLACKBERRY_TRACKBALL_IRQ_HANDLER1(void)
|
||||||
|
{
|
||||||
|
handleTrackball();
|
||||||
|
}
|
||||||
|
|
||||||
|
void BLACKBERRY_TRACKBALL_IRQ_HANDLER2(void)
|
||||||
|
{
|
||||||
|
handleTrackball();
|
||||||
|
}
|
||||||
45
keycluster/src/blackberry_trackball.h
Normal file
45
keycluster/src/blackberry_trackball.h
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
#ifndef __BLACKBERRY_TRACKBALL_H__
|
||||||
|
#define __BLACKBERRY_TRACKBALL_H__
|
||||||
|
|
||||||
|
// Includes:
|
||||||
|
|
||||||
|
#include "slave_protocol.h"
|
||||||
|
|
||||||
|
// Macros:
|
||||||
|
|
||||||
|
#define BLACKBERRY_TRACKBALL_LEFT_PORT PORTB
|
||||||
|
#define BLACKBERRY_TRACKBALL_LEFT_GPIO GPIOB
|
||||||
|
#define BLACKBERRY_TRACKBALL_LEFT_IRQ PORTB_IRQn
|
||||||
|
#define BLACKBERRY_TRACKBALL_LEFT_CLOCK kCLOCK_PortB
|
||||||
|
#define BLACKBERRY_TRACKBALL_LEFT_PIN 0
|
||||||
|
|
||||||
|
#define BLACKBERRY_TRACKBALL_RIGHT_PORT PORTB
|
||||||
|
#define BLACKBERRY_TRACKBALL_RIGHT_GPIO GPIOB
|
||||||
|
#define BLACKBERRY_TRACKBALL_RIGHT_IRQ PORTB_IRQn
|
||||||
|
#define BLACKBERRY_TRACKBALL_RIGHT_CLOCK kCLOCK_PortB
|
||||||
|
#define BLACKBERRY_TRACKBALL_RIGHT_PIN 2
|
||||||
|
|
||||||
|
#define BLACKBERRY_TRACKBALL_UP_PORT PORTA
|
||||||
|
#define BLACKBERRY_TRACKBALL_UP_GPIO GPIOA
|
||||||
|
#define BLACKBERRY_TRACKBALL_UP_IRQ PORTA_IRQn
|
||||||
|
#define BLACKBERRY_TRACKBALL_UP_CLOCK kCLOCK_PortA
|
||||||
|
#define BLACKBERRY_TRACKBALL_UP_PIN 12
|
||||||
|
|
||||||
|
#define BLACKBERRY_TRACKBALL_DOWN_PORT PORTB
|
||||||
|
#define BLACKBERRY_TRACKBALL_DOWN_GPIO GPIOB
|
||||||
|
#define BLACKBERRY_TRACKBALL_DOWN_IRQ PORTB_IRQn
|
||||||
|
#define BLACKBERRY_TRACKBALL_DOWN_CLOCK kCLOCK_PortB
|
||||||
|
#define BLACKBERRY_TRACKBALL_DOWN_PIN 6
|
||||||
|
|
||||||
|
#define BLACKBERRY_TRACKBALL_IRQ_HANDLER1 PORTA_IRQHandler
|
||||||
|
#define BLACKBERRY_TRACKBALL_IRQ_HANDLER2 PORTB_IRQHandler
|
||||||
|
|
||||||
|
// Variables:
|
||||||
|
|
||||||
|
extern pointer_delta_t BlackBerryTrackball_PointerDelta;
|
||||||
|
|
||||||
|
// Functions:
|
||||||
|
|
||||||
|
void BlackberryTrackball_Init(void);
|
||||||
|
|
||||||
|
#endif
|
||||||
19
keycluster/src/i2c.h
Normal file
19
keycluster/src/i2c.h
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
#ifndef __I2C_H__
|
||||||
|
#define __I2C_H__
|
||||||
|
|
||||||
|
// Macros:
|
||||||
|
|
||||||
|
#define I2C_BUS_BASEADDR I2C0
|
||||||
|
#define I2C_BUS_CLK_SRC I2C0_CLK_SRC
|
||||||
|
#define I2C_BUS_BAUD_RATE 100000 // 100 kHz works even with a 20 meter long bridge cable.
|
||||||
|
#define I2C_BUS_MUX kPORT_MuxAlt2
|
||||||
|
|
||||||
|
#define I2C_BUS_SDA_PORT PORTB
|
||||||
|
#define I2C_BUS_SDA_CLOCK kCLOCK_PortB
|
||||||
|
#define I2C_BUS_SDA_PIN 4
|
||||||
|
|
||||||
|
#define I2C_BUS_SCL_PORT PORTB
|
||||||
|
#define I2C_BUS_SCL_CLOCK kCLOCK_PortB
|
||||||
|
#define I2C_BUS_SCL_PIN 3
|
||||||
|
|
||||||
|
#endif
|
||||||
33
keycluster/src/i2c_watchdog.c
Normal file
33
keycluster/src/i2c_watchdog.c
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
#include "fsl_i2c.h"
|
||||||
|
#include "i2c.h"
|
||||||
|
#include "i2c_watchdog.h"
|
||||||
|
#include "test_led.h"
|
||||||
|
#include "init_peripherals.h"
|
||||||
|
|
||||||
|
// NOTE: Because of a bug in the ROM bootloader of the KL03Z, the watchdog timer is disabled and cannot be re-enabled.
|
||||||
|
// See https://community.nxp.com/thread/457893
|
||||||
|
// Therefore the hardware watchdog timer cannot be used without an extra way to enter bootloader or application mode.
|
||||||
|
static uint32_t prevWatchdogCounter = 0;
|
||||||
|
static uint32_t I2cWatchdog_RecoveryCounter; // Counter for how many times we had to recover and restart
|
||||||
|
|
||||||
|
void RunWatchdog(void)
|
||||||
|
{
|
||||||
|
static volatile uint32_t I2cWatchdog_WatchCounter = 0; // Counter for timer
|
||||||
|
static int counter = 0;
|
||||||
|
|
||||||
|
counter++;
|
||||||
|
if (counter == 100) { // We get called from KEY_SCANNER_HANDLER() which runs at 1ms, thus scaling down by 100 here to get 100 ms period
|
||||||
|
counter=0;
|
||||||
|
TestLed_Toggle();
|
||||||
|
I2cWatchdog_WatchCounter++;
|
||||||
|
|
||||||
|
if (I2cWatchdog_WatchCounter > 10) { // Do not check within the first 1000 ms, as I2C might not be running yet
|
||||||
|
if (I2C_Watchdog == prevWatchdogCounter) { // Restart I2C if there hasn't been any interrupt during 100 ms. I2C_Watchdog gets incremented for every I2C transaction
|
||||||
|
I2cWatchdog_RecoveryCounter++;
|
||||||
|
I2C_SlaveDeinit(I2C_BUS_BASEADDR);
|
||||||
|
initI2c();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
prevWatchdogCounter = I2C_Watchdog;
|
||||||
|
}
|
||||||
|
}
|
||||||
18
keycluster/src/i2c_watchdog.h
Normal file
18
keycluster/src/i2c_watchdog.h
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
#ifndef __I2C_WATCHDOG_H__
|
||||||
|
#define __I2C_WATCHDOG_H__
|
||||||
|
|
||||||
|
// Includes:
|
||||||
|
|
||||||
|
#include "fsl_lptmr.h"
|
||||||
|
|
||||||
|
// Macros:
|
||||||
|
|
||||||
|
#define I2C_WATCHDOG_LPTMR_HANDLER LPTMR0_IRQHandler
|
||||||
|
#define LPTMR_SOURCE_CLOCK CLOCK_GetFreq(kCLOCK_LpoClk)
|
||||||
|
#define LPTMR_USEC_COUNT 100000U
|
||||||
|
|
||||||
|
// Functions:
|
||||||
|
|
||||||
|
void RunWatchdog(void);
|
||||||
|
|
||||||
|
#endif
|
||||||
91
keycluster/src/init_peripherals.c
Normal file
91
keycluster/src/init_peripherals.c
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
#include "fsl_common.h"
|
||||||
|
#include "fsl_port.h"
|
||||||
|
#include "test_led.h"
|
||||||
|
#include "init_peripherals.h"
|
||||||
|
#include "i2c_addresses.h"
|
||||||
|
#include "fsl_i2c.h"
|
||||||
|
#include "fsl_clock.h"
|
||||||
|
#include "i2c.h"
|
||||||
|
#include "led_pwm.h"
|
||||||
|
#include "slave_protocol_handler.h"
|
||||||
|
#include "i2c_watchdog.h"
|
||||||
|
#include "main.h"
|
||||||
|
#include "module.h"
|
||||||
|
#include "blackberry_trackball.h"
|
||||||
|
|
||||||
|
i2c_slave_config_t slaveConfig;
|
||||||
|
i2c_slave_handle_t slaveHandle;
|
||||||
|
|
||||||
|
uint8_t userData;
|
||||||
|
uint8_t rxMessagePos;
|
||||||
|
uint8_t dosBuffer[2];
|
||||||
|
|
||||||
|
static void i2cSlaveCallback(I2C_Type *base, i2c_slave_transfer_t *xfer, void *userDataArg)
|
||||||
|
{
|
||||||
|
dosBuffer[0] = xfer->event;
|
||||||
|
dosBuffer[1] = userData;
|
||||||
|
|
||||||
|
switch (xfer->event) {
|
||||||
|
case kI2C_SlaveTransmitEvent:
|
||||||
|
SlaveTxHandler();
|
||||||
|
xfer->data = (uint8_t*)&TxMessage;
|
||||||
|
xfer->dataSize = TxMessage.length + I2C_MESSAGE_HEADER_LENGTH;
|
||||||
|
break;
|
||||||
|
case kI2C_SlaveAddressMatchEvent:
|
||||||
|
rxMessagePos = 0;
|
||||||
|
break;
|
||||||
|
case kI2C_SlaveReceiveEvent:
|
||||||
|
((uint8_t*)&RxMessage)[rxMessagePos++] = userData;
|
||||||
|
if (RxMessage.length == rxMessagePos-I2C_MESSAGE_HEADER_LENGTH) {
|
||||||
|
SlaveRxHandler();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void initInterruptPriorities(void)
|
||||||
|
{
|
||||||
|
NVIC_SetPriority(I2C0_IRQn, 1);
|
||||||
|
NVIC_SetPriority(TPM1_IRQn, 1);
|
||||||
|
NVIC_SetPriority(SPI0_IRQn, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void initI2c(void)
|
||||||
|
{
|
||||||
|
port_pin_config_t pinConfig = {
|
||||||
|
.pullSelect = kPORT_PullUp,
|
||||||
|
};
|
||||||
|
|
||||||
|
CLOCK_EnableClock(I2C_BUS_SDA_CLOCK);
|
||||||
|
CLOCK_EnableClock(I2C_BUS_SCL_CLOCK);
|
||||||
|
|
||||||
|
pinConfig.mux = I2C_BUS_MUX;
|
||||||
|
PORT_SetPinConfig(I2C_BUS_SDA_PORT, I2C_BUS_SDA_PIN, &pinConfig);
|
||||||
|
PORT_SetPinConfig(I2C_BUS_SCL_PORT, I2C_BUS_SCL_PIN, &pinConfig);
|
||||||
|
|
||||||
|
I2C_SlaveGetDefaultConfig(&slaveConfig);
|
||||||
|
slaveConfig.slaveAddress = I2C_ADDRESS_MODULE_FIRMWARE;
|
||||||
|
I2C_SlaveInit(I2C_BUS_BASEADDR, &slaveConfig);
|
||||||
|
I2C_SlaveTransferCreateHandle(I2C_BUS_BASEADDR, &slaveHandle, i2cSlaveCallback, &userData);
|
||||||
|
I2C_SlaveTransferNonBlocking(I2C_BUS_BASEADDR, &slaveHandle, kI2C_SlaveAddressMatchEvent);
|
||||||
|
}
|
||||||
|
|
||||||
|
void InitLedDriver(void)
|
||||||
|
{
|
||||||
|
CLOCK_EnableClock(LED_DRIVER_SDB_CLOCK);
|
||||||
|
PORT_SetPinMux(LED_DRIVER_SDB_PORT, LED_DRIVER_SDB_PIN, kPORT_MuxAsGpio);
|
||||||
|
GPIO_PinInit(LED_DRIVER_SDB_GPIO, LED_DRIVER_SDB_PIN, &(gpio_pin_config_t){kGPIO_DigitalOutput, 0});
|
||||||
|
GPIO_WritePinOutput(LED_DRIVER_SDB_GPIO, LED_DRIVER_SDB_PIN, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void InitPeripherals(void)
|
||||||
|
{
|
||||||
|
initInterruptPriorities();
|
||||||
|
InitLedDriver();
|
||||||
|
TestLed_Init();
|
||||||
|
LedPwm_Init();
|
||||||
|
initI2c();
|
||||||
|
BlackberryTrackball_Init();
|
||||||
|
}
|
||||||
16
keycluster/src/init_peripherals.h
Normal file
16
keycluster/src/init_peripherals.h
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
#ifndef __INIT_PERIPHERALS_H__
|
||||||
|
#define __INIT_PERIPHERALS_H__
|
||||||
|
|
||||||
|
// Macros:
|
||||||
|
|
||||||
|
#define LED_DRIVER_SDB_PORT PORTB
|
||||||
|
#define LED_DRIVER_SDB_GPIO GPIOB
|
||||||
|
#define LED_DRIVER_SDB_CLOCK kCLOCK_PortB
|
||||||
|
#define LED_DRIVER_SDB_PIN 1
|
||||||
|
|
||||||
|
// Functions:
|
||||||
|
|
||||||
|
void InitPeripherals(void);
|
||||||
|
void initI2c(void);
|
||||||
|
|
||||||
|
#endif
|
||||||
22
keycluster/src/key_scanner.c
Normal file
22
keycluster/src/key_scanner.c
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
#include "fsl_lptmr.h"
|
||||||
|
#include "key_scanner.h"
|
||||||
|
#include "i2c_watchdog.h"
|
||||||
|
|
||||||
|
void KEY_SCANNER_HANDLER(void)
|
||||||
|
{
|
||||||
|
KeyMatrix_ScanRow(&keyMatrix);
|
||||||
|
RunWatchdog();
|
||||||
|
LPTMR_ClearStatusFlags(KEY_SCANNER_LPTMR_BASEADDR, kLPTMR_TimerCompareFlag);
|
||||||
|
}
|
||||||
|
|
||||||
|
void InitKeyScanner(void)
|
||||||
|
{
|
||||||
|
lptmr_config_t lptmrConfig;
|
||||||
|
LPTMR_GetDefaultConfig(&lptmrConfig);
|
||||||
|
LPTMR_Init(KEY_SCANNER_LPTMR_BASEADDR, &lptmrConfig);
|
||||||
|
|
||||||
|
LPTMR_SetTimerPeriod(KEY_SCANNER_LPTMR_BASEADDR, USEC_TO_COUNT(KEY_SCANNER_INTERVAL_USEC, LPTMR_SOURCE_CLOCK));
|
||||||
|
LPTMR_EnableInterrupts(KEY_SCANNER_LPTMR_BASEADDR, kLPTMR_TimerInterruptEnable);
|
||||||
|
EnableIRQ(KEY_SCANNER_LPTMR_IRQ_ID);
|
||||||
|
LPTMR_StartTimer(KEY_SCANNER_LPTMR_BASEADDR);
|
||||||
|
}
|
||||||
22
keycluster/src/key_scanner.h
Normal file
22
keycluster/src/key_scanner.h
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
#ifndef __KEY_SCANNER_H__
|
||||||
|
#define __KEY_SCANNER_H__
|
||||||
|
|
||||||
|
// Includes:
|
||||||
|
|
||||||
|
#include "main.h"
|
||||||
|
|
||||||
|
// Macros:
|
||||||
|
|
||||||
|
#define LPTMR_SOURCE_CLOCK CLOCK_GetFreq(kCLOCK_LpoClk)
|
||||||
|
|
||||||
|
#define KEY_SCANNER_LPTMR_BASEADDR LPTMR0
|
||||||
|
#define KEY_SCANNER_LPTMR_IRQ_ID LPTMR0_IRQn
|
||||||
|
#define KEY_SCANNER_HANDLER LPTMR0_IRQHandler
|
||||||
|
|
||||||
|
#define KEY_SCANNER_INTERVAL_USEC (1000 / KEYBOARD_MATRIX_ROWS_NUM)
|
||||||
|
|
||||||
|
// Functions:
|
||||||
|
|
||||||
|
void InitKeyScanner(void);
|
||||||
|
|
||||||
|
#endif
|
||||||
30
keycluster/src/led_pwm.c
Normal file
30
keycluster/src/led_pwm.c
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
#include "led_pwm.h"
|
||||||
|
#include "fsl_port.h"
|
||||||
|
|
||||||
|
void LedPwm_Init(void)
|
||||||
|
{
|
||||||
|
CLOCK_EnableClock(LED_PWM_CLOCK);
|
||||||
|
PORT_SetPinMux(LED_PWM_PORT, LED_PWM_PIN, kPORT_MuxAlt2);
|
||||||
|
|
||||||
|
// Select the clock source for the TPM counter as MCGPLLCLK.
|
||||||
|
CLOCK_SetTpmClock(1U);
|
||||||
|
|
||||||
|
tpm_config_t tpmInfo;
|
||||||
|
TPM_GetDefaultConfig(&tpmInfo);
|
||||||
|
TPM_Init(LED_PWM_TPM_BASEADDR, &tpmInfo);
|
||||||
|
|
||||||
|
tpm_chnl_pwm_signal_param_t tpmParam[1];
|
||||||
|
tpmParam[0].chnlNumber = LED_PWM_TPM_CHANNEL;
|
||||||
|
tpmParam[0].level = kTPM_LowTrue;
|
||||||
|
tpmParam[0].dutyCyclePercent = 100 - INITIAL_DUTY_CYCLE_PERCENT;
|
||||||
|
TPM_SetupPwm(LED_PWM_TPM_BASEADDR, tpmParam, 1,
|
||||||
|
kTPM_EdgeAlignedPwm, TPM_PWM_FREQUENCY, TPM_SOURCE_CLOCK);
|
||||||
|
|
||||||
|
TPM_StartTimer(LED_PWM_TPM_BASEADDR, kTPM_SystemClock);
|
||||||
|
}
|
||||||
|
|
||||||
|
void LedPwm_SetBrightness(uint8_t brightnessPercent)
|
||||||
|
{
|
||||||
|
TPM_UpdatePwmDutycycle(LED_PWM_TPM_BASEADDR, LED_PWM_TPM_CHANNEL,
|
||||||
|
kTPM_EdgeAlignedPwm, 100 - brightnessPercent);
|
||||||
|
}
|
||||||
27
keycluster/src/led_pwm.h
Normal file
27
keycluster/src/led_pwm.h
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
#ifndef __LED_PWM_H__
|
||||||
|
#define __LED_PWM_H__
|
||||||
|
|
||||||
|
// Includes:
|
||||||
|
|
||||||
|
#include "fsl_tpm.h"
|
||||||
|
|
||||||
|
// Macros:
|
||||||
|
|
||||||
|
#define LED_PWM_PORT PORTB
|
||||||
|
#define LED_PWM_CLOCK kCLOCK_PortB
|
||||||
|
#define LED_PWM_PIN 5
|
||||||
|
|
||||||
|
#define LED_PWM_TPM_BASEADDR TPM1
|
||||||
|
#define LED_PWM_TPM_CHANNEL kTPM_Chnl_1
|
||||||
|
|
||||||
|
#define TPM_SOURCE_CLOCK CLOCK_GetFreq(kCLOCK_BusClk)
|
||||||
|
#define TPM_PWM_FREQUENCY 24000U
|
||||||
|
|
||||||
|
#define INITIAL_DUTY_CYCLE_PERCENT 100U
|
||||||
|
|
||||||
|
// Functions:
|
||||||
|
|
||||||
|
void LedPwm_Init(void);
|
||||||
|
void LedPwm_SetBrightness(uint8_t brightnessPercent);
|
||||||
|
|
||||||
|
#endif
|
||||||
34
keycluster/src/main.c
Normal file
34
keycluster/src/main.c
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
#include "main.h"
|
||||||
|
#include "slave/init_clock.h"
|
||||||
|
#include "init_peripherals.h"
|
||||||
|
#include "bootloader.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
#include "key_scanner.h"
|
||||||
|
#include "module.h"
|
||||||
|
|
||||||
|
DEFINE_BOOTLOADER_CONFIG_AREA(I2C_ADDRESS_MODULE_BOOTLOADER)
|
||||||
|
|
||||||
|
key_matrix_t keyMatrix = {
|
||||||
|
.colNum = KEYBOARD_MATRIX_COLS_NUM,
|
||||||
|
.rowNum = KEYBOARD_MATRIX_ROWS_NUM,
|
||||||
|
.cols = (key_matrix_pin_t[]) {
|
||||||
|
{PORTB, GPIOB, kCLOCK_PortB, 11},
|
||||||
|
{PORTA, GPIOA, kCLOCK_PortA, 6},
|
||||||
|
},
|
||||||
|
.rows = (key_matrix_pin_t[]) {
|
||||||
|
{PORTB, GPIOB, kCLOCK_PortB, 7},
|
||||||
|
{PORTB, GPIOB, kCLOCK_PortB, 10},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
InitClock();
|
||||||
|
InitPeripherals();
|
||||||
|
KeyMatrix_Init(&keyMatrix);
|
||||||
|
InitKeyScanner();
|
||||||
|
|
||||||
|
while (1) {
|
||||||
|
__WFI();
|
||||||
|
}
|
||||||
|
}
|
||||||
17
keycluster/src/main.h
Normal file
17
keycluster/src/main.h
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
#ifndef __MAIN_H__
|
||||||
|
#define __MAIN_H__
|
||||||
|
|
||||||
|
// Includes:
|
||||||
|
|
||||||
|
#include "key_matrix.h"
|
||||||
|
|
||||||
|
// Macros:
|
||||||
|
|
||||||
|
#define KEYBOARD_MATRIX_COLS_NUM 2
|
||||||
|
#define KEYBOARD_MATRIX_ROWS_NUM 2
|
||||||
|
|
||||||
|
// Variables:
|
||||||
|
|
||||||
|
extern key_matrix_t keyMatrix;
|
||||||
|
|
||||||
|
#endif
|
||||||
13
keycluster/src/module.h
Normal file
13
keycluster/src/module.h
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
#ifndef __MODULE_H__
|
||||||
|
#define __MODULE_H__
|
||||||
|
|
||||||
|
// Macros:
|
||||||
|
|
||||||
|
#define I2C_ADDRESS_MODULE_FIRMWARE I2C_ADDRESS_LEFT_MODULE_FIRMWARE
|
||||||
|
#define I2C_ADDRESS_MODULE_BOOTLOADER I2C_ADDRESS_LEFT_MODULE_BOOTLOADER
|
||||||
|
#define MODULE_PROTOCOL_VERSION 1
|
||||||
|
#define MODULE_ID ModuleId_KeyClusterLeft
|
||||||
|
#define MODULE_KEY_COUNT (KEYBOARD_MATRIX_ROWS_NUM * KEYBOARD_MATRIX_COLS_NUM)
|
||||||
|
#define MODULE_POINTER_COUNT 1
|
||||||
|
|
||||||
|
#endif
|
||||||
115
keycluster/src/slave_protocol_handler.c
Normal file
115
keycluster/src/slave_protocol_handler.c
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
#include "slave_protocol_handler.h"
|
||||||
|
#include "test_led.h"
|
||||||
|
#include "main.h"
|
||||||
|
#include "i2c_addresses.h"
|
||||||
|
#include "i2c.h"
|
||||||
|
#include "led_pwm.h"
|
||||||
|
#include "slave_protocol.h"
|
||||||
|
#include "main.h"
|
||||||
|
#include "init_peripherals.h"
|
||||||
|
#include "bool_array_converter.h"
|
||||||
|
#include "bootloader.h"
|
||||||
|
#include "module.h"
|
||||||
|
#include "versions.h"
|
||||||
|
#include "blackberry_trackball.h"
|
||||||
|
|
||||||
|
i2c_message_t RxMessage;
|
||||||
|
i2c_message_t TxMessage;
|
||||||
|
|
||||||
|
static version_t moduleProtocolVersion = {
|
||||||
|
MODULE_PROTOCOL_MAJOR_VERSION,
|
||||||
|
MODULE_PROTOCOL_MINOR_VERSION,
|
||||||
|
MODULE_PROTOCOL_PATCH_VERSION,
|
||||||
|
};
|
||||||
|
|
||||||
|
static version_t firmwareVersion = {
|
||||||
|
FIRMWARE_MAJOR_VERSION,
|
||||||
|
FIRMWARE_MINOR_VERSION,
|
||||||
|
FIRMWARE_PATCH_VERSION,
|
||||||
|
};
|
||||||
|
|
||||||
|
void SlaveRxHandler(void)
|
||||||
|
{
|
||||||
|
if (!CRC16_IsMessageValid(&RxMessage)) {
|
||||||
|
TxMessage.length = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t commandId = RxMessage.data[0];
|
||||||
|
switch (commandId) {
|
||||||
|
case SlaveCommand_JumpToBootloader:
|
||||||
|
NVIC_SystemReset();
|
||||||
|
break;
|
||||||
|
case SlaveCommand_SetTestLed:
|
||||||
|
TxMessage.length = 0;
|
||||||
|
bool isLedOn = RxMessage.data[1];
|
||||||
|
TestLed_Set(isLedOn);
|
||||||
|
break;
|
||||||
|
case SlaveCommand_SetLedPwmBrightness:
|
||||||
|
TxMessage.length = 0;
|
||||||
|
uint8_t brightnessPercent = RxMessage.data[1];
|
||||||
|
LedPwm_SetBrightness(brightnessPercent);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SlaveTxHandler(void)
|
||||||
|
{
|
||||||
|
uint8_t commandId = RxMessage.data[0];
|
||||||
|
switch (commandId) {
|
||||||
|
case SlaveCommand_RequestProperty: {
|
||||||
|
uint8_t propertyId = RxMessage.data[1];
|
||||||
|
switch (propertyId) {
|
||||||
|
case SlaveProperty_Sync: {
|
||||||
|
memcpy(TxMessage.data, SlaveSyncString, SLAVE_SYNC_STRING_LENGTH);
|
||||||
|
TxMessage.length = SLAVE_SYNC_STRING_LENGTH;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case SlaveProperty_ModuleProtocolVersion: {
|
||||||
|
memcpy(TxMessage.data, &moduleProtocolVersion, sizeof(version_t));
|
||||||
|
TxMessage.length = sizeof(version_t);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case SlaveProperty_FirmwareVersion: {
|
||||||
|
memcpy(TxMessage.data, &firmwareVersion, sizeof(version_t));
|
||||||
|
TxMessage.length = sizeof(version_t);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case SlaveProperty_ModuleId: {
|
||||||
|
TxMessage.data[0] = MODULE_ID;
|
||||||
|
TxMessage.length = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case SlaveProperty_KeyCount: {
|
||||||
|
TxMessage.data[0] = MODULE_KEY_COUNT;
|
||||||
|
TxMessage.length = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case SlaveProperty_PointerCount: {
|
||||||
|
TxMessage.data[0] = MODULE_POINTER_COUNT;
|
||||||
|
TxMessage.length = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case SlaveCommand_RequestKeyStates:
|
||||||
|
BoolBytesToBits(keyMatrix.keyStates, TxMessage.data, MODULE_KEY_COUNT);
|
||||||
|
uint8_t messageLength = BOOL_BYTES_TO_BITS_COUNT(MODULE_KEY_COUNT);
|
||||||
|
if (MODULE_POINTER_COUNT) {
|
||||||
|
pointer_delta_t *pointerDelta = (pointer_delta_t*)(TxMessage.data + messageLength);
|
||||||
|
pointerDelta->x = BlackBerryTrackball_PointerDelta.x;
|
||||||
|
pointerDelta->y = BlackBerryTrackball_PointerDelta.y;
|
||||||
|
BlackBerryTrackball_PointerDelta.x = 0;
|
||||||
|
BlackBerryTrackball_PointerDelta.y = 0;
|
||||||
|
if (keyMatrix.keyStates[0]) {
|
||||||
|
pointerDelta->x = 1;
|
||||||
|
}
|
||||||
|
messageLength += sizeof(pointer_delta_t);
|
||||||
|
}
|
||||||
|
TxMessage.length = messageLength;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
CRC16_UpdateMessageChecksum(&TxMessage);
|
||||||
|
}
|
||||||
20
keycluster/src/slave_protocol_handler.h
Normal file
20
keycluster/src/slave_protocol_handler.h
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
#ifndef __SLAVE_PROTOCOL_HANDLER_H__
|
||||||
|
#define __SLAVE_PROTOCOL_HANDLER_H__
|
||||||
|
|
||||||
|
// Includes:
|
||||||
|
|
||||||
|
#include "fsl_port.h"
|
||||||
|
#include "crc16.h"
|
||||||
|
#include "slave_protocol.h"
|
||||||
|
|
||||||
|
// Variables:
|
||||||
|
|
||||||
|
extern i2c_message_t RxMessage;
|
||||||
|
extern i2c_message_t TxMessage;
|
||||||
|
|
||||||
|
// Functions:
|
||||||
|
|
||||||
|
void SlaveRxHandler(void);
|
||||||
|
void SlaveTxHandler(void);
|
||||||
|
|
||||||
|
#endif
|
||||||
10
keycluster/src/test_led.c
Normal file
10
keycluster/src/test_led.c
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
#include "test_led.h"
|
||||||
|
#include "fsl_port.h"
|
||||||
|
|
||||||
|
extern void TestLed_Init(void)
|
||||||
|
{
|
||||||
|
CLOCK_EnableClock(TEST_LED_CLOCK);
|
||||||
|
PORT_SetPinMux(TEST_LED_PORT, TEST_LED_PIN, kPORT_MuxAsGpio);
|
||||||
|
GPIO_PinInit(TEST_LED_GPIO, TEST_LED_PIN, &(gpio_pin_config_t){kGPIO_DigitalOutput, 0});
|
||||||
|
TestLed_On();
|
||||||
|
}
|
||||||
42
keycluster/src/test_led.h
Normal file
42
keycluster/src/test_led.h
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
#ifndef __TEST_LED_H__
|
||||||
|
#define __TEST_LED_H__
|
||||||
|
|
||||||
|
// Includes:
|
||||||
|
|
||||||
|
#include "fsl_gpio.h"
|
||||||
|
|
||||||
|
// Macros:
|
||||||
|
|
||||||
|
#define LOGIC_LED_ON 0U
|
||||||
|
#define LOGIC_LED_OFF 1U
|
||||||
|
|
||||||
|
#define TEST_LED_GPIO GPIOB
|
||||||
|
#define TEST_LED_PORT PORTB
|
||||||
|
#define TEST_LED_CLOCK kCLOCK_PortB
|
||||||
|
#define TEST_LED_PIN 13
|
||||||
|
|
||||||
|
static inline void TestLed_On(void)
|
||||||
|
{
|
||||||
|
GPIO_SetPinsOutput(TEST_LED_GPIO, 1U << TEST_LED_PIN);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void TestLed_Off(void)
|
||||||
|
{
|
||||||
|
GPIO_ClearPinsOutput(TEST_LED_GPIO, 1U << TEST_LED_PIN);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void TestLed_Set(bool state)
|
||||||
|
{
|
||||||
|
GPIO_WritePinOutput(TEST_LED_GPIO, TEST_LED_PIN, state);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void TestLed_Toggle(void)
|
||||||
|
{
|
||||||
|
GPIO_TogglePinsOutput(TEST_LED_GPIO, 1U << TEST_LED_PIN);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Functions:
|
||||||
|
|
||||||
|
void TestLed_Init(void);
|
||||||
|
|
||||||
|
#endif
|
||||||
58
left/Makefile
Normal file
58
left/Makefile
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
# Copyright (C) 2018 Kristian Lauszus. All rights reserved.
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# Contact information
|
||||||
|
# -------------------
|
||||||
|
# Kristian Lauszus
|
||||||
|
# Web : http://www.lauszus.com
|
||||||
|
# e-mail : lauszus@gmail.com
|
||||||
|
|
||||||
|
# Set project name.
|
||||||
|
PROJECT_NAME = uhk_left
|
||||||
|
|
||||||
|
# Defines the part type that this project uses.
|
||||||
|
PART = MKL03Z32VFK4
|
||||||
|
|
||||||
|
# Defines the linker script to use for the application.
|
||||||
|
LDSCRIPT = ../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/gcc/MKL03Z32xxx4_flash.ld
|
||||||
|
|
||||||
|
# Size of the heap and stack.
|
||||||
|
HEAP_SIZE = 0
|
||||||
|
STACK_SIZE = 0x0050
|
||||||
|
|
||||||
|
# Set the compiler CPU and FPU options.
|
||||||
|
CPU = -mcpu=cortex-m0plus
|
||||||
|
FPU = -mfloat-abi=soft
|
||||||
|
|
||||||
|
# Command for flashing the left half of the keyboard.
|
||||||
|
FLASH_CMD = node ../lib/agent/packages/usb/update-module-firmware.js leftHalf $(PROJECT_OBJ:.axf=.bin)
|
||||||
|
|
||||||
|
# Path to the JLink script used for the left half.
|
||||||
|
JLINK_SCRIPT = ../scripts/flash-left.jlink
|
||||||
|
|
||||||
|
# Source files.
|
||||||
|
SOURCE = $(wildcard src/*.c) \
|
||||||
|
../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/system_MKL03Z4.c \
|
||||||
|
../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/gcc/startup_MKL03Z4.S \
|
||||||
|
../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/drivers/fsl_clock.c \
|
||||||
|
../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/drivers/fsl_gpio.c \
|
||||||
|
../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/drivers/fsl_i2c.c \
|
||||||
|
../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/drivers/fsl_lptmr.c \
|
||||||
|
../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/drivers/fsl_spi.c \
|
||||||
|
../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/drivers/fsl_tpm.c \
|
||||||
|
$(wildcard ../shared/*.c) \
|
||||||
|
$(wildcard ../shared/slave/*.c)
|
||||||
|
|
||||||
|
# Header files.
|
||||||
|
IPATH = src \
|
||||||
|
../lib/KSDK_2.0_MKL03Z8xxx4/CMSIS/Include \
|
||||||
|
../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4 \
|
||||||
|
../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/drivers \
|
||||||
|
../shared
|
||||||
|
|
||||||
|
# Include main Makefile.
|
||||||
|
include ../scripts/Makedefs.mk
|
||||||
@@ -5,19 +5,19 @@
|
|||||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1792027861" moduleId="org.eclipse.cdt.core.settings" name="uhk60-left_debug">
|
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1792027861" moduleId="org.eclipse.cdt.core.settings" name="uhk60-left_debug">
|
||||||
<externalSettings/>
|
<externalSettings/>
|
||||||
<extensions>
|
<extensions>
|
||||||
|
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
|
||||||
</extensions>
|
</extensions>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||||
<configuration artifactExtension="elf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="${cross_rm} -rf" description="" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1792027861" name="uhk60-left_debug" parent="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug">
|
<configuration artifactExtension="elf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="${cross_rm} -rf" description="" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1792027861" name="uhk60-left_debug" parent="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug">
|
||||||
<folderInfo id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1792027861." name="/" resourcePath="">
|
<folderInfo id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1792027861." name="/" resourcePath="">
|
||||||
<toolChain id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.debug.439601044" name="Cross ARM GCC" superClass="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.debug">
|
<toolChain id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.debug.439601044" name="Cross ARM GCC" superClass="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.debug">
|
||||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.780228407" name="Optimization Level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level" value="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.none" valueType="enumerated"/>
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.780228407" name="Optimization Level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level" value="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.most" valueType="enumerated"/>
|
||||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength.1547417078" name="Message length (-fmessage-length=0)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength" value="true" valueType="boolean"/>
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength.1547417078" name="Message length (-fmessage-length=0)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength" value="true" valueType="boolean"/>
|
||||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar.765602671" name="'char' is signed (-fsigned-char)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar" value="true" valueType="boolean"/>
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar.765602671" name="'char' is signed (-fsigned-char)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar" value="true" valueType="boolean"/>
|
||||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections.910567930" name="Function sections (-ffunction-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections" value="true" valueType="boolean"/>
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections.910567930" name="Function sections (-ffunction-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections" value="true" valueType="boolean"/>
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.badfunctioncast.2943267007" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.badfunctioncast" value="false" valueType="boolean"/>
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.badfunctioncast.2943267007" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.badfunctioncast" value="false" valueType="boolean"/>
|
||||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createlisting.9995899345" name="Create extended listing" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createlisting" value="false" valueType="boolean"/>
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createlisting.9995899345" name="Create extended listing" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createlisting" value="false" valueType="boolean"/>
|
||||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform.1777290613" isAbstract="false" osList="all" superClass="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform"/>
|
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform.1777290613" isAbstract="false" osList="all" superClass="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform"/>
|
||||||
<builder buildPath="${workspace_loc:/k64f}/debug" id="ilg.gnuarmeclipse.managedbuild.cross.builder.1406291427" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" stopOnErr="false" superClass="ilg.gnuarmeclipse.managedbuild.cross.builder"/>
|
<builder buildPath="${workspace_loc:/uhk-left}/../" id="ilg.gnuarmeclipse.managedbuild.cross.builder.1406291427" incrementalBuildTarget="all DEBUG=1" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" stopOnErr="false" superClass="ilg.gnuarmeclipse.managedbuild.cross.builder"/>
|
||||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.2007968129" name="Cross ARM GNU Assembler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler">
|
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.2007968129" name="Cross ARM GNU Assembler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler">
|
||||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor.1246588554" name="Use preprocessor" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor" value="true" valueType="boolean"/>
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor.1246588554" name="Use preprocessor" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor" value="true" valueType="boolean"/>
|
||||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths.2122094274" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths"/>
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths.2122094274" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths"/>
|
||||||
@@ -165,16 +165,16 @@
|
|||||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1939339834.1792647078" moduleId="org.eclipse.cdt.core.settings" name="uhk60-left_release">
|
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1939339834.1792647078" moduleId="org.eclipse.cdt.core.settings" name="uhk60-left_release">
|
||||||
<externalSettings/>
|
<externalSettings/>
|
||||||
<extensions>
|
<extensions>
|
||||||
|
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
|
||||||
</extensions>
|
</extensions>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||||
<configuration artifactExtension="elf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="${cross_rm} -rf" description="" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1939339834.1792647078" name="uhk60-left_release" parent="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release">
|
<configuration artifactExtension="elf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" cleanCommand="${cross_rm} -rf" description="" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1939339834.1792647078" name="uhk60-left_release" parent="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release">
|
||||||
<folderInfo id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1939339834.1792647078." name="/" resourcePath="">
|
<folderInfo id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1939339834.1792647078." name="/" resourcePath="">
|
||||||
<toolChain id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.release.1802192936" name="Cross ARM GCC" superClass="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.release">
|
<toolChain id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.release.1802192936" name="Cross ARM GCC" superClass="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.release">
|
||||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.918206081" name="Optimization Level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level" value="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.size" valueType="enumerated"/>
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.918206081" name="Optimization Level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level" value="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.size" valueType="enumerated"/>
|
||||||
@@ -220,7 +220,7 @@
|
|||||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.badfunctioncast.6545741443.1540890614" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.badfunctioncast" value="false" valueType="boolean"/>
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.badfunctioncast.6545741443.1540890614" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.badfunctioncast" value="false" valueType="boolean"/>
|
||||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createlisting.1382191896" name="Create extended listing" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createlisting" value="false" valueType="boolean"/>
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createlisting.1382191896" name="Create extended listing" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createlisting" value="false" valueType="boolean"/>
|
||||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform.2107171855" isAbstract="false" osList="all" superClass="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform"/>
|
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform.2107171855" isAbstract="false" osList="all" superClass="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform"/>
|
||||||
<builder buildPath="${workspace_loc:/k64f}/release" id="ilg.gnuarmeclipse.managedbuild.cross.builder.1689719605" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" stopOnErr="false" superClass="ilg.gnuarmeclipse.managedbuild.cross.builder"/>
|
<builder buildPath="${workspace_loc:/uhk-left}/../" id="ilg.gnuarmeclipse.managedbuild.cross.builder.1689719605" incrementalBuildTarget="all DEBUG=0" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" stopOnErr="false" superClass="ilg.gnuarmeclipse.managedbuild.cross.builder"/>
|
||||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.1477971290" name="Cross ARM GNU Assembler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler">
|
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.1477971290" name="Cross ARM GNU Assembler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler">
|
||||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor.334227408" name="Use preprocessor" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor" value="true" valueType="boolean"/>
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor.334227408" name="Use preprocessor" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor" value="true" valueType="boolean"/>
|
||||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths.1702866230" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths"/>
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths.1702866230" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths"/>
|
||||||
|
|||||||
1
left/build/.gitignore
vendored
1
left/build/.gitignore
vendored
@@ -1,3 +1,4 @@
|
|||||||
/.settings/
|
/.settings/
|
||||||
/uhk60-left_debug/
|
/uhk60-left_debug/
|
||||||
/uhk60-left_release/
|
/uhk60-left_release/
|
||||||
|
/uhk60-left_release/
|
||||||
|
|||||||
@@ -31,6 +31,16 @@
|
|||||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||||
</natures>
|
</natures>
|
||||||
<linkedResources>
|
<linkedResources>
|
||||||
|
<link>
|
||||||
|
<name>Makedefs.mk</name>
|
||||||
|
<type>1</type>
|
||||||
|
<locationURI>PARENT-2-PROJECT_LOC/scripts/Makedefs.mk</locationURI>
|
||||||
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>Makefile</name>
|
||||||
|
<type>1</type>
|
||||||
|
<locationURI>PARENT-1-PROJECT_LOC/Makefile</locationURI>
|
||||||
|
</link>
|
||||||
<link>
|
<link>
|
||||||
<name>drivers</name>
|
<name>drivers</name>
|
||||||
<type>2</type>
|
<type>2</type>
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
<intAttribute key="org.eclipse.cdt.debug.gdbjtag.core.portNumber" value="2331"/>
|
<intAttribute key="org.eclipse.cdt.debug.gdbjtag.core.portNumber" value="2331"/>
|
||||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setPcRegister" value="false"/>
|
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setPcRegister" value="false"/>
|
||||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setResume" value="false"/>
|
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setResume" value="false"/>
|
||||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setStopAt" value="false"/>
|
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setStopAt" value="true"/>
|
||||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.stopAt" value="main"/>
|
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.stopAt" value="main"/>
|
||||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsFileName" value=""/>
|
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsFileName" value=""/>
|
||||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsOffset" value=""/>
|
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsOffset" value=""/>
|
||||||
@@ -77,6 +77,6 @@
|
|||||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||||
<listEntry value="4"/>
|
<listEntry value="4"/>
|
||||||
</listAttribute>
|
</listAttribute>
|
||||||
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <memoryBlockExpressionList context="Context string"/> "/>
|
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <memoryBlockExpressionList context="Context string"/> "/>
|
||||||
<stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>
|
<stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>
|
||||||
</launchConfiguration>
|
</launchConfiguration>
|
||||||
|
|||||||
@@ -1,34 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<launchConfiguration type="org.eclipse.cdt.launch.applicationLaunchType">
|
<launchConfiguration type="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType">
|
||||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.AUTO_SOLIB" value="true"/>
|
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LAUNCH_CONFIGURATION_BUILD_SCOPE" value="${none}"/>
|
||||||
<listAttribute key="org.eclipse.cdt.dsf.gdb.AUTO_SOLIB_LIST"/>
|
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="/usr/bin/make"/>
|
||||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="gdb"/>
|
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-j8 DEBUG=1 flash"/>
|
||||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_ON_FORK" value="false"/>
|
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/uhk-left}/../"/>
|
||||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.GDB_INIT" value=".gdbinit"/>
|
|
||||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.NON_STOP" value="false"/>
|
|
||||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.REVERSE" value="false"/>
|
|
||||||
<listAttribute key="org.eclipse.cdt.dsf.gdb.SOLIB_PATH"/>
|
|
||||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.TRACEPOINT_MODE" value="TP_NORMAL_ONLY"/>
|
|
||||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.UPDATE_THREADLIST_ON_SUSPEND" value="false"/>
|
|
||||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.internal.ui.launching.LocalApplicationCDebuggerTab.DEFAULTS_SET" value="true"/>
|
|
||||||
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/>
|
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
|
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_ID" value="gdb"/>
|
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_REGISTER_GROUPS" value=""/>
|
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_START_MODE" value="run"/>
|
|
||||||
<booleanAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN" value="true"/>
|
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="main"/>
|
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_ARGUMENTS" value="leftHalf uhk60-left_debug/uhk-left.bin"/>
|
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="../../lib/agent/packages/usb/update-module-firmware.js"/>
|
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="uhk-left"/>
|
|
||||||
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="false"/>
|
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1792027861"/>
|
|
||||||
<booleanAttribute key="org.eclipse.cdt.launch.use_terminal" value="true"/>
|
|
||||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
|
||||||
<listEntry value="/uhk-left"/>
|
|
||||||
</listAttribute>
|
|
||||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
|
||||||
<listEntry value="4"/>
|
|
||||||
</listAttribute>
|
|
||||||
<stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>
|
|
||||||
</launchConfiguration>
|
</launchConfiguration>
|
||||||
|
|||||||
@@ -77,6 +77,6 @@
|
|||||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||||
<listEntry value="4"/>
|
<listEntry value="4"/>
|
||||||
</listAttribute>
|
</listAttribute>
|
||||||
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <memoryBlockExpressionList context="Context string"/> "/>
|
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <memoryBlockExpressionList context="Context string"/> "/>
|
||||||
<stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>
|
<stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>
|
||||||
</launchConfiguration>
|
</launchConfiguration>
|
||||||
|
|||||||
@@ -1,48 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<launchConfiguration type="org.eclipse.cdt.launch.applicationLaunchType">
|
<launchConfiguration type="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType">
|
||||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.AUTO_SOLIB" value="true"/>
|
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LAUNCH_CONFIGURATION_BUILD_SCOPE" value="${none}"/>
|
||||||
<listAttribute key="org.eclipse.cdt.dsf.gdb.AUTO_SOLIB_LIST"/>
|
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="/usr/bin/make"/>
|
||||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="gdb"/>
|
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-j8 DEBUG=0 flash"/>
|
||||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_ON_FORK" value="false"/>
|
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/uhk-left}/../"/>
|
||||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.GDB_INIT" value=".gdbinit"/>
|
|
||||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.NON_STOP" value="false"/>
|
|
||||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.REVERSE" value="false"/>
|
|
||||||
<listAttribute key="org.eclipse.cdt.dsf.gdb.SOLIB_PATH"/>
|
|
||||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.TRACEPOINT_MODE" value="TP_NORMAL_ONLY"/>
|
|
||||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.UPDATE_THREADLIST_ON_SUSPEND" value="false"/>
|
|
||||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.internal.ui.launching.LocalApplicationCDebuggerTab.DEFAULTS_SET" value="true"/>
|
|
||||||
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/>
|
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
|
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_ID" value="gdb"/>
|
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_REGISTER_GROUPS" value=""/>
|
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_START_MODE" value="run"/>
|
|
||||||
<booleanAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN" value="true"/>
|
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="main"/>
|
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_ARGUMENTS" value="leftHalf uhk60-left_release/uhk-left.bin"/>
|
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="../../lib/agent/packages/usb/update-module-firmware.js"/>
|
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="uhk-left"/>
|
|
||||||
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="false"/>
|
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1939339834.1792647078"/>
|
|
||||||
<booleanAttribute key="org.eclipse.cdt.launch.use_terminal" value="true"/>
|
|
||||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
|
||||||
<listEntry value="/uhk-left"/>
|
|
||||||
</listAttribute>
|
|
||||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
|
||||||
<listEntry value="4"/>
|
|
||||||
</listAttribute>
|
|
||||||
<booleanAttribute key="org.eclipse.linuxtools.internal.perf.attr.DefaultEvent" value="true"/>
|
|
||||||
<booleanAttribute key="org.eclipse.linuxtools.internal.perf.attr.HideUnresolvedSymbols" value="true"/>
|
|
||||||
<stringAttribute key="org.eclipse.linuxtools.internal.perf.attr.Kernel.Location" value=""/>
|
|
||||||
<booleanAttribute key="org.eclipse.linuxtools.internal.perf.attr.Kernel.SourceLineNumbers" value="false"/>
|
|
||||||
<booleanAttribute key="org.eclipse.linuxtools.internal.perf.attr.ModuleSymbols" value="false"/>
|
|
||||||
<booleanAttribute key="org.eclipse.linuxtools.internal.perf.attr.MultipleEvents" value="false"/>
|
|
||||||
<booleanAttribute key="org.eclipse.linuxtools.internal.perf.attr.Multiplex" value="false"/>
|
|
||||||
<booleanAttribute key="org.eclipse.linuxtools.internal.perf.attr.Record.Realtime" value="false"/>
|
|
||||||
<intAttribute key="org.eclipse.linuxtools.internal.perf.attr.Record.Realtime.Priority" value="1"/>
|
|
||||||
<booleanAttribute key="org.eclipse.linuxtools.internal.perf.attr.Record.Verbose" value="false"/>
|
|
||||||
<booleanAttribute key="org.eclipse.linuxtools.internal.perf.attr.ShowSourceDisassembly" value="false"/>
|
|
||||||
<booleanAttribute key="org.eclipse.linuxtools.internal.perf.attr.ShowStat" value="false"/>
|
|
||||||
<booleanAttribute key="org.eclipse.linuxtools.internal.perf.attr.SourceLineNumbers" value="true"/>
|
|
||||||
<intAttribute key="org.eclipse.linuxtools.internal.perf.attr.StatRunCount" value="1"/>
|
|
||||||
<stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>
|
|
||||||
</launchConfiguration>
|
</launchConfiguration>
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
#ifndef __CONFIG_H__
|
|
||||||
#define __CONFIG_H__
|
|
||||||
|
|
||||||
// Macros:
|
|
||||||
|
|
||||||
// #define DEBUG_OVER_SPI
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
#ifdef DEBUG_OVER_SPI
|
|
||||||
|
|
||||||
#include "debug_over_spi.h"
|
|
||||||
#include "config.h"
|
|
||||||
#include "fsl_gpio.h"
|
|
||||||
|
|
||||||
|
|
||||||
#define EXAMPLE_SPI_MASTER (SPI0)
|
|
||||||
#define EXAMPLE_SPI_MASTER_SOURCE_CLOCK (kCLOCK_BusClk)
|
|
||||||
|
|
||||||
#define BUFFER_SIZE (64)
|
|
||||||
static uint8_t srcBuff[BUFFER_SIZE];
|
|
||||||
|
|
||||||
static spi_transfer_t xfer = {0};
|
|
||||||
static spi_master_config_t userConfig;
|
|
||||||
spi_master_handle_t handle;
|
|
||||||
|
|
||||||
static volatile bool masterFinished = true;
|
|
||||||
|
|
||||||
static void masterCallback(SPI_Type *base, spi_master_handle_t *masterHandle, status_t status, void *userData)
|
|
||||||
{
|
|
||||||
masterFinished = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void DebugOverSpi_Init(void)
|
|
||||||
{
|
|
||||||
CLOCK_EnableClock(DEBUG_OVER_SPI_MOSI_CLOCK);
|
|
||||||
CLOCK_EnableClock(DEBUG_OVER_SPI_SCK_CLOCK);
|
|
||||||
|
|
||||||
PORT_SetPinMux(DEBUG_OVER_SPI_MOSI_PORT, DEBUG_OVER_SPI_MOSI_PIN, kPORT_MuxAlt3);
|
|
||||||
PORT_SetPinMux(DEBUG_OVER_SPI_SCK_PORT, DEBUG_OVER_SPI_SCK_PIN, kPORT_MuxAlt3);
|
|
||||||
|
|
||||||
GPIO_PinInit(DEBUG_OVER_SPI_MOSI_GPIO, DEBUG_OVER_SPI_MOSI_PIN, &(gpio_pin_config_t){kGPIO_DigitalOutput, 0});
|
|
||||||
GPIO_PinInit(DEBUG_OVER_SPI_SCK_GPIO, DEBUG_OVER_SPI_SCK_PIN, &(gpio_pin_config_t){kGPIO_DigitalOutput, 0});
|
|
||||||
|
|
||||||
GPIO_SetPinsOutput(DEBUG_OVER_SPI_MOSI_GPIO, 1U << DEBUG_OVER_SPI_MOSI_PIN);
|
|
||||||
GPIO_SetPinsOutput(DEBUG_OVER_SPI_SCK_GPIO, 1U << DEBUG_OVER_SPI_SCK_PIN);
|
|
||||||
|
|
||||||
SPI_MasterGetDefaultConfig(&userConfig);
|
|
||||||
uint32_t srcFreq = CLOCK_GetFreq(EXAMPLE_SPI_MASTER_SOURCE_CLOCK);
|
|
||||||
SPI_MasterInit(EXAMPLE_SPI_MASTER, &userConfig, srcFreq);
|
|
||||||
SPI_MasterTransferCreateHandle(EXAMPLE_SPI_MASTER, &handle, masterCallback, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
void DebugOverSpi_Send(uint8_t *tx, uint8_t len)
|
|
||||||
{
|
|
||||||
if (masterFinished) {
|
|
||||||
masterFinished = false;
|
|
||||||
memcpy(srcBuff, tx, MIN(BUFFER_SIZE, len));
|
|
||||||
xfer.txData = srcBuff;
|
|
||||||
xfer.dataSize = len;
|
|
||||||
SPI_MasterTransferNonBlocking(EXAMPLE_SPI_MASTER, &handle, &xfer);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
#ifdef DEBUG_OVER_SPI
|
|
||||||
|
|
||||||
#ifndef __DEBUG_OVER_SPI_H__
|
|
||||||
#define __DEBUG_OVER_SPI_H__
|
|
||||||
|
|
||||||
// Includes:
|
|
||||||
|
|
||||||
#include "fsl_common.h"
|
|
||||||
#include "fsl_port.h"
|
|
||||||
#include "fsl_spi.h"
|
|
||||||
|
|
||||||
// Macros:
|
|
||||||
|
|
||||||
#define DEBUG_OVER_SPI_MOSI_PORT PORTA
|
|
||||||
#define DEBUG_OVER_SPI_MOSI_GPIO GPIOA
|
|
||||||
#define DEBUG_OVER_SPI_MOSI_CLOCK kCLOCK_PortA
|
|
||||||
#define DEBUG_OVER_SPI_MOSI_PIN 7
|
|
||||||
|
|
||||||
#define DEBUG_OVER_SPI_SCK_PORT PORTB
|
|
||||||
#define DEBUG_OVER_SPI_SCK_GPIO GPIOB
|
|
||||||
#define DEBUG_OVER_SPI_SCK_CLOCK kCLOCK_PortB
|
|
||||||
#define DEBUG_OVER_SPI_SCK_PIN 0
|
|
||||||
|
|
||||||
// Functions:
|
|
||||||
|
|
||||||
void DebugOverSpi_Init(void);
|
|
||||||
void DebugOverSpi_Send(uint8_t *tx, uint8_t len);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#else
|
|
||||||
#define DebugOverSpi_Init()
|
|
||||||
#define DebugOverSpi_Send(tx, len)
|
|
||||||
#endif
|
|
||||||
@@ -4,35 +4,30 @@
|
|||||||
#include "test_led.h"
|
#include "test_led.h"
|
||||||
#include "init_peripherals.h"
|
#include "init_peripherals.h"
|
||||||
|
|
||||||
//static uint32_t prevWatchdogCounter = 0;
|
// NOTE: Because of a bug in the ROM bootloader of the KL03Z, the watchdog timer is disabled and cannot be re-enabled.
|
||||||
uint32_t I2cWatchdog_RecoveryCounter;
|
// See https://community.nxp.com/thread/457893
|
||||||
volatile uint32_t I2cWatchdog_WatchCounter;
|
// Therefore the hardware watchdog timer cannot be used without an extra way to enter bootloader or application mode.
|
||||||
|
static uint32_t prevWatchdogCounter = 0;
|
||||||
|
static uint32_t I2cWatchdog_RecoveryCounter; // Counter for how many times we had to recover and restart
|
||||||
|
|
||||||
void InitI2cWatchdog(void)
|
void RunWatchdog(void)
|
||||||
{
|
{
|
||||||
lptmr_config_t lptmrConfig;
|
static volatile uint32_t I2cWatchdog_WatchCounter = 0; // Counter for timer
|
||||||
LPTMR_GetDefaultConfig(&lptmrConfig);
|
static int counter = 0;
|
||||||
LPTMR_Init(LPTMR0, &lptmrConfig);
|
|
||||||
LPTMR_SetTimerPeriod(LPTMR0, USEC_TO_COUNT(LPTMR_USEC_COUNT, LPTMR_SOURCE_CLOCK));
|
counter++;
|
||||||
LPTMR_EnableInterrupts(LPTMR0, kLPTMR_TimerInterruptEnable);
|
if (counter == 100) { // We get called from KEY_SCANNER_HANDLER() which runs at 1ms, thus scaling down by 100 here to get 100 ms period
|
||||||
EnableIRQ(LPTMR0_IRQn);
|
counter=0;
|
||||||
LPTMR_StartTimer(LPTMR0);
|
TestLed_Toggle();
|
||||||
}
|
|
||||||
/*
|
|
||||||
void I2C_WATCHDOG_LPTMR_HANDLER(void)
|
|
||||||
{
|
|
||||||
TEST_LED_TOGGLE();
|
|
||||||
I2cWatchdog_WatchCounter++;
|
I2cWatchdog_WatchCounter++;
|
||||||
|
|
||||||
if (I2C_Watchdog == prevWatchdogCounter) { // Restart I2C if there hasn't been any interrupt during 100 ms
|
if (I2cWatchdog_WatchCounter > 10) { // Do not check within the first 1000 ms, as I2C might not be running yet
|
||||||
// NVIC_SystemReset();
|
if (I2C_Watchdog == prevWatchdogCounter) { // Restart I2C if there hasn't been any interrupt during 100 ms. I2C_Watchdog gets incremented for every I2C transaction
|
||||||
I2cWatchdog_RecoveryCounter++;
|
I2cWatchdog_RecoveryCounter++;
|
||||||
I2C_SlaveDeinit(I2C_BUS_BASEADDR);
|
I2C_SlaveDeinit(I2C_BUS_BASEADDR);
|
||||||
InitI2c();
|
initI2c();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
prevWatchdogCounter = I2C_Watchdog;
|
prevWatchdogCounter = I2C_Watchdog;
|
||||||
|
|
||||||
LPTMR_ClearStatusFlags(LPTMR0, kLPTMR_TimerCompareFlag);
|
|
||||||
}
|
}
|
||||||
*/
|
}
|
||||||
|
|||||||
@@ -13,7 +13,6 @@
|
|||||||
|
|
||||||
// Functions:
|
// Functions:
|
||||||
|
|
||||||
void InitI2cWatchdog(void);
|
|
||||||
void RunWatchdog(void);
|
void RunWatchdog(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -9,7 +9,8 @@
|
|||||||
#include "led_pwm.h"
|
#include "led_pwm.h"
|
||||||
#include "slave_protocol_handler.h"
|
#include "slave_protocol_handler.h"
|
||||||
#include "i2c_watchdog.h"
|
#include "i2c_watchdog.h"
|
||||||
#include "debug_over_spi.h"
|
#include "main.h"
|
||||||
|
#include "module.h"
|
||||||
|
|
||||||
i2c_slave_config_t slaveConfig;
|
i2c_slave_config_t slaveConfig;
|
||||||
i2c_slave_handle_t slaveHandle;
|
i2c_slave_handle_t slaveHandle;
|
||||||
@@ -22,7 +23,6 @@ static void i2cSlaveCallback(I2C_Type *base, i2c_slave_transfer_t *xfer, void *u
|
|||||||
{
|
{
|
||||||
dosBuffer[0] = xfer->event;
|
dosBuffer[0] = xfer->event;
|
||||||
dosBuffer[1] = userData;
|
dosBuffer[1] = userData;
|
||||||
DebugOverSpi_Send(dosBuffer, 2);
|
|
||||||
|
|
||||||
switch (xfer->event) {
|
switch (xfer->event) {
|
||||||
case kI2C_SlaveTransmitEvent:
|
case kI2C_SlaveTransmitEvent:
|
||||||
@@ -44,14 +44,14 @@ static void i2cSlaveCallback(I2C_Type *base, i2c_slave_transfer_t *xfer, void *u
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void InitInterruptPriorities(void)
|
void initInterruptPriorities(void)
|
||||||
{
|
{
|
||||||
NVIC_SetPriority(I2C0_IRQn, 1);
|
NVIC_SetPriority(I2C0_IRQn, 1);
|
||||||
NVIC_SetPriority(TPM1_IRQn, 1);
|
NVIC_SetPriority(TPM1_IRQn, 1);
|
||||||
NVIC_SetPriority(SPI0_IRQn, 1);
|
NVIC_SetPriority(SPI0_IRQn, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InitI2c(void)
|
void initI2c(void)
|
||||||
{
|
{
|
||||||
port_pin_config_t pinConfig = {
|
port_pin_config_t pinConfig = {
|
||||||
.pullSelect = kPORT_PullUp,
|
.pullSelect = kPORT_PullUp,
|
||||||
@@ -65,7 +65,7 @@ void InitI2c(void)
|
|||||||
PORT_SetPinConfig(I2C_BUS_SCL_PORT, I2C_BUS_SCL_PIN, &pinConfig);
|
PORT_SetPinConfig(I2C_BUS_SCL_PORT, I2C_BUS_SCL_PIN, &pinConfig);
|
||||||
|
|
||||||
I2C_SlaveGetDefaultConfig(&slaveConfig);
|
I2C_SlaveGetDefaultConfig(&slaveConfig);
|
||||||
slaveConfig.slaveAddress = I2C_ADDRESS_LEFT_KEYBOARD_HALF_FIRMWARE;
|
slaveConfig.slaveAddress = I2C_ADDRESS_MODULE_FIRMWARE;
|
||||||
I2C_SlaveInit(I2C_BUS_BASEADDR, &slaveConfig);
|
I2C_SlaveInit(I2C_BUS_BASEADDR, &slaveConfig);
|
||||||
I2C_SlaveTransferCreateHandle(I2C_BUS_BASEADDR, &slaveHandle, i2cSlaveCallback, &userData);
|
I2C_SlaveTransferCreateHandle(I2C_BUS_BASEADDR, &slaveHandle, i2cSlaveCallback, &userData);
|
||||||
I2C_SlaveTransferNonBlocking(I2C_BUS_BASEADDR, &slaveHandle, kI2C_SlaveAddressMatchEvent);
|
I2C_SlaveTransferNonBlocking(I2C_BUS_BASEADDR, &slaveHandle, kI2C_SlaveAddressMatchEvent);
|
||||||
@@ -81,11 +81,9 @@ void InitLedDriver(void)
|
|||||||
|
|
||||||
void InitPeripherals(void)
|
void InitPeripherals(void)
|
||||||
{
|
{
|
||||||
InitInterruptPriorities();
|
initInterruptPriorities();
|
||||||
InitLedDriver();
|
InitLedDriver();
|
||||||
InitTestLed();
|
TestLed_Init();
|
||||||
LedPwm_Init();
|
LedPwm_Init();
|
||||||
// InitI2cWatchdog();
|
initI2c();
|
||||||
DebugOverSpi_Init();
|
|
||||||
InitI2c();
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,6 @@
|
|||||||
// Functions:
|
// Functions:
|
||||||
|
|
||||||
void InitPeripherals(void);
|
void InitPeripherals(void);
|
||||||
void InitI2c(void);
|
void initI2c(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
#include "fsl_lptmr.h"
|
#include "fsl_lptmr.h"
|
||||||
#include "key_scanner.h"
|
#include "key_scanner.h"
|
||||||
#include "main.h"
|
#include "i2c_watchdog.h"
|
||||||
|
|
||||||
void KEY_SCANNER_HANDLER(void)
|
void KEY_SCANNER_HANDLER(void)
|
||||||
{
|
{
|
||||||
KeyMatrix_ScanRow(&keyMatrix);
|
KeyMatrix_ScanRow(&keyMatrix);
|
||||||
|
RunWatchdog();
|
||||||
LPTMR_ClearStatusFlags(KEY_SCANNER_LPTMR_BASEADDR, kLPTMR_TimerCompareFlag);
|
LPTMR_ClearStatusFlags(KEY_SCANNER_LPTMR_BASEADDR, kLPTMR_TimerCompareFlag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "init_clock.h"
|
#include "slave/init_clock.h"
|
||||||
#include "init_peripherals.h"
|
#include "init_peripherals.h"
|
||||||
#include "bootloader.h"
|
#include "bootloader.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "config.h"
|
|
||||||
#include "key_scanner.h"
|
#include "key_scanner.h"
|
||||||
|
#include "module.h"
|
||||||
|
|
||||||
DEFINE_BOOTLOADER_CONFIG_AREA(I2C_ADDRESS_LEFT_KEYBOARD_HALF_BOOTLOADER)
|
DEFINE_BOOTLOADER_CONFIG_AREA(I2C_ADDRESS_MODULE_BOOTLOADER)
|
||||||
|
|
||||||
key_matrix_t keyMatrix = {
|
key_matrix_t keyMatrix = {
|
||||||
.colNum = KEYBOARD_MATRIX_COLS_NUM,
|
.colNum = KEYBOARD_MATRIX_COLS_NUM,
|
||||||
@@ -15,11 +15,7 @@ key_matrix_t keyMatrix = {
|
|||||||
{PORTB, GPIOB, kCLOCK_PortB, 11},
|
{PORTB, GPIOB, kCLOCK_PortB, 11},
|
||||||
{PORTA, GPIOA, kCLOCK_PortA, 6},
|
{PORTA, GPIOA, kCLOCK_PortA, 6},
|
||||||
{PORTA, GPIOA, kCLOCK_PortA, 8},
|
{PORTA, GPIOA, kCLOCK_PortA, 8},
|
||||||
#ifdef DEBUG_OVER_SPI
|
|
||||||
{PORTA, GPIOA, kCLOCK_PortA, 8},
|
|
||||||
#else
|
|
||||||
{PORTB, GPIOB, kCLOCK_PortB, 0},
|
{PORTB, GPIOB, kCLOCK_PortB, 0},
|
||||||
#endif
|
|
||||||
{PORTB, GPIOB, kCLOCK_PortB, 6},
|
{PORTB, GPIOB, kCLOCK_PortB, 6},
|
||||||
{PORTA, GPIOA, kCLOCK_PortA, 3},
|
{PORTA, GPIOA, kCLOCK_PortA, 3},
|
||||||
{PORTA, GPIOA, kCLOCK_PortA, 12}
|
{PORTA, GPIOA, kCLOCK_PortA, 12}
|
||||||
@@ -28,11 +24,7 @@ key_matrix_t keyMatrix = {
|
|||||||
{PORTB, GPIOB, kCLOCK_PortB, 7},
|
{PORTB, GPIOB, kCLOCK_PortB, 7},
|
||||||
{PORTB, GPIOB, kCLOCK_PortB, 10},
|
{PORTB, GPIOB, kCLOCK_PortB, 10},
|
||||||
{PORTA, GPIOA, kCLOCK_PortA, 5},
|
{PORTA, GPIOA, kCLOCK_PortA, 5},
|
||||||
#ifdef DEBUG_OVER_SPI
|
|
||||||
{PORTA, GPIOA, kCLOCK_PortA, 5},
|
|
||||||
#else
|
|
||||||
{PORTA, GPIOA, kCLOCK_PortA, 7},
|
{PORTA, GPIOA, kCLOCK_PortA, 7},
|
||||||
#endif
|
|
||||||
{PORTA, GPIOA, kCLOCK_PortA, 4}
|
{PORTA, GPIOA, kCLOCK_PortA, 4}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,9 +3,11 @@
|
|||||||
|
|
||||||
// Macros:
|
// Macros:
|
||||||
|
|
||||||
|
#define I2C_ADDRESS_MODULE_FIRMWARE I2C_ADDRESS_LEFT_KEYBOARD_HALF_FIRMWARE
|
||||||
|
#define I2C_ADDRESS_MODULE_BOOTLOADER I2C_ADDRESS_LEFT_KEYBOARD_HALF_BOOTLOADER
|
||||||
#define MODULE_PROTOCOL_VERSION 1
|
#define MODULE_PROTOCOL_VERSION 1
|
||||||
#define MODULE_ID ModuleId_LeftKeyboardHalf
|
#define MODULE_ID ModuleId_LeftKeyboardHalf
|
||||||
#define MODULE_KEY_COUNT (KEYBOARD_MATRIX_ROWS_NUM * KEYBOARD_MATRIX_COLS_NUM)
|
#define MODULE_KEY_COUNT (KEYBOARD_MATRIX_ROWS_NUM * KEYBOARD_MATRIX_COLS_NUM)
|
||||||
#define MODULE_HAS_POINTER false
|
#define MODULE_POINTER_COUNT 0
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -10,10 +10,23 @@
|
|||||||
#include "bool_array_converter.h"
|
#include "bool_array_converter.h"
|
||||||
#include "bootloader.h"
|
#include "bootloader.h"
|
||||||
#include "module.h"
|
#include "module.h"
|
||||||
|
#include "versions.h"
|
||||||
|
|
||||||
i2c_message_t RxMessage;
|
i2c_message_t RxMessage;
|
||||||
i2c_message_t TxMessage;
|
i2c_message_t TxMessage;
|
||||||
|
|
||||||
|
static version_t moduleProtocolVersion = {
|
||||||
|
MODULE_PROTOCOL_MAJOR_VERSION,
|
||||||
|
MODULE_PROTOCOL_MINOR_VERSION,
|
||||||
|
MODULE_PROTOCOL_PATCH_VERSION,
|
||||||
|
};
|
||||||
|
|
||||||
|
static version_t firmwareVersion = {
|
||||||
|
FIRMWARE_MAJOR_VERSION,
|
||||||
|
FIRMWARE_MINOR_VERSION,
|
||||||
|
FIRMWARE_PATCH_VERSION,
|
||||||
|
};
|
||||||
|
|
||||||
void SlaveRxHandler(void)
|
void SlaveRxHandler(void)
|
||||||
{
|
{
|
||||||
if (!CRC16_IsMessageValid(&RxMessage)) {
|
if (!CRC16_IsMessageValid(&RxMessage)) {
|
||||||
@@ -29,7 +42,7 @@ void SlaveRxHandler(void)
|
|||||||
case SlaveCommand_SetTestLed:
|
case SlaveCommand_SetTestLed:
|
||||||
TxMessage.length = 0;
|
TxMessage.length = 0;
|
||||||
bool isLedOn = RxMessage.data[1];
|
bool isLedOn = RxMessage.data[1];
|
||||||
TEST_LED_SET(isLedOn);
|
TestLed_Set(isLedOn);
|
||||||
break;
|
break;
|
||||||
case SlaveCommand_SetLedPwmBrightness:
|
case SlaveCommand_SetLedPwmBrightness:
|
||||||
TxMessage.length = 0;
|
TxMessage.length = 0;
|
||||||
@@ -51,21 +64,29 @@ void SlaveTxHandler(void)
|
|||||||
TxMessage.length = SLAVE_SYNC_STRING_LENGTH;
|
TxMessage.length = SLAVE_SYNC_STRING_LENGTH;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case SlaveProperty_ModuleProtocolVersion: {
|
||||||
|
memcpy(TxMessage.data, &moduleProtocolVersion, sizeof(version_t));
|
||||||
|
TxMessage.length = sizeof(version_t);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case SlaveProperty_FirmwareVersion: {
|
||||||
|
memcpy(TxMessage.data, &firmwareVersion, sizeof(version_t));
|
||||||
|
TxMessage.length = sizeof(version_t);
|
||||||
|
break;
|
||||||
|
}
|
||||||
case SlaveProperty_ModuleId: {
|
case SlaveProperty_ModuleId: {
|
||||||
TxMessage.data[0] = MODULE_ID;
|
TxMessage.data[0] = MODULE_ID;
|
||||||
TxMessage.length = 1;
|
TxMessage.length = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SlaveProperty_ProtocolVersion: {
|
case SlaveProperty_KeyCount: {
|
||||||
TxMessage.data[0] = MODULE_PROTOCOL_VERSION;
|
TxMessage.data[0] = MODULE_KEY_COUNT;
|
||||||
TxMessage.length = 1;
|
TxMessage.length = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SlaveProperty_Features: {
|
case SlaveProperty_PointerCount: {
|
||||||
uhk_module_features_t *moduleFeatures = (uhk_module_features_t*)&TxMessage.data;
|
TxMessage.data[0] = MODULE_POINTER_COUNT;
|
||||||
moduleFeatures->keyCount = MODULE_KEY_COUNT;
|
TxMessage.length = 1;
|
||||||
moduleFeatures->hasPointer = MODULE_HAS_POINTER;
|
|
||||||
TxMessage.length = sizeof(uhk_module_features_t);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
#include "test_led.h"
|
#include "test_led.h"
|
||||||
#include "fsl_port.h"
|
#include "fsl_port.h"
|
||||||
|
|
||||||
extern void InitTestLed(void)
|
extern void TestLed_Init(void)
|
||||||
{
|
{
|
||||||
CLOCK_EnableClock(TEST_LED_CLOCK);
|
CLOCK_EnableClock(TEST_LED_CLOCK);
|
||||||
PORT_SetPinMux(TEST_LED_PORT, TEST_LED_PIN, kPORT_MuxAsGpio);
|
PORT_SetPinMux(TEST_LED_PORT, TEST_LED_PIN, kPORT_MuxAsGpio);
|
||||||
GPIO_PinInit(TEST_LED_GPIO, TEST_LED_PIN, &(gpio_pin_config_t){kGPIO_DigitalOutput, 0});
|
GPIO_PinInit(TEST_LED_GPIO, TEST_LED_PIN, &(gpio_pin_config_t){kGPIO_DigitalOutput, 0});
|
||||||
TEST_LED_ON();
|
TestLed_On();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,13 +15,28 @@
|
|||||||
#define TEST_LED_CLOCK kCLOCK_PortB
|
#define TEST_LED_CLOCK kCLOCK_PortB
|
||||||
#define TEST_LED_PIN 13
|
#define TEST_LED_PIN 13
|
||||||
|
|
||||||
#define TEST_LED_ON() GPIO_SetPinsOutput(TEST_LED_GPIO, 1U << TEST_LED_PIN)
|
static inline void TestLed_On(void)
|
||||||
#define TEST_LED_OFF() GPIO_ClearPinsOutput(TEST_LED_GPIO, 1U << TEST_LED_PIN)
|
{
|
||||||
#define TEST_LED_SET(state) GPIO_WritePinOutput(TEST_LED_GPIO, TEST_LED_PIN, (state))
|
GPIO_SetPinsOutput(TEST_LED_GPIO, 1U << TEST_LED_PIN);
|
||||||
#define TEST_LED_TOGGLE() GPIO_TogglePinsOutput(TEST_LED_GPIO, 1U << TEST_LED_PIN)
|
}
|
||||||
|
|
||||||
|
static inline void TestLed_Off(void)
|
||||||
|
{
|
||||||
|
GPIO_ClearPinsOutput(TEST_LED_GPIO, 1U << TEST_LED_PIN);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void TestLed_Set(bool state)
|
||||||
|
{
|
||||||
|
GPIO_WritePinOutput(TEST_LED_GPIO, TEST_LED_PIN, state);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void TestLed_Toggle(void)
|
||||||
|
{
|
||||||
|
GPIO_TogglePinsOutput(TEST_LED_GPIO, 1U << TEST_LED_PIN);
|
||||||
|
}
|
||||||
|
|
||||||
// Functions:
|
// Functions:
|
||||||
|
|
||||||
void InitTestLed(void);
|
void TestLed_Init(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Submodule lib/KSDK_2.0_MK22FN512xxx12 updated: 7142722eed...e447ecee3a
Submodule lib/agent updated: 04b43896c5...fae83a4148
76
right/Makefile
Normal file
76
right/Makefile
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
# Copyright (C) 2018 Kristian Lauszus. All rights reserved.
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# Contact information
|
||||||
|
# -------------------
|
||||||
|
# Kristian Lauszus
|
||||||
|
# Web : http://www.lauszus.com
|
||||||
|
# e-mail : lauszus@gmail.com
|
||||||
|
|
||||||
|
# Set project name.
|
||||||
|
PROJECT_NAME = uhk_right
|
||||||
|
|
||||||
|
# Defines the part type that this project uses.
|
||||||
|
PART = MK22FN512VLH12
|
||||||
|
|
||||||
|
# Defines the linker script to use for the application.
|
||||||
|
LDSCRIPT = src/link/MK22FN512xxx12_flash.ld
|
||||||
|
|
||||||
|
# Size of the heap and stack.
|
||||||
|
HEAP_SIZE = 0x2000
|
||||||
|
STACK_SIZE = 0x0400
|
||||||
|
|
||||||
|
# Set the compiler CPU and FPU options.
|
||||||
|
CPU = -mcpu=cortex-m4
|
||||||
|
FPU = -mfpu=fpv4-sp-d16 -mfloat-abi=hard
|
||||||
|
|
||||||
|
# Command for flashing the right half of the keyboard.
|
||||||
|
FLASH_CMD = node ../lib/agent/packages/usb/update-device-firmware.js $(PROJECT_OBJ:.axf=.hex)
|
||||||
|
|
||||||
|
# Path to the JLink script used for the right half.
|
||||||
|
JLINK_SCRIPT = ../scripts/flash-right.jlink
|
||||||
|
|
||||||
|
# Preprocessor directives.
|
||||||
|
BUILD_FLAGS = -DCPU_$(PART)_cm4 -DUSB_STACK_BM -DBL_HAS_BOOTLOADER_CONFIG=1
|
||||||
|
|
||||||
|
# Address of the app vector table. The bootloader will take up the flash before this address.
|
||||||
|
BL_APP_VECTOR_TABLE_ADDRESS ?= 0xc000
|
||||||
|
|
||||||
|
# Source files.
|
||||||
|
SOURCE = $(wildcard src/*.c) \
|
||||||
|
$(wildcard src/*/*.c) \
|
||||||
|
$(wildcard src/*/*/*.c) \
|
||||||
|
../lib/bootloader/src/bootloader/src/wormhole.c \
|
||||||
|
$(wildcard ../lib/KSDK_2.0_MK22FN512xxx12/middleware/usb_1.0.0/device/*.c) \
|
||||||
|
$(wildcard ../lib/KSDK_2.0_MK22FN512xxx12/middleware/usb_1.0.0/osa/*.c) \
|
||||||
|
../lib/KSDK_2.0_MK22FN512xxx12/devices/MK22F51212/system_MK22F51212.c \
|
||||||
|
../lib/KSDK_2.0_MK22FN512xxx12/devices/MK22F51212/gcc/startup_MK22F51212.S \
|
||||||
|
../lib/KSDK_2.0_MK22FN512xxx12/devices/MK22F51212/drivers/fsl_adc16.c \
|
||||||
|
../lib/KSDK_2.0_MK22FN512xxx12/devices/MK22F51212/drivers/fsl_clock.c \
|
||||||
|
../lib/KSDK_2.0_MK22FN512xxx12/devices/MK22F51212/drivers/fsl_ftm.c \
|
||||||
|
../lib/KSDK_2.0_MK22FN512xxx12/devices/MK22F51212/drivers/fsl_gpio.c \
|
||||||
|
../lib/KSDK_2.0_MK22FN512xxx12/devices/MK22F51212/drivers/fsl_i2c.c \
|
||||||
|
../lib/KSDK_2.0_MK22FN512xxx12/devices/MK22F51212/drivers/fsl_pit.c \
|
||||||
|
../lib/KSDK_2.0_MK22FN512xxx12/devices/MK22F51212/drivers/fsl_smc.c \
|
||||||
|
$(wildcard ../shared/*.c)
|
||||||
|
|
||||||
|
# Header files.
|
||||||
|
IPATH = src \
|
||||||
|
src/ksdk_usb \
|
||||||
|
src/buspal \
|
||||||
|
src/buspal/bm_usb \
|
||||||
|
../lib/bootloader/src \
|
||||||
|
../lib/KSDK_2.0_MK22FN512xxx12/middleware/usb_1.0.0/device \
|
||||||
|
../lib/KSDK_2.0_MK22FN512xxx12/middleware/usb_1.0.0/include \
|
||||||
|
../lib/KSDK_2.0_MK22FN512xxx12/middleware/usb_1.0.0/osa \
|
||||||
|
../lib/KSDK_2.0_MK22FN512xxx12/CMSIS/Include \
|
||||||
|
../lib/KSDK_2.0_MK22FN512xxx12/devices/MK22F51212 \
|
||||||
|
../lib/KSDK_2.0_MK22FN512xxx12/devices/MK22F51212/drivers \
|
||||||
|
../shared
|
||||||
|
|
||||||
|
# Include main Makefile.
|
||||||
|
include ../scripts/Makedefs.mk
|
||||||
@@ -5,19 +5,19 @@
|
|||||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1939339834.1692217331" moduleId="org.eclipse.cdt.core.settings" name="uhk60-right_release">
|
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1939339834.1692217331" moduleId="org.eclipse.cdt.core.settings" name="uhk60-right_release">
|
||||||
<externalSettings/>
|
<externalSettings/>
|
||||||
<extensions>
|
<extensions>
|
||||||
|
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
|
||||||
</extensions>
|
</extensions>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||||
<configuration artifactExtension="elf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="${cross_rm} -rf" description="" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1939339834.1692217331" name="uhk60-right_release" parent="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release">
|
<configuration artifactExtension="elf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" cleanCommand="${cross_rm} -rf" description="" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1939339834.1692217331" name="uhk60-right_release" parent="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release">
|
||||||
<folderInfo id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1939339834.1692217331." name="/" resourcePath="">
|
<folderInfo id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1939339834.1692217331." name="/" resourcePath="">
|
||||||
<toolChain id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.release.453692058" name="Cross ARM GCC" superClass="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.release">
|
<toolChain id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.release.453692058" name="Cross ARM GCC" superClass="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.release">
|
||||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.8609064" name="Optimization Level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level" value="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.size" valueType="enumerated"/>
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.8609064" name="Optimization Level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level" value="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.most" valueType="enumerated"/>
|
||||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength.704315278" name="Message length (-fmessage-length=0)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength" value="true" valueType="boolean"/>
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength.704315278" name="Message length (-fmessage-length=0)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength" value="true" valueType="boolean"/>
|
||||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar.108613118" name="'char' is signed (-fsigned-char)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar" value="true" valueType="boolean"/>
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar.108613118" name="'char' is signed (-fsigned-char)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar" value="true" valueType="boolean"/>
|
||||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections.916504304" name="Function sections (-ffunction-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections" value="true" valueType="boolean"/>
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections.916504304" name="Function sections (-ffunction-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections" value="true" valueType="boolean"/>
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.toerrors.1518272175" name="Generate errors instead of warnings (-Werror)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.toerrors" value="false" valueType="boolean"/>
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.toerrors.1518272175" name="Generate errors instead of warnings (-Werror)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.toerrors" value="false" valueType="boolean"/>
|
||||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createlisting.104956045" name="Create extended listing" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createlisting" value="false" valueType="boolean"/>
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createlisting.104956045" name="Create extended listing" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createlisting" value="false" valueType="boolean"/>
|
||||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform.1135747399" isAbstract="false" osList="all" superClass="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform"/>
|
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform.1135747399" isAbstract="false" osList="all" superClass="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform"/>
|
||||||
<builder buildPath="${workspace_loc:/k64f}/release" id="ilg.gnuarmeclipse.managedbuild.cross.builder.789002772" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" stopOnErr="false" superClass="ilg.gnuarmeclipse.managedbuild.cross.builder"/>
|
<builder buildPath="${workspace_loc:/uhk-right}/../" id="ilg.gnuarmeclipse.managedbuild.cross.builder.789002772" incrementalBuildTarget="all DEBUG=0" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" stopOnErr="false" superClass="ilg.gnuarmeclipse.managedbuild.cross.builder"/>
|
||||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.2026990925" name="Cross ARM GNU Assembler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler">
|
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.2026990925" name="Cross ARM GNU Assembler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler">
|
||||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor.494477502" name="Use preprocessor" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor" value="true" valueType="boolean"/>
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor.494477502" name="Use preprocessor" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor" value="true" valueType="boolean"/>
|
||||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths.1465555477" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths"/>
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths.1465555477" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths"/>
|
||||||
@@ -136,9 +136,6 @@
|
|||||||
</tool>
|
</tool>
|
||||||
</toolChain>
|
</toolChain>
|
||||||
</folderInfo>
|
</folderInfo>
|
||||||
<fileInfo id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1939339834.1692217331.621318926" name="wormhole.c" rcbsApplicability="disable" resourcePath="bootloader-shared/wormhole.c" toolsToInvoke="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.813655335.948885614">
|
|
||||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.813655335.948885614" name="Cross ARM C Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.813655335"/>
|
|
||||||
</fileInfo>
|
|
||||||
</configuration>
|
</configuration>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||||
@@ -148,16 +145,16 @@
|
|||||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1939339834.1692217331.1297236062" moduleId="org.eclipse.cdt.core.settings" name="uhk60-right_debug">
|
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1939339834.1692217331.1297236062" moduleId="org.eclipse.cdt.core.settings" name="uhk60-right_debug">
|
||||||
<externalSettings/>
|
<externalSettings/>
|
||||||
<extensions>
|
<extensions>
|
||||||
|
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
|
||||||
</extensions>
|
</extensions>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||||
<configuration artifactExtension="elf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="${cross_rm} -rf" description="" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1939339834.1692217331.1297236062" name="uhk60-right_debug" parent="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release">
|
<configuration artifactExtension="elf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" cleanCommand="${cross_rm} -rf" description="" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1939339834.1692217331.1297236062" name="uhk60-right_debug" parent="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release">
|
||||||
<folderInfo id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1939339834.1692217331.1297236062." name="/" resourcePath="">
|
<folderInfo id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1939339834.1692217331.1297236062." name="/" resourcePath="">
|
||||||
<toolChain id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.release.622643167" name="Cross ARM GCC" superClass="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.release">
|
<toolChain id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.release.622643167" name="Cross ARM GCC" superClass="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.release">
|
||||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.274883814" name="Optimization Level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level" value="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.none" valueType="enumerated"/>
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.274883814" name="Optimization Level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level" value="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.none" valueType="enumerated"/>
|
||||||
@@ -200,7 +197,7 @@
|
|||||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.toerrors.2098763517" name="Generate errors instead of warnings (-Werror)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.toerrors" value="false" valueType="boolean"/>
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.toerrors.2098763517" name="Generate errors instead of warnings (-Werror)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.toerrors" value="false" valueType="boolean"/>
|
||||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createlisting.836473542" name="Create extended listing" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createlisting" value="false" valueType="boolean"/>
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createlisting.836473542" name="Create extended listing" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createlisting" value="false" valueType="boolean"/>
|
||||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform.1768350063" isAbstract="false" osList="all" superClass="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform"/>
|
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform.1768350063" isAbstract="false" osList="all" superClass="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform"/>
|
||||||
<builder buildPath="${workspace_loc:/k64f}/release" id="ilg.gnuarmeclipse.managedbuild.cross.builder.1931309296" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" stopOnErr="false" superClass="ilg.gnuarmeclipse.managedbuild.cross.builder"/>
|
<builder buildPath="${workspace_loc:/uhk-right}/../" id="ilg.gnuarmeclipse.managedbuild.cross.builder.1931309296" incrementalBuildTarget="all DEBUG=1" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" stopOnErr="false" superClass="ilg.gnuarmeclipse.managedbuild.cross.builder"/>
|
||||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.894450" name="Cross ARM GNU Assembler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler">
|
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.894450" name="Cross ARM GNU Assembler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler">
|
||||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor.555709175" name="Use preprocessor" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor" value="true" valueType="boolean"/>
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor.555709175" name="Use preprocessor" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor" value="true" valueType="boolean"/>
|
||||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths.1619685061" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths"/>
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths.1619685061" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths"/>
|
||||||
@@ -291,16 +288,16 @@
|
|||||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1939339834.1692217331.1297236062.2081695142" moduleId="org.eclipse.cdt.core.settings" name="uhk60-right_debug_standalone">
|
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1939339834.1692217331.1297236062.2081695142" moduleId="org.eclipse.cdt.core.settings" name="uhk60-right_debug_standalone">
|
||||||
<externalSettings/>
|
<externalSettings/>
|
||||||
<extensions>
|
<extensions>
|
||||||
|
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
|
||||||
</extensions>
|
</extensions>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||||
<configuration artifactExtension="elf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="${cross_rm} -rf" description="Debug version of uhk60-right without the bootloader" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1939339834.1692217331.1297236062.2081695142" name="uhk60-right_debug_standalone" parent="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release">
|
<configuration artifactExtension="elf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" cleanCommand="${cross_rm} -rf" description="Debug version of uhk60-right without the bootloader" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1939339834.1692217331.1297236062.2081695142" name="uhk60-right_debug_standalone" parent="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release">
|
||||||
<folderInfo id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1939339834.1692217331.1297236062.2081695142." name="/" resourcePath="">
|
<folderInfo id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1939339834.1692217331.1297236062.2081695142." name="/" resourcePath="">
|
||||||
<toolChain id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.release.788475280" name="Cross ARM GCC" superClass="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.release">
|
<toolChain id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.release.788475280" name="Cross ARM GCC" superClass="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.release">
|
||||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.402546001" name="Optimization Level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level" value="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.none" valueType="enumerated"/>
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.402546001" name="Optimization Level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level" value="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.none" valueType="enumerated"/>
|
||||||
@@ -343,7 +340,7 @@
|
|||||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.toerrors.2124713168" name="Generate errors instead of warnings (-Werror)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.toerrors" value="false" valueType="boolean"/>
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.toerrors.2124713168" name="Generate errors instead of warnings (-Werror)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.toerrors" value="false" valueType="boolean"/>
|
||||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createlisting.1228214828" name="Create extended listing" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createlisting" value="false" valueType="boolean"/>
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createlisting.1228214828" name="Create extended listing" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createlisting" value="false" valueType="boolean"/>
|
||||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform.1911575583" isAbstract="false" osList="all" superClass="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform"/>
|
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform.1911575583" isAbstract="false" osList="all" superClass="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform"/>
|
||||||
<builder buildPath="${workspace_loc:/k64f}/release" id="ilg.gnuarmeclipse.managedbuild.cross.builder.1942759303" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" stopOnErr="false" superClass="ilg.gnuarmeclipse.managedbuild.cross.builder"/>
|
<builder buildPath="${workspace_loc:/uhk-right}/../" id="ilg.gnuarmeclipse.managedbuild.cross.builder.1942759303" incrementalBuildTarget="all DEBUG=1 BL_APP_VECTOR_TABLE_ADDRESS=0" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" stopOnErr="false" superClass="ilg.gnuarmeclipse.managedbuild.cross.builder"/>
|
||||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.1355758441" name="Cross ARM GNU Assembler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler">
|
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.1355758441" name="Cross ARM GNU Assembler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler">
|
||||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor.511724221" name="Use preprocessor" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor" value="true" valueType="boolean"/>
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor.511724221" name="Use preprocessor" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor" value="true" valueType="boolean"/>
|
||||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths.1130167410" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths"/>
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths.1130167410" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths"/>
|
||||||
@@ -450,14 +447,97 @@
|
|||||||
</scannerConfigBuildInfo>
|
</scannerConfigBuildInfo>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
<storageModule moduleId="refreshScope" versionNumber="2">
|
<storageModule moduleId="refreshScope" versionNumber="2">
|
||||||
<configuration configurationName="uhk60-right_debug_standalone">
|
<configuration configurationName="uhk60-right_debug">
|
||||||
<resource resourceType="PROJECT" workspacePath="/uhk-right"/>
|
<resource resourceType="PROJECT" workspacePath="/uhk-right"/>
|
||||||
</configuration>
|
</configuration>
|
||||||
<configuration configurationName="uhk60-right_release">
|
<configuration configurationName="uhk60-right_release">
|
||||||
<resource resourceType="PROJECT" workspacePath="/uhk-right"/>
|
<resource resourceType="PROJECT" workspacePath="/uhk-right"/>
|
||||||
</configuration>
|
</configuration>
|
||||||
<configuration configurationName="uhk60-right_debug">
|
<configuration configurationName="uhk60-right_debug_standalone">
|
||||||
<resource resourceType="PROJECT" workspacePath="/uhk-right"/>
|
<resource resourceType="PROJECT" workspacePath="/uhk-right"/>
|
||||||
</configuration>
|
</configuration>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
|
<storageModule moduleId="com.crt.config">
|
||||||
|
<projectStorage><?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<TargetConfig>
|
||||||
|
<Properties property_3="NXP" property_4="MK22FN512xxx12" property_count="5" version="100200"/>
|
||||||
|
<infoList vendor="NXP"><info chip="MK22FN512xxx12" name="MK22FN512xxx12"><chip><name>MK22FN512xxx12</name>
|
||||||
|
<family>K2x</family>
|
||||||
|
<vendor>NXP</vendor>
|
||||||
|
<memory can_program="true" id="Flash" is_ro="true" size="0" type="Flash"/>
|
||||||
|
<memory id="RAM" size="0" type="RAM"/>
|
||||||
|
<memoryInstance derived_from="Flash" driver="FTFA_2K.cfx" id="PROGRAM_FLASH" location="0x00000000" size="0x00080000"/>
|
||||||
|
<memoryInstance derived_from="RAM" id="SRAM_UPPER" location="0x20000000" size="0x00010000"/>
|
||||||
|
<memoryInstance derived_from="RAM" id="SRAM_LOWER" location="0x1fff0000" size="0x00010000"/>
|
||||||
|
<peripheralInstance derived_from="FTFA-FlashConfig" determined="infoFile" id="FTFA-FlashConfig" location="0x400"/>
|
||||||
|
<peripheralInstance derived_from="DMA" determined="infoFile" id="DMA" location="0x40008000"/>
|
||||||
|
<peripheralInstance derived_from="FB" determined="infoFile" id="FB" location="0x4000C000"/>
|
||||||
|
<peripheralInstance derived_from="FMC" determined="infoFile" id="FMC" location="0x4001F000"/>
|
||||||
|
<peripheralInstance derived_from="FTFA" determined="infoFile" id="FTFA" location="0x40020000"/>
|
||||||
|
<peripheralInstance derived_from="DMAMUX" determined="infoFile" id="DMAMUX" location="0x40021000"/>
|
||||||
|
<peripheralInstance derived_from="FTM0" determined="infoFile" id="FTM0" location="0x40038000"/>
|
||||||
|
<peripheralInstance derived_from="FTM1" determined="infoFile" id="FTM1" location="0x40039000"/>
|
||||||
|
<peripheralInstance derived_from="FTM2" determined="infoFile" id="FTM2" location="0x4003A000"/>
|
||||||
|
<peripheralInstance derived_from="FTM3" determined="infoFile" id="FTM3" location="0x40026000"/>
|
||||||
|
<peripheralInstance derived_from="ADC0" determined="infoFile" id="ADC0" location="0x4003B000"/>
|
||||||
|
<peripheralInstance derived_from="ADC1" determined="infoFile" id="ADC1" location="0x40027000"/>
|
||||||
|
<peripheralInstance derived_from="DAC0" determined="infoFile" id="DAC0" location="0x4003F000"/>
|
||||||
|
<peripheralInstance derived_from="DAC1" determined="infoFile" id="DAC1" location="0x40028000"/>
|
||||||
|
<peripheralInstance derived_from="RNG" determined="infoFile" id="RNG" location="0x40029000"/>
|
||||||
|
<peripheralInstance derived_from="LPUART0" determined="infoFile" id="LPUART0" location="0x4002A000"/>
|
||||||
|
<peripheralInstance derived_from="SPI0" determined="infoFile" id="SPI0" location="0x4002C000"/>
|
||||||
|
<peripheralInstance derived_from="SPI1" determined="infoFile" id="SPI1" location="0x4002D000"/>
|
||||||
|
<peripheralInstance derived_from="I2S0" determined="infoFile" id="I2S0" location="0x4002F000"/>
|
||||||
|
<peripheralInstance derived_from="CRC" determined="infoFile" id="CRC" location="0x40032000"/>
|
||||||
|
<peripheralInstance derived_from="PDB0" determined="infoFile" id="PDB0" location="0x40036000"/>
|
||||||
|
<peripheralInstance derived_from="PIT" determined="infoFile" id="PIT" location="0x40037000"/>
|
||||||
|
<peripheralInstance derived_from="RTC" determined="infoFile" id="RTC" location="0x4003D000"/>
|
||||||
|
<peripheralInstance derived_from="RFVBAT" determined="infoFile" id="RFVBAT" location="0x4003E000"/>
|
||||||
|
<peripheralInstance derived_from="LPTMR0" determined="infoFile" id="LPTMR0" location="0x40040000"/>
|
||||||
|
<peripheralInstance derived_from="RFSYS" determined="infoFile" id="RFSYS" location="0x40041000"/>
|
||||||
|
<peripheralInstance derived_from="SIM" determined="infoFile" id="SIM" location="0x40047000"/>
|
||||||
|
<peripheralInstance derived_from="PORTA" determined="infoFile" id="PORTA" location="0x40049000"/>
|
||||||
|
<peripheralInstance derived_from="PORTB" determined="infoFile" id="PORTB" location="0x4004A000"/>
|
||||||
|
<peripheralInstance derived_from="PORTC" determined="infoFile" id="PORTC" location="0x4004B000"/>
|
||||||
|
<peripheralInstance derived_from="PORTD" determined="infoFile" id="PORTD" location="0x4004C000"/>
|
||||||
|
<peripheralInstance derived_from="PORTE" determined="infoFile" id="PORTE" location="0x4004D000"/>
|
||||||
|
<peripheralInstance derived_from="WDOG" determined="infoFile" id="WDOG" location="0x40052000"/>
|
||||||
|
<peripheralInstance derived_from="EWM" determined="infoFile" id="EWM" location="0x40061000"/>
|
||||||
|
<peripheralInstance derived_from="MCG" determined="infoFile" id="MCG" location="0x40064000"/>
|
||||||
|
<peripheralInstance derived_from="OSC" determined="infoFile" id="OSC" location="0x40065000"/>
|
||||||
|
<peripheralInstance derived_from="I2C0" determined="infoFile" id="I2C0" location="0x40066000"/>
|
||||||
|
<peripheralInstance derived_from="I2C1" determined="infoFile" id="I2C1" location="0x40067000"/>
|
||||||
|
<peripheralInstance derived_from="UART0" determined="infoFile" id="UART0" location="0x4006A000"/>
|
||||||
|
<peripheralInstance derived_from="UART1" determined="infoFile" id="UART1" location="0x4006B000"/>
|
||||||
|
<peripheralInstance derived_from="UART2" determined="infoFile" id="UART2" location="0x4006C000"/>
|
||||||
|
<peripheralInstance derived_from="USB0" determined="infoFile" id="USB0" location="0x40072000"/>
|
||||||
|
<peripheralInstance derived_from="CMP0" determined="infoFile" id="CMP0" location="0x40073000"/>
|
||||||
|
<peripheralInstance derived_from="CMP1" determined="infoFile" id="CMP1" location="0x40073008"/>
|
||||||
|
<peripheralInstance derived_from="VREF" determined="infoFile" id="VREF" location="0x40074000"/>
|
||||||
|
<peripheralInstance derived_from="LLWU" determined="infoFile" id="LLWU" location="0x4007C000"/>
|
||||||
|
<peripheralInstance derived_from="PMC" determined="infoFile" id="PMC" location="0x4007D000"/>
|
||||||
|
<peripheralInstance derived_from="SMC" determined="infoFile" id="SMC" location="0x4007E000"/>
|
||||||
|
<peripheralInstance derived_from="RCM" determined="infoFile" id="RCM" location="0x4007F000"/>
|
||||||
|
<peripheralInstance derived_from="GPIOA" determined="infoFile" id="GPIOA" location="0x400FF000"/>
|
||||||
|
<peripheralInstance derived_from="GPIOB" determined="infoFile" id="GPIOB" location="0x400FF040"/>
|
||||||
|
<peripheralInstance derived_from="GPIOC" determined="infoFile" id="GPIOC" location="0x400FF080"/>
|
||||||
|
<peripheralInstance derived_from="GPIOD" determined="infoFile" id="GPIOD" location="0x400FF0C0"/>
|
||||||
|
<peripheralInstance derived_from="GPIOE" determined="infoFile" id="GPIOE" location="0x400FF100"/>
|
||||||
|
<peripheralInstance derived_from="SystemControl" determined="infoFile" id="SystemControl" location="0xE000E000"/>
|
||||||
|
<peripheralInstance derived_from="SysTick" determined="infoFile" id="SysTick" location="0xE000E010"/>
|
||||||
|
<peripheralInstance derived_from="NVIC" determined="infoFile" id="NVIC" location="0xE000E100"/>
|
||||||
|
<peripheralInstance derived_from="MCM" determined="infoFile" id="MCM" location="0xE0080000"/>
|
||||||
|
</chip>
|
||||||
|
<processor><name gcc_name="cortex-m4">Cortex-M4</name>
|
||||||
|
<family>Cortex-M</family>
|
||||||
|
</processor>
|
||||||
|
<link href="MK22F51212_internal_peripheral.xml" show="embed" type="simple"/>
|
||||||
|
</info>
|
||||||
|
</infoList>
|
||||||
|
</TargetConfig></projectStorage>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="com.nxp.mcuxpresso.core.datamodels">
|
||||||
|
<sdkName>SDK_2.x_MK22FN512xxx12</sdkName>
|
||||||
|
<sdkVersion>2.2.0</sdkVersion>
|
||||||
|
</storageModule>
|
||||||
</cproject>
|
</cproject>
|
||||||
|
|||||||
@@ -30,6 +30,16 @@
|
|||||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||||
</natures>
|
</natures>
|
||||||
<linkedResources>
|
<linkedResources>
|
||||||
|
<link>
|
||||||
|
<name>Makedefs.mk</name>
|
||||||
|
<type>1</type>
|
||||||
|
<locationURI>PARENT-2-PROJECT_LOC/scripts/Makedefs.mk</locationURI>
|
||||||
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>Makefile</name>
|
||||||
|
<type>1</type>
|
||||||
|
<locationURI>PARENT-1-PROJECT_LOC/Makefile</locationURI>
|
||||||
|
</link>
|
||||||
<link>
|
<link>
|
||||||
<name>bootloader-shared</name>
|
<name>bootloader-shared</name>
|
||||||
<type>2</type>
|
<type>2</type>
|
||||||
|
|||||||
@@ -196,21 +196,27 @@ SECTIONS
|
|||||||
text_end = ORIGIN(m_text) + LENGTH(m_text);
|
text_end = ORIGIN(m_text) + LENGTH(m_text);
|
||||||
ASSERT(__DATA_END <= text_end, "region m_text overflowed with text and data")
|
ASSERT(__DATA_END <= text_end, "region m_text overflowed with text and data")
|
||||||
|
|
||||||
USB_RAM_GAP = DEFINED(__usb_ram_size__) ? __usb_ram_size__ : 0x800;
|
|
||||||
/* Uninitialized data section */
|
/* Uninitialized data section */
|
||||||
.bss :
|
.bss : ALIGN(4)
|
||||||
{
|
{
|
||||||
/* This is used by the startup in order to initialize the .bss section */
|
/* This is used by the startup in order to initialize the .bss section */
|
||||||
. = ALIGN(4);
|
|
||||||
__START_BSS = .;
|
__START_BSS = .;
|
||||||
__bss_start__ = .;
|
__bss_start__ = .;
|
||||||
*(.bss)
|
*(.bss)
|
||||||
*(.bss*)
|
*(.bss*)
|
||||||
. = ALIGN(512);
|
|
||||||
USB_RAM_START = .;
|
|
||||||
. += USB_RAM_GAP;
|
|
||||||
*(COMMON)
|
*(COMMON)
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
|
} > m_data
|
||||||
|
|
||||||
|
.m_usb_bdt (NOLOAD) :
|
||||||
|
{
|
||||||
|
. = ALIGN(512);
|
||||||
|
*(m_usb_bdt)
|
||||||
|
} > m_data
|
||||||
|
|
||||||
|
.m_usb_global (NOLOAD) :
|
||||||
|
{
|
||||||
|
*(m_usb_global)
|
||||||
__bss_end__ = .;
|
__bss_end__ = .;
|
||||||
__END_BSS = .;
|
__END_BSS = .;
|
||||||
} > m_data
|
} > m_data
|
||||||
@@ -239,17 +245,6 @@ SECTIONS
|
|||||||
. += STACK_SIZE;
|
. += STACK_SIZE;
|
||||||
} > m_data_2
|
} > m_data_2
|
||||||
|
|
||||||
m_usb_bdt USB_RAM_START (NOLOAD) :
|
|
||||||
{
|
|
||||||
*(m_usb_bdt)
|
|
||||||
USB_RAM_BDT_END = .;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_usb_global USB_RAM_BDT_END (NOLOAD) :
|
|
||||||
{
|
|
||||||
*(m_usb_global)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Initializes stack on the end of block */
|
/* Initializes stack on the end of block */
|
||||||
__StackTop = ORIGIN(m_data_2) + LENGTH(m_data_2);
|
__StackTop = ORIGIN(m_data_2) + LENGTH(m_data_2);
|
||||||
__StackLimit = __StackTop - STACK_SIZE;
|
__StackLimit = __StackTop - STACK_SIZE;
|
||||||
|
|||||||
@@ -204,21 +204,27 @@ SECTIONS
|
|||||||
text_end = ORIGIN(m_text) + LENGTH(m_text);
|
text_end = ORIGIN(m_text) + LENGTH(m_text);
|
||||||
ASSERT(__DATA_END <= text_end, "region m_text overflowed with text and data")
|
ASSERT(__DATA_END <= text_end, "region m_text overflowed with text and data")
|
||||||
|
|
||||||
USB_RAM_GAP = DEFINED(__usb_ram_size__) ? __usb_ram_size__ : 0x800;
|
|
||||||
/* Uninitialized data section */
|
/* Uninitialized data section */
|
||||||
.bss :
|
.bss : ALIGN(4)
|
||||||
{
|
{
|
||||||
/* This is used by the startup in order to initialize the .bss section */
|
/* This is used by the startup in order to initialize the .bss section */
|
||||||
. = ALIGN(4);
|
|
||||||
__START_BSS = .;
|
__START_BSS = .;
|
||||||
__bss_start__ = .;
|
__bss_start__ = .;
|
||||||
*(.bss)
|
*(.bss)
|
||||||
*(.bss*)
|
*(.bss*)
|
||||||
. = ALIGN(512);
|
|
||||||
USB_RAM_START = .;
|
|
||||||
. += USB_RAM_GAP;
|
|
||||||
*(COMMON)
|
*(COMMON)
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
|
} > m_data
|
||||||
|
|
||||||
|
.m_usb_bdt (NOLOAD) :
|
||||||
|
{
|
||||||
|
. = ALIGN(512);
|
||||||
|
*(m_usb_bdt)
|
||||||
|
} > m_data
|
||||||
|
|
||||||
|
.m_usb_global (NOLOAD) :
|
||||||
|
{
|
||||||
|
*(m_usb_global)
|
||||||
__bss_end__ = .;
|
__bss_end__ = .;
|
||||||
__END_BSS = .;
|
__END_BSS = .;
|
||||||
} > m_data
|
} > m_data
|
||||||
@@ -247,17 +253,6 @@ SECTIONS
|
|||||||
. += STACK_SIZE;
|
. += STACK_SIZE;
|
||||||
} > m_data_2
|
} > m_data_2
|
||||||
|
|
||||||
m_usb_bdt USB_RAM_START (NOLOAD) :
|
|
||||||
{
|
|
||||||
*(m_usb_bdt)
|
|
||||||
USB_RAM_BDT_END = .;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_usb_global USB_RAM_BDT_END (NOLOAD) :
|
|
||||||
{
|
|
||||||
*(m_usb_global)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Initializes stack on the end of block */
|
/* Initializes stack on the end of block */
|
||||||
__StackTop = ORIGIN(m_data_2) + LENGTH(m_data_2);
|
__StackTop = ORIGIN(m_data_2) + LENGTH(m_data_2);
|
||||||
__StackLimit = __StackTop - STACK_SIZE;
|
__StackLimit = __StackTop - STACK_SIZE;
|
||||||
|
|||||||
@@ -1,49 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<launchConfiguration type="org.eclipse.cdt.launch.applicationLaunchType">
|
<launchConfiguration type="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType">
|
||||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.AUTO_SOLIB" value="true"/>
|
<stringAttribute key="bad_container_name" value="/uhk-l"/>
|
||||||
<listAttribute key="org.eclipse.cdt.dsf.gdb.AUTO_SOLIB_LIST"/>
|
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LAUNCH_CONFIGURATION_BUILD_SCOPE" value="${none}"/>
|
||||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="gdb"/>
|
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="/usr/bin/make"/>
|
||||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_ON_FORK" value="false"/>
|
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-j8 DEBUG=1 flash"/>
|
||||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.GDB_INIT" value=".gdbinit"/>
|
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/uhk-right}/../"/>
|
||||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.NON_STOP" value="false"/>
|
|
||||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.REVERSE" value="false"/>
|
|
||||||
<listAttribute key="org.eclipse.cdt.dsf.gdb.SOLIB_PATH"/>
|
|
||||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.TRACEPOINT_MODE" value="TP_NORMAL_ONLY"/>
|
|
||||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.UPDATE_THREADLIST_ON_SUSPEND" value="false"/>
|
|
||||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.internal.ui.launching.LocalApplicationCDebuggerTab.DEFAULTS_SET" value="true"/>
|
|
||||||
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/>
|
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
|
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_ID" value="gdb"/>
|
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_REGISTER_GROUPS" value=""/>
|
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_START_MODE" value="run"/>
|
|
||||||
<booleanAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN" value="true"/>
|
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="main"/>
|
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_ARGUMENTS" value="uhk60-right_debug/uhk-right.hex"/>
|
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="../../lib/agent/packages/usb/update-device-firmware.js"/>
|
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="uhk-right"/>
|
|
||||||
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="false"/>
|
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1939339834.1692217331.1297236062"/>
|
|
||||||
<booleanAttribute key="org.eclipse.cdt.launch.use_terminal" value="true"/>
|
|
||||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
|
||||||
<listEntry value="/uhk-right"/>
|
|
||||||
</listAttribute>
|
|
||||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
|
||||||
<listEntry value="4"/>
|
|
||||||
</listAttribute>
|
|
||||||
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <memoryBlockExpressionList context="reserved-for-future-use"/> "/>
|
|
||||||
<booleanAttribute key="org.eclipse.linuxtools.internal.perf.attr.DefaultEvent" value="true"/>
|
|
||||||
<booleanAttribute key="org.eclipse.linuxtools.internal.perf.attr.HideUnresolvedSymbols" value="true"/>
|
|
||||||
<stringAttribute key="org.eclipse.linuxtools.internal.perf.attr.Kernel.Location" value=""/>
|
|
||||||
<booleanAttribute key="org.eclipse.linuxtools.internal.perf.attr.Kernel.SourceLineNumbers" value="false"/>
|
|
||||||
<booleanAttribute key="org.eclipse.linuxtools.internal.perf.attr.ModuleSymbols" value="false"/>
|
|
||||||
<booleanAttribute key="org.eclipse.linuxtools.internal.perf.attr.MultipleEvents" value="false"/>
|
|
||||||
<booleanAttribute key="org.eclipse.linuxtools.internal.perf.attr.Multiplex" value="false"/>
|
|
||||||
<booleanAttribute key="org.eclipse.linuxtools.internal.perf.attr.Record.Realtime" value="false"/>
|
|
||||||
<intAttribute key="org.eclipse.linuxtools.internal.perf.attr.Record.Realtime.Priority" value="1"/>
|
|
||||||
<booleanAttribute key="org.eclipse.linuxtools.internal.perf.attr.Record.Verbose" value="false"/>
|
|
||||||
<booleanAttribute key="org.eclipse.linuxtools.internal.perf.attr.ShowSourceDisassembly" value="false"/>
|
|
||||||
<booleanAttribute key="org.eclipse.linuxtools.internal.perf.attr.ShowStat" value="false"/>
|
|
||||||
<booleanAttribute key="org.eclipse.linuxtools.internal.perf.attr.SourceLineNumbers" value="true"/>
|
|
||||||
<intAttribute key="org.eclipse.linuxtools.internal.perf.attr.StatRunCount" value="1"/>
|
|
||||||
<stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>
|
|
||||||
</launchConfiguration>
|
</launchConfiguration>
|
||||||
|
|||||||
@@ -64,10 +64,10 @@
|
|||||||
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/>
|
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/>
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
|
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_REGISTER_GROUPS" value=""/>
|
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_REGISTER_GROUPS" value=""/>
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="uhk60-right_debug/uhk-right.elf"/>
|
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="uhk60-right_debug_standalone/uhk-right.elf"/>
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="uhk-right"/>
|
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="uhk-right"/>
|
||||||
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="false"/>
|
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="false"/>
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1939339834.1692217331.1297236062.2081695142"/>
|
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value=""/>
|
||||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||||
<listEntry value="/uhk-right"/>
|
<listEntry value="/uhk-right"/>
|
||||||
</listAttribute>
|
</listAttribute>
|
||||||
@@ -77,6 +77,6 @@
|
|||||||
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
|
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
|
||||||
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
|
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
|
||||||
</listAttribute>
|
</listAttribute>
|
||||||
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <memoryBlockExpressionList context="Context string"/> "/>
|
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <memoryBlockExpressionList context="Context string"/> "/>
|
||||||
<stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>
|
<stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>
|
||||||
</launchConfiguration>
|
</launchConfiguration>
|
||||||
|
|||||||
@@ -1,49 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<launchConfiguration type="org.eclipse.cdt.launch.applicationLaunchType">
|
<launchConfiguration type="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType">
|
||||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.AUTO_SOLIB" value="true"/>
|
<stringAttribute key="bad_container_name" value="/uhk-l"/>
|
||||||
<listAttribute key="org.eclipse.cdt.dsf.gdb.AUTO_SOLIB_LIST"/>
|
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LAUNCH_CONFIGURATION_BUILD_SCOPE" value="${none}"/>
|
||||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="gdb"/>
|
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="/usr/bin/make"/>
|
||||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_ON_FORK" value="false"/>
|
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-j8 DEBUG=0 flash"/>
|
||||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.GDB_INIT" value=".gdbinit"/>
|
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/uhk-right}/../"/>
|
||||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.NON_STOP" value="false"/>
|
|
||||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.REVERSE" value="false"/>
|
|
||||||
<listAttribute key="org.eclipse.cdt.dsf.gdb.SOLIB_PATH"/>
|
|
||||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.TRACEPOINT_MODE" value="TP_NORMAL_ONLY"/>
|
|
||||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.UPDATE_THREADLIST_ON_SUSPEND" value="false"/>
|
|
||||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.internal.ui.launching.LocalApplicationCDebuggerTab.DEFAULTS_SET" value="true"/>
|
|
||||||
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/>
|
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
|
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_ID" value="gdb"/>
|
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_REGISTER_GROUPS" value=""/>
|
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_START_MODE" value="run"/>
|
|
||||||
<booleanAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN" value="true"/>
|
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="main"/>
|
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_ARGUMENTS" value="uhk60-right_release/uhk-right.hex"/>
|
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="../../lib/agent/packages/usb/update-device-firmware.js"/>
|
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="uhk-right"/>
|
|
||||||
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="false"/>
|
|
||||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1939339834.1692217331"/>
|
|
||||||
<booleanAttribute key="org.eclipse.cdt.launch.use_terminal" value="true"/>
|
|
||||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
|
||||||
<listEntry value="/uhk-right"/>
|
|
||||||
</listAttribute>
|
|
||||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
|
||||||
<listEntry value="4"/>
|
|
||||||
</listAttribute>
|
|
||||||
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <memoryBlockExpressionList context="reserved-for-future-use"/> "/>
|
|
||||||
<booleanAttribute key="org.eclipse.linuxtools.internal.perf.attr.DefaultEvent" value="true"/>
|
|
||||||
<booleanAttribute key="org.eclipse.linuxtools.internal.perf.attr.HideUnresolvedSymbols" value="true"/>
|
|
||||||
<stringAttribute key="org.eclipse.linuxtools.internal.perf.attr.Kernel.Location" value=""/>
|
|
||||||
<booleanAttribute key="org.eclipse.linuxtools.internal.perf.attr.Kernel.SourceLineNumbers" value="false"/>
|
|
||||||
<booleanAttribute key="org.eclipse.linuxtools.internal.perf.attr.ModuleSymbols" value="false"/>
|
|
||||||
<booleanAttribute key="org.eclipse.linuxtools.internal.perf.attr.MultipleEvents" value="false"/>
|
|
||||||
<booleanAttribute key="org.eclipse.linuxtools.internal.perf.attr.Multiplex" value="false"/>
|
|
||||||
<booleanAttribute key="org.eclipse.linuxtools.internal.perf.attr.Record.Realtime" value="false"/>
|
|
||||||
<intAttribute key="org.eclipse.linuxtools.internal.perf.attr.Record.Realtime.Priority" value="1"/>
|
|
||||||
<booleanAttribute key="org.eclipse.linuxtools.internal.perf.attr.Record.Verbose" value="false"/>
|
|
||||||
<booleanAttribute key="org.eclipse.linuxtools.internal.perf.attr.ShowSourceDisassembly" value="false"/>
|
|
||||||
<booleanAttribute key="org.eclipse.linuxtools.internal.perf.attr.ShowStat" value="false"/>
|
|
||||||
<booleanAttribute key="org.eclipse.linuxtools.internal.perf.attr.SourceLineNumbers" value="true"/>
|
|
||||||
<intAttribute key="org.eclipse.linuxtools.internal.perf.attr.StatRunCount" value="1"/>
|
|
||||||
<stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>
|
|
||||||
</launchConfiguration>
|
</launchConfiguration>
|
||||||
|
|||||||
@@ -593,9 +593,6 @@ static status_t handle_command_internal(uint8_t *packet, uint32_t packetLength)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
#if FIXED_BUSPAL_BOOTLOADER
|
#if FIXED_BUSPAL_BOOTLOADER
|
||||||
size_t offset;
|
|
||||||
int res;
|
|
||||||
|
|
||||||
status = kStatus_Success; /* set default */
|
status = kStatus_Success; /* set default */
|
||||||
res = WaitForStartByte(rxBuf, &offset);
|
res = WaitForStartByte(rxBuf, &offset);
|
||||||
if (res==1 && offset==1)
|
if (res==1 && offset==1)
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ status_t serial_packet_read(const peripheral_descriptor_t *self,
|
|||||||
|
|
||||||
// Receive the framing data packet.
|
// Receive the framing data packet.
|
||||||
isPacketOk = true;
|
isPacketOk = true;
|
||||||
status_t status = read_data_packet(&framingPacket, g_serialContext.data, packetType);
|
status = read_data_packet(&framingPacket, g_serialContext.data, packetType);
|
||||||
if (status != kStatus_Success)
|
if (status != kStatus_Success)
|
||||||
{
|
{
|
||||||
// No packet available.
|
// No packet available.
|
||||||
|
|||||||
@@ -3,7 +3,4 @@
|
|||||||
|
|
||||||
// Macros:
|
// Macros:
|
||||||
|
|
||||||
#define I2C_WATCHDOG
|
|
||||||
// #define LED_DRIVER_STRESS_TEST
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -6,12 +6,20 @@ static uint8_t hardwareConfig[HARDWARE_CONFIG_SIZE];
|
|||||||
static uint8_t ATTR_DATA2 stagingUserConfig[USER_CONFIG_SIZE];
|
static uint8_t ATTR_DATA2 stagingUserConfig[USER_CONFIG_SIZE];
|
||||||
static uint8_t validatedUserConfig[USER_CONFIG_SIZE];
|
static uint8_t validatedUserConfig[USER_CONFIG_SIZE];
|
||||||
|
|
||||||
|
uint16_t ValidatedUserConfigLength;
|
||||||
config_buffer_t HardwareConfigBuffer = { hardwareConfig };
|
config_buffer_t HardwareConfigBuffer = { hardwareConfig };
|
||||||
config_buffer_t StagingUserConfigBuffer = { stagingUserConfig };
|
config_buffer_t StagingUserConfigBuffer = { stagingUserConfig };
|
||||||
config_buffer_t ValidatedUserConfigBuffer = { validatedUserConfig };
|
config_buffer_t ValidatedUserConfigBuffer = { validatedUserConfig };
|
||||||
|
|
||||||
|
hardware_config_t *HardwareConfig = (hardware_config_t*)hardwareConfig;
|
||||||
|
|
||||||
bool ParserRunDry;
|
bool ParserRunDry;
|
||||||
|
|
||||||
|
bool IsConfigBufferIdValid(config_buffer_id_t configBufferId)
|
||||||
|
{
|
||||||
|
return ConfigBufferId_HardwareConfig <= configBufferId && configBufferId <= ConfigBufferId_ValidatedUserConfig;
|
||||||
|
}
|
||||||
|
|
||||||
config_buffer_t* ConfigBufferIdToConfigBuffer(config_buffer_id_t configBufferId)
|
config_buffer_t* ConfigBufferIdToConfigBuffer(config_buffer_id_t configBufferId)
|
||||||
{
|
{
|
||||||
switch (configBufferId) {
|
switch (configBufferId) {
|
||||||
@@ -25,3 +33,16 @@ config_buffer_t* ConfigBufferIdToConfigBuffer(config_buffer_id_t configBufferId)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint16_t ConfigBufferIdToBufferSize(config_buffer_id_t configBufferId)
|
||||||
|
{
|
||||||
|
switch (configBufferId) {
|
||||||
|
case ConfigBufferId_HardwareConfig:
|
||||||
|
return HARDWARE_CONFIG_SIZE;
|
||||||
|
case ConfigBufferId_StagingUserConfig:
|
||||||
|
case ConfigBufferId_ValidatedUserConfig:
|
||||||
|
return USER_CONFIG_SIZE;
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -6,6 +6,10 @@
|
|||||||
#include "fsl_common.h"
|
#include "fsl_common.h"
|
||||||
#include "basic_types.h"
|
#include "basic_types.h"
|
||||||
|
|
||||||
|
// Macros:
|
||||||
|
|
||||||
|
#define HARDWARE_CONFIG_SIGNATURE_LENGTH 3
|
||||||
|
|
||||||
// Typedefs:
|
// Typedefs:
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
@@ -14,15 +18,32 @@
|
|||||||
ConfigBufferId_ValidatedUserConfig,
|
ConfigBufferId_ValidatedUserConfig,
|
||||||
} config_buffer_id_t;
|
} config_buffer_id_t;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
uint8_t signatureLength;
|
||||||
|
char signature[HARDWARE_CONFIG_SIGNATURE_LENGTH];
|
||||||
|
uint8_t majorVersion;
|
||||||
|
uint8_t minorVersion;
|
||||||
|
uint8_t patchVersion;
|
||||||
|
uint8_t brandId;
|
||||||
|
uint8_t deviceId;
|
||||||
|
uint32_t uniqueId;
|
||||||
|
bool isVendorModeOn;
|
||||||
|
bool isIso;
|
||||||
|
} hardware_config_t;
|
||||||
|
|
||||||
// Variables:
|
// Variables:
|
||||||
|
|
||||||
extern bool ParserRunDry;
|
extern bool ParserRunDry;
|
||||||
|
extern uint16_t ValidatedUserConfigLength;
|
||||||
extern config_buffer_t HardwareConfigBuffer;
|
extern config_buffer_t HardwareConfigBuffer;
|
||||||
extern config_buffer_t StagingUserConfigBuffer;
|
extern config_buffer_t StagingUserConfigBuffer;
|
||||||
extern config_buffer_t ValidatedUserConfigBuffer;
|
extern config_buffer_t ValidatedUserConfigBuffer;
|
||||||
|
extern hardware_config_t *HardwareConfig;
|
||||||
|
|
||||||
// Functions:
|
// Functions:
|
||||||
|
|
||||||
|
bool IsConfigBufferIdValid(config_buffer_id_t configBufferId);
|
||||||
config_buffer_t* ConfigBufferIdToConfigBuffer(config_buffer_id_t configBufferId);
|
config_buffer_t* ConfigBufferIdToConfigBuffer(config_buffer_id_t configBufferId);
|
||||||
|
uint16_t ConfigBufferIdToBufferSize(config_buffer_id_t configBufferId);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -5,18 +5,33 @@
|
|||||||
#include "config_globals.h"
|
#include "config_globals.h"
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
#include "usb_report_updater.h"
|
#include "usb_report_updater.h"
|
||||||
|
#include "led_display.h"
|
||||||
|
#include "slave_scheduler.h"
|
||||||
|
#include "slave_drivers/is31fl3731_driver.h"
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
static parser_error_t parseModuleConfiguration(config_buffer_t *buffer)
|
static parser_error_t parseModuleConfiguration(config_buffer_t *buffer)
|
||||||
{
|
{
|
||||||
uint8_t id = ReadUInt8(buffer);
|
uint8_t id = ReadUInt8(buffer);
|
||||||
|
uint8_t pointerMode = ReadUInt8(buffer); // move vs scroll
|
||||||
uint8_t deceleratedPointerSpeedMultiplier = ReadUInt8(buffer);
|
uint8_t deceleratedPointerSpeedMultiplier = ReadUInt8(buffer);
|
||||||
uint8_t basePointerSpeedMultiplier = ReadUInt8(buffer);
|
uint8_t basePointerSpeedMultiplier = ReadUInt8(buffer);
|
||||||
uint8_t acceleratedPointerSpeed = ReadUInt8(buffer);
|
uint8_t acceleratedPointerSpeed = ReadUInt8(buffer);
|
||||||
|
uint16_t angularShift = ReadUInt16(buffer);
|
||||||
|
uint8_t modLayerPointerFunction = ReadUInt8(buffer); // none vs invertMode vs decelerate vs accelerate
|
||||||
|
uint8_t fnLayerPointerFunction = ReadUInt8(buffer); // none vs invertMode vs decelerate vs accelerate
|
||||||
|
uint8_t mouseLayerPointerFunction = ReadUInt8(buffer); // none vs invertMode vs decelerate vs accelerate
|
||||||
|
|
||||||
(void)id;
|
(void)id;
|
||||||
|
(void)pointerMode;
|
||||||
(void)deceleratedPointerSpeedMultiplier;
|
(void)deceleratedPointerSpeedMultiplier;
|
||||||
(void)basePointerSpeedMultiplier;
|
(void)basePointerSpeedMultiplier;
|
||||||
(void)acceleratedPointerSpeed;
|
(void)acceleratedPointerSpeed;
|
||||||
|
(void)angularShift;
|
||||||
|
(void)modLayerPointerFunction;
|
||||||
|
(void)fnLayerPointerFunction;
|
||||||
|
(void)mouseLayerPointerFunction;
|
||||||
|
|
||||||
return ParserError_Success;
|
return ParserError_Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -36,11 +51,11 @@ parser_error_t ParseConfig(config_buffer_t *buffer)
|
|||||||
const char *deviceName = ReadString(buffer, &len);
|
const char *deviceName = ReadString(buffer, &len);
|
||||||
uint16_t doubleTapSwitchLayerTimeout = ReadUInt16(buffer);
|
uint16_t doubleTapSwitchLayerTimeout = ReadUInt16(buffer);
|
||||||
|
|
||||||
(void)userConfigLength;
|
|
||||||
(void)dataModelMajorVersion;
|
(void)dataModelMajorVersion;
|
||||||
(void)dataModelMinorVersion;
|
(void)dataModelMinorVersion;
|
||||||
(void)dataModelPatchVersion;
|
(void)dataModelPatchVersion;
|
||||||
(void)deviceName;
|
(void)deviceName;
|
||||||
|
(void)doubleTapSwitchLayerTimeout;
|
||||||
|
|
||||||
// LED brightness
|
// LED brightness
|
||||||
|
|
||||||
@@ -48,10 +63,6 @@ parser_error_t ParseConfig(config_buffer_t *buffer)
|
|||||||
uint8_t alphanumericSegmentsBrightness = ReadUInt8(buffer);
|
uint8_t alphanumericSegmentsBrightness = ReadUInt8(buffer);
|
||||||
uint8_t keyBacklightBrightness = ReadUInt8(buffer);
|
uint8_t keyBacklightBrightness = ReadUInt8(buffer);
|
||||||
|
|
||||||
(void)iconsAndLayerTextsBrightness;
|
|
||||||
(void)alphanumericSegmentsBrightness;
|
|
||||||
(void)keyBacklightBrightness;
|
|
||||||
|
|
||||||
// Mouse kinetic properties
|
// Mouse kinetic properties
|
||||||
|
|
||||||
uint8_t mouseMoveInitialSpeed = ReadUInt8(buffer);
|
uint8_t mouseMoveInitialSpeed = ReadUInt8(buffer);
|
||||||
@@ -125,7 +136,19 @@ parser_error_t ParseConfig(config_buffer_t *buffer)
|
|||||||
// If parsing succeeded then apply the parsed values.
|
// If parsing succeeded then apply the parsed values.
|
||||||
|
|
||||||
if (!ParserRunDry) {
|
if (!ParserRunDry) {
|
||||||
DoubleTapSwitchLayerTimeout = doubleTapSwitchLayerTimeout;
|
// DoubleTapSwitchLayerTimeout = doubleTapSwitchLayerTimeout;
|
||||||
|
|
||||||
|
// Update LED brightnesses and reinitialize LED drivers
|
||||||
|
|
||||||
|
ValidatedUserConfigLength = userConfigLength;
|
||||||
|
|
||||||
|
IconsAndLayerTextsBrightness = iconsAndLayerTextsBrightness;
|
||||||
|
AlphanumericSegmentsBrightness = alphanumericSegmentsBrightness;
|
||||||
|
KeyBacklightBrightness = keyBacklightBrightness;
|
||||||
|
|
||||||
|
LedSlaveDriver_UpdateLeds();
|
||||||
|
|
||||||
|
// Update mouse key speeds
|
||||||
|
|
||||||
MouseMoveState.initialSpeed = mouseMoveInitialSpeed;
|
MouseMoveState.initialSpeed = mouseMoveInitialSpeed;
|
||||||
MouseMoveState.acceleration = mouseMoveAcceleration;
|
MouseMoveState.acceleration = mouseMoveAcceleration;
|
||||||
@@ -139,6 +162,8 @@ parser_error_t ParseConfig(config_buffer_t *buffer)
|
|||||||
MouseScrollState.baseSpeed = mouseScrollBaseSpeed;
|
MouseScrollState.baseSpeed = mouseScrollBaseSpeed;
|
||||||
MouseScrollState.acceleratedSpeed = mouseScrollAcceleratedSpeed;
|
MouseScrollState.acceleratedSpeed = mouseScrollAcceleratedSpeed;
|
||||||
|
|
||||||
|
// Update counts
|
||||||
|
|
||||||
AllKeymapsCount = keymapCount;
|
AllKeymapsCount = keymapCount;
|
||||||
AllMacrosCount = macroCount;
|
AllMacrosCount = macroCount;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ static parser_error_t parseKeyStrokeAction(key_action_t *keyAction, uint8_t keyS
|
|||||||
static parser_error_t parseSwitchLayerAction(key_action_t *KeyAction, config_buffer_t *buffer)
|
static parser_error_t parseSwitchLayerAction(key_action_t *KeyAction, config_buffer_t *buffer)
|
||||||
{
|
{
|
||||||
uint8_t layer = ReadUInt8(buffer) + 1;
|
uint8_t layer = ReadUInt8(buffer) + 1;
|
||||||
uint8_t mode = ReadBool(buffer) ? SwitchLayerMode_Toggle : SwitchLayerMode_HoldAndDoubleTapToggle;
|
switch_layer_mode_t mode = ReadUInt8(buffer);
|
||||||
|
|
||||||
KeyAction->type = KeyActionType_SwitchLayer;
|
KeyAction->type = KeyActionType_SwitchLayer;
|
||||||
KeyAction->switchLayer.layer = layer;
|
KeyAction->switchLayer.layer = layer;
|
||||||
@@ -75,7 +75,7 @@ static parser_error_t parsePlayMacroAction(key_action_t *keyAction, config_buffe
|
|||||||
if (macroIndex >= tempMacroCount) {
|
if (macroIndex >= tempMacroCount) {
|
||||||
return ParserError_InvalidSerializedPlayMacroAction;
|
return ParserError_InvalidSerializedPlayMacroAction;
|
||||||
}
|
}
|
||||||
keyAction->type = KeyActionType_SwitchKeymap;
|
keyAction->type = KeyActionType_PlayMacro;
|
||||||
keyAction->playMacro.macroId = macroIndex;
|
keyAction->playMacro.macroId = macroIndex;
|
||||||
return ParserError_Success;
|
return ParserError_Success;
|
||||||
}
|
}
|
||||||
@@ -116,7 +116,7 @@ static parser_error_t parseKeyAction(key_action_t *keyAction, config_buffer_t *b
|
|||||||
return ParserError_InvalidSerializedKeyActionType;
|
return ParserError_InvalidSerializedKeyActionType;
|
||||||
}
|
}
|
||||||
|
|
||||||
static parser_error_t parseKeyActions(uint8_t targetLayer, config_buffer_t *buffer, uint8_t moduleId, uint8_t pointerRole)
|
static parser_error_t parseKeyActions(uint8_t targetLayer, config_buffer_t *buffer, uint8_t moduleId)
|
||||||
{
|
{
|
||||||
parser_error_t errorCode;
|
parser_error_t errorCode;
|
||||||
uint16_t actionCount = ReadCompactLength(buffer);
|
uint16_t actionCount = ReadCompactLength(buffer);
|
||||||
@@ -137,9 +137,7 @@ static parser_error_t parseKeyActions(uint8_t targetLayer, config_buffer_t *buff
|
|||||||
static parser_error_t parseModule(config_buffer_t *buffer, uint8_t layer)
|
static parser_error_t parseModule(config_buffer_t *buffer, uint8_t layer)
|
||||||
{
|
{
|
||||||
uint8_t moduleId = ReadUInt8(buffer);
|
uint8_t moduleId = ReadUInt8(buffer);
|
||||||
uint8_t pointerRole = ReadUInt8(buffer);
|
return parseKeyActions(layer, buffer, moduleId);
|
||||||
|
|
||||||
return parseKeyActions(layer, buffer, moduleId, pointerRole);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static parser_error_t parseLayer(config_buffer_t *buffer, uint8_t layer)
|
static parser_error_t parseLayer(config_buffer_t *buffer, uint8_t layer)
|
||||||
@@ -198,4 +196,3 @@ parser_error_t ParseKeymap(config_buffer_t *buffer, uint8_t keymapIdx, uint8_t k
|
|||||||
}
|
}
|
||||||
return ParserError_Success;
|
return ParserError_Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -48,10 +48,12 @@
|
|||||||
SerializedMouseAction_ScrollRight,
|
SerializedMouseAction_ScrollRight,
|
||||||
SerializedMouseAction_Accelerate,
|
SerializedMouseAction_Accelerate,
|
||||||
SerializedMouseAction_Decelerate,
|
SerializedMouseAction_Decelerate,
|
||||||
SerializedMouseAction_Last = SerializedMouseAction_Decelerate,
|
|
||||||
SerializedMouseAction_Button_4,
|
SerializedMouseAction_Button_4,
|
||||||
SerializedMouseAction_Button_5,
|
SerializedMouseAction_Button_5,
|
||||||
SerializedMouseAction_Button_6,
|
SerializedMouseAction_Button_6,
|
||||||
|
SerializedMouseAction_Button_7,
|
||||||
|
SerializedMouseAction_Button_8,
|
||||||
|
SerializedMouseAction_Last = SerializedMouseAction_Button_8,
|
||||||
} serialized_mouse_action_t;
|
} serialized_mouse_action_t;
|
||||||
|
|
||||||
// Functions:
|
// Functions:
|
||||||
|
|||||||
@@ -7,13 +7,15 @@ parser_error_t parseKeyMacroAction(config_buffer_t *buffer, macro_action_t *macr
|
|||||||
uint8_t keyMacroType = macroActionType - SerializedMacroActionType_KeyMacroAction;
|
uint8_t keyMacroType = macroActionType - SerializedMacroActionType_KeyMacroAction;
|
||||||
uint8_t action = keyMacroType & 0b11;
|
uint8_t action = keyMacroType & 0b11;
|
||||||
uint8_t type;
|
uint8_t type;
|
||||||
uint8_t scancode;
|
uint16_t scancode = 0;
|
||||||
uint8_t modifierMask;
|
uint8_t modifierMask;
|
||||||
|
|
||||||
keyMacroType >>= 2;
|
keyMacroType >>= 2;
|
||||||
type = keyMacroType & 0b11;
|
type = keyMacroType & 0b11;
|
||||||
keyMacroType >>= 2;
|
keyMacroType >>= 2;
|
||||||
scancode = keyMacroType & 0b10 ? ReadUInt8(buffer) : 0;
|
if (keyMacroType & 0b10) {
|
||||||
|
scancode = type == SerializedKeystrokeType_LongMedia ? ReadUInt16(buffer) : ReadUInt8(buffer);
|
||||||
|
}
|
||||||
modifierMask = keyMacroType & 0b01 ? ReadUInt8(buffer) : 0;
|
modifierMask = keyMacroType & 0b01 ? ReadUInt8(buffer) : 0;
|
||||||
macroAction->type = MacroActionType_Key;
|
macroAction->type = MacroActionType_Key;
|
||||||
macroAction->key.action = action;
|
macroAction->key.action = action;
|
||||||
@@ -58,7 +60,7 @@ parser_error_t parseScrollMouseMacroAction(config_buffer_t *buffer, macro_action
|
|||||||
|
|
||||||
parser_error_t parseDelayMacroAction(config_buffer_t *buffer, macro_action_t *macroAction)
|
parser_error_t parseDelayMacroAction(config_buffer_t *buffer, macro_action_t *macroAction)
|
||||||
{
|
{
|
||||||
int16_t delay = ReadInt16(buffer);
|
uint16_t delay = ReadUInt16(buffer);
|
||||||
|
|
||||||
macroAction->type = MacroActionType_Delay;
|
macroAction->type = MacroActionType_Delay;
|
||||||
macroAction->delay.delay = delay;
|
macroAction->delay.delay = delay;
|
||||||
|
|||||||
@@ -6,10 +6,10 @@
|
|||||||
#include "config_parser/config_globals.h"
|
#include "config_parser/config_globals.h"
|
||||||
#include "buffer.h"
|
#include "buffer.h"
|
||||||
|
|
||||||
bool IsEepromBusy;
|
volatile bool IsEepromBusy;
|
||||||
static eeprom_operation_t CurrentEepromOperation;
|
static eeprom_operation_t CurrentEepromOperation;
|
||||||
static config_buffer_id_t CurrentConfigBufferId;
|
static config_buffer_id_t CurrentConfigBufferId;
|
||||||
status_t LastEepromTransferStatus;
|
static status_t LastEepromTransferStatus;
|
||||||
void (*SuccessCallback)(void);
|
void (*SuccessCallback)(void);
|
||||||
|
|
||||||
static i2c_master_handle_t i2cHandle;
|
static i2c_master_handle_t i2cHandle;
|
||||||
@@ -94,14 +94,14 @@ void EEPROM_Init(void)
|
|||||||
I2C_MasterTransferCreateHandle(I2C_EEPROM_BUS_BASEADDR, &i2cHandle, i2cCallback, NULL);
|
I2C_MasterTransferCreateHandle(I2C_EEPROM_BUS_BASEADDR, &i2cHandle, i2cCallback, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
status_t EEPROM_LaunchTransfer(eeprom_operation_t operation, config_buffer_id_t config_buffer_id, void (*successCallback))
|
status_t EEPROM_LaunchTransfer(eeprom_operation_t operation, config_buffer_id_t configBufferId, void (*successCallback))
|
||||||
{
|
{
|
||||||
if (IsEepromBusy) {
|
if (IsEepromBusy) {
|
||||||
return kStatus_I2C_Busy;
|
return kStatus_I2C_Busy;
|
||||||
}
|
}
|
||||||
|
|
||||||
CurrentEepromOperation = operation;
|
CurrentEepromOperation = operation;
|
||||||
CurrentConfigBufferId = config_buffer_id;
|
CurrentConfigBufferId = configBufferId;
|
||||||
SuccessCallback = successCallback;
|
SuccessCallback = successCallback;
|
||||||
|
|
||||||
bool isHardwareConfig = CurrentConfigBufferId == ConfigBufferId_HardwareConfig;
|
bool isHardwareConfig = CurrentConfigBufferId == ConfigBufferId_HardwareConfig;
|
||||||
@@ -117,7 +117,8 @@ status_t EEPROM_LaunchTransfer(eeprom_operation_t operation, config_buffer_id_t
|
|||||||
case EepromOperation_Write:
|
case EepromOperation_Write:
|
||||||
sourceBuffer = ConfigBufferIdToConfigBuffer(CurrentConfigBufferId)->buffer;
|
sourceBuffer = ConfigBufferIdToConfigBuffer(CurrentConfigBufferId)->buffer;
|
||||||
sourceOffset = 0;
|
sourceOffset = 0;
|
||||||
sourceLength = isHardwareConfig ? HARDWARE_CONFIG_SIZE : USER_CONFIG_SIZE;
|
uint16_t userConfigSize = ValidatedUserConfigLength && configBufferId == ConfigBufferId_ValidatedUserConfig ? ValidatedUserConfigLength : USER_CONFIG_SIZE;
|
||||||
|
sourceLength = isHardwareConfig ? HARDWARE_CONFIG_SIZE : userConfigSize;
|
||||||
LastEepromTransferStatus = writePage();
|
LastEepromTransferStatus = writePage();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -125,3 +126,8 @@ status_t EEPROM_LaunchTransfer(eeprom_operation_t operation, config_buffer_id_t
|
|||||||
IsEepromBusy = LastEepromTransferStatus == kStatus_Success;
|
IsEepromBusy = LastEepromTransferStatus == kStatus_Success;
|
||||||
return LastEepromTransferStatus;
|
return LastEepromTransferStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool IsEepromOperationValid(eeprom_operation_t operation)
|
||||||
|
{
|
||||||
|
return operation == EepromOperation_Read || operation == EepromOperation_Write;
|
||||||
|
}
|
||||||
|
|||||||
@@ -24,12 +24,12 @@
|
|||||||
|
|
||||||
// Variables:
|
// Variables:
|
||||||
|
|
||||||
extern bool IsEepromBusy;
|
extern volatile bool IsEepromBusy;
|
||||||
extern status_t EepromTransferStatus;
|
|
||||||
|
|
||||||
// Functions:
|
// Functions:
|
||||||
|
|
||||||
void EEPROM_Init(void);
|
void EEPROM_Init(void);
|
||||||
status_t EEPROM_LaunchTransfer(eeprom_operation_t operation, config_buffer_id_t config_buffer_id, void (*successCallback));
|
status_t EEPROM_LaunchTransfer(eeprom_operation_t operation, config_buffer_id_t config_buffer_id, void (*successCallback));
|
||||||
|
bool IsEepromOperationValid(eeprom_operation_t operation);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -13,7 +13,8 @@
|
|||||||
#define I2C_MAIN_BUS_BASEADDR I2C0
|
#define I2C_MAIN_BUS_BASEADDR I2C0
|
||||||
#define I2C_MAIN_BUS_IRQ_ID I2C0_IRQn
|
#define I2C_MAIN_BUS_IRQ_ID I2C0_IRQn
|
||||||
#define I2C_MAIN_BUS_CLK_SRC I2C0_CLK_SRC
|
#define I2C_MAIN_BUS_CLK_SRC I2C0_CLK_SRC
|
||||||
#define I2C_MAIN_BUS_BAUD_RATE 100000 // 100 kHz works even with a 20 meter long bridge cable.
|
#define I2C_MAIN_BUS_NORMAL_BAUD_RATE 100000
|
||||||
|
#define I2C_MAIN_BUS_BUSPAL_BAUD_RATE 30000
|
||||||
#define I2C_MAIN_BUS_MUX kPORT_MuxAlt7
|
#define I2C_MAIN_BUS_MUX kPORT_MuxAlt7
|
||||||
|
|
||||||
#define I2C_MAIN_BUS_SDA_GPIO GPIOD
|
#define I2C_MAIN_BUS_SDA_GPIO GPIOD
|
||||||
@@ -34,10 +35,12 @@
|
|||||||
#define I2C_EEPROM_BUS_BAUD_RATE 1000000 // 1 Mhz is the maximum speed of the EEPROM.
|
#define I2C_EEPROM_BUS_BAUD_RATE 1000000 // 1 Mhz is the maximum speed of the EEPROM.
|
||||||
#define I2C_EEPROM_BUS_MUX kPORT_MuxAlt2
|
#define I2C_EEPROM_BUS_MUX kPORT_MuxAlt2
|
||||||
|
|
||||||
|
#define I2C_EEPROM_BUS_SDA_GPIO GPIOC
|
||||||
#define I2C_EEPROM_BUS_SDA_PORT PORTC
|
#define I2C_EEPROM_BUS_SDA_PORT PORTC
|
||||||
#define I2C_EEPROM_BUS_SDA_CLOCK kCLOCK_PortC
|
#define I2C_EEPROM_BUS_SDA_CLOCK kCLOCK_PortC
|
||||||
#define I2C_EEPROM_BUS_SDA_PIN 11
|
#define I2C_EEPROM_BUS_SDA_PIN 11
|
||||||
|
|
||||||
|
#define I2C_EEPROM_BUS_SCL_GPIO GPIOC
|
||||||
#define I2C_EEPROM_BUS_SCL_PORT PORTC
|
#define I2C_EEPROM_BUS_SCL_PORT PORTC
|
||||||
#define I2C_EEPROM_BUS_SCL_CLOCK kCLOCK_PortC
|
#define I2C_EEPROM_BUS_SCL_CLOCK kCLOCK_PortC
|
||||||
#define I2C_EEPROM_BUS_SCL_PIN 10
|
#define I2C_EEPROM_BUS_SCL_PIN 10
|
||||||
|
|||||||
25
right/src/i2c_error_logger.c
Normal file
25
right/src/i2c_error_logger.c
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
#include "fsl_i2c.h"
|
||||||
|
#include "i2c_error_logger.h"
|
||||||
|
|
||||||
|
i2c_slave_error_counter_t I2cSlaveErrorCounters[MAX_SLAVE_COUNT];
|
||||||
|
|
||||||
|
void LogI2cError(uint8_t slaveId, status_t status)
|
||||||
|
{
|
||||||
|
i2c_slave_error_counter_t *i2cSlaveErrorCounter = I2cSlaveErrorCounters + slaveId;
|
||||||
|
uint8_t errorIdx;
|
||||||
|
|
||||||
|
for (errorIdx=0; errorIdx<i2cSlaveErrorCounter->errorTypeCount; errorIdx++) {
|
||||||
|
i2c_error_count_t *currentI2cError = i2cSlaveErrorCounter->errors + errorIdx;
|
||||||
|
if (currentI2cError->status == status) {
|
||||||
|
currentI2cError->count++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (errorIdx == i2cSlaveErrorCounter->errorTypeCount && errorIdx < MAX_LOGGED_I2C_ERROR_TYPES_PER_SLAVE) {
|
||||||
|
i2cSlaveErrorCounter->errorTypeCount++;
|
||||||
|
i2c_error_count_t *currentI2cError = i2cSlaveErrorCounter->errors + errorIdx;
|
||||||
|
currentI2cError->status = status;
|
||||||
|
currentI2cError->count = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
33
right/src/i2c_error_logger.h
Normal file
33
right/src/i2c_error_logger.h
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
#ifndef __I2C_ERROR_LOGGER_H__
|
||||||
|
#define __I2C_ERROR_LOGGER_H__
|
||||||
|
|
||||||
|
// Includes:
|
||||||
|
|
||||||
|
#include "fsl_common.h"
|
||||||
|
#include "slave_scheduler.h"
|
||||||
|
|
||||||
|
// Macros:
|
||||||
|
|
||||||
|
#define MAX_LOGGED_I2C_ERROR_TYPES_PER_SLAVE 7
|
||||||
|
|
||||||
|
// Typedefs:
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
status_t status;
|
||||||
|
uint32_t count;
|
||||||
|
} i2c_error_count_t;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
uint8_t errorTypeCount;
|
||||||
|
i2c_error_count_t errors[MAX_LOGGED_I2C_ERROR_TYPES_PER_SLAVE];
|
||||||
|
} i2c_slave_error_counter_t;
|
||||||
|
|
||||||
|
// Variables:
|
||||||
|
|
||||||
|
extern i2c_slave_error_counter_t I2cSlaveErrorCounters[MAX_SLAVE_COUNT];
|
||||||
|
|
||||||
|
// Functions:
|
||||||
|
|
||||||
|
void LogI2cError(uint8_t slaveId, status_t status);
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -5,8 +5,8 @@
|
|||||||
#include "fsl_gpio.h"
|
#include "fsl_gpio.h"
|
||||||
#include "i2c.h"
|
#include "i2c.h"
|
||||||
#include "i2c_watchdog.h"
|
#include "i2c_watchdog.h"
|
||||||
#include "slave_scheduler.h"
|
|
||||||
#include "init_peripherals.h"
|
#include "init_peripherals.h"
|
||||||
|
#include "peripherals/test_led.h"
|
||||||
|
|
||||||
uint32_t I2cWatchdog_WatchCounter;
|
uint32_t I2cWatchdog_WatchCounter;
|
||||||
uint32_t I2cWatchdog_RecoveryCounter;
|
uint32_t I2cWatchdog_RecoveryCounter;
|
||||||
@@ -19,18 +19,15 @@ static uint32_t prevWatchdogCounter;
|
|||||||
void PIT_I2C_WATCHDOG_HANDLER(void)
|
void PIT_I2C_WATCHDOG_HANDLER(void)
|
||||||
{
|
{
|
||||||
I2cWatchdog_WatchCounter++;
|
I2cWatchdog_WatchCounter++;
|
||||||
|
|
||||||
if (I2C_Watchdog == prevWatchdogCounter) { // Restart I2C if there haven't been any interrupts recently
|
if (I2C_Watchdog == prevWatchdogCounter) { // Restart I2C if there haven't been any interrupts recently
|
||||||
I2cWatchdog_RecoveryCounter++;
|
I2cWatchdog_RecoveryCounter++;
|
||||||
i2c_master_config_t masterConfig;
|
ReinitI2cMainBus();
|
||||||
I2C_MasterGetDefaultConfig(&masterConfig);
|
|
||||||
I2C_MasterDeinit(I2C_MAIN_BUS_BASEADDR);
|
|
||||||
InitI2cMainBus();
|
|
||||||
InitSlaveScheduler();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
prevWatchdogCounter = I2C_Watchdog;
|
prevWatchdogCounter = I2C_Watchdog;
|
||||||
|
|
||||||
PIT_ClearStatusFlags(PIT, PIT_I2C_WATCHDOG_CHANNEL, PIT_TFLG_TIF_MASK);
|
PIT_ClearStatusFlags(PIT, PIT_I2C_WATCHDOG_CHANNEL, PIT_TFLG_TIF_MASK);
|
||||||
|
TestLed_Toggle();
|
||||||
}
|
}
|
||||||
|
|
||||||
void InitI2cWatchdog(void)
|
void InitI2cWatchdog(void)
|
||||||
|
|||||||
@@ -12,119 +12,149 @@
|
|||||||
#include "init_peripherals.h"
|
#include "init_peripherals.h"
|
||||||
#include "eeprom.h"
|
#include "eeprom.h"
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
#include "key_debouncer.h"
|
|
||||||
#include "usb_api.h"
|
#include "usb_api.h"
|
||||||
|
#include "slave_scheduler.h"
|
||||||
|
#include "bootloader/wormhole.h"
|
||||||
|
|
||||||
void InitInterruptPriorities(void)
|
bool IsBusPalOn;
|
||||||
{
|
volatile uint32_t I2cMainBusRequestedBaudRateBps = I2C_MAIN_BUS_NORMAL_BAUD_RATE;
|
||||||
NVIC_SetPriority(PIT_I2C_WATCHDOG_IRQ_ID, 1);
|
volatile uint32_t I2cMainBusActualBaudRateBps;
|
||||||
NVIC_SetPriority(PIT_TIMER_IRQ_ID, 2);
|
|
||||||
NVIC_SetPriority(PIT_KEY_SCANNER_IRQ_ID, 3);
|
static i2c_bus_t i2cMainBus = {
|
||||||
NVIC_SetPriority(PIT_KEY_DEBOUNCER_IRQ_ID, 3);
|
.baseAddr = I2C_MAIN_BUS_BASEADDR,
|
||||||
NVIC_SetPriority(I2C_MAIN_BUS_IRQ_ID, 3);
|
.clockSrc = I2C_MAIN_BUS_CLK_SRC,
|
||||||
NVIC_SetPriority(I2C_EEPROM_BUS_IRQ_ID, 3);
|
.mux = I2C_MAIN_BUS_MUX,
|
||||||
NVIC_SetPriority(USB_IRQ_ID, 3);
|
|
||||||
|
.sdaClock = I2C_MAIN_BUS_SDA_CLOCK,
|
||||||
|
.sdaGpio = I2C_MAIN_BUS_SDA_GPIO,
|
||||||
|
.sdaPort = I2C_MAIN_BUS_SDA_PORT,
|
||||||
|
.sdaPin = I2C_MAIN_BUS_SDA_PIN,
|
||||||
|
|
||||||
|
.sclClock = I2C_MAIN_BUS_SCL_CLOCK,
|
||||||
|
.sclGpio = I2C_MAIN_BUS_SCL_GPIO,
|
||||||
|
.sclPort = I2C_MAIN_BUS_SCL_PORT,
|
||||||
|
.sclPin = I2C_MAIN_BUS_SCL_PIN,
|
||||||
|
};
|
||||||
|
|
||||||
|
static i2c_bus_t i2cEepromBus = {
|
||||||
|
.baseAddr = I2C_EEPROM_BUS_BASEADDR,
|
||||||
|
.clockSrc = I2C_EEPROM_BUS_CLK_SRC,
|
||||||
|
.mux = I2C_EEPROM_BUS_MUX,
|
||||||
|
|
||||||
|
.sdaClock = I2C_EEPROM_BUS_SDA_CLOCK,
|
||||||
|
.sdaGpio = I2C_EEPROM_BUS_SDA_GPIO,
|
||||||
|
.sdaPort = I2C_EEPROM_BUS_SDA_PORT,
|
||||||
|
.sdaPin = I2C_EEPROM_BUS_SDA_PIN,
|
||||||
|
|
||||||
|
.sclClock = I2C_EEPROM_BUS_SCL_CLOCK,
|
||||||
|
.sclGpio = I2C_EEPROM_BUS_SCL_GPIO,
|
||||||
|
.sclPort = I2C_EEPROM_BUS_SCL_PORT,
|
||||||
|
.sclPin = I2C_EEPROM_BUS_SCL_PIN,
|
||||||
|
};
|
||||||
|
|
||||||
|
static void initBusPalState(void) {
|
||||||
|
IsBusPalOn = Wormhole.magicNumber == WORMHOLE_MAGIC_NUMBER && Wormhole.enumerationMode == EnumerationMode_BusPal;
|
||||||
|
if (IsBusPalOn) {
|
||||||
|
Wormhole.magicNumber = 0;
|
||||||
|
I2cMainBusRequestedBaudRateBps = I2C_MAIN_BUS_BUSPAL_BAUD_RATE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void delay(void)
|
static void initInterruptPriorities(void)
|
||||||
|
{
|
||||||
|
NVIC_SetPriority(PIT_I2C_WATCHDOG_IRQ_ID, 1);
|
||||||
|
NVIC_SetPriority(I2C_EEPROM_BUS_IRQ_ID, 0);
|
||||||
|
NVIC_SetPriority(PIT_TIMER_IRQ_ID, 3);
|
||||||
|
NVIC_SetPriority(I2C_MAIN_BUS_IRQ_ID, 4);
|
||||||
|
NVIC_SetPriority(USB_IRQ_ID, 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void delay(void)
|
||||||
{
|
{
|
||||||
for (volatile uint32_t i=0; i<62; i++);
|
for (volatile uint32_t i=0; i<62; i++);
|
||||||
}
|
}
|
||||||
|
|
||||||
void recoverI2c(void)
|
static void recoverI2cBus(i2c_bus_t *i2cBus)
|
||||||
{
|
{
|
||||||
PORT_SetPinMux(I2C_MAIN_BUS_SDA_PORT, I2C_MAIN_BUS_SDA_PIN, kPORT_MuxAsGpio);
|
PORT_SetPinMux(i2cBus->sdaPort, i2cBus->sdaPin, kPORT_MuxAsGpio);
|
||||||
PORT_SetPinMux(I2C_MAIN_BUS_SCL_PORT, I2C_MAIN_BUS_SCL_PIN, kPORT_MuxAsGpio);
|
PORT_SetPinMux(i2cBus->sclPort, i2cBus->sclPin, kPORT_MuxAsGpio);
|
||||||
GPIO_PinInit(I2C_MAIN_BUS_SCL_GPIO, I2C_MAIN_BUS_SCL_PIN, &(gpio_pin_config_t){kGPIO_DigitalOutput, 1});
|
GPIO_PinInit(i2cBus->sclGpio, i2cBus->sclPin, &(gpio_pin_config_t){kGPIO_DigitalOutput, 1});
|
||||||
|
|
||||||
bool isOn = true;
|
bool isOn = true;
|
||||||
for (int i=0; i<20; i++) {
|
for (int i=0; i<20; i++) {
|
||||||
GPIO_PinInit(I2C_MAIN_BUS_SDA_GPIO, I2C_MAIN_BUS_SDA_PIN, &(gpio_pin_config_t){kGPIO_DigitalInput});
|
GPIO_PinInit(i2cBus->sdaGpio, i2cBus->sdaPin, &(gpio_pin_config_t){kGPIO_DigitalInput});
|
||||||
bool isSdaHigh = GPIO_ReadPinInput(I2C_MAIN_BUS_SDA_GPIO, I2C_MAIN_BUS_SDA_PIN);
|
bool isSdaHigh = GPIO_ReadPinInput(i2cBus->sdaGpio, i2cBus->sdaPin);
|
||||||
GPIO_PinInit(I2C_MAIN_BUS_SDA_GPIO, I2C_MAIN_BUS_SDA_PIN, &(gpio_pin_config_t){kGPIO_DigitalOutput, 1});
|
GPIO_PinInit(i2cBus->sdaGpio, i2cBus->sdaPin, &(gpio_pin_config_t){kGPIO_DigitalOutput, 1});
|
||||||
|
|
||||||
if (isSdaHigh) {
|
if (isSdaHigh) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
GPIO_WritePinOutput(I2C_MAIN_BUS_SCL_GPIO, I2C_MAIN_BUS_SCL_PIN, isOn);
|
GPIO_WritePinOutput(i2cBus->sclGpio, i2cBus->sclPin, isOn);
|
||||||
delay();
|
delay();
|
||||||
isOn = !isOn;
|
isOn = !isOn;
|
||||||
}
|
}
|
||||||
|
|
||||||
GPIO_WritePinOutput(I2C_MAIN_BUS_SDA_GPIO, I2C_MAIN_BUS_SDA_PIN, 0);
|
GPIO_WritePinOutput(i2cBus->sdaGpio, i2cBus->sdaPin, 0);
|
||||||
delay();
|
delay();
|
||||||
GPIO_WritePinOutput(I2C_MAIN_BUS_SCL_GPIO, I2C_MAIN_BUS_SCL_PIN, 1);
|
GPIO_WritePinOutput(i2cBus->sclGpio, i2cBus->sclPin, 1);
|
||||||
delay();
|
delay();
|
||||||
GPIO_WritePinOutput(I2C_MAIN_BUS_SDA_GPIO, I2C_MAIN_BUS_SDA_PIN, 1);
|
GPIO_WritePinOutput(i2cBus->sdaGpio, i2cBus->sdaPin, 1);
|
||||||
delay();
|
delay();
|
||||||
}
|
}
|
||||||
|
|
||||||
void InitI2cMainBus(void)
|
static void initI2cBus(i2c_bus_t *i2cBus)
|
||||||
{
|
{
|
||||||
CLOCK_EnableClock(I2C_MAIN_BUS_SDA_CLOCK);
|
CLOCK_EnableClock(i2cBus->sdaClock);
|
||||||
CLOCK_EnableClock(I2C_MAIN_BUS_SCL_CLOCK);
|
CLOCK_EnableClock(i2cBus->sclClock);
|
||||||
|
|
||||||
recoverI2c();
|
recoverI2cBus(i2cBus);
|
||||||
|
|
||||||
port_pin_config_t pinConfig = {
|
port_pin_config_t pinConfig = {
|
||||||
.pullSelect = kPORT_PullUp,
|
.pullSelect = kPORT_PullUp,
|
||||||
.openDrainEnable = kPORT_OpenDrainEnable,
|
.openDrainEnable = kPORT_OpenDrainEnable,
|
||||||
.mux = I2C_MAIN_BUS_MUX,
|
.mux = i2cBus->mux,
|
||||||
};
|
};
|
||||||
|
|
||||||
PORT_SetPinConfig(I2C_MAIN_BUS_SDA_PORT, I2C_MAIN_BUS_SDA_PIN, &pinConfig);
|
PORT_SetPinConfig(i2cBus->sdaPort, i2cBus->sdaPin, &pinConfig);
|
||||||
PORT_SetPinConfig(I2C_MAIN_BUS_SCL_PORT, I2C_MAIN_BUS_SCL_PIN, &pinConfig);
|
PORT_SetPinConfig(i2cBus->sclPort, i2cBus->sclPin, &pinConfig);
|
||||||
|
|
||||||
i2c_master_config_t masterConfig;
|
i2c_master_config_t masterConfig;
|
||||||
I2C_MasterGetDefaultConfig(&masterConfig);
|
I2C_MasterGetDefaultConfig(&masterConfig);
|
||||||
masterConfig.baudRate_Bps = I2C_MAIN_BUS_BAUD_RATE;
|
masterConfig.baudRate_Bps = i2cBus == &i2cMainBus ? I2cMainBusRequestedBaudRateBps : I2C_EEPROM_BUS_BAUD_RATE;
|
||||||
uint32_t sourceClock = CLOCK_GetFreq(I2C_MAIN_BUS_CLK_SRC);
|
uint32_t sourceClock = CLOCK_GetFreq(i2cBus->clockSrc);
|
||||||
I2C_MasterInit(I2C_MAIN_BUS_BASEADDR, &masterConfig, sourceClock);
|
I2C_MasterInit(i2cBus->baseAddr, &masterConfig, sourceClock);
|
||||||
|
|
||||||
|
if (i2cBus == &i2cMainBus) {
|
||||||
|
I2cMainBusActualBaudRateBps = I2C_ActualBaudRate;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void initI2cEepromBus(void)
|
void ReinitI2cMainBus(void)
|
||||||
{
|
{
|
||||||
port_pin_config_t pinConfig = {
|
I2C_MasterDeinit(I2C_MAIN_BUS_BASEADDR);
|
||||||
.pullSelect = kPORT_PullUp,
|
initI2cBus(&i2cMainBus);
|
||||||
.openDrainEnable = kPORT_OpenDrainEnable,
|
InitSlaveScheduler();
|
||||||
.mux = I2C_EEPROM_BUS_MUX,
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
CLOCK_EnableClock(I2C_EEPROM_BUS_SDA_CLOCK);
|
|
||||||
CLOCK_EnableClock(I2C_EEPROM_BUS_SCL_CLOCK);
|
|
||||||
|
|
||||||
PORT_SetPinConfig(I2C_EEPROM_BUS_SDA_PORT, I2C_EEPROM_BUS_SDA_PIN, &pinConfig);
|
|
||||||
PORT_SetPinConfig(I2C_EEPROM_BUS_SCL_PORT, I2C_EEPROM_BUS_SCL_PIN, &pinConfig);
|
|
||||||
|
|
||||||
i2c_master_config_t masterConfig;
|
|
||||||
I2C_MasterGetDefaultConfig(&masterConfig);
|
|
||||||
masterConfig.baudRate_Bps = I2C_EEPROM_BUS_BAUD_RATE;
|
|
||||||
uint32_t sourceClock = CLOCK_GetFreq(I2C_EEPROM_BUS_CLK_SRC);
|
|
||||||
I2C_MasterInit(I2C_EEPROM_BUS_BASEADDR, &masterConfig, sourceClock);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InitI2c(void)
|
static void initI2c(void)
|
||||||
{
|
{
|
||||||
InitI2cMainBus();
|
initI2cBus(&i2cMainBus);
|
||||||
initI2cEepromBus();
|
initI2cBus(&i2cEepromBus);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InitPeripherals(void)
|
void InitPeripherals(void)
|
||||||
{
|
{
|
||||||
InitInterruptPriorities();
|
initBusPalState();
|
||||||
|
initInterruptPriorities();
|
||||||
Timer_Init();
|
Timer_Init();
|
||||||
InitLedDriver();
|
InitLedDriver();
|
||||||
InitResetButton();
|
InitResetButton();
|
||||||
InitMergeSensor();
|
InitMergeSensor();
|
||||||
ADC_Init();
|
ADC_Init();
|
||||||
InitI2c();
|
initI2c();
|
||||||
InitTestLed();
|
TestLed_Init();
|
||||||
LedPwm_Init();
|
LedPwm_Init();
|
||||||
#ifdef I2C_WATCHDOG
|
|
||||||
InitI2cWatchdog();
|
InitI2cWatchdog();
|
||||||
#endif
|
|
||||||
InitKeyDebouncer();
|
|
||||||
EEPROM_Init();
|
EEPROM_Init();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,37 @@
|
|||||||
#ifndef __INIT_PERIPHERALS_H__
|
#ifndef __INIT_PERIPHERALS_H__
|
||||||
#define __INIT_PERIPHERALS_H__
|
#define __INIT_PERIPHERALS_H__
|
||||||
|
|
||||||
// Includes
|
// Includes:
|
||||||
|
|
||||||
#include "fsl_common.h"
|
#include "fsl_common.h"
|
||||||
|
|
||||||
|
// Typedefs:
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
clock_name_t clockSrc;
|
||||||
|
I2C_Type *baseAddr;
|
||||||
|
uint16_t mux;
|
||||||
|
|
||||||
|
clock_ip_name_t sdaClock;
|
||||||
|
GPIO_Type *sdaGpio;
|
||||||
|
PORT_Type *sdaPort;
|
||||||
|
uint32_t sdaPin;
|
||||||
|
|
||||||
|
clock_ip_name_t sclClock;
|
||||||
|
GPIO_Type *sclGpio;
|
||||||
|
PORT_Type *sclPort;
|
||||||
|
uint32_t sclPin;
|
||||||
|
} i2c_bus_t;
|
||||||
|
|
||||||
|
// Variables:
|
||||||
|
|
||||||
|
extern bool IsBusPalOn;
|
||||||
|
extern volatile uint32_t I2cMainBusRequestedBaudRateBps;
|
||||||
|
extern volatile uint32_t I2cMainBusActualBaudRateBps;
|
||||||
|
|
||||||
// Functions:
|
// Functions:
|
||||||
|
|
||||||
void InitPeripherals(void);
|
void InitPeripherals(void);
|
||||||
void InitI2cMainBus(void);
|
void ReinitI2cMainBus(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -19,7 +19,6 @@
|
|||||||
KeyActionType_SwitchLayer,
|
KeyActionType_SwitchLayer,
|
||||||
KeyActionType_SwitchKeymap,
|
KeyActionType_SwitchKeymap,
|
||||||
KeyActionType_PlayMacro,
|
KeyActionType_PlayMacro,
|
||||||
KeyActionType_Test,
|
|
||||||
} key_action_type_t;
|
} key_action_type_t;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
@@ -29,9 +28,9 @@
|
|||||||
} keystroke_type_t;
|
} keystroke_type_t;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
SwitchLayerMode_Hold,
|
|
||||||
SwitchLayerMode_HoldAndDoubleTapToggle,
|
SwitchLayerMode_HoldAndDoubleTapToggle,
|
||||||
SwitchLayerMode_Toggle,
|
SwitchLayerMode_Toggle,
|
||||||
|
SwitchLayerMode_Hold,
|
||||||
} switch_layer_mode_t;
|
} switch_layer_mode_t;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
#include "key_debouncer.h"
|
|
||||||
#include "fsl_pit.h"
|
|
||||||
#include "slot.h"
|
|
||||||
#include "module.h"
|
|
||||||
#include "key_states.h"
|
|
||||||
#include "peripherals/test_led.h"
|
|
||||||
|
|
||||||
void PIT_KEY_DEBOUNCER_HANDLER(void)
|
|
||||||
{
|
|
||||||
TEST_LED_TOGGLE();
|
|
||||||
for (uint8_t slotId=0; slotId<SLOT_COUNT; slotId++) {
|
|
||||||
for (uint8_t keyId=0; keyId<MAX_KEY_COUNT_PER_MODULE; keyId++) {
|
|
||||||
uint8_t *debounceCounter = &KeyStates[slotId][keyId].debounceCounter;
|
|
||||||
if (*debounceCounter < 0xff) {
|
|
||||||
(*debounceCounter)++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
PIT_ClearStatusFlags(PIT, PIT_KEY_DEBOUNCER_CHANNEL, PIT_TFLG_TIF_MASK);
|
|
||||||
}
|
|
||||||
|
|
||||||
void InitKeyDebouncer(void)
|
|
||||||
{
|
|
||||||
pit_config_t pitConfig;
|
|
||||||
PIT_GetDefaultConfig(&pitConfig);
|
|
||||||
PIT_Init(PIT, &pitConfig);
|
|
||||||
PIT_SetTimerPeriod(PIT, PIT_KEY_DEBOUNCER_CHANNEL, MSEC_TO_COUNT(KEY_DEBOUNCER_INTERVAL_MSEC, PIT_SOURCE_CLOCK));
|
|
||||||
PIT_EnableInterrupts(PIT, PIT_KEY_DEBOUNCER_CHANNEL, kPIT_TimerInterruptEnable);
|
|
||||||
EnableIRQ(PIT_KEY_DEBOUNCER_IRQ_ID);
|
|
||||||
PIT_StartTimer(PIT, PIT_KEY_DEBOUNCER_CHANNEL);
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
#ifndef __KEY_DEBOUNCER_H__
|
|
||||||
#define __KEY_DEBOUNCER_H__
|
|
||||||
|
|
||||||
// Includes:
|
|
||||||
|
|
||||||
#include "peripherals/pit.h"
|
|
||||||
#include "fsl_common.h"
|
|
||||||
|
|
||||||
// Macros:
|
|
||||||
|
|
||||||
#define KEY_DEBOUNCER_INTERVAL_MSEC 1
|
|
||||||
#define KEY_DEBOUNCER_TIMEOUT_MSEC 10
|
|
||||||
|
|
||||||
// Functions:
|
|
||||||
|
|
||||||
void InitKeyDebouncer(void);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
#include "fsl_pit.h"
|
|
||||||
#include "key_scanner.h"
|
|
||||||
|
|
||||||
void PIT_KEY_SCANNER_HANDLER(void)
|
|
||||||
{
|
|
||||||
KeyMatrix_ScanRow(&RightKeyMatrix);
|
|
||||||
PIT_ClearStatusFlags(PIT, PIT_KEY_SCANNER_CHANNEL, PIT_TFLG_TIF_MASK);
|
|
||||||
}
|
|
||||||
|
|
||||||
void InitKeyScanner(void)
|
|
||||||
{
|
|
||||||
pit_config_t pitConfig;
|
|
||||||
PIT_GetDefaultConfig(&pitConfig);
|
|
||||||
PIT_Init(PIT, &pitConfig);
|
|
||||||
PIT_SetTimerPeriod(PIT, PIT_KEY_SCANNER_CHANNEL, USEC_TO_COUNT(KEY_SCANNER_INTERVAL_USEC, PIT_SOURCE_CLOCK));
|
|
||||||
PIT_EnableInterrupts(PIT, PIT_KEY_SCANNER_CHANNEL, kPIT_TimerInterruptEnable);
|
|
||||||
EnableIRQ(PIT_KEY_SCANNER_IRQ_ID);
|
|
||||||
PIT_StartTimer(PIT, PIT_KEY_SCANNER_CHANNEL);
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
#ifndef __KEY_SCANNER_H__
|
|
||||||
#define __KEY_SCANNER_H__
|
|
||||||
|
|
||||||
// Includes:
|
|
||||||
|
|
||||||
#include "peripherals/pit.h"
|
|
||||||
#include "right_key_matrix.h"
|
|
||||||
|
|
||||||
// Macros:
|
|
||||||
|
|
||||||
#define KEY_SCANNER_INTERVAL_USEC (1000 / RIGHT_KEY_MATRIX_ROWS_NUM)
|
|
||||||
|
|
||||||
// Functions:
|
|
||||||
|
|
||||||
void InitKeyScanner(void);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -10,10 +10,10 @@
|
|||||||
// Typedefs:
|
// Typedefs:
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
bool previous;
|
uint8_t timestamp;
|
||||||
bool current;
|
bool previous : 1;
|
||||||
bool suppressed;
|
bool current : 1;
|
||||||
uint8_t debounceCounter;
|
bool debouncing : 1;
|
||||||
} key_state_t;
|
} key_state_t;
|
||||||
|
|
||||||
// Variables:
|
// Variables:
|
||||||
|
|||||||
@@ -6,17 +6,36 @@
|
|||||||
#include "config_parser/config_globals.h"
|
#include "config_parser/config_globals.h"
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
|
|
||||||
keymap_reference_t AllKeymaps[MAX_KEYMAP_NUM] = { { "FTY", 0, 3 } };
|
keymap_reference_t AllKeymaps[MAX_KEYMAP_NUM] = {
|
||||||
|
{
|
||||||
|
.abbreviation = "FTY",
|
||||||
|
.offset = 0,
|
||||||
|
.abbreviationLen = 3
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
uint8_t AllKeymapsCount;
|
uint8_t AllKeymapsCount;
|
||||||
uint8_t DefaultKeymapIndex;
|
uint8_t DefaultKeymapIndex;
|
||||||
uint8_t CurrentKeymapIndex = 0;
|
uint8_t CurrentKeymapIndex = 0;
|
||||||
|
|
||||||
void SwitchKeymap(uint8_t index)
|
void SwitchKeymapById(uint8_t index)
|
||||||
{
|
{
|
||||||
CurrentKeymapIndex = index;
|
CurrentKeymapIndex = index;
|
||||||
ValidatedUserConfigBuffer.offset = AllKeymaps[index].offset;
|
ValidatedUserConfigBuffer.offset = AllKeymaps[index].offset;
|
||||||
ParseKeymap(&ValidatedUserConfigBuffer, index, AllKeymapsCount, AllMacrosCount);
|
ParseKeymap(&ValidatedUserConfigBuffer, index, AllKeymapsCount, AllMacrosCount);
|
||||||
LedDisplay_SetCurrentKeymapText();
|
LedDisplay_UpdateText();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool SwitchKeymapByAbbreviation(uint8_t length, char *abbrev)
|
||||||
|
{
|
||||||
|
for (uint8_t i=0; i<AllKeymapsCount; i++) {
|
||||||
|
keymap_reference_t *keymap = AllKeymaps + i;
|
||||||
|
if (keymap->abbreviationLen == length && memcmp(keymap->abbreviation, abbrev, length) == 0) {
|
||||||
|
SwitchKeymapById(i);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// The factory keymap is initialized before it gets overwritten by the default keymap of the EEPROM.
|
// The factory keymap is initialized before it gets overwritten by the default keymap of the EEPROM.
|
||||||
@@ -109,6 +128,102 @@ key_action_t CurrentKeymap[LAYER_COUNT][SLOT_COUNT][MAX_KEY_COUNT_PER_MODULE] =
|
|||||||
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_V }},
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_V }},
|
||||||
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_B }},
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_B }},
|
||||||
|
|
||||||
|
// Row 5
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_LEFT_CONTROL }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_LEFT_GUI }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_LEFT_ALT }},
|
||||||
|
{ .type = KeyActionType_SwitchLayer, .switchLayer = { .layer = LayerId_Fn }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_SPACE }},
|
||||||
|
{ .type = KeyActionType_SwitchLayer, .switchLayer = { .layer = LayerId_Mod }},
|
||||||
|
{ .type = KeyActionType_None },
|
||||||
|
},
|
||||||
|
|
||||||
|
// Left module
|
||||||
|
{
|
||||||
|
// Row 1
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_GRAVE_ACCENT_AND_TILDE }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_1_AND_EXCLAMATION }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_2_AND_AT }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_3_AND_HASHMARK }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_4_AND_DOLLAR }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_5_AND_PERCENTAGE }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_6_AND_CARET }},
|
||||||
|
|
||||||
|
// Row 2
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_TAB }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_Q }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_W }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_E }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_R }},
|
||||||
|
{ .type = KeyActionType_None },
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_T }},
|
||||||
|
|
||||||
|
// Row 3
|
||||||
|
{ .type = KeyActionType_SwitchLayer, .switchLayer = { .layer = LayerId_Mouse }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_A }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_S }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_D }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_F }},
|
||||||
|
{ .type = KeyActionType_None },
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_G }},
|
||||||
|
|
||||||
|
// Row 4
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_LEFT_SHIFT }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_NON_US_BACKSLASH_AND_PIPE }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_Z }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_X }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_C }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_V }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_B }},
|
||||||
|
|
||||||
|
// Row 5
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_LEFT_CONTROL }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_LEFT_GUI }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_LEFT_ALT }},
|
||||||
|
{ .type = KeyActionType_SwitchLayer, .switchLayer = { .layer = LayerId_Fn }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_SPACE }},
|
||||||
|
{ .type = KeyActionType_SwitchLayer, .switchLayer = { .layer = LayerId_Mod }},
|
||||||
|
{ .type = KeyActionType_None },
|
||||||
|
},
|
||||||
|
|
||||||
|
// Right module
|
||||||
|
{
|
||||||
|
// Row 1
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_GRAVE_ACCENT_AND_TILDE }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_1_AND_EXCLAMATION }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_2_AND_AT }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_3_AND_HASHMARK }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_4_AND_DOLLAR }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_5_AND_PERCENTAGE }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_6_AND_CARET }},
|
||||||
|
|
||||||
|
// Row 2
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_TAB }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_Q }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_W }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_E }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_R }},
|
||||||
|
{ .type = KeyActionType_None },
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_T }},
|
||||||
|
|
||||||
|
// Row 3
|
||||||
|
{ .type = KeyActionType_SwitchLayer, .switchLayer = { .layer = LayerId_Mouse }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_A }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_S }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_D }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_F }},
|
||||||
|
{ .type = KeyActionType_None },
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_G }},
|
||||||
|
|
||||||
|
// Row 4
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_LEFT_SHIFT }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_NON_US_BACKSLASH_AND_PIPE }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_Z }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_X }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_C }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_V }},
|
||||||
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_B }},
|
||||||
|
|
||||||
// Row 5
|
// Row 5
|
||||||
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_LEFT_CONTROL }},
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_LEFT_CONTROL }},
|
||||||
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_LEFT_GUI }},
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_LEFT_GUI }},
|
||||||
@@ -157,7 +272,7 @@ key_action_t CurrentKeymap[LAYER_COUNT][SLOT_COUNT][MAX_KEY_COUNT_PER_MODULE] =
|
|||||||
{ .type = KeyActionType_None },
|
{ .type = KeyActionType_None },
|
||||||
{ .type = KeyActionType_None },
|
{ .type = KeyActionType_None },
|
||||||
{ .type = KeyActionType_None },
|
{ .type = KeyActionType_None },
|
||||||
{ .type = HID_KEYBOARD_SC_MENU },
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_APPLICATION }},
|
||||||
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_RIGHT_SHIFT }},
|
{ .type = KeyActionType_Keystroke, .keystroke = { .scancode = HID_KEYBOARD_SC_RIGHT_SHIFT }},
|
||||||
{ .type = KeyActionType_None },
|
{ .type = KeyActionType_None },
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
// Functions:
|
// Functions:
|
||||||
|
|
||||||
void SwitchKeymap(uint8_t index);
|
void SwitchKeymapById(uint8_t index);
|
||||||
|
bool SwitchKeymapByAbbreviation(uint8_t length, char *abbrev);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -5,12 +5,12 @@
|
|||||||
#include "keymap.h"
|
#include "keymap.h"
|
||||||
|
|
||||||
static bool heldLayers[LAYER_COUNT];
|
static bool heldLayers[LAYER_COUNT];
|
||||||
static switch_layer_mode_t pressedLayers[LAYER_COUNT];
|
static bool toggledLayers[LAYER_COUNT];
|
||||||
|
|
||||||
void updateLayerStates(void)
|
void updateLayerStates(void)
|
||||||
{
|
{
|
||||||
memset(heldLayers, false, LAYER_COUNT);
|
memset(heldLayers, false, LAYER_COUNT);
|
||||||
memset(pressedLayers, false, LAYER_COUNT);
|
memset(toggledLayers, false, LAYER_COUNT);
|
||||||
|
|
||||||
for (uint8_t slotId=0; slotId<SLOT_COUNT; slotId++) {
|
for (uint8_t slotId=0; slotId<SLOT_COUNT; slotId++) {
|
||||||
for (uint8_t keyId=0; keyId<MAX_KEY_COUNT_PER_MODULE; keyId++) {
|
for (uint8_t keyId=0; keyId<MAX_KEY_COUNT_PER_MODULE; keyId++) {
|
||||||
@@ -20,9 +20,8 @@ void updateLayerStates(void)
|
|||||||
if (action.type == KeyActionType_SwitchLayer) {
|
if (action.type == KeyActionType_SwitchLayer) {
|
||||||
if (action.switchLayer.mode != SwitchLayerMode_Toggle) {
|
if (action.switchLayer.mode != SwitchLayerMode_Toggle) {
|
||||||
heldLayers[action.switchLayer.layer] = true;
|
heldLayers[action.switchLayer.layer] = true;
|
||||||
}
|
} else if (!keyState->previous) {
|
||||||
if (action.switchLayer.mode != SwitchLayerMode_Hold && !keyState->previous && keyState->current) {
|
toggledLayers[action.switchLayer.layer] = true;
|
||||||
pressedLayers[action.switchLayer.layer] = action.switchLayer.mode;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -40,11 +39,11 @@ layer_id_t GetActiveLayer()
|
|||||||
// Handle toggled layers
|
// Handle toggled layers
|
||||||
|
|
||||||
for (layer_id_t layerId=LayerId_Mod; layerId<=LayerId_Mouse; layerId++) {
|
for (layer_id_t layerId=LayerId_Mod; layerId<=LayerId_Mouse; layerId++) {
|
||||||
if (pressedLayers[layerId]) {
|
if (toggledLayers[layerId]) {
|
||||||
if (ToggledLayer == layerId) {
|
if (ToggledLayer == layerId) {
|
||||||
ToggledLayer = LayerId_Base;
|
ToggledLayer = LayerId_Base;
|
||||||
break;
|
break;
|
||||||
} else if (ToggledLayer == LayerId_Base && pressedLayers[layerId] == SwitchLayerMode_Toggle) {
|
} else if (ToggledLayer == LayerId_Base && toggledLayers[layerId] == SwitchLayerMode_Toggle) {
|
||||||
ToggledLayer = layerId;
|
ToggledLayer = layerId;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -71,3 +70,14 @@ layer_id_t GetActiveLayer()
|
|||||||
|
|
||||||
return heldLayer;
|
return heldLayer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool IsLayerHeld(void)
|
||||||
|
{
|
||||||
|
for (layer_id_t layerId = LayerId_Mod; layerId <= LayerId_Mouse; layerId++) {
|
||||||
|
if (heldLayers[layerId]) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
|
|
||||||
// Functions:
|
// Functions:
|
||||||
|
|
||||||
layer_id_t GetActiveLayer();
|
layer_id_t GetActiveLayer(void);
|
||||||
|
bool IsLayerHeld(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -3,7 +3,12 @@
|
|||||||
#include "layer.h"
|
#include "layer.h"
|
||||||
#include "keymap.h"
|
#include "keymap.h"
|
||||||
|
|
||||||
static const uint16_t capitalLetterToSegmentSet[] = {
|
uint8_t IconsAndLayerTextsBrightness = 0xff;
|
||||||
|
uint8_t AlphanumericSegmentsBrightness = 0xff;
|
||||||
|
bool ledIconStates[LedDisplayIcon_Last];
|
||||||
|
char LedDisplay_DebugString[] = " ";
|
||||||
|
|
||||||
|
static const uint16_t capitalLetterToSegmentMap[] = {
|
||||||
0b0000000011110111,
|
0b0000000011110111,
|
||||||
0b0001001010001111,
|
0b0001001010001111,
|
||||||
0b0000000000111001,
|
0b0000000000111001,
|
||||||
@@ -32,7 +37,7 @@ static const uint16_t capitalLetterToSegmentSet[] = {
|
|||||||
0b0000110000001001,
|
0b0000110000001001,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const uint16_t digitToSegmentSet[] = {
|
static const uint16_t digitToSegmentMap[] = {
|
||||||
0b0000110000111111,
|
0b0000110000111111,
|
||||||
0b0000010000000110,
|
0b0000010000000110,
|
||||||
0b0000100010001011,
|
0b0000100010001011,
|
||||||
@@ -45,13 +50,13 @@ static const uint16_t digitToSegmentSet[] = {
|
|||||||
0b0000000011101111,
|
0b0000000011101111,
|
||||||
};
|
};
|
||||||
|
|
||||||
static uint16_t characterToSegmentSet(char character)
|
static uint16_t characterToSegmentMap(char character)
|
||||||
{
|
{
|
||||||
switch (character) {
|
switch (character) {
|
||||||
case 'A' ... 'Z':
|
case 'A' ... 'Z':
|
||||||
return capitalLetterToSegmentSet[character - 'A'];
|
return capitalLetterToSegmentMap[character - 'A'];
|
||||||
case '0' ... '9':
|
case '0' ... '9':
|
||||||
return digitToSegmentSet[character - '0'];
|
return digitToSegmentMap[character - '0'];
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -62,43 +67,66 @@ void LedDisplay_SetText(uint8_t length, const char* text)
|
|||||||
|
|
||||||
switch (length) {
|
switch (length) {
|
||||||
case 3:
|
case 3:
|
||||||
allSegmentSets = (uint64_t)characterToSegmentSet(text[2]) << 28;
|
allSegmentSets = (uint64_t)characterToSegmentMap(text[2]) << 28;
|
||||||
case 2:
|
case 2:
|
||||||
allSegmentSets |= characterToSegmentSet(text[1]) << 14;
|
allSegmentSets |= characterToSegmentMap(text[1]) << 14;
|
||||||
case 1:
|
case 1:
|
||||||
allSegmentSets |= characterToSegmentSet(text[0]);
|
allSegmentSets |= characterToSegmentMap(text[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
LedDriverValues[LedDriverId_Left][11] = allSegmentSets & 0b00000001 ? LED_BRIGHTNESS_LEVEL : 0;
|
LedDriverValues[LedDriverId_Left][11] = allSegmentSets & 0b00000001 ? AlphanumericSegmentsBrightness : 0;
|
||||||
LedDriverValues[LedDriverId_Left][12] = allSegmentSets & 0b00000010 ? LED_BRIGHTNESS_LEVEL : 0;
|
LedDriverValues[LedDriverId_Left][12] = allSegmentSets & 0b00000010 ? AlphanumericSegmentsBrightness : 0;
|
||||||
allSegmentSets >>= 2;
|
allSegmentSets >>= 2;
|
||||||
|
|
||||||
for (uint8_t i = 24; i <= 136; i += 16) {
|
for (uint8_t i = 24; i <= 136; i += 16) {
|
||||||
for (uint8_t j = 0; j < 5; j++) {
|
for (uint8_t j = 0; j < 5; j++) {
|
||||||
LedDriverValues[LedDriverId_Left][i + j] = allSegmentSets & 1 << j ? LED_BRIGHTNESS_LEVEL : 0;
|
LedDriverValues[LedDriverId_Left][i + j] = allSegmentSets & 1 << j ? AlphanumericSegmentsBrightness : 0;
|
||||||
}
|
}
|
||||||
allSegmentSets >>= 5;
|
allSegmentSets >>= 5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LedDisplay_SetCurrentKeymapText(void)
|
void LedDisplay_SetLayer(layer_id_t layerId)
|
||||||
{
|
|
||||||
keymap_reference_t *currentKeymap = AllKeymaps + CurrentKeymapIndex;
|
|
||||||
LedDisplay_SetText(currentKeymap->abbreviationLen, currentKeymap->abbreviation);
|
|
||||||
}
|
|
||||||
|
|
||||||
void LedDisplay_SetLayer(uint8_t layerId)
|
|
||||||
{
|
{
|
||||||
for (uint8_t i = 13; i <= 45; i += 16) {
|
for (uint8_t i = 13; i <= 45; i += 16) {
|
||||||
LedDriverValues[LedDriverId_Left][i] = 0;
|
LedDriverValues[LedDriverId_Left][i] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (layerId >= LayerId_Mod && layerId <= LayerId_Mouse) {
|
if (layerId >= LayerId_Mod && layerId <= LayerId_Mouse) {
|
||||||
LedDriverValues[LedDriverId_Left][16 * layerId - 3] = LED_BRIGHTNESS_LEVEL;
|
LedDriverValues[LedDriverId_Left][16 * layerId - 3] = IconsAndLayerTextsBrightness;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool LedDisplay_GetIcon(led_display_icon_t icon)
|
||||||
|
{
|
||||||
|
return LedDriverValues[LedDriverId_Left][8 + icon];
|
||||||
|
}
|
||||||
|
|
||||||
void LedDisplay_SetIcon(led_display_icon_t icon, bool isEnabled)
|
void LedDisplay_SetIcon(led_display_icon_t icon, bool isEnabled)
|
||||||
{
|
{
|
||||||
LedDriverValues[LedDriverId_Left][8 + icon] = isEnabled ? LED_BRIGHTNESS_LEVEL : 0;
|
ledIconStates[icon] = isEnabled;
|
||||||
|
LedDriverValues[LedDriverId_Left][icon + 8] = isEnabled ? IconsAndLayerTextsBrightness : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void LedDisplay_UpdateIcons(void)
|
||||||
|
{
|
||||||
|
for (led_display_icon_t i=0; i<=LedDisplayIcon_Last; i++) {
|
||||||
|
LedDisplay_SetIcon(i, ledIconStates[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void LedDisplay_UpdateText(void)
|
||||||
|
{
|
||||||
|
#if LED_DISPLAY_DEBUG_MODE == 0
|
||||||
|
keymap_reference_t *currentKeymap = AllKeymaps + CurrentKeymapIndex;
|
||||||
|
LedDisplay_SetText(currentKeymap->abbreviationLen, currentKeymap->abbreviation);
|
||||||
|
#else
|
||||||
|
LedDisplay_SetText(strlen(LedDisplay_DebugString), LedDisplay_DebugString);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void LedDisplay_UpdateAll(void)
|
||||||
|
{
|
||||||
|
LedDisplay_UpdateIcons();
|
||||||
|
LedDisplay_UpdateText();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,11 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
#include "layer.h"
|
||||||
|
|
||||||
|
// Macros:
|
||||||
|
|
||||||
|
#define LED_DISPLAY_DEBUG_MODE 0
|
||||||
|
|
||||||
// Typedefs:
|
// Typedefs:
|
||||||
|
|
||||||
@@ -12,13 +17,23 @@
|
|||||||
LedDisplayIcon_CapsLock,
|
LedDisplayIcon_CapsLock,
|
||||||
LedDisplayIcon_Agent,
|
LedDisplayIcon_Agent,
|
||||||
LedDisplayIcon_Adaptive,
|
LedDisplayIcon_Adaptive,
|
||||||
|
LedDisplayIcon_Last = LedDisplayIcon_Adaptive,
|
||||||
} led_display_icon_t;
|
} led_display_icon_t;
|
||||||
|
|
||||||
|
// Variables:
|
||||||
|
|
||||||
|
extern uint8_t IconsAndLayerTextsBrightness;
|
||||||
|
extern uint8_t AlphanumericSegmentsBrightness;
|
||||||
|
extern char LedDisplay_DebugString[];
|
||||||
|
|
||||||
// Functions:
|
// Functions:
|
||||||
|
|
||||||
void LedDisplay_SetText(uint8_t length, const char* text);
|
void LedDisplay_SetText(uint8_t length, const char* text);
|
||||||
void LedDisplay_SetCurrentKeymapText(void);
|
void LedDisplay_SetLayer(layer_id_t layerId);
|
||||||
void LedDisplay_SetLayer(uint8_t layerId);
|
bool LedDisplay_GetIcon(led_display_icon_t icon);
|
||||||
void LedDisplay_SetIcon(led_display_icon_t icon, bool isEnabled);
|
void LedDisplay_SetIcon(led_display_icon_t icon, bool isEnabled);
|
||||||
|
void LedDisplay_UpdateIcons(void);
|
||||||
|
void LedDisplay_UpdateText(void);
|
||||||
|
void LedDisplay_UpdateAll(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
277
right/src/link/MK22FN512xxx12_flash.ld
Normal file
277
right/src/link/MK22FN512xxx12_flash.ld
Normal file
@@ -0,0 +1,277 @@
|
|||||||
|
/*
|
||||||
|
** ###################################################################
|
||||||
|
** Processors: MK22FN512CAP12
|
||||||
|
** MK22FN512VDC12
|
||||||
|
** MK22FN512VLH12
|
||||||
|
** MK22FN512VLL12
|
||||||
|
** MK22FN512VMP12
|
||||||
|
**
|
||||||
|
** Compiler: GNU C Compiler
|
||||||
|
** Reference manual: K22P121M120SF7RM, Rev. 1, March 24, 2014
|
||||||
|
** Version: rev. 2.8, 2015-02-19
|
||||||
|
** Build: b151217
|
||||||
|
**
|
||||||
|
** Abstract:
|
||||||
|
** Linker file for the GNU C Compiler
|
||||||
|
**
|
||||||
|
** Copyright (c) 2015 Freescale Semiconductor, Inc.
|
||||||
|
** All rights reserved.
|
||||||
|
**
|
||||||
|
** Redistribution and use in source and binary forms, with or without modification,
|
||||||
|
** are permitted provided that the following conditions are met:
|
||||||
|
**
|
||||||
|
** o Redistributions of source code must retain the above copyright notice, this list
|
||||||
|
** of conditions and the following disclaimer.
|
||||||
|
**
|
||||||
|
** o Redistributions in binary form must reproduce the above copyright notice, this
|
||||||
|
** list of conditions and the following disclaimer in the documentation and/or
|
||||||
|
** other materials provided with the distribution.
|
||||||
|
**
|
||||||
|
** o Neither the name of Freescale Semiconductor, Inc. nor the names of its
|
||||||
|
** contributors may be used to endorse or promote products derived from this
|
||||||
|
** software without specific prior written permission.
|
||||||
|
**
|
||||||
|
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
** ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
**
|
||||||
|
** http: www.freescale.com
|
||||||
|
** mail: support@freescale.com
|
||||||
|
**
|
||||||
|
** ###################################################################
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Entry Point */
|
||||||
|
ENTRY(Reset_Handler)
|
||||||
|
|
||||||
|
HEAP_SIZE = DEFINED(__heap_size__) ? __heap_size__ : 0x2000;
|
||||||
|
STACK_SIZE = DEFINED(__stack_size__) ? __stack_size__ : 0x0400;
|
||||||
|
M_VECTOR_RAM_SIZE = DEFINED(__ram_vector_table__) ? 0x0400 : 0x0;
|
||||||
|
|
||||||
|
/* This should match the value in bootloader_config.h if KBOOT is used */
|
||||||
|
BL_APP_VECTOR_TABLE_ADDRESS = DEFINED(__bl_app_vector_table_address__) ? __bl_app_vector_table_address__ : 0;
|
||||||
|
|
||||||
|
/* Specify the memory areas */
|
||||||
|
MEMORY
|
||||||
|
{
|
||||||
|
m_interrupts (RX) : ORIGIN = 0x0 + BL_APP_VECTOR_TABLE_ADDRESS, LENGTH = 0x00000400
|
||||||
|
m_text (RX) : ORIGIN = 0x00000400 + BL_APP_VECTOR_TABLE_ADDRESS, LENGTH = 512K - 0x400 - BL_APP_VECTOR_TABLE_ADDRESS
|
||||||
|
m_data (RW) : ORIGIN = 0x1FFF0000, LENGTH = 0x00010000
|
||||||
|
m_data_2 (RW) : ORIGIN = 0x20000000, LENGTH = 0x0000FF00
|
||||||
|
m_noinit (RW) : ORIGIN = 0x2000FF00, LENGTH = 0x000000FF
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Define output sections */
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
/* The startup code goes first into internal flash */
|
||||||
|
.interrupts :
|
||||||
|
{
|
||||||
|
__VECTOR_TABLE = .;
|
||||||
|
. = ALIGN(4);
|
||||||
|
KEEP(*(.isr_vector)) /* Startup code */
|
||||||
|
. = ALIGN(4);
|
||||||
|
} > m_interrupts
|
||||||
|
|
||||||
|
/* The program code and other data goes into internal flash */
|
||||||
|
.text :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
*(.text) /* .text sections (code) */
|
||||||
|
*(.text*) /* .text* sections (code) */
|
||||||
|
*(.rodata) /* .rodata sections (constants, strings, etc.) */
|
||||||
|
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
|
||||||
|
*(.glue_7) /* glue arm to thumb code */
|
||||||
|
*(.glue_7t) /* glue thumb to arm code */
|
||||||
|
*(.eh_frame)
|
||||||
|
KEEP (*(.init))
|
||||||
|
KEEP (*(.fini))
|
||||||
|
. = ALIGN(4);
|
||||||
|
} > m_text
|
||||||
|
|
||||||
|
.ARM.extab :
|
||||||
|
{
|
||||||
|
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
||||||
|
} > m_text
|
||||||
|
|
||||||
|
.ARM :
|
||||||
|
{
|
||||||
|
__exidx_start = .;
|
||||||
|
*(.ARM.exidx*)
|
||||||
|
__exidx_end = .;
|
||||||
|
} > m_text
|
||||||
|
|
||||||
|
.ctors :
|
||||||
|
{
|
||||||
|
__CTOR_LIST__ = .;
|
||||||
|
/* gcc uses crtbegin.o to find the start of
|
||||||
|
the constructors, so we make sure it is
|
||||||
|
first. Because this is a wildcard, it
|
||||||
|
doesn't matter if the user does not
|
||||||
|
actually link against crtbegin.o; the
|
||||||
|
linker won't look for a file to match a
|
||||||
|
wildcard. The wildcard also means that it
|
||||||
|
doesn't matter which directory crtbegin.o
|
||||||
|
is in. */
|
||||||
|
KEEP (*crtbegin.o(.ctors))
|
||||||
|
KEEP (*crtbegin?.o(.ctors))
|
||||||
|
/* We don't want to include the .ctor section from
|
||||||
|
from the crtend.o file until after the sorted ctors.
|
||||||
|
The .ctor section from the crtend file contains the
|
||||||
|
end of ctors marker and it must be last */
|
||||||
|
KEEP (*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors))
|
||||||
|
KEEP (*(SORT(.ctors.*)))
|
||||||
|
KEEP (*(.ctors))
|
||||||
|
__CTOR_END__ = .;
|
||||||
|
} > m_text
|
||||||
|
|
||||||
|
.dtors :
|
||||||
|
{
|
||||||
|
__DTOR_LIST__ = .;
|
||||||
|
KEEP (*crtbegin.o(.dtors))
|
||||||
|
KEEP (*crtbegin?.o(.dtors))
|
||||||
|
KEEP (*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors))
|
||||||
|
KEEP (*(SORT(.dtors.*)))
|
||||||
|
KEEP (*(.dtors))
|
||||||
|
__DTOR_END__ = .;
|
||||||
|
} > m_text
|
||||||
|
|
||||||
|
.preinit_array :
|
||||||
|
{
|
||||||
|
PROVIDE_HIDDEN (__preinit_array_start = .);
|
||||||
|
KEEP (*(.preinit_array*))
|
||||||
|
PROVIDE_HIDDEN (__preinit_array_end = .);
|
||||||
|
} > m_text
|
||||||
|
|
||||||
|
.init_array :
|
||||||
|
{
|
||||||
|
PROVIDE_HIDDEN (__init_array_start = .);
|
||||||
|
KEEP (*(SORT(.init_array.*)))
|
||||||
|
KEEP (*(.init_array*))
|
||||||
|
PROVIDE_HIDDEN (__init_array_end = .);
|
||||||
|
} > m_text
|
||||||
|
|
||||||
|
.fini_array :
|
||||||
|
{
|
||||||
|
PROVIDE_HIDDEN (__fini_array_start = .);
|
||||||
|
KEEP (*(SORT(.fini_array.*)))
|
||||||
|
KEEP (*(.fini_array*))
|
||||||
|
PROVIDE_HIDDEN (__fini_array_end = .);
|
||||||
|
} > m_text
|
||||||
|
|
||||||
|
__etext = .; /* define a global symbol at end of code */
|
||||||
|
__DATA_ROM = .; /* Symbol is used by startup for data initialization */
|
||||||
|
|
||||||
|
.interrupts_ram :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__VECTOR_RAM__ = .;
|
||||||
|
__interrupts_ram_start__ = .; /* Create a global symbol at data start */
|
||||||
|
*(.m_interrupts_ram) /* This is a user defined section */
|
||||||
|
. += M_VECTOR_RAM_SIZE;
|
||||||
|
. = ALIGN(4);
|
||||||
|
__interrupts_ram_end__ = .; /* Define a global symbol at data end */
|
||||||
|
} > m_data
|
||||||
|
|
||||||
|
__VECTOR_RAM = DEFINED(__ram_vector_table__) ? __VECTOR_RAM__ : ORIGIN(m_interrupts);
|
||||||
|
__RAM_VECTOR_TABLE_SIZE_BYTES = DEFINED(__ram_vector_table__) ? (__interrupts_ram_end__ - __interrupts_ram_start__) : 0x0;
|
||||||
|
|
||||||
|
.data : AT(__DATA_ROM)
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__DATA_RAM = .;
|
||||||
|
__data_start__ = .; /* create a global symbol at data start */
|
||||||
|
*(.data) /* .data sections */
|
||||||
|
*(.data*) /* .data* sections */
|
||||||
|
KEEP(*(.jcr*))
|
||||||
|
. = ALIGN(4);
|
||||||
|
__data_end__ = .; /* define a global symbol at data end */
|
||||||
|
} > m_data
|
||||||
|
|
||||||
|
__DATA_END = __DATA_ROM + (__data_end__ - __data_start__);
|
||||||
|
text_end = ORIGIN(m_text) + LENGTH(m_text);
|
||||||
|
ASSERT(__DATA_END <= text_end, "region m_text overflowed with text and data")
|
||||||
|
|
||||||
|
/* Uninitialized data section */
|
||||||
|
.bss : ALIGN(4)
|
||||||
|
{
|
||||||
|
/* This is used by the startup in order to initialize the .bss section */
|
||||||
|
__START_BSS = .;
|
||||||
|
__bss_start__ = .;
|
||||||
|
*(.bss)
|
||||||
|
*(.bss*)
|
||||||
|
*(COMMON)
|
||||||
|
. = ALIGN(4);
|
||||||
|
} > m_data
|
||||||
|
|
||||||
|
.m_usb_bdt (NOLOAD) :
|
||||||
|
{
|
||||||
|
. = ALIGN(512);
|
||||||
|
*(m_usb_bdt)
|
||||||
|
} > m_data
|
||||||
|
|
||||||
|
.m_usb_global (NOLOAD) :
|
||||||
|
{
|
||||||
|
*(m_usb_global)
|
||||||
|
__bss_end__ = .;
|
||||||
|
__END_BSS = .;
|
||||||
|
} > m_data
|
||||||
|
|
||||||
|
.m_data_2 :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
*(.m_data_2) /* This is an User defined section */
|
||||||
|
. = ALIGN(4);
|
||||||
|
} > m_data_2
|
||||||
|
|
||||||
|
.heap :
|
||||||
|
{
|
||||||
|
. = ALIGN(8);
|
||||||
|
__end__ = .;
|
||||||
|
PROVIDE(end = .);
|
||||||
|
_pvHeapStart = .; /* Add for _sbrk */
|
||||||
|
__HeapBase = .;
|
||||||
|
. += HEAP_SIZE;
|
||||||
|
__HeapLimit = .;
|
||||||
|
__heap_limit = .; /* Add for _sbrk */
|
||||||
|
} > m_data_2
|
||||||
|
|
||||||
|
.stack :
|
||||||
|
{
|
||||||
|
. = ALIGN(8);
|
||||||
|
. += STACK_SIZE;
|
||||||
|
} > m_data_2
|
||||||
|
|
||||||
|
/* Initializes stack on the end of block */
|
||||||
|
__StackTop = ORIGIN(m_data_2) + LENGTH(m_data_2);
|
||||||
|
__StackLimit = __StackTop - STACK_SIZE;
|
||||||
|
PROVIDE(__stack = __StackTop);
|
||||||
|
|
||||||
|
.ARM.attributes 0 : { *(.ARM.attributes) }
|
||||||
|
|
||||||
|
ASSERT(__StackLimit >= __HeapLimit, "region m_data_2 overflowed with stack and heap")
|
||||||
|
|
||||||
|
.noinit (NOLOAD):
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
_noinit = .;
|
||||||
|
|
||||||
|
*(.noinit .noinit.*)
|
||||||
|
|
||||||
|
. = ALIGN(4) ;
|
||||||
|
_end_noinit = .;
|
||||||
|
} > m_noinit
|
||||||
|
|
||||||
|
/* Mandatory to be word aligned, _sbrk assumes this */
|
||||||
|
PROVIDE ( end = _end_noinit ); /* was _ebss */
|
||||||
|
PROVIDE ( _end = _end_noinit );
|
||||||
|
PROVIDE ( __end = _end_noinit );
|
||||||
|
PROVIDE ( __end__ = _end_noinit );
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
#include "config_parser/parse_macro.h"
|
#include "config_parser/parse_macro.h"
|
||||||
#include "config_parser/config_globals.h"
|
#include "config_parser/config_globals.h"
|
||||||
|
#include "timer.h"
|
||||||
|
|
||||||
macro_reference_t AllMacros[MAX_MACRO_NUM];
|
macro_reference_t AllMacros[MAX_MACRO_NUM];
|
||||||
uint8_t AllMacrosCount;
|
uint8_t AllMacrosCount;
|
||||||
@@ -18,69 +19,102 @@ uint8_t characterToScancode(char character)
|
|||||||
{
|
{
|
||||||
switch (character) {
|
switch (character) {
|
||||||
case 'A' ... 'Z':
|
case 'A' ... 'Z':
|
||||||
return 0;
|
|
||||||
case 'a' ... 'z':
|
case 'a' ... 'z':
|
||||||
return 0;
|
return HID_KEYBOARD_SC_A - 1 + (character & 0x1F);
|
||||||
case '1' ... '9':
|
case '1' ... '9':
|
||||||
return 0;
|
return HID_KEYBOARD_SC_1_AND_EXCLAMATION - 1 + (character & 0x0F);
|
||||||
case ')':
|
case ')':
|
||||||
case '0':
|
case '0':
|
||||||
return 0;
|
return HID_KEYBOARD_SC_0_AND_CLOSING_PARENTHESIS;
|
||||||
case '!':
|
case '!':
|
||||||
return 0;
|
return HID_KEYBOARD_SC_1_AND_EXCLAMATION;
|
||||||
case '@':
|
case '@':
|
||||||
return 0;
|
return HID_KEYBOARD_SC_2_AND_AT;
|
||||||
case '#':
|
case '#':
|
||||||
return 0;
|
return HID_KEYBOARD_SC_3_AND_HASHMARK;
|
||||||
case '$':
|
case '$':
|
||||||
return 0;
|
return HID_KEYBOARD_SC_4_AND_DOLLAR;
|
||||||
case '%':
|
case '%':
|
||||||
return 0;
|
return HID_KEYBOARD_SC_5_AND_PERCENTAGE;
|
||||||
case '^':
|
case '^':
|
||||||
return 0;
|
return HID_KEYBOARD_SC_6_AND_CARET;
|
||||||
case '&':
|
case '&':
|
||||||
return 0;
|
return HID_KEYBOARD_SC_7_AND_AMPERSAND;
|
||||||
case '*':
|
case '*':
|
||||||
return 0;
|
return HID_KEYBOARD_SC_8_AND_ASTERISK;
|
||||||
case '(':
|
case '(':
|
||||||
return 0;
|
return HID_KEYBOARD_SC_9_AND_OPENING_PARENTHESIS;
|
||||||
case '`':
|
case '`':
|
||||||
case '~':
|
case '~':
|
||||||
return 0;
|
return HID_KEYBOARD_SC_GRAVE_ACCENT_AND_TILDE;
|
||||||
case '[':
|
case '[':
|
||||||
case '{':
|
case '{':
|
||||||
return 0;
|
return HID_KEYBOARD_SC_OPENING_BRACKET_AND_OPENING_BRACE;
|
||||||
case ']':
|
case ']':
|
||||||
case '}':
|
case '}':
|
||||||
return 0;
|
return HID_KEYBOARD_SC_CLOSING_BRACKET_AND_CLOSING_BRACE;
|
||||||
case ';':
|
case ';':
|
||||||
case ':':
|
case ':':
|
||||||
return 0;
|
return HID_KEYBOARD_SC_SEMICOLON_AND_COLON;
|
||||||
case '\'':
|
case '\'':
|
||||||
case '\"':
|
case '\"':
|
||||||
return 0;
|
return HID_KEYBOARD_SC_APOSTROPHE_AND_QUOTE;
|
||||||
case '+':
|
case '+':
|
||||||
case '=':
|
case '=':
|
||||||
return 0;
|
return HID_KEYBOARD_SC_EQUAL_AND_PLUS;
|
||||||
case '\\':
|
case '\\':
|
||||||
case '|':
|
case '|':
|
||||||
return 0;
|
return HID_KEYBOARD_SC_BACKSLASH_AND_PIPE;
|
||||||
case '.':
|
case '.':
|
||||||
case '>':
|
case '>':
|
||||||
return 0;
|
return HID_KEYBOARD_SC_DOT_AND_GREATER_THAN_SIGN;
|
||||||
case ',':
|
case ',':
|
||||||
case '<':
|
case '<':
|
||||||
return 0;
|
return HID_KEYBOARD_SC_COMMA_AND_LESS_THAN_SIGN;
|
||||||
case '/':
|
case '/':
|
||||||
case '\?':
|
case '\?':
|
||||||
return 0;
|
return HID_KEYBOARD_SC_SLASH_AND_QUESTION_MARK;
|
||||||
case '-':
|
case '-':
|
||||||
case '_':
|
case '_':
|
||||||
return 0;
|
return HID_KEYBOARD_SC_MINUS_AND_UNDERSCORE;
|
||||||
|
case '\n':
|
||||||
|
return HID_KEYBOARD_SC_ENTER;
|
||||||
|
case ' ':
|
||||||
|
return HID_KEYBOARD_SC_SPACE;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool characterToShift(char character)
|
||||||
|
{
|
||||||
|
switch (character) {
|
||||||
|
case 'A' ... 'Z':
|
||||||
|
case ')':
|
||||||
|
case '!':
|
||||||
|
case '@':
|
||||||
|
case '#':
|
||||||
|
case '$':
|
||||||
|
case '%':
|
||||||
|
case '^':
|
||||||
|
case '&':
|
||||||
|
case '*':
|
||||||
|
case '(':
|
||||||
|
case '~':
|
||||||
|
case '{':
|
||||||
|
case '}':
|
||||||
|
case ':':
|
||||||
|
case '\"':
|
||||||
|
case '+':
|
||||||
|
case '|':
|
||||||
|
case '>':
|
||||||
|
case '<':
|
||||||
|
case '\?':
|
||||||
|
case '_':
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void addBasicScancode(uint8_t scancode)
|
void addBasicScancode(uint8_t scancode)
|
||||||
{
|
{
|
||||||
if (!scancode) {
|
if (!scancode) {
|
||||||
@@ -184,95 +218,192 @@ void deleteSystemScancode(uint8_t scancode)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool processKeyMacroAction(void)
|
void addScancode(uint16_t scancode, keystroke_type_t type)
|
||||||
|
{
|
||||||
|
switch (type) {
|
||||||
|
case KeystrokeType_Basic:
|
||||||
|
addBasicScancode(scancode);
|
||||||
|
break;
|
||||||
|
case KeystrokeType_Media:
|
||||||
|
addMediaScancode(scancode);
|
||||||
|
break;
|
||||||
|
case KeystrokeType_System:
|
||||||
|
addSystemScancode(scancode);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void deleteScancode(uint16_t scancode, keystroke_type_t type)
|
||||||
|
{
|
||||||
|
switch (type) {
|
||||||
|
case KeystrokeType_Basic:
|
||||||
|
deleteBasicScancode(scancode);
|
||||||
|
break;
|
||||||
|
case KeystrokeType_Media:
|
||||||
|
deleteMediaScancode(scancode);
|
||||||
|
break;
|
||||||
|
case KeystrokeType_System:
|
||||||
|
deleteSystemScancode(scancode);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool processKeyAction(void)
|
||||||
{
|
{
|
||||||
static bool pressStarted;
|
static bool pressStarted;
|
||||||
|
|
||||||
switch (currentMacroAction.key.action) {
|
switch (currentMacroAction.key.action) {
|
||||||
case MacroSubAction_Press:
|
case MacroSubAction_Tap:
|
||||||
if (!pressStarted) {
|
if (!pressStarted) {
|
||||||
pressStarted = true;
|
pressStarted = true;
|
||||||
addModifiers(currentMacroAction.key.modifierMask);
|
addModifiers(currentMacroAction.key.modifierMask);
|
||||||
switch (currentMacroAction.key.type) {
|
addScancode(currentMacroAction.key.scancode, currentMacroAction.key.type);
|
||||||
case KeystrokeType_Basic:
|
|
||||||
addBasicScancode(currentMacroAction.key.scancode);
|
|
||||||
break;
|
|
||||||
case KeystrokeType_Media:
|
|
||||||
// addMediaScancode(currentMacroAction.key.scancode);
|
|
||||||
break;
|
|
||||||
case KeystrokeType_System:
|
|
||||||
addSystemScancode(currentMacroAction.key.scancode);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
pressStarted = false;
|
pressStarted = false;
|
||||||
deleteModifiers(currentMacroAction.key.modifierMask);
|
deleteModifiers(currentMacroAction.key.modifierMask);
|
||||||
switch (currentMacroAction.key.type) {
|
deleteScancode(currentMacroAction.key.scancode, currentMacroAction.key.type);
|
||||||
case KeystrokeType_Basic:
|
|
||||||
deleteBasicScancode(currentMacroAction.key.scancode);
|
|
||||||
break;
|
|
||||||
case KeystrokeType_Media:
|
|
||||||
// deleteMediaScancode(currentMacroAction.key.scancode);
|
|
||||||
break;
|
|
||||||
case KeystrokeType_System:
|
|
||||||
deleteSystemScancode(currentMacroAction.key.scancode);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case MacroSubAction_Release:
|
case MacroSubAction_Release:
|
||||||
deleteModifiers(currentMacroAction.key.modifierMask);
|
deleteModifiers(currentMacroAction.key.modifierMask);
|
||||||
switch (currentMacroAction.key.type) {
|
deleteScancode(currentMacroAction.key.scancode, currentMacroAction.key.type);
|
||||||
case KeystrokeType_Basic:
|
|
||||||
deleteBasicScancode(currentMacroAction.key.scancode);
|
|
||||||
break;
|
break;
|
||||||
case KeystrokeType_Media:
|
case MacroSubAction_Press:
|
||||||
// deleteMediaScancode(currentMacroAction.key.scancode);
|
|
||||||
break;
|
|
||||||
case KeystrokeType_System:
|
|
||||||
deleteSystemScancode(currentMacroAction.key.scancode);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case MacroSubAction_Hold:
|
|
||||||
addModifiers(currentMacroAction.key.modifierMask);
|
addModifiers(currentMacroAction.key.modifierMask);
|
||||||
switch (currentMacroAction.key.type) {
|
addScancode(currentMacroAction.key.scancode, currentMacroAction.key.type);
|
||||||
case KeystrokeType_Basic:
|
|
||||||
addBasicScancode(currentMacroAction.key.scancode);
|
|
||||||
break;
|
|
||||||
case KeystrokeType_Media:
|
|
||||||
// addMediaScancode(currentMacroAction.key.scancode);
|
|
||||||
break;
|
|
||||||
case KeystrokeType_System:
|
|
||||||
addSystemScancode(currentMacroAction.key.scancode);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool processDelayAction(void)
|
||||||
|
{
|
||||||
|
static bool inDelay;
|
||||||
|
static uint32_t delayStart;
|
||||||
|
|
||||||
|
if (inDelay) {
|
||||||
|
if (Timer_GetElapsedTime(&delayStart) >= currentMacroAction.delay.delay) {
|
||||||
|
inDelay = false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
delayStart = CurrentTime;
|
||||||
|
inDelay = true;
|
||||||
|
}
|
||||||
|
return inDelay;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool processMouseButtonAction(void)
|
||||||
|
{
|
||||||
|
static bool pressStarted;
|
||||||
|
|
||||||
|
switch (currentMacroAction.mouseButton.action) {
|
||||||
|
case MacroSubAction_Tap:
|
||||||
|
if (!pressStarted) {
|
||||||
|
pressStarted = true;
|
||||||
|
MacroMouseReport.buttons |= currentMacroAction.mouseButton.mouseButtonsMask;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
pressStarted = false;
|
||||||
|
MacroMouseReport.buttons &= ~currentMacroAction.mouseButton.mouseButtonsMask;
|
||||||
|
break;
|
||||||
|
case MacroSubAction_Release:
|
||||||
|
MacroMouseReport.buttons &= ~currentMacroAction.mouseButton.mouseButtonsMask;
|
||||||
|
break;
|
||||||
|
case MacroSubAction_Press:
|
||||||
|
MacroMouseReport.buttons |= currentMacroAction.mouseButton.mouseButtonsMask;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool processMoveMouseAction(void)
|
||||||
|
{
|
||||||
|
static bool inMotion;
|
||||||
|
|
||||||
|
if (inMotion) {
|
||||||
|
MacroMouseReport.x = 0;
|
||||||
|
MacroMouseReport.y = 0;
|
||||||
|
inMotion = false;
|
||||||
|
} else {
|
||||||
|
MacroMouseReport.x = currentMacroAction.moveMouse.x;
|
||||||
|
MacroMouseReport.y = currentMacroAction.moveMouse.y;
|
||||||
|
inMotion = true;
|
||||||
|
}
|
||||||
|
return inMotion;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool processScrollMouseAction(void)
|
||||||
|
{
|
||||||
|
static bool inMotion;
|
||||||
|
|
||||||
|
if (inMotion) {
|
||||||
|
MacroMouseReport.wheelX = 0;
|
||||||
|
MacroMouseReport.wheelY = 0;
|
||||||
|
inMotion = false;
|
||||||
|
} else {
|
||||||
|
MacroMouseReport.wheelX = currentMacroAction.scrollMouse.x;
|
||||||
|
MacroMouseReport.wheelY = currentMacroAction.scrollMouse.y;
|
||||||
|
inMotion = true;
|
||||||
|
}
|
||||||
|
return inMotion;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool processTextAction(void)
|
||||||
|
{
|
||||||
|
static uint16_t textIndex;
|
||||||
|
static uint8_t reportIndex = USB_BASIC_KEYBOARD_MAX_KEYS;
|
||||||
|
char character;
|
||||||
|
uint8_t scancode;
|
||||||
|
|
||||||
|
if (textIndex == currentMacroAction.text.textLen) {
|
||||||
|
textIndex = 0;
|
||||||
|
reportIndex = USB_BASIC_KEYBOARD_MAX_KEYS;
|
||||||
|
memset(&MacroBasicKeyboardReport, 0, sizeof MacroBasicKeyboardReport);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (reportIndex == USB_BASIC_KEYBOARD_MAX_KEYS) {
|
||||||
|
reportIndex = 0;
|
||||||
|
memset(&MacroBasicKeyboardReport, 0, sizeof MacroBasicKeyboardReport);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
character = currentMacroAction.text.text[textIndex];
|
||||||
|
scancode = characterToScancode(character);
|
||||||
|
for (uint8_t i = 0; i < reportIndex; i++) {
|
||||||
|
if (MacroBasicKeyboardReport.scancodes[i] == scancode) {
|
||||||
|
reportIndex = USB_BASIC_KEYBOARD_MAX_KEYS;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MacroBasicKeyboardReport.scancodes[reportIndex++] = scancode;
|
||||||
|
MacroBasicKeyboardReport.modifiers = characterToShift(character) ? HID_KEYBOARD_MODIFIER_LEFTSHIFT : 0;
|
||||||
|
++textIndex;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool processCurrentMacroAction(void)
|
bool processCurrentMacroAction(void)
|
||||||
{
|
{
|
||||||
switch (currentMacroAction.type) {
|
switch (currentMacroAction.type) {
|
||||||
case MacroActionType_Delay:
|
case MacroActionType_Delay:
|
||||||
return false;
|
return processDelayAction();
|
||||||
case MacroActionType_Key:
|
case MacroActionType_Key:
|
||||||
return processKeyMacroAction();
|
return processKeyAction();
|
||||||
case MacroActionType_MouseButton:
|
case MacroActionType_MouseButton:
|
||||||
return false;
|
return processMouseButtonAction();
|
||||||
case MacroActionType_MoveMouse:
|
case MacroActionType_MoveMouse:
|
||||||
return false;
|
return processMoveMouseAction();
|
||||||
case MacroActionType_ScrollMouse:
|
case MacroActionType_ScrollMouse:
|
||||||
return false;
|
return processScrollMouseAction();
|
||||||
case MacroActionType_Text:
|
case MacroActionType_Text:
|
||||||
return false;
|
return processTextAction();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Macros_StartMacro(uint8_t index)
|
void Macros_StartMacro(uint8_t index)
|
||||||
{
|
{
|
||||||
|
if(AllMacros[index].macroActionsCount == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
MacroPlaying = true;
|
MacroPlaying = true;
|
||||||
currentMacroIndex = index;
|
currentMacroIndex = index;
|
||||||
currentMacroActionIndex = 0;
|
currentMacroActionIndex = 0;
|
||||||
|
|||||||
@@ -20,8 +20,8 @@
|
|||||||
} macro_reference_t;
|
} macro_reference_t;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
MacroSubAction_Tap,
|
||||||
MacroSubAction_Press,
|
MacroSubAction_Press,
|
||||||
MacroSubAction_Hold,
|
|
||||||
MacroSubAction_Release,
|
MacroSubAction_Release,
|
||||||
} macro_sub_action_t;
|
} macro_sub_action_t;
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
struct {
|
struct {
|
||||||
macro_sub_action_t action;
|
macro_sub_action_t action;
|
||||||
keystroke_type_t type;
|
keystroke_type_t type;
|
||||||
uint8_t scancode;
|
uint16_t scancode;
|
||||||
uint8_t modifierMask;
|
uint8_t modifierMask;
|
||||||
} ATTR_PACKED key;
|
} ATTR_PACKED key;
|
||||||
struct {
|
struct {
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
int16_t y;
|
int16_t y;
|
||||||
} ATTR_PACKED scrollMouse;
|
} ATTR_PACKED scrollMouse;
|
||||||
struct {
|
struct {
|
||||||
int16_t delay;
|
uint16_t delay;
|
||||||
} ATTR_PACKED delay;
|
} ATTR_PACKED delay;
|
||||||
struct {
|
struct {
|
||||||
const char *text;
|
const char *text;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user