ostringstream and stringstream operator<< makes hardfault exception (stm32f4, touchGFX, freeRTOS, malloc-wrapper), how to solve or alternatives?
Does ofstringstream and stringstream not work with freeRTOS?
We develop a device using stm32f46x using touch GFX and freeRTOS. The system is generated with the latest STM32Cube IDE and the configuration tool. After crashes with localtime, new etc. I overloaded new and malloc first and later I used the suggested solution of David Nadler. Now the program crashed with hardfault (CFSR Register Content 0x1400 - stack fault) at every place where a std::ofstringstream or std::stringstream uses operator<<. Debugging seem to show sufficient stack and heap sizes. Always when "<<" is applied with data (not with precision()) a hardfault is thrown immdiately. While I had set breakpoint at the malloc and malloc_r wrappers, these functions are not called.
- Any solution?
- Does anyone successfull use stringstreams with stm32?
- What is the alternative, use of ftoa, itoa?
- I know that ofstringstream is maybe not the best as the template my consume space at all places where it is used and sizeof also is morte than 300 bytes.
- The device configuration tool installs an older version of freeRTOS (10.0.1) while the latest touchGFX 4.14 delivers a newer one (10.2.1), but this is not installed and not compatible with the main.c etc generated by the devcice configuration tool. Can the older rtos be a problem?
