Skip to content

Reduced iram usage #948

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions src/nimble/esp_port/port/include/esp_nimble_cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@
#define MYNEWT_VAL(x) MYNEWT_VAL_ ## x
#define MYNEWT_VAL_CHOICE(_name, _val) MYNEWT_VAL_ ## _name ## __ ## _val

#ifndef IRAM_ATTR_64MCPU
#define IRAM_ATTR_64MCPU IRAM_ATTR
#endif


#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S3
#define NIMBLE_CFG_CONTROLLER 0
#else
Expand Down
6 changes: 3 additions & 3 deletions src/nimble/esp_port/port/src/exp_nimble_mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "nimconfig.h"
#include "../include/esp_nimble_mem.h"

IRAM_ATTR void *nimble_platform_mem_malloc(size_t size)
void *nimble_platform_mem_malloc(size_t size)
{
#ifdef CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_INTERNAL
return heap_caps_malloc(size, MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT);
Expand All @@ -24,7 +24,7 @@
#endif
}

IRAM_ATTR void *nimble_platform_mem_calloc(size_t n, size_t size)
void *nimble_platform_mem_calloc(size_t n, size_t size)
{
#ifdef CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_INTERNAL
return heap_caps_calloc(n, size, MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT);
Expand All @@ -37,7 +37,7 @@
#endif
}

IRAM_ATTR void nimble_platform_mem_free(void *ptr)
void nimble_platform_mem_free(void *ptr)
{
heap_caps_free(ptr);
}
Expand Down
4 changes: 2 additions & 2 deletions src/nimble/porting/nimble/src/nimble_port.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ nimble_port_stop(void)
}

void
IRAM_ATTR nimble_port_run(void)
nimble_port_run(void)
{
struct ble_npl_event *ev;

Expand All @@ -328,7 +328,7 @@ IRAM_ATTR nimble_port_run(void)
}

struct ble_npl_eventq *
IRAM_ATTR nimble_port_get_dflt_eventq(void)
nimble_port_get_dflt_eventq(void)
{
return &g_eventq_dflt;
}
Expand Down
4 changes: 2 additions & 2 deletions src/nimble/porting/nimble/src/os_msys_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ static struct os_sanity_check os_msys_sc;
* @return The msys pool's minimum safe buffer count.
*/
static int
IRAM_ATTR os_msys_sanity_min_count(int idx)
os_msys_sanity_min_count(int idx)
{
switch (idx) {
case 0:
Expand All @@ -114,7 +114,7 @@ IRAM_ATTR os_msys_sanity_min_count(int idx)
}

static int
IRAM_ATTR os_msys_sanity(struct os_sanity_check *sc, void *arg)
os_msys_sanity(struct os_sanity_check *sc, void *arg)
{
const struct os_mbuf_pool *omp;
int min_count;
Expand Down