Floating point support on STM32F4
Posted: Fri Aug 01, 2014 5:56 pm
Hi,
Using a STM32F407 discovery board with ChibiOS-2.6.3. GCC is 4.7.3, binutils-2.23.2, newlib-2.0.0
Now that I've gotten a working C++ setup, I am seeing this issue. I have this class template:
I have set up the Makefile with USE_FPU = YES.
When compiled, if I instantiate a foo<int> in main() it works as expected. When I instantiate a foo< float >, it immediately goes to the _unhandled_exception() handler. I cannot even single step into the constructor.
I have tried enabling DBG options chconf.h, as well as tried with mfloat-abi=hard, softfp and soft.
Using a STM32F407 discovery board with ChibiOS-2.6.3. GCC is 4.7.3, binutils-2.23.2, newlib-2.0.0
Now that I've gotten a working C++ setup, I am seeing this issue. I have this class template:
Code: Select all
template< typename T >
class foo {
public:
foo( T t ) { t_ = t; }
private:
T t_;
};
I have set up the Makefile with USE_FPU = YES.
When compiled, if I instantiate a foo<int> in main() it works as expected. When I instantiate a foo< float >, it immediately goes to the _unhandled_exception() handler. I cannot even single step into the constructor.
I have tried enabling DBG options chconf.h, as well as tried with mfloat-abi=hard, softfp and soft.