Skip to content

Commit

Permalink
NANO RP2040: rebuild libmbed.a
Browse files Browse the repository at this point in the history
  • Loading branch information
pennam committed Jun 17, 2024
1 parent 4d4db0f commit 5461939
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.<group>`
* The section attribute is `.uninitialized_data.<group>`
*
* \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
Expand Down
3 changes: 2 additions & 1 deletion variants/NANO_RP2040_CONNECT/defines.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions variants/NANO_RP2040_CONNECT/includes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Binary file modified variants/NANO_RP2040_CONNECT/libs/libmbed.a
Binary file not shown.

0 comments on commit 5461939

Please sign in to comment.