cancel
Showing results for 
Search instead for 
Did you mean: 

CCM and Structures

benoit2
Associate II
Posted on June 05, 2015 at 16:07

Hi everyone,

I need to put the maximum of my data in the CCM. This is already done for simple types like this :

uint32_t memory_dur_init __attribute__ ((section(
''.ccm''
)));

I'm scratching my head for structures :

typedef
struct
Track Track;
struct
Track {
/* EFFETS */
uint8_t effect_count;
Effect* effect_tab[DEFAULT_EFFECT_NUMBER_MAX];
Pending_List* pending_list_note_on; 
On_Off_List* on_off_list;
List_Out_List* list_out_list;
CC_Param_Pool* cc_param_pool;
uint64_t cc_rec_flags[CC_REC_FLAG_NUM];
};

I declare them like this :

Track* track = pvPortMalloc(
sizeof
(*track));

Is it possible to malloc them in the CCM..? Cheers, Ben #stm32 #ccm
1 REPLY 1
Posted on June 05, 2015 at 17:01

Yes, you'd basically need to refine your allocator code to understand the multiple arenas from which to draw memory. I've covered this for Keil and GNU/GCC on previous threads.

 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..