Skip to content

Commit 66b473f

Browse files
committed
zephyr: add rmt support
Add expected source files to CMakeLists.txt for each relevant targets. Signed-off-by: Joel Guittet <joelguittet@gmail.com>
1 parent cab74bf commit 66b473f

File tree

12 files changed

+215
-9
lines changed

12 files changed

+215
-9
lines changed

zephyr/esp32/CMakeLists.txt

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ if(CONFIG_SOC_SERIES_ESP32)
6363
../../components/esp_hal_pcnt/${CONFIG_SOC_SERIES}/include
6464
../../components/esp_hal_pmu/include
6565
../../components/esp_hal_pmu/${CONFIG_SOC_SERIES}/include
66+
../../components/esp_hal_rmt/include
67+
../../components/esp_hal_rmt/${CONFIG_SOC_SERIES}/include/
6668
../../components/esp_hal_rtc_timer/include
6769
../../components/esp_hal_rtc_timer/${CONFIG_SOC_SERIES}/include
6870
../../components/esp_hal_sd/include
@@ -165,7 +167,6 @@ if(CONFIG_SOC_SERIES_ESP32)
165167
../../components/efuse/${CONFIG_SOC_SERIES}/esp_efuse_fields.c
166168
../../components/efuse/${CONFIG_SOC_SERIES}/esp_efuse_utility.c
167169
../../components/efuse/src/efuse_controller/keys/without_key_purposes/three_key_blocks/esp_efuse_api_key.c
168-
../../components/esp_hw_support/esp_memory_utils.c
169170
)
170171

171172
if(CONFIG_SOC_FLASH_ESP32 OR NOT CONFIG_BOOTLOADER_MCUBOOT)
@@ -257,6 +258,14 @@ if(CONFIG_SOC_SERIES_ESP32)
257258
../../components/esp_driver_dac/dac_common.c
258259
)
259260

261+
zephyr_sources_ifdef(CONFIG_ESPRESSIF_RMT
262+
../../components/esp_hal_rmt/rmt_hal.c
263+
../../components/esp_hal_gpio/gpio_hal.c
264+
../../components/esp_driver_gpio/src/gpio.c
265+
../../components/esp_driver_gpio/src/rtc_io.c
266+
../../components/esp_hal_rmt/${CONFIG_SOC_SERIES}/rmt_periph.c
267+
)
268+
260269
if(CONFIG_PM OR CONFIG_POWEROFF)
261270
zephyr_sources(
262271
../../components/esp_hw_support/sleep_gpio.c
@@ -266,7 +275,6 @@ if(CONFIG_SOC_SERIES_ESP32)
266275
../../components/esp_hw_support/sleep_modem.c
267276
../../components/esp_hw_support/sleep_uart.c
268277
../../components/esp_hw_support/clk_utils.c
269-
../../components/esp_hw_support/esp_memory_utils.c
270278
../../components/esp_hal_touch_sens/touch_sens_hal.c
271279
../../components/bootloader_support/bootloader_flash/src/bootloader_flash_config_${CONFIG_SOC_SERIES}.c
272280
)
@@ -342,6 +350,7 @@ if(CONFIG_SOC_SERIES_ESP32)
342350
../../components/esp_hw_support/clk_ctrl_os.c
343351
../../components/esp_hw_support/cpu.c
344352
../../components/esp_hw_support/esp_clk.c
353+
../../components/esp_hw_support/esp_memory_utils.c
345354
../../components/esp_hw_support/hw_random.c
346355
../../components/esp_hw_support/mac_addr.c
347356
../../components/esp_hw_support/periph_ctrl.c

