Skip to content

Commit

Permalink
Addressed review comments
Browse files Browse the repository at this point in the history
* Moved MINIMAL_LIBC config to mcuboot defaults
* Brought back setting lock feature map, but changed the value
from 0x101 to 0x181 (added COTA support)

Additionally:
* Changed main return type from void to main for Zephyr unit tests
runner.
  • Loading branch information
kkasperczyk-no committed Nov 2, 2023
1 parent 9df56c0 commit e0c2384
Show file tree
Hide file tree
Showing 19 changed files with 9 additions and 49 deletions.
4 changes: 4 additions & 0 deletions config/nrfconnect/chip-module/Kconfig.mcuboot.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ config FLASH
config FPROTECT
default y

choice LIBC_IMPLEMENTATION
default MINIMAL_LIBC
endchoice

# nRF7002DK uses SPI NOR external flash
if BOARD_NRF7002DK_NRF5340_CPUAPP

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,3 @@ CONFIG_CONSOLE=n
CONFIG_SERIAL=n
CONFIG_UART_CONSOLE=n
CONFIG_USE_SEGGER_RTT=n

# Use minimal C library instead of the Picolib
CONFIG_MINIMAL_LIBC=y
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,3 @@ CONFIG_CONSOLE=n
CONFIG_SERIAL=n
CONFIG_UART_CONSOLE=n
CONFIG_USE_SEGGER_RTT=n

# Use minimal C library instead of the Picolib
CONFIG_MINIMAL_LIBC=y
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,3 @@ CONFIG_CONSOLE=n
CONFIG_SERIAL=n
CONFIG_UART_CONSOLE=n
CONFIG_USE_SEGGER_RTT=n

# Use minimal C library instead of the Picolib
CONFIG_MINIMAL_LIBC=y
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,3 @@ CONFIG_CONSOLE=n
CONFIG_SERIAL=n
CONFIG_UART_CONSOLE=n
CONFIG_USE_SEGGER_RTT=n

# Use minimal C library instead of the Picolib
CONFIG_MINIMAL_LIBC=y
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,3 @@ CONFIG_SERIAL=n
CONFIG_UART_CONSOLE=n
CONFIG_USE_SEGGER_RTT=n
CONFIG_GPIO=n

# Use minimal C library instead of the Picolib
CONFIG_MINIMAL_LIBC=y
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,3 @@ CONFIG_SERIAL=n
CONFIG_UART_CONSOLE=n
CONFIG_USE_SEGGER_RTT=n
CONFIG_GPIO=n

# Use minimal C library instead of the Picolib
CONFIG_MINIMAL_LIBC=y
3 changes: 0 additions & 3 deletions examples/lighting-app/nrfconnect/child_image/mcuboot/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,3 @@ CONFIG_SERIAL=n
CONFIG_UART_CONSOLE=n
CONFIG_USE_SEGGER_RTT=n
CONFIG_GPIO=n

# Use minimal C library instead of the Picolib
CONFIG_MINIMAL_LIBC=y
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,3 @@ CONFIG_SERIAL=n
CONFIG_UART_CONSOLE=n
CONFIG_USE_SEGGER_RTT=n
CONFIG_GPIO=n

# Use minimal C library instead of the Picolib
CONFIG_MINIMAL_LIBC=y
3 changes: 0 additions & 3 deletions examples/lock-app/nrfconnect/child_image/mcuboot/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,3 @@ CONFIG_SERIAL=n
CONFIG_UART_CONSOLE=n
CONFIG_USE_SEGGER_RTT=n
CONFIG_GPIO=n

# Use minimal C library instead of the Picolib
CONFIG_MINIMAL_LIBC=y
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,3 @@ CONFIG_SERIAL=n
CONFIG_UART_CONSOLE=n
CONFIG_USE_SEGGER_RTT=n
CONFIG_GPIO=n

# Use minimal C library instead of the Picolib
CONFIG_MINIMAL_LIBC=y
4 changes: 4 additions & 0 deletions examples/lock-app/nrfconnect/main/ZclCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,5 +126,9 @@ void emberAfDoorLockClusterInitCallback(EndpointId endpoint)
logOnFailure(DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::Set(endpoint, CONFIG_LOCK_NUM_CREDENTIALS_PER_USER),
"number of credentials per user");

// Set FeatureMap to (kUser|kPinCredential), default is:
// (kUser|kAccessSchedules|kRfidCredential|kPinCredential) 0x113
logOnFailure(DoorLock::Attributes::FeatureMap::Set(endpoint, 0x181), "feature map");

AppTask::Instance().UpdateClusterState(BoltLockMgr().GetState(), BoltLockManager::OperationSource::kUnspecified);
}
3 changes: 0 additions & 3 deletions examples/pump-app/nrfconnect/child_image/mcuboot/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,3 @@ CONFIG_CONSOLE=n
CONFIG_SERIAL=n
CONFIG_UART_CONSOLE=n
CONFIG_USE_SEGGER_RTT=n

# Use minimal C library instead of the Picolib
CONFIG_MINIMAL_LIBC=y
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,3 @@ CONFIG_CONSOLE=n
CONFIG_SERIAL=n
CONFIG_UART_CONSOLE=n
CONFIG_USE_SEGGER_RTT=n

# Use minimal C library instead of the Picolib
CONFIG_MINIMAL_LIBC=y
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,3 @@ CONFIG_CONSOLE=n
CONFIG_SERIAL=n
CONFIG_UART_CONSOLE=n
CONFIG_USE_SEGGER_RTT=n

# Use minimal C library instead of the Picolib
CONFIG_MINIMAL_LIBC=y
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,3 @@ CONFIG_CONSOLE=n
CONFIG_SERIAL=n
CONFIG_UART_CONSOLE=n
CONFIG_USE_SEGGER_RTT=n

# Use minimal C library instead of the Picolib
CONFIG_MINIMAL_LIBC=y
3 changes: 0 additions & 3 deletions examples/window-app/nrfconnect/child_image/mcuboot/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,3 @@ CONFIG_CONSOLE=n
CONFIG_SERIAL=n
CONFIG_UART_CONSOLE=n
CONFIG_USE_SEGGER_RTT=n

# Use minimal C library instead of the Picolib
CONFIG_MINIMAL_LIBC=y
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,3 @@ CONFIG_CONSOLE=n
CONFIG_SERIAL=n
CONFIG_UART_CONSOLE=n
CONFIG_USE_SEGGER_RTT=n

# Use minimal C library instead of the Picolib
CONFIG_MINIMAL_LIBC=y
2 changes: 1 addition & 1 deletion src/test_driver/nrfconnect/main/runner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ using namespace ::chip::DeviceLayer;

LOG_MODULE_REGISTER(runner, CONFIG_MATTER_LOG_LEVEL);

extern "C" void main(void)
extern "C" int main(void)
{
VerifyOrDie(settings_subsys_init() == 0);

Expand Down

0 comments on commit e0c2384

Please sign in to comment.