Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into legacy_master
Browse files Browse the repository at this point in the history
  • Loading branch information
kareltucek committed Dec 17, 2024
2 parents c48aa75 + 83fc6be commit 62f0113
Show file tree
Hide file tree
Showing 387 changed files with 1,971 additions and 1,500 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,3 @@
[submodule "lib/SDK_2.8.0_MKL17Z32xxx4"]
path = lib/SDK_2.8.0_MKL17Z32xxx4
url = https://github.com/UltimateHackingKeyboard/SDK_2.8.0_MKL17Z32xxx4.git
[submodule "lib/c2usb"]
path = lib/c2usb
url = https://github.com/IntergatedCircuits/c2usb.git
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"nrf-connect.toolchain.path": "${nrf-connect.toolchain:2.6.1}",
"nrf-connect.topdir": "${nrf-connect.sdk:2.4.1}",
"nrf-connect.toolchain.path": "${nrf-connect.toolchain:2.8.0}",
"nrf-connect.topdir": "${nrf-connect.sdk:2.8.0}",
"nrf-connect.applications": [
"${workspaceFolder}/device"
],
Expand Down
178 changes: 175 additions & 3 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,187 @@
"label": "Build UHK 60 v2 firmware",
"type": "shell",
"command": "make",
"args": ["${command:cpptools.activeConfigName}"],
"args": [
"${command:cpptools.activeConfigName}"
],
"options": {
"cwd": "${workspaceFolder}/right/uhk60v2"
},
"problemMatcher": ["$gcc"],
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "Generate UHK versions",
"type": "shell",
"command": "node",
"args": [
"scripts/generate-versions.mjs"
],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": [],
"group": {
"kind": "none",
"isDefault": true
}
},
{
"label": "West update",
"group": {
"kind": "none",
"isDefault": true
},
"options": {
"cwd": "${workspaceFolder}"
},
"type": "process",
"command": "nrfutil",
"args": [
"toolchain-manager",
"launch",
"--shell",
"--",
"west",
"update"
]
},
{
"label": "West patch",
"group": {
"kind": "none",
"isDefault": true
},
"options": {
"cwd": "${workspaceFolder}"
},
"type": "process",
"command": "nrfutil",
"args": [
"toolchain-manager",
"launch",
"--shell",
"--",
"west",
"patch"
],
"dependsOrder": "sequence",
"dependsOn": [
"West update"
]
},
{
"label": "Build UHK 80 left firmware",
"group": {
"kind": "build",
"isDefault": true
},
"options": {
"cwd": "${workspaceFolder}"
},
"type": "process",
"command": "nrfutil",
"args": [
"toolchain-manager",
"launch",
"--shell",
"--",
"west",
"build",
"--build-dir",
"${cwd}/device/build/uhk-80-left",
"${cwd}/device",
"--pristine",
"--board",
"uhk-80-left",
"--no-sysbuild",
"--",
"-DNCS_TOOLCHAIN_VERSION=NONE",
"-DCONF_FILE=${cwd}/device/prj.conf",
"-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",
"-DBOARD_ROOT=${cwd}",
"-Dmcuboot_OVERLAY_CONFIG=${cwd}/device/child_image/mcuboot.conf;${cwd}/device/child_image/uhk-80-left.mcuboot.conf"
],
"problemMatcher": [
"$gcc"
]
},
{
"label": "Build UHK 80 right firmware",
"group": {
"kind": "build",
"isDefault": true
},
"options": {
"cwd": "${workspaceFolder}"
},
"type": "process",
"command": "nrfutil",
"args": [
"toolchain-manager",
"launch",
"--shell",
"--",
"west",
"build",
"--build-dir",
"${cwd}/device/build/uhk-80-right",
"${cwd}/device",
"--pristine",
"--board",
"uhk-80-right",
"--no-sysbuild",
"--",
"-DNCS_TOOLCHAIN_VERSION=NONE",
"-DCONF_FILE=${cwd}/device/prj.conf",
"-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",
"-DBOARD_ROOT=${cwd}",
"-Dmcuboot_OVERLAY_CONFIG=${cwd}/device/child_image/mcuboot.conf;${cwd}/device/child_image/uhk-80-right.mcuboot.conf"
],
"problemMatcher": [
"$gcc"
]
},
{
"label": "Build UHK dongle firmware",
"group": {
"kind": "build",
"isDefault": true
},
"options": {
"cwd": "${workspaceFolder}"
},
"type": "process",
"command": "nrfutil",
"args": [
"toolchain-manager",
"launch",
"--shell",
"--",
"west",
"build",
"--build-dir",
"${cwd}/device/build/uhk-dongle",
"${cwd}/device",
"--pristine",
"--board",
"uhk-dongle",
"--no-sysbuild",
"--",
"-DNCS_TOOLCHAIN_VERSION=NONE",
"-DCONF_FILE=${cwd}/device/prj.conf",
"-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",
"-DBOARD_ROOT=${cwd}",
"-Dmcuboot_OVERLAY_CONFIG=${cwd}/device/child_image/mcuboot.conf;${cwd}/device/child_image/uhk-dongle.mcuboot.conf"
],
"problemMatcher": [
"$gcc"
]
}
]
}
}
25 changes: 25 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
cmake_minimum_required(VERSION 3.20)

