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

NCS 2.8.0 plus my USB changes again #353

Merged
merged 33 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
f303fc4
cmake: define NDEBUG when DEBUG Kconfig is not enabled, to remove ass…
benedekkupper Oct 3, 2024
dc25023
update board.cmake to current reference
benedekkupper Oct 25, 2024
6a25865
kconfig: restructuring step 1
benedekkupper Oct 25, 2024
bede208
kconfig: move build type independent options out of prj.conf
benedekkupper Oct 26, 2024
d59dc8f
Bump to NCS 2.7.0
mondalaci Jul 24, 2024
ad9689c
boards: update to hardware model 2
benedekkupper Oct 26, 2024
a0e61c5
zephyr/ncs: fix hardware model 2 with out-of-tree boards
benedekkupper Oct 26, 2024
e7205b0
bugfixing to compile for new NCS
benedekkupper Oct 26, 2024
f181a5d
boards: rename directory from arm arch to vendor
benedekkupper Oct 27, 2024
0427d8a
zephyr: patch UGL boards into the tree
benedekkupper Oct 28, 2024
b43bb28
add tasks for building UHK 80 firmwares
benedekkupper Nov 9, 2024
2256c13
Revert "zephyr: patch UGL boards into the tree"
benedekkupper Nov 9, 2024
be6b60e
add HID interface for battery charging (#202)
benedekkupper Oct 13, 2024
3932585
usb: use different usage for battery application to avoid macOS warni…
benedekkupper Oct 18, 2024
2620d49
usb: add HID battery IF, apply changes in c2usb thread (#202)
benedekkupper Oct 13, 2024
6414db8
HID: remove double buffering from inputs, move common behavior to bas…
benedekkupper Oct 13, 2024
f838bce
usb: be lenient with the semaphore
benedekkupper Oct 15, 2024
fa70d43
usb: add print for wakeup
benedekkupper Oct 25, 2024
5d9ab03
NCS update to 2.8.0
benedekkupper Nov 19, 2024
d1c5a3a
move UHK 80 boards into a single directory to eliminate duplicate files
benedekkupper Nov 19, 2024
4b7805c
import c2usb not as submodule, but as zephyr module
benedekkupper Nov 9, 2024
2ca89b5
use newlib libc to print assert sources
benedekkupper Nov 20, 2024
fffb713
kconfig: limit BLE functionality to what's used per board
benedekkupper Nov 25, 2024
69b962a
carry over the feature selectivity to the source code
benedekkupper Nov 25, 2024
f84f413
restore USB HID disabling while BLE HID is active
benedekkupper Nov 25, 2024
5b5fe9f
allow agent on both transport concurrently (#355)
benedekkupper Nov 28, 2024
49cb009
get rid of source file symlinks
benedekkupper Dec 4, 2024
b349a61
convert version generating scripts to python, generate automatically …
benedekkupper Dec 4, 2024
9e7df3d
Update buildscript.
kareltucek Dec 5, 2024
7468eb3
Fix crashes on thread waking.
kareltucek Dec 5, 2024
18e6bea
cmake: generate compile commands for clangd intellisense
benedekkupper Dec 6, 2024
f2ecd6b
fix wrong stub linking
benedekkupper Dec 16, 2024
08d28d9
dongle: set regout0 to provide 3.3V from USB (#361)
benedekkupper Dec 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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 @@ -48,7 +48,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.

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
Loading