Skip to content

Commit 6a2703a

Browse files
app: move common configuration to Kconfig file
Move the common configuration shared between the various prj*.conf files to the Kconfig file. Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
1 parent 2cdfc51 commit 6a2703a

File tree

5 files changed

+19
-26
lines changed

5 files changed

+19
-26
lines changed

app/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ module = CANNECTIVITY
77
module-str = CANnectivity
88
source "subsys/logging/Kconfig.template.log_config"
99

10+
configdefault CAN_FD_MODE
11+
default y
12+
1013
config CANNECTIVITY_BOOT_BANNER
1114
bool "CANnectivity boot banner"
1215
default y if BOOT_BANNER
@@ -87,6 +90,12 @@ configdefault USB_MAX_POWER
8790
configdefault USB_DEVICE_GS_USB_MAX_CHANNELS
8891
default CANNECTIVITY_MAX_CHANNELS
8992

93+
configdefault USB_DEVICE_BOS
94+
default y
95+
96+
configdefault USB_DEVICE_INITIALIZE_AT_BOOT
97+
default n
98+
9099
endif # USB_DEVICE_STACK
91100

92101
if USB_DEVICE_STACK_NEXT

app/prj.conf

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
# This is using the deprecated USB device stack
22
CONFIG_DEPRECATION_TEST=y
3+
CONFIG_USB_DEVICE_STACK=y
34

5+
# Logging configuration
46
CONFIG_LOG=y
57
CONFIG_USB_DRIVER_LOG_LEVEL_ERR=y
68
CONFIG_USB_DEVICE_LOG_LEVEL_ERR=y
79
CONFIG_USB_DEVICE_GS_USB_LOG_LEVEL_DBG=y
810
CONFIG_CANNECTIVITY_LOG_LEVEL_DBG=y
9-
10-
CONFIG_USB_DEVICE_STACK=y
11-
CONFIG_USB_DEVICE_BOS=y
12-
CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n
13-
14-
CONFIG_CAN=y
15-
CONFIG_CAN_FD_MODE=y

app/prj_release.conf

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# This is using the deprecated USB device stack
22
CONFIG_DEPRECATION_TEST=y
3+
CONFIG_USB_DEVICE_STACK=y
34

45
# Hardened configuration
56
CONFIG_BOOT_BANNER=n
@@ -10,10 +11,3 @@ CONFIG_OVERRIDE_FRAME_POINTER_DEFAULT=y
1011

1112
# Arm-specific hardened configuration
1213
CONFIG_FAULT_DUMP=0
13-
14-
CONFIG_USB_DEVICE_STACK=y
15-
CONFIG_USB_DEVICE_BOS=y
16-
CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n
17-
18-
CONFIG_CAN=y
19-
CONFIG_CAN_FD_MODE=y

app/prj_usbd_next.conf

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1+
# This is using the experimental USB device_next stack class
12
CONFIG_WARN_EXPERIMENTAL=y
3+
CONFIG_USB_DEVICE_STACK_NEXT=y
24

5+
# Logging configuration
36
CONFIG_LOG=y
47
CONFIG_UDC_DRIVER_LOG_LEVEL_WRN=y
58
CONFIG_USBD_LOG_LEVEL_WRN=y
69
CONFIG_USBD_GS_USB_LOG_LEVEL_DBG=y
710
CONFIG_CANNECTIVITY_LOG_LEVEL_DBG=y
8-
9-
CONFIG_USB_DEVICE_STACK_NEXT=y
10-
11-
CONFIG_CAN=y
12-
CONFIG_CAN_FD_MODE=y

app/prj_usbd_next_release.conf

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# This is using the experimental USB device_next stack class
2+
CONFIG_WARN_EXPERIMENTAL=y
3+
CONFIG_USB_DEVICE_STACK_NEXT=y
4+
15
# Hardened configuration
26
CONFIG_BOOT_BANNER=n
37
CONFIG_BUILD_OUTPUT_STRIPPED=y
@@ -7,10 +11,3 @@ CONFIG_OVERRIDE_FRAME_POINTER_DEFAULT=y
711

812
# Arm-specific hardened configuration
913
CONFIG_FAULT_DUMP=0
10-
11-
CONFIG_WARN_EXPERIMENTAL=y
12-
13-
CONFIG_USB_DEVICE_STACK_NEXT=y
14-
15-
CONFIG_CAN=y
16-
CONFIG_CAN_FD_MODE=y

0 commit comments

Comments
 (0)