I want to use CCMRAM in 407. Is there a possibility of getting malloc to allocate CCMRAM instead of regular RAM? I changed the linker script to put stack and heap in CCMRAM but the issue is CCMRAM clock has to be enabled before any call takes place.
To overcome this problem I modified the start up assembly file by enabling the clock (AHB1ENR bit 20) at the very beginning. The program which was freezing before enabling the clock started working but stops/freezes after executing a few C statements. I can declare global variables in CCMRAM by providing attribute, but this is resulting in a large chunk (if I use a buffer of say 32K in CCMRAM) FLASH or program memory of 32k is getting filled with 00s (I think to copy initialized variables at start up). What is the workaround please? Thank you for your time.