Question
memory usage in stm32
Hi community!
I write a simple code in stm32 and I need to calculate the memory usage from the build analyzer
this is a part of the code
#define N 16146
volatile uint16_t adc_buffer[N];
int main(void)
{
HAL_Init();
SystemClock_Config();
MX_GPIO_Init();
MX_DMA_Init();
MX_ADC2_Init();
MX_TIM2_Init();
MX_TIM6_Init();
int i = 0;
while (1)
{
adc_buffer[i]=++i;
i=i%N;
}
}
it's just a simple code to test so I think the used RAM should be at least 32.292KB (16146*2) but in the build analyzer I got that I used just 1.86KB

and I don't find the variable adc_buffer in the memory details

I tried to change the build viewer refresh mode to auto and it still gave the same result
