8000 Reduced iram usage · h2zero/NimBLE-Arduino@cf9e337 · GitHub
[go: up one dir, main page]

Skip to content

Commit cf9e337

Browse files
authored
Reduced iram usage
Removes the esp specific use of IRAM_ATTR as it causes issues with Arduino builds.
1 parent a0a4cdb commit cf9e337

File tree

4 files changed

+7
-12
lines changed

4 files changed

+7
-12
lines changed

src/nimble/esp_port/port/include/esp_nimble_cfg.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@
1818
#define MYNEWT_VAL(x) MYNEWT_VAL_ ## x
1919
#define MYNEWT_VAL_CHOICE(_name, _val) MYNEWT_VAL_ ## _name ## __ ## _val
2020

21-
#ifndef IRAM_ATTR_64MCPU
22-
#define IRAM_ATTR_64MCPU IRAM_ATTR
23-
#endif
24-
25-
2621
#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S3
2722
#define NIMBLE_CFG_CONTROLLER 0
2823
#else

src/nimble/esp_port/port/src/exp_nimble_mem.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include "nimconfig.h"
1212
#include "../include/esp_nimble_mem.h"
1313

14-
IRAM_ATTR void *nimble_platform_mem_malloc(size_t size)
14+
void *nimble_platform_mem_malloc(size_t size)
1515
{
1616
#ifdef CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_INTERNAL
1717
return heap_caps_malloc(size, MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT);
@@ -24,7 +24,7 @@
2424
#endif
2525
}
2626

27-
IRAM_ATTR void *nimble_platform_mem_calloc(size_t n, size_t size)
27+
void *nimble_platform_mem_calloc(size_t n, size_t size)
2828
{
2929
#ifdef CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_INTERNAL
3030
return heap_caps_calloc(n, size, MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT);
@@ -37,7 +37,7 @@
3737
#endif
3838
}
3939

40-
IRAM_ATTR void nimble_platform_mem_free(void *ptr)
40+
void nimble_platform_mem_free(void *ptr)
4141
{
4242
heap_caps_free(ptr);
4343
}

src/nimble/porting/nimble/src/nimble_port.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ nimble_port_stop(void)
312312
}
313313

314314
void
315-
IRAM_ATTR nimble_port_run(void)
315+
nimble_port_run(void)
316316
{
317317
struct ble_npl_event *ev;
318318

@@ -328,7 +328,7 @@ IRAM_ATTR nimble_port_run(void)
328328
}
329329

330330
struct ble_npl_eventq *
331-
IRAM_ATTR nimble_port_get_dflt_eventq(void)
331+
nimble_port_get_dflt_eventq(void)
332332
{
333333
return &g_eventq_dflt;
334334
}

src/nimble/porting/nimble/src/os_msys_init.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ static struct os_sanity_check os_msys_sc;
9898
* @return The msys pool's minimum safe buffer count.
9999
*/
100100
static int
101-
IRAM_ATTR os_msys_sanity_min_count(int idx)
101+
os_msys_sanity_min_count(int idx)
102102
{
103103
switch (idx) {
104104
case 0:
@@ -114,7 +114,7 @@ IRAM_ATTR os_msys_sanity_min_count(int idx)
114114
}
115115

116116
static int
117-
IRAM_ATTR os_msys_sanity(struct os_sanity_check *sc, void *arg)
117+
os_msys_sanity(struct os_sanity_check *sc, void *arg)
118118
{
119119
const struct os_mbuf_pool *omp;
120120
int min_count;

0 commit comments

Comments
 (0)
0