zephyr/esp32c3/CMakeLists.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ if(CONFIG_SOC_SERIES_ESP32C3)
5555
../../components/esp_hal_mspi/${CONFIG_SOC_SERIES}/include
5656
../../components/esp_hal_pmu/include
5757
../../components/esp_hal_pmu/${CONFIG_SOC_SERIES}/include
58+
../../components/esp_hal_rmt/include
59+
../../components/esp_hal_rmt/${CONFIG_SOC_SERIES}/include/
5860
../../components/esp_hal_rtc_timer/include
5961
../../components/esp_hal_rtc_timer/${CONFIG_SOC_SERIES}/include
6062
../../components/esp_hal_security/include
@@ -223,6 +225,14 @@ if(CONFIG_SOC_SERIES_ESP32C3)
223225
../../components/esp_hal_ledc/ledc_hal.c
224226
)
225227

228+
zephyr_sources_ifdef(CONFIG_ESPRESSIF_RMT
229+
../../components/esp_hal_rmt/rmt_hal.c
230+
../../components/esp_hal_gpio/gpio_hal.c
231+
../../components/esp_driver_gpio/src/gpio.c
232+
../../components/esp_driver_gpio/src/rtc_io.c
233+
../../components/esp_hal_rmt/${CONFIG_SOC_SERIES}/rmt_periph.c
234+
)
235+
226236
if(CONFIG_PM OR CONFIG_POWEROFF)
227237
zephyr_sources(
228238
../../components/esp_hw_support/sleep_gpio.c
@@ -234,7 +244,6 @@ if(CONFIG_SOC_SERIES_ESP32C3)
234244
../../components/esp_hal_pmu/${CONFIG_SOC_SERIES}/rtc_cntl_hal.c
235245
../../components/esp_hw_support/sleep_uart.c
236246
../../components/esp_hw_support/clk_utils.c
237-
../../components/esp_hw_support/esp_memory_utils.c
238247
)
239248
endif()
240249

@@ -305,6 +314,7 @@ if(CONFIG_SOC_SERIES_ESP32C3)
305314
../../components/esp_hw_support/clk_ctrl_os.c
306315
../../components/esp_hw_support/cpu.c
307316
../../components/esp_hw_support/esp_clk.c
317+
../../components/esp_hw_support/esp_memory_utils.c
308318
../../components/esp_hw_support/hw_random.c
309319
../../components/esp_hw_support/mac_addr.c
310320
../../components/esp_hw_support/periph_ctrl.c

zephyr/esp32c6/CMakeLists.txt

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ if(CONFIG_SOC_SERIES_ESP32C6)
6565
../../components/esp_hal_pcnt/${CONFIG_SOC_SERIES}/include
6666
../../components/esp_hal_pmu/include
6767
../../components/esp_hal_pmu/${CONFIG_SOC_SERIES}/include
68+
../../components/esp_hal_rmt/include
69+
../../components/esp_hal_rmt/${CONFIG_SOC_SERIES}/include/
6870
../../components/esp_hal_rtc_timer/include
6971
../../components/esp_hal_rtc_timer/${CONFIG_SOC_SERIES}/include
7072
../../components/esp_hal_sd/include
@@ -224,6 +226,14 @@ if(CONFIG_SOC_SERIES_ESP32C6)
224226
)
225227
endif()
226228

