The STM32F1 microcontroller is a Cortex M3 chip, which does not have a Floating point unit. Therefore I would initially assume that a large part of your code is acutally just a floating point library that was automatically included when the code was built. I suggest that you take a look at the *.map file to see what is taking all this space.
There are other available libraries available to execute floating point operations on Cortex M3 that can optimize for size, speed, accuracy or a combination of these. BSEC itself should use about ~20-22kB of ROM space, and 1kB of RAM