Skip to content

Commit fa613dd

Browse files
committed
Add UART support to RP2 platform
Signed-off-by: Paul Guyot <pguyot@kallisys.net>
1 parent 9af830e commit fa613dd

File tree

3 files changed

+379
-1
lines changed

3 files changed

+379
-1
lines changed

libs/avm_rp2/src/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ set(ERLANG_MODULES
2727
i2c
2828
pico
2929
spi
30+
uart
3031
)
3132

3233
pack_archive(avm_rp2 DEPENDS_ON eavmlib ERLC_FLAGS +warnings_as_errors MODULES ${ERLANG_MODULES})

src/platforms/rp2/src/lib/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ set(SOURCE_FILES
3333
gpiodriver.c
3434
i2cdriver.c
3535
spidriver.c
36+
uartdriver.c
3637
networkdriver.c
3738
otp_crypto_platform.c
3839
platform_defaultatoms.c
@@ -61,6 +62,7 @@ target_link_libraries(
6162
hardware_gpio
6263
hardware_i2c
6364
hardware_spi
65+
hardware_uart
6466
hardware_sync
6567
pico_float
6668
pico_mbedtls
@@ -125,4 +127,4 @@ if (NOT AVM_DISABLE_JIT)
125127
target_link_options(libAtomVM${PLATFORM_LIB_SUFFIX} PUBLIC "SHELL:-Wl,-u -Wl,jit_stream_flash_get_nif")
126128
endif()
127129

128-
target_link_options(libAtomVM${PLATFORM_LIB_SUFFIX} PUBLIC "SHELL:-Wl,-u -Wl,gpio_nif -Wl,-u -Wl,i2c_nif -Wl,-u -Wl,spi_nif -Wl,-u -Wl,otp_crypto_nif")
130+
target_link_options(libAtomVM${PLATFORM_LIB_SUFFIX} PUBLIC "SHELL:-Wl,-u -Wl,gpio_nif -Wl,-u -Wl,i2c_nif -Wl,-u -Wl,spi_nif -Wl,-u -Wl,uart_nif -Wl,-u -Wl,otp_crypto_nif")

0 commit comments

Comments
 (0)