229+
zephyr_sources_ifdef(CONFIG_ESPRESSIF_RMT
230+
../../components/esp_hal_rmt/rmt_hal.c
231+
../../components/esp_hal_gpio/gpio_hal.c
232+
../../components/esp_driver_gpio/src/gpio.c
233+
../../components/esp_driver_gpio/src/rtc_io.c
234+
../../components/esp_hal_rmt/${CONFIG_SOC_SERIES}/rmt_periph.c
235+
)
236+
227237
if(CONFIG_PM OR CONFIG_POWEROFF)
228238
zephyr_sources(
229239
../../components/esp_driver_gpio/src/gpio.c
@@ -241,7 +251,6 @@ if(CONFIG_SOC_SERIES_ESP32C6)
241251
../../components/esp_hal_pmu/${CONFIG_SOC_SERIES}/pmu_hal.c
242252
../../components/esp_hw_support/sleep_uart.c
243253
../../components/esp_hw_support/clk_utils.c
244-
../../components/esp_hw_support/esp_memory_utils.c
245254
../../components/esp_hw_support/port/${CONFIG_SOC_SERIES}/peripheral_domain_pd.c
246255
../common/pm_impl_zephyr.c
247256
)
@@ -279,12 +288,15 @@ if(CONFIG_SOC_SERIES_ESP32C6)
279288
../../components/esp_hal_clock/${CONFIG_SOC_SERIES}/clk_tree_hal.c
280289
../../components/esp_hal_gpio/${CONFIG_SOC_SERIES}/rtc_io_periph.c
281290
../../components/esp_hal_gpio/rtc_io_hal.c
291+
../../components/esp_hal_pmu/${CONFIG_SOC_SERIES}/pau_hal.c
292+
../../components/esp_hal_pmu/${CONFIG_SOC_SERIES}/pmu_hal.c
282293
../../components/esp_hal_systimer/systimer_hal.c
283294
../../components/esp_hal_wdt/wdt_hal_iram.c
284295
../../components/esp_hw_support/adc_share_hw_ctrl.c
285296
../../components/esp_hw_support/clk_ctrl_os.c
286297
../../components/esp_hw_support/cpu.c
287298
../../components/esp_hw_support/esp_clk.c
299+
../../components/esp_hw_support/esp_memory_utils.c
288300
../../components/esp_hw_support/hw_random.c
289301
../../components/esp_hw_support/mac_addr.c
290302
../../components/esp_hw_support/modem/modem_clock.c
@@ -304,6 +316,7 @@ if(CONFIG_SOC_SERIES_ESP32C6)
304316
../../components/esp_hw_support/port/${CONFIG_SOC_SERIES}/sar_periph_ctrl.c
305317
../../components/esp_hw_support/port/${CONFIG_SOC_SERIES}/systimer.c
306318
../../components/esp_hw_support/port/esp_clk_tree_common.c
319+
../../components/esp_hw_support/port/pau_regdma.c
307320
../../components/esp_hw_support/port/regdma_link.c
308321
../../components/esp_hw_support/regi2c_ctrl.c
309322
../../components/esp_hw_support/rtc_module.c

zephyr/esp32h2/CMakeLists.txt

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ if(CONFIG_SOC_SERIES_ESP32H2)
6565
../../components/esp_hal_pcnt/${CONFIG_SOC_SERIES}/include
6666
../../components/esp_hal_pmu/include
6767
../../components/esp_hal_pmu/${CONFIG_SOC_SERIES}/include
68+
../../components/esp_hal_rmt/include
69+
../../components/esp_hal_rmt/${CONFIG_SOC_SERIES}/include/
6870
../../components/esp_hal_rtc_timer/include
6971
../../components/esp_hal_rtc_timer/${CONFIG_SOC_SERIES}/include
7072
../../components/esp_hal_security/include
@@ -226,12 +228,15 @@ if(CONFIG_SOC_SERIES_ESP32H2)
226228
../../components/esp_hal_clock/${CONFIG_SOC_SERIES}/clk_tree_hal.c
227229
../../components/esp_hal_gpio/${CONFIG_SOC_SERIES}/rtc_io_periph.c
228230
../../components/esp_hal_gpio/rtc_io_hal.c
231+
../../components/esp_hal_pmu/${CONFIG_SOC_SERIES}/pau_hal.c
232+
../../components/esp_hal_pmu/${CONFIG_SOC_SERIES}/pmu_hal.c
229233
../../components/esp_hal_systimer/systimer_hal.c
230234
../../components/esp_hal_wdt/wdt_hal_iram.c
231235
../../components/esp_hw_support/adc_share_hw_ctrl.c
232236
../../components/esp_hw_support/clk_ctrl_os.c
233237
../../components/esp_hw_support/cpu.c
234238
../../components/esp_hw_support/esp_clk.c
239+
../../components/esp_hw_support/esp_memory_utils.c
235240
../../components/esp_hw_support/hw_random.c
236241
../../components/esp_hw_support/mac_addr.c
237242
../../components/esp_hw_support/modem/modem_clock.c
@@ -251,6 +256,7 @@ if(CONFIG_SOC_SERIES_ESP32H2)
251256
../../components/esp_hw_support/port/${CONFIG_SOC_SERIES}/sar_periph_ctrl.c
252257
../../components/esp_hw_support/port/${CONFIG_SOC_SERIES}/systimer.c
253258
../../components/esp_hw_support/port/esp_clk_tree_common.c
259+
../../components/esp_hw_support/port/pau_regdma.c
254260
../../components/esp_hw_support/port/regdma_link.c
255261
../../components/esp_hw_support/regi2c_ctrl.c
256262
../../components/esp_hw_support/rtc_module.c
@@ -372,6 +378,14 @@ if(CONFIG_SOC_SERIES_ESP32H2)
372378
../../components/esp_hal_pcnt/pcnt_hal.c
373379
)
374380

