Skip to content

Commit

Permalink
Make IRAM section name configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
cpq committed Dec 1, 2024
1 parent c5fda07 commit 5072088
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion mongoose.h
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,10 @@ struct timeval {
#define MG_ENABLE_TCPIP_PRINT_DEBUG_STATS 0
#endif

#ifndef MG_IRAM_SECTION_NAME
#define MG_IRAM_SECTION_NAME ".iram"
#endif




Expand Down Expand Up @@ -2669,7 +2673,7 @@ void mg_rpc_list(struct mg_rpc_req *r);
#else
#ifndef MG_IRAM
#if defined(__GNUC__)
#define MG_IRAM __attribute__((noinline, section(".iram")))
#define MG_IRAM __attribute__((noinline, section(MG_IRAM_SECTION_NAME)))
#else
#define MG_IRAM
#endif // compiler
Expand Down
4 changes: 4 additions & 0 deletions src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,7 @@
#ifndef MG_ENABLE_TCPIP_PRINT_DEBUG_STATS
#define MG_ENABLE_TCPIP_PRINT_DEBUG_STATS 0
#endif

#ifndef MG_IRAM_SECTION_NAME
#define MG_IRAM_SECTION_NAME ".iram"
#endif
2 changes: 1 addition & 1 deletion src/ota.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#else
#ifndef MG_IRAM
#if defined(__GNUC__)
#define MG_IRAM __attribute__((noinline, section(".iram")))
#define MG_IRAM __attribute__((noinline, section(MG_IRAM_SECTION_NAME)))
#else
#define MG_IRAM
#endif // compiler
Expand Down

0 comments on commit 5072088

Please sign in to comment.