User Activity

can anyone suggest a method to sort hardfault error.I went on commenting few lines to sort the problem and found that when the uart is continuesly receiving and transmitting data this occurs.
I were trying to get data continues from a sensor and didnt find any flag that will acknowledge when a data is received . Only thing is there is HAL_UART_Receive_IT(),HAL_UART_Receive() functions.i need to seperate my data from Uart interupt handler.
I got a sample cubemx project which is in STM32f4 series using FREERTOS, my hardware is designed for STM32F0 so i cant use the sample code.so please suggest a method.. 
i have generated code from motor control workbench and when i build this code the error came as,region `FLASH' overflowed by 18000 bytes StSpin_Hall_24_07 C/C++ ProblemStSpin_Hall_24_07.elf section `.text' will not fit in region `FLASH' StSpin_Hall_2...
i have generated code from motor control workbench and when i build this code the error came as,region `FLASH' overflowed by 18000 bytes StSpin_Hall_24_07 C/C++ ProblemStSpin_Hall_24_07.elf section `.text' will not fit in region `FLASH' StSpin_Hal...