FLASH Mem Error
I use an STM32F030F4 chip. The code I wrote is quite short. But when I compile I get this error. And STM32F0 has 16 to 256 Kbytes of Flash memory. I don't understand why it is an error. Does anyone know why?
c:\st\stm32cubeide_1.10.1\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.win32_1.0.0.202111181127\tools\arm-none-eabi\bin\ld.exe: STM32F0.elf section `.text' will not fit in region `FLASH'
c:\st\stm32cubeide_1.10.1\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.win32_1.0.0.202111181127\tools\arm-none-eabi\bin\ld.exe: region `FLASH' overflowed by 952 byteint main(void)
{
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_ADC_Init();
MX_I2C1_Init();
/* USER CODE BEGIN 2 */
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
if (HAL_ADC_Start(&hadc) != HAL_OK)
{
Error_Handler();
}
// ADC dönüşümünün tamamlanmasını bekle
if (HAL_ADC_PollForConversion(&hadc, HAL_MAX_DELAY) != HAL_OK)
{
Error_Handler();
}
// ADC değerini oku
uint16_t adcValue = HAL_ADC_GetValue(&hadc);
// ADC değerini sıcaklık değerine çevirin
float resistance, temperature;
resistance = 100000.0 / ((4095.0 / adcValue) - 1.0);
temperature = (1.0 / ((log(resistance / 100000.0) / 3950.0) + (1.0 / 298.15))) - 273.15;
// Dönüşüm sonuçlarını kullanın veya görüntüleyin
// temperature, sıcaklık değerini içerir
HAL_Delay(1000);
}
/* USER CODE END 3 */
}