381+
zephyr_sources_ifdef(CONFIG_ESPRESSIF_RMT
382+
../../components/esp_hal_rmt/rmt_hal.c
383+
../../components/esp_hal_gpio/gpio_hal.c
384+
../../components/esp_driver_gpio/src/gpio.c
385+
../../components/esp_driver_gpio/src/rtc_io.c
386+
../../components/esp_hal_rmt/${CONFIG_SOC_SERIES}/rmt_periph.c
387+
)
388+
375389
if(CONFIG_PM OR CONFIG_POWEROFF)
376390
zephyr_sources(
377391
../../components/esp_driver_gpio/src/gpio.c
@@ -392,7 +406,6 @@ if(CONFIG_SOC_SERIES_ESP32H2)
392406
../../components/esp_hal_pmu/${CONFIG_SOC_SERIES}/pmu_hal.c
393407
../../components/esp_hw_support/sleep_uart.c
394408
../../components/esp_hw_support/clk_utils.c
395-
../../components/esp_hw_support/esp_memory_utils.c
396409
../../components/esp_hw_support/port/${CONFIG_SOC_SERIES}/peripheral_domain_pd.c
397410
../common/pm_impl_zephyr.c
398411
)

zephyr/esp32s2/CMakeLists.txt

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ if(CONFIG_SOC_SERIES_ESP32S2)
5757
../../components/esp_hal_pcnt/${CONFIG_SOC_SERIES}/include
5858
../../components/esp_hal_pmu/include
5959
../../components/esp_hal_pmu/${CONFIG_SOC_SERIES}/include
60+
../../components/esp_hal_rmt/include
61+
../../components/esp_hal_rmt/${CONFIG_SOC_SERIES}/include/
6062
../../components/esp_hal_rtc_timer/include
6163
../../components/esp_hal_rtc_timer/${CONFIG_SOC_SERIES}/include
6264
../../components/esp_hal_security/include
@@ -200,7 +202,6 @@ if(CONFIG_SOC_SERIES_ESP32S2)
200202
zephyr_compile_definitions(CONFIG_SPIRAM)
201203
zephyr_sources(
202204
../../components/esp_psram/system_layer/esp_psram.c
203-
../../components/esp_hw_support/esp_memory_utils.c
204205
../../components/esp_psram/${CONFIG_SOC_SERIES}/esp_psram_impl_quad.c
205206
../../components/esp_hw_support/esp_gpio_reserve.c
206207
../../components/hal/mmu_hal.c
@@ -261,6 +262,14 @@ if(CONFIG_SOC_SERIES_ESP32S2)
261262
endif()
262263
endif()
263264

265+
zephyr_sources_ifdef(CONFIG_ESPRESSIF_RMT
266+
../../components/esp_hal_rmt/rmt_hal.c
267+
../../components/esp_hal_gpio/gpio_hal.c
268+
../../components/esp_driver_gpio/src/gpio.c
269+
../../components/esp_driver_gpio/src/rtc_io.c
270+
../../components/esp_hal_rmt/${CONFIG_SOC_SERIES}/rmt_periph.c
271+
)
272+
264273
if(CONFIG_PM OR CONFIG_POWEROFF)
265274
zephyr_sources(
266275
../../components/esp_hw_support/sleep_gpio.c
@@ -270,7 +279,6 @@ if(CONFIG_SOC_SERIES_ESP32S2)
270279
../../components/esp_hal_touch_sens/esp32s2/touch_sensor_legacy_hal.c
271280
../../components/esp_hw_support/sleep_uart.c
272281
../../components/esp_hw_support/clk_utils.c
273-
../../components/esp_hw_support/esp_memory_utils.c
274282
../../components/esp_hal_touch_sens/touch_sens_hal.c
275283
)
276284
endif()
@@ -328,6 +336,7 @@ if(CONFIG_SOC_SERIES_ESP32S2)
328336
../../components/esp_hw_support/clk_ctrl_os.c
329337
../../components/esp_hw_support/cpu.c
330338
../../components/esp_hw_support/esp_clk.c
339+
../../components/esp_hw_support/esp_memory_utils.c
331340
../../components/esp_hw_support/hw_random.c
332341
../../components/esp_hw_support/mac_addr.c
333342
../../components/esp_hw_support/periph_ctrl.c

zephyr/esp32s3/CMakeLists.txt

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ if(CONFIG_SOC_SERIES_ESP32S3)
6565
../../components/esp_hal_pcnt/${CONFIG_SOC_SERIES}/include
6666
../../components/esp_hal_pmu/include
6767
../../components/esp_hal_pmu/${CONFIG_SOC_SERIES}/include
68+
../../components/esp_hal_rmt/include
69+
../../components/esp_hal_rmt/${CONFIG_SOC_SERIES}/include/
6870
../../components/esp_hal_rtc_timer/include
6971
../../components/esp_hal_rtc_timer/${CONFIG_SOC_SERIES}/include
7072
../../components/esp_hal_sd/include
@@ -292,7 +294,6 @@ if(CONFIG_SOC_SERIES_ESP32S3)
292294
zephyr_compile_definitions(CONFIG_SPIRAM)
293295
zephyr_sources(
294296
../../components/esp_psram/system_layer/esp_psram.c
295-
../../components/esp_hw_support/esp_memory_utils.c
296297
../../components/esp_hw_support/esp_gpio_reserve.c
297298
)
298299

@@ -319,14 +320,21 @@ if(CONFIG_SOC_SERIES_ESP32S3)
319320
../../components/esp_hal_lcd/lcd_hal.c
320321
)
321322

