Skip to content

Commit ddf2c13

Browse files
sylvioalvesnordicjm
authored andcommitted
boards: xtensa: olimex_esp32_evb: Convert to v2
Converts the board to hwmv2 Signed-off-by: Sylvio Alves <[email protected]>
1 parent 92a9993 commit ddf2c13

16 files changed

+138
-25
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_OLIMEX_ESP32_EVB
5+
select SOC_ESP32_PROCPU if BOARD_OLIMEX_ESP32_EVB_ESP32_PROCPU
6+
select SOC_ESP32_APPCPU if BOARD_OLIMEX_ESP32_EVB_ESP32_APPCPU

boards/boards_legacy/xtensa/olimex_esp32_evb/Kconfig.defconfig renamed to boards/olimex/olimex_esp32_evb/Kconfig.defconfig

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,7 @@
33
# Copyright (c) 2022 Henrik Brix Andersen <[email protected]>
44
# SPDX-License-Identifier: Apache-2.0
55

6-
if BOARD_OLIMEX_ESP32_EVB
7-
8-
config BOARD
9-
default "olimex_esp32_evb"
10-
11-
config ENTROPY_GENERATOR
12-
default y
6+
if BOARD_OLIMEX_ESP32_EVB_ESP32_PROCPU
137

148
config HEAP_MEM_POOL_ADD_SIZE_BOARD
159
int
@@ -22,4 +16,11 @@ choice BT_HCI_BUS_TYPE
2216
default BT_ESP32 if BT
2317
endchoice
2418

25-
endif # BOARD_OLIMEX_ESP32_EVB
19+
endif # BOARD_OLIMEX_ESP32_EVB_ESP32_PROCPU
20+
21+
if BOARD_OLIMEX_ESP32_EVB_ESP32_APPCPU
22+
23+
config HEAP_MEM_POOL_ADD_SIZE_BOARD
24+
default 256
25+
26+
endif # BOARD_OLIMEX_ESP32_EVB_ESP32_APPCPU

boards/boards_legacy/xtensa/olimex_esp32_evb/Kconfig.board renamed to boards/olimex/olimex_esp32_evb/Kconfig.olimex_esp32_evb

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,4 @@
44
# SPDX-License-Identifier: Apache-2.0
55

66
config BOARD_OLIMEX_ESP32_EVB
7-
bool "Olimex ESP32-EVB"
8-
depends on SOC_SERIES_ESP32
9-
10-
choice SOC_PART_NUMBER
11-
default SOC_ESP32_WROVER_E_N8R2
12-
endchoice
7+
select SOC_ESP32_WROVER_E_N8R2
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
board:
2+
name: olimex_esp32_evb
3+
vendor: olimex
4+
socs:
5+
- name: esp32

boards/boards_legacy/xtensa/olimex_esp32_evb/doc/index.rst renamed to boards/olimex/olimex_esp32_evb/doc/index.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,9 @@ Zephyr build. Output is structured by the domain subdirectories:
160160
161161
build/
162162
├── hello_world
163-
   └── zephyr
164-
   ├── zephyr.elf
165-
   └── zephyr.bin
163+
└── zephyr
164+
├── zephyr.elf
165+
└── zephyr.bin
166166
├── mcuboot
167167
│ └── zephyr
168168
│ ├── zephyr.elf
@@ -194,7 +194,7 @@ Build and flash applications as usual (see :ref:`build_an_application` and
194194

195195
.. zephyr-app-commands::
196196
:zephyr-app: samples/hello_world
197-
:board: olimex_esp32_evb
197+
:board: olimex_esp32_evb/esp32/procpu
198198
:goals: build
199199

200200
The usual ``flash`` target will work with the ``olimex_esp32_evb`` board
@@ -203,7 +203,7 @@ application.
203203

204204
.. zephyr-app-commands::
205205
:zephyr-app: samples/hello_world
206-
:board: olimex_esp32_evb
206+
:board: olimex_esp32_evb/esp32/procpu
207207
:goals: flash
208208

209209
Open the serial monitor using the following command:
@@ -235,15 +235,15 @@ Here is an example for building the :ref:`hello_world` application.
235235

236236
.. zephyr-app-commands::
237237
:zephyr-app: samples/hello_world
238-
:board: olimex_esp32_evb
238+
:board: olimex_esp32_evb/esp32/procpu
239239
:goals: build flash
240240
:gen-args: -DOPENOCD=<path/to/bin/openocd> -DOPENOCD_DEFAULT_PATH=<path/to/openocd/share/openocd/scripts>
241241

242242
You can debug an application in the usual way. Here is an example for the :ref:`hello_world` application.
243243

244244
.. zephyr-app-commands::
245245
:zephyr-app: samples/hello_world
246-
:board: olimex_esp32_evb
246+
:board: olimex_esp32_evb/esp32/procpu
247247
:goals: debug
248248

249249
References
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
/*
2+
* Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
/dts-v1/;
7+
8+
#include <espressif/esp32/esp32_appcpu.dtsi>
9+
10+
/ {
11+
model = "Espressif ESP32-DevkitC APPCPU";
12+
compatible = "espressif,esp32";
13+
14+
chosen {
15+
zephyr,sram = &sram0;
16+
zephyr,ipc_shm = &shm0;
17+
zephyr,ipc = &ipm0;
18+
};
19+
};
20+
21+
&cpu0 {
22+
clock-frequency = <ESP32_CLK_CPU_240M>;
23+
};
24+
25+
&cpu1 {
26+
clock-frequency = <ESP32_CLK_CPU_240M>;
27+
};
28+
29+
&ipm0 {
30+
status = "okay";
31+
};
32+
33+
&trng0 {
34+
status = "okay";
35+
};
36+
37+
&flash0 {
38+
status = "okay";
39+
partitions {
40+
compatible = "fixed-partitions";
41+
#address-cells = <1>;
42+
#size-cells = <1>;
43+
44+
/* Reserve 60kB for the bootloader */
45+
boot_partition: partition@1000 {
46+
label = "mcuboot";
47+
reg = <0x00001000 0x0000F000>;
48+
read-only;
49+
};
50+
51+
/* Reserve 1024kB for the application in slot 0 */
52+
slot0_partition: partition@10000 {
53+
label = "image-0";
54+
reg = <0x00010000 0x00100000>;
55+
};
56+
57+
/* Reserve 1024kB for the application in slot 1 */
58+
slot1_partition: partition@110000 {
59+
label = "image-1";
60+
reg = <0x00110000 0x00100000>;
61+
};
62+
63+
/* Reserve 256kB for the scratch partition */
64+
scratch_partition: partition@210000 {
65+
label = "image-scratch";
66+
reg = <0x00210000 0x00040000>;
67+
};
68+
69+
storage_partition: partition@250000 {
70+
label = "storage";
71+
reg = <0x00250000 0x00006000>;
72+
};
73+
};
74+
};

0 commit comments

Comments
 (0)