Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

Commit 83fc6be

Browse files
authored
Merge pull request #353 from UltimateHackingKeyboard/usb-battery-if-2.7.0
NCS 2.8.0 plus my USB changes again
2 parents 317a739 + 08d28d9 commit 83fc6be

387 files changed

Lines changed: 1970 additions & 1499 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,3 @@
1313
[submodule "lib/SDK_2.8.0_MKL17Z32xxx4"]
1414
path = lib/SDK_2.8.0_MKL17Z32xxx4
1515
url = https://github.com/UltimateHackingKeyboard/SDK_2.8.0_MKL17Z32xxx4.git
16-
[submodule "lib/c2usb"]
17-
path = lib/c2usb
18-
url = https://github.com/IntergatedCircuits/c2usb.git

.vscode/settings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"nrf-connect.toolchain.path": "${nrf-connect.toolchain:2.6.1}",
3-
"nrf-connect.topdir": "${nrf-connect.sdk:2.4.1}",
2+
"nrf-connect.toolchain.path": "${nrf-connect.toolchain:2.8.0}",
3+
"nrf-connect.topdir": "${nrf-connect.sdk:2.8.0}",
44
"nrf-connect.applications": [
55
"${workspaceFolder}/device"
66
],

.vscode/tasks.json

Lines changed: 175 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,187 @@
55
"label": "Build UHK 60 v2 firmware",
66
"type": "shell",
77
"command": "make",
8-
"args": ["${command:cpptools.activeConfigName}"],
8+
"args": [
9+
"${command:cpptools.activeConfigName}"
10+
],
911
"options": {
1012
"cwd": "${workspaceFolder}/right/uhk60v2"
1113
},
12-
"problemMatcher": ["$gcc"],
14+
"problemMatcher": [
15+
"$gcc"
16+
],
1317
"group": {
1418
"kind": "build",
1519
"isDefault": true
1620
}
1721
},
22+
{
23+
"label": "Generate UHK versions",
24+
"type": "shell",
25+
"command": "node",
26+
"args": [
27+
"scripts/generate-versions.mjs"
28+
],
29+
"options": {
30+
"cwd": "${workspaceFolder}"
31+
},
32+
"problemMatcher": [],
33+
"group": {
34+
"kind": "none",
35+
"isDefault": true
36+
}
37+
},
38+
{
39+
"label": "West update",
40+
"group": {
41+
"kind": "none",
42+
"isDefault": true
43+
},
44+
"options": {
45+
"cwd": "${workspaceFolder}"
46+
},
47+
"type": "process",
48+
"command": "nrfutil",
49+
"args": [
50+
"toolchain-manager",
51+
"launch",
52+
"--shell",
53+
"--",
54+
"west",
55+
"update"
56+
]
57+
},
58+
{
59+
"label": "West patch",
60+
"group": {
61+
"kind": "none",
62+
"isDefault": true
63+
},
64+
"options": {
65+
"cwd": "${workspaceFolder}"
66+
},
67+
"type": "process",
68+
"command": "nrfutil",
69+
"args": [
70+
"toolchain-manager",
71+
"launch",
72+
"--shell",
73+
"--",
74+
"west",
75+
"patch"
76+
],
77+
"dependsOrder": "sequence",
78+
"dependsOn": [
79+
"West update"
80+
]
81+
},
82+
{
83+
"label": "Build UHK 80 left firmware",
84+
"group": {
85+
"kind": "build",
86+
"isDefault": true
87+
},
88+
"options": {
89+
"cwd": "${workspaceFolder}"
90+
},
91+
"type": "process",
92+
"command": "nrfutil",
93+
"args": [
94+
"toolchain-manager",
95+
"launch",
96+
"--shell",
97+
"--",
98+
"west",
99+
"build",
100+
"--build-dir",
101+
"${cwd}/device/build/uhk-80-left",
102+
"${cwd}/device",
103+
"--pristine",
104+
"--board",
105+
"uhk-80-left",
106+
"--no-sysbuild",
107+
"--",
108+
"-DNCS_TOOLCHAIN_VERSION=NONE",
109+
"-DCONF_FILE=${cwd}/device/prj.conf",
110+
"-DEXTRA_CONF_FILE=${cwd}/device/prj.conf.overlays/nrf_shared.conf;${cwd}/device/prj.conf.overlays/c2usb.conf;${cwd}/device/prj.conf.overlays/uhk-80.conf;${cwd}/device/prj.conf.overlays/ble_nus.conf",
111+
"-DBOARD_ROOT=${cwd}",
112+
"-Dmcuboot_OVERLAY_CONFIG=${cwd}/device/child_image/mcuboot.conf;${cwd}/device/child_image/uhk-80-left.mcuboot.conf"
113+
],
114+
"problemMatcher": [
115+
"$gcc"
116+
]
117+
},
118+
{
119+
"label": "Build UHK 80 right firmware",
120+
"group": {
121+
"kind": "build",
122+
"isDefault": true
123+
},
124+
"options": {
125+
"cwd": "${workspaceFolder}"
126+
},
127+
"type": "process",
128+
"command": "nrfutil",
129+
"args": [
130+
"toolchain-manager",
131+
"launch",
132+
"--shell",
133+
"--",
134+
"west",
135+
"build",
136+
"--build-dir",
137+
"${cwd}/device/build/uhk-80-right",
138+
"${cwd}/device",
139+
"--pristine",
140+
"--board",
141+
"uhk-80-right",
142+
"--no-sysbuild",
143+
"--",
144+
"-DNCS_TOOLCHAIN_VERSION=NONE",
145+
"-DCONF_FILE=${cwd}/device/prj.conf",
146+
"-DEXTRA_CONF_FILE=${cwd}/device/prj.conf.overlays/nrf_shared.conf;${cwd}/device/prj.conf.overlays/c2usb.conf;${cwd}/device/prj.conf.overlays/uhk-80.conf;${cwd}/device/prj.conf.overlays/ble_nus.conf;${cwd}/device/prj.conf.overlays/ble_nus_client.conf;${cwd}/device/prj.conf.overlays/ble_hid.conf",
147+
"-DBOARD_ROOT=${cwd}",
148+
"-Dmcuboot_OVERLAY_CONFIG=${cwd}/device/child_image/mcuboot.conf;${cwd}/device/child_image/uhk-80-right.mcuboot.conf"
149+
],
150+
"problemMatcher": [
151+
"$gcc"
152+
]
153+
},
154+
{
155+
"label": "Build UHK dongle firmware",
156+
"group": {
157+
"kind": "build",
158+
"isDefault": true
159+
},
160+
"options": {
161+
"cwd": "${workspaceFolder}"
162+
},
163+
"type": "process",
164+
"command": "nrfutil",
165+
"args": [
166+
"toolchain-manager",
167+
"launch",
168+
"--shell",
169+
"--",
170+
"west",
171+
"build",
172+
"--build-dir",
173+
"${cwd}/device/build/uhk-dongle",
174+
"${cwd}/device",
175+
"--pristine",
176+
"--board",
177+
"uhk-dongle",
178+
"--no-sysbuild",
179+
"--",
180+
"-DNCS_TOOLCHAIN_VERSION=NONE",
181+
"-DCONF_FILE=${cwd}/device/prj.conf",
182+
"-DEXTRA_CONF_FILE=${cwd}/device/prj.conf.overlays/nrf_shared.conf;${cwd}/device/prj.conf.overlays/c2usb.conf;${cwd}/device/prj.conf.overlays/ble_nus_client.conf",
183+
"-DBOARD_ROOT=${cwd}",
184+
"-Dmcuboot_OVERLAY_CONFIG=${cwd}/device/child_image/mcuboot.conf;${cwd}/device/child_image/uhk-dongle.mcuboot.conf"
185+
],
186+
"problemMatcher": [
187+
"$gcc"
188+
]
189+
}
18190
]
19-
}
191+
}

