diff --git a/cores/arduino/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/objects.h b/cores/arduino/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/objects.h index f5f44a58f..0231968bb 100644 --- a/cores/arduino/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/objects.h +++ b/cores/arduino/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/objects.h @@ -33,6 +33,7 @@ extern "C" { #include "pico/assert.h" #include "pico/time.h" #include "pico/types.h" +#include "pico/rand.h" #include "hardware/pwm.h" #include "hardware/adc.h" #include "hardware/resets.h" @@ -122,6 +123,12 @@ struct flash_s { uint32_t dummy; }; +#if DEVICE_TRNG +struct trng_s { + uint8_t not_used; +}; +#endif + typedef struct gpio_s gpio_t; typedef struct serial_s serial_t; diff --git a/cores/arduino/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2_common/hardware_sync/include/hardware/sync.h b/cores/arduino/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2_common/hardware_sync/include/hardware/sync.h index 8f91d5595..4f076aba0 100644 --- a/cores/arduino/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2_common/hardware_sync/include/hardware/sync.h +++ b/cores/arduino/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2_common/hardware_sync/include/hardware/sync.h @@ -70,6 +70,11 @@ typedef volatile uint32_t spin_lock_t; #define PICO_SPINLOCK_ID_HARDWARE_CLAIM 11 #endif +// PICO_CONFIG: PICO_SPINLOCK_ID_RAND, Spinlock ID for Random Number Generator, min=0, max=31, default=12, group=hardware_sync +#ifndef PICO_SPINLOCK_ID_RAND +#define PICO_SPINLOCK_ID_RAND 12 +#endif + // PICO_CONFIG: PICO_SPINLOCK_ID_OS1, First Spinlock ID reserved for use by low level OS style software, min=0, max=31, default=14, group=hardware_sync #ifndef PICO_SPINLOCK_ID_OS1 #define PICO_SPINLOCK_ID_OS1 14 diff --git a/cores/arduino/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2_common/pico_platform/include/pico/platform.h b/cores/arduino/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2_common/pico_platform/include/pico/platform.h index ee1d360ce..ea16d9734 100644 --- a/cores/arduino/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2_common/pico_platform/include/pico/platform.h +++ b/cores/arduino/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2_common/pico_platform/include/pico/platform.h @@ -151,14 +151,14 @@ extern "C" { * * For example a `uint32_t` foo that will retain its value if the program is restarted by reset. * - * uint32_t __uninitialized_ram("my_group_name") foo; + * uint32_t __uninitialized_ram(foo); * - * The section attribute is `.uninitialized_ram.` + * The section attribute is `.uninitialized_data.` * * \param group a string suffix to use in the section name to distinguish groups that can be linker * garbage-collected independently */ -#define __uninitialized_ram(group) __attribute__((section(".uninitialized_ram." #group))) group +#define __uninitialized_ram(group) __attribute__((section(".uninitialized_data." #group))) group /*! \brief Section attribute macro for placement in flash even in a COPY_TO_RAM binary * \ingroup pico_platform diff --git a/variants/NANO_RP2040_CONNECT/defines.txt b/variants/NANO_RP2040_CONNECT/defines.txt index 60ddca583..5f8190305 100644 --- a/variants/NANO_RP2040_CONNECT/defines.txt +++ b/variants/NANO_RP2040_CONNECT/defines.txt @@ -16,11 +16,12 @@ -DDEVICE_SERIAL=1 -DDEVICE_SERIAL_FC=1 -DDEVICE_SPI=1 +-DDEVICE_TRNG=1 -DDEVICE_USBDEVICE=1 -DDEVICE_USTICKER=1 -DDEVICE_WATCHDOG=1 -D__MBED__=1 --DMBED_BUILD_TIMESTAMP=1714634413.5827048 +-DMBED_BUILD_TIMESTAMP=1718377159.4257615 -D__MBED_CMSIS_RTOS_CM -DMBED_MPU_CUSTOM -DMBEDTLS_ENTROPY_NV_SEED diff --git a/variants/NANO_RP2040_CONNECT/includes.txt b/variants/NANO_RP2040_CONNECT/includes.txt index d84e91a12..dbd89c569 100644 --- a/variants/NANO_RP2040_CONNECT/includes.txt +++ b/variants/NANO_RP2040_CONNECT/includes.txt @@ -325,6 +325,9 @@ -iwithprefixbefore/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2_common/pico_platform -iwithprefixbefore/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2_common/pico_platform/include -iwithprefixbefore/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2_common/pico_platform/include/pico +-iwithprefixbefore/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2_common/pico_rand +-iwithprefixbefore/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2_common/pico_rand/include +-iwithprefixbefore/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2_common/pico_rand/include/pico -iwithprefixbefore/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2_common/pico_runtime -iwithprefixbefore/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2_common/pico_runtime/include -iwithprefixbefore/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2_common/pico_runtime/include/pico diff --git a/variants/NANO_RP2040_CONNECT/libs/libmbed.a b/variants/NANO_RP2040_CONNECT/libs/libmbed.a index b9e8ff1b7..4c51ab1a9 100644 Binary files a/variants/NANO_RP2040_CONNECT/libs/libmbed.a and b/variants/NANO_RP2040_CONNECT/libs/libmbed.a differ