Skip to content

Commit 38c10c3

Browse files
committed
Updated the Challenger 840 BLE board support files to include the new partition
1 parent 4fbe056 commit 38c10c3

7 files changed

+79
-23
lines changed
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
/dts-v1/;
22
#include "challenger_840_ble_common.dtsi"
3-
#include <nordic/nrf52840_partition.dtsi>
3+
#include "challenger_840_ble_partition.dtsi"
44

55
/ {
66
model = "iLabs CHALLENGER 840 BLE";
77
compatible = "adafruit,feather-nrf52840";
88

99
chosen {
10-
zephyr,console = &uart0;
11-
zephyr,shell-uart = &uart0;
12-
zephyr,uart-mcumgr = &uart0;
13-
zephyr,bt-mon-uart = &uart0;
14-
zephyr,bt-c2h-uart = &uart0;
10+
zephyr,console = &cdc_acm_uart0;
11+
zephyr,shell-uart = &cdc_acm_uart0;
12+
zephyr,uart-mcumgr = &cdc_acm_uart0;
13+
zephyr,bt-mon-uart = &cdc_acm_uart0;
14+
zephyr,bt-c2h-uart = &cdc_acm_uart0;
1515
};
16-
};
16+
};

boards/ilabs/challenger_840_ble/challenger_840_ble_common.dtsi

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,20 @@ SPDX-License-Identifier: Apache-2.0 */
6969
sw0 = &button0;
7070
led-strip = &led_strip;
7171
};
72-
72+
fstab {
73+
compatible = "zephyr,fstab";
74+
lfs1: lfs1 {
75+
compatible = "zephyr,fstab,littlefs";
76+
mount-point = "/lfs1";
77+
partition = <&storage_partition>;
78+
automount;
79+
read-size = <16>;
80+
prog-size = <16>;
81+
cache-size = <64>;
82+
lookahead-size = <32>;
83+
block-cycles = <512>;
84+
};
85+
};
7386
};
7487

7588
&adc {
@@ -153,12 +166,23 @@ SPDX-License-Identifier: Apache-2.0 */
153166
compatible = "jedec,spi-nor";
154167
reg = <0>;
155168
spi-max-frequency = <40000000>;
156-
size = <DT_SIZE_M(8)>; /* (8MB) */
169+
size = <DT_SIZE_M(64)>;
157170
status = "okay";
158171
jedec-id = [ ef 40 17 ];
159172
has-dpd;
160173
t-enter-dpd = <3500>;
161174
t-exit-dpd = <3500>;
175+
176+
partitions {
177+
compatible = "fixed-partitions";
178+
#address-cells = <1>;
179+
#size-cells = <1>;
180+
181+
storage_partition: partition@0 {
182+
label = "storage";
183+
reg = <0x00000000 0x007270E0>;
184+
};
185+
};
162186
};
163187
};
164188

@@ -169,4 +193,7 @@ SPDX-License-Identifier: Apache-2.0 */
169193
zephyr_udc0: &usbd {
170194
compatible = "nordic,nrf-usbd";
171195
status = "okay";
172-
};
196+
cdc_acm_uart0: cdc_acm_uart0 {
197+
compatible = "zephyr,cdc-acm-uart";
198+
};
199+
};

boards/ilabs/challenger_840_ble/challenger_840_ble_defconfig

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@ CONFIG_REGULATOR=y
1717
CONFIG_VOLTAGE_DIVIDER=y
1818

1919
# Enable console
20-
CONFIG_CONSOLE=y
21-
CONFIG_UART_CONSOLE=y
20+
#CONFIG_CONSOLE=y
21+
#CONFIG_UART_CONSOLE=y
2222

2323
# 32kHz clock source
24+
CONFIG_CLOCK_CONTROL=y
25+
CONFIG_CLOCK_CONTROL_NRF=y
2426
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
2527
CONFIG_CLOCK_CONTROL_NRF_K32SRC_500PPM=y
2628

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*
2+
* Copyright (c) 2024 Jacob Winther
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
chosen {
9+
zephyr,sram = &sram0;
10+
zephyr,flash = &flash0;
11+
zephyr,code-partition = &slot0_partition;
12+
};
13+
};
14+
15+
&flash0 {
16+
partitions {
17+
compatible = "fixed-partitions";
18+
#address-cells = <1>;
19+
#size-cells = <1>;
20+
21+
boot_partition: partition@0 {
22+
label = "mcuboot";
23+
reg = <0x00000000 0x0000C000>;
24+
};
25+
slot0_partition: partition@c000 {
26+
label = "image-0";
27+
reg = <0x0000C000 0x00077000>;
28+
};
29+
slot1_partition: partition@83000 {
30+
label = "image-1";
31+
reg = <0x00083000 0x00075000>;
32+
};
33+
34+
};
35+
};

boards/ilabs/challenger_840_ble/challenger_840_ble_partition_uf2.dtsi

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ SPDX-License-Identifier: Apache-2.0 */
3232
* The flash starting at 0x000ed000 and ending at
3333
* 0x000f4000 is reserved for use by the application.
3434
*/
35-
storage_partition: partition@ed000 {
36-
label = "storage";
37-
reg = <0x0000ed000 DT_SIZE_K(28)>;
38-
};
3935

4036
boot_partition: partition@f4000 {
4137
label = "UF2";

boards/ilabs/challenger_840_ble/challenger_840_ble_uf2.dts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
/ {
1212
model = "iLabs Challenger 840 BLE UF2";
13-
compatible = "adafruit,feather-nrf52840-uf2";
13+
compatible = "adafruit,feather-nrf52840";
1414

1515
chosen {
1616
zephyr,console = &cdc_acm_uart0;
@@ -21,10 +21,4 @@
2121
};
2222

2323
};
24-
25-
zephyr_udc0: &usbd {
26-
cdc_acm_uart0: cdc_acm_uart0 {
27-
compatible = "zephyr,cdc-acm-uart";
28-
};
29-
};
3024

boards/ilabs/challenger_840_ble/challenger_840_ble_uf2_defconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ CONFIG_CONSOLE=y
3535
CONFIG_UART_CONSOLE=y
3636

3737
# 32kHz clock source
38+
CONFIG_CLOCK_CONTROL=y
39+
CONFIG_CLOCK_CONTROL_NRF=y
3840
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
3941
CONFIG_CLOCK_CONTROL_NRF_K32SRC_500PPM=y
4042

0 commit comments

Comments
 (0)