323+
zephyr_sources_ifdef(CONFIG_ESPRESSIF_RMT
324+
../../components/esp_hal_rmt/rmt_hal.c
325+
../../components/esp_hal_gpio/gpio_hal.c
326+
../../components/esp_driver_gpio/src/gpio.c
327+
../../components/esp_driver_gpio/src/rtc_io.c
328+
../../components/esp_hal_rmt/${CONFIG_SOC_SERIES}/rmt_periph.c
329+
)
330+
322331
if(CONFIG_PM OR CONFIG_POWEROFF)
323332
zephyr_sources(
324333
../../components/esp_hw_support/sleep_gpio.c
325334
../../components/esp_hw_support/sleep_event.c
326335
../../components/esp_hw_support/sleep_console.c
327336
../../components/esp_hw_support/sleep_uart.c
328337
../../components/esp_hw_support/clk_utils.c
329-
../../components/esp_hw_support/esp_memory_utils.c
330338
../../components/esp_driver_gpio/src/gpio.c
331339
../../components/esp_hw_support/sleep_modem.c
332340
../../components/esp_hal_touch_sens/touch_sens_hal.c
@@ -386,6 +394,7 @@ if(CONFIG_SOC_SERIES_ESP32S3)
386394
../../components/esp_hw_support/clk_ctrl_os.c
387395
../../components/esp_hw_support/cpu.c
388396
../../components/esp_hw_support/esp_clk.c
397+
../../components/esp_hw_support/esp_memory_utils.c
389398
../../components/esp_hw_support/hw_random.c
390399
../../components/esp_hw_support/mac_addr.c
391400
../../components/esp_hw_support/mspi/mspi_timing_tuning/mspi_timing_tuning.c

zephyr/port/pincfgs/esp32.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,3 +463,52 @@ sdhc0:
463463
sigi: host_card_write_prt_2
464464
gpio: [[5, 11], [16, 23], [25, 27], [32, 39]]
465465

466+
rmt:
467+
out0:
468+
sigo: rmt_sig_out0
469+
gpio: [[0, 39]]
470+
out1:
471+
sigo: rmt_sig_out1
472+
gpio: [[0, 39]]
473+
out2:
474+
sigo: rmt_sig_out2
475+
gpio: [[0, 39]]
476+
out3:
477+
sigo: rmt_sig_out3
478+
gpio: [[0, 39]]
479+
out4:
480+
sigo: rmt_sig_out4
481+
gpio: [[0, 39]]
482+
out5:
483+
sigo: rmt_sig_out5
484+
gpio: [[0, 39]]
485+
out6:
486+
sigo: rmt_sig_out6
487+
gpio: [[0, 39]]
488+
out7:
489+
sigo: rmt_sig_out7
490+
gpio: [[0, 39]]
491+
in0:
492+
sigi: rmt_sig_in0
493+
gpio: [[0, 39]]
494+
in1:
495+
sigi: rmt_sig_in1
496+
gpio: [[0, 39]]
497+
in2:
498+
sigi: rmt_sig_in2
499+
gpio: [[0, 39]]
500+
in3:
501+
sigi: rmt_sig_in3
502+
gpio: [[0, 39]]
503+
in4:
504+
sigi: rmt_sig_in4
505+
gpio: [[0, 39]]
506+
in5:
507+
sigi: rmt_sig_in5
508+
gpio: [[0, 39]]
509+
in6:
510+
sigi: rmt_sig_in6
511+
gpio: [[0, 39]]
512+
in7:
513+
sigi: rmt_sig_in7
514+
gpio: [[0, 39]]

zephyr/port/pincfgs/esp32c3.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,3 +141,17 @@ ledc:
141141
ch5:
142142
sigo: ledc_ls_sig_out5
143143
gpio: [[0, 21]]
144+
145+
rmt:
146+
out0:
147+
sigo: rmt_sig_out0
148+
gpio: [[0, 21]]
149+
out1:
150+
sigo: rmt_sig_out1
151+
gpio: [[0, 21]]
152+
in0:
153+
sigi: rmt_sig_in0
154+
gpio: [[0, 21]]
155+
in1:
156+
sigi: rmt_sig_in1
157+
gpio: [[0, 21]]

zephyr/port/pincfgs/esp32c6.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,3 +263,17 @@ pcnt3:
263263
ch1ctrl:
264264
sigi: pcnt_ctrl_ch1_in3
265265
gpio: [[0, 23]]
266+
267+
rmt:
268+
out0:
269+
sigo: rmt_sig_out0
270+
gpio: [[0, 23]]
271+
out1:
272+
sigo: rmt_sig_out1
273+
gpio: [[0, 23]]
274+
in0:
275+
sigi: rmt_sig_in0
276+
gpio: [[0, 23]]
277+
in1:
278+
sigi: rmt_sig_in1
279+
gpio: [[0, 23]]

0 commit comments

Comments
 (0)