# until https://github.com/zephyrproject-rtos/zephyr/pull/69490 is merged
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

# zephyr's build system doesn't define standard build type symbols, fix that here
if(NOT CONFIG_DEBUG)
add_definitions(-DNDEBUG)
endif()

if(NOT CONFIG_DEVICE_ID)
# uhk code isn't added to bootloader
return()
endif()

project(uhk)
add_library(${PROJECT_NAME})
target_link_libraries(${PROJECT_NAME} PUBLIC
zephyr_interface
)
add_subdirectory(device/src)
add_subdirectory(right/src)
add_subdirectory(shared)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Then, depending whether you want a full IDE experience or just minimal tools for

- If the `build.sh` doesn't suit you, then launch the nrfutil shell:
```
nrfutil toolchain-manager launch --shell --ncs-version v2.6.1
nrfutil toolchain-manager launch --shell --ncs-version v2.8.0
```
- In the shell, you can build (e.g.) uhk-80-left as follows:
Expand Down
12 changes: 0 additions & 12 deletions boards/arm/uhk-80-left/Kconfig.defconfig

This file was deleted.

9 changes: 0 additions & 9 deletions boards/arm/uhk-80-left/board.cmake

This file was deleted.

12 changes: 0 additions & 12 deletions boards/arm/uhk-80-right/Kconfig.defconfig

This file was deleted.

9 changes: 0 additions & 9 deletions boards/arm/uhk-80-right/board.cmake

This file was deleted.

7 changes: 0 additions & 7 deletions boards/arm/uhk-80-right/pre_dt_board.cmake

This file was deleted.

12 changes: 0 additions & 12 deletions boards/arm/uhk-dongle/Kconfig.defconfig

This file was deleted.

7 changes: 0 additions & 7 deletions boards/arm/uhk-dongle/pre_dt_board.cmake

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ supported:
- spi
- usb_device
- watchdog

# TODO: use board revisions: https://docs.zephyrproject.org/latest/hardware/porting/board_porting.html#multiple-board-revisions
4 changes: 4 additions & 0 deletions boards/ugl/uhk-80/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
zephyr_library()
if(CONFIG_DEVICE_ID) # don't add it to bootloader image as well
zephyr_library_sources(board.c)
endif()
14 changes: 14 additions & 0 deletions boards/ugl/uhk-80/Kconfig.board
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright (c) 2023 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

config BOARD_UHK_80_LEFT
bool "UHK 80 left"
depends on SOC_NRF52840_QIAA

config BOARD_UHK_80_RIGHT
bool "UHK 80 right"
depends on SOC_NRF52840_QIAA

config BOARD_UHK_DONGLE
bool "UHK dongle"
depends on SOC_NRF52840_QIAA
Loading

0 comments on commit 62f0113

Please sign in to comment.