File tree 2 files changed +2
-1
lines changed
2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ extern "C" {
31
31
*/
32
32
#define HEAP_ALIGN (ptr ) (((size_t)ptr + (HEAP_ALIGN_SIZE - 1)) & ~(HEAP_ALIGN_SIZE - 1))
33
33
34
+ #define MALLOC_CAP_EXEC (1 << 0) ///< Memory must be able to run executable code
34
35
#define MALLOC_CAP_32BIT (1 << 1) ///< Memory must allow for aligned 32-bit data accesses
35
36
#define MALLOC_CAP_8BIT (1 << 2) ///< Memory must allow for 8-bit data accesses
36
37
#define MALLOC_CAP_DMA (1 << 3) ///< Memory must be able to accessed by DMA
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ void heap_caps_init(void)
46
46
if (iram_size > HEAP_REGION_IRAM_MIN && iram_size < HEAP_REGION_IRAM_MAX ) {
47
47
g_heap_region [heap_region_num ].start_addr = (uint8_t * )& _iram_end ;
48
48
g_heap_region [heap_region_num ].total_size = iram_size ;
49
- g_heap_region [heap_region_num ].caps = MALLOC_CAP_32BIT ;
49
+ g_heap_region [heap_region_num ].caps = MALLOC_CAP_32BIT | MALLOC_CAP_EXEC ;
50
50
heap_region_num ++ ;
51
51
}
52
52
#endif
You can’t perform that action at this time.
0 commit comments