CMakeLists.txt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
cmake_minimum_required(VERSION 3.20)
2+
3+
# until https://github.com/zephyrproject-rtos/zephyr/pull/69490 is merged
4+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")
5+
6+
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
7+
8+
# zephyr's build system doesn't define standard build type symbols, fix that here
9+
if(NOT CONFIG_DEBUG)
10+
add_definitions(-DNDEBUG)
11+
endif()
12+
13+
if(NOT CONFIG_DEVICE_ID)
14+
# uhk code isn't added to bootloader
15+
return()
16+
endif()
17+
18+
project(uhk)
19+
add_library(${PROJECT_NAME})
20+
target_link_libraries(${PROJECT_NAME} PUBLIC
21+
zephyr_interface
22+
)
23+
add_subdirectory(device/src)
24+
add_subdirectory(right/src)
25+
add_subdirectory(shared)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Then, depending whether you want a full IDE experience or just minimal tools for
4848

4949
- If the `build.sh` doesn't suit you, then launch the nrfutil shell:
5050
```
51-
nrfutil toolchain-manager launch --shell --ncs-version v2.6.1
51+
nrfutil toolchain-manager launch --shell --ncs-version v2.8.0
5252
```
5353
- In the shell, you can build (e.g.) uhk-80-left as follows:
5454

boards/arm/uhk-80-left/Kconfig.defconfig

Lines changed: 0 additions & 12 deletions
This file was deleted.

boards/arm/uhk-80-left/board.cmake

Lines changed: 0 additions & 9 deletions
This file was deleted.

boards/arm/uhk-80-right/Kconfig.defconfig

Lines changed: 0 additions & 12 deletions
This file was deleted.

boards/arm/uhk-80-right/board.cmake

Lines changed: 0 additions & 9 deletions
This file was deleted.

boards/arm/uhk-80-right/pre_dt_board.cmake

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)