This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Execute Failed while SRC using <sstream> with armclang

Lately I'd obsessed over compiling STM32 project with ARMCLANG.

Here is Details:

Case 1. Used "#include <sstream>" in cpp file, complied successfully but execute failed, meanwhile I didn't use any function in <sstream>.

Case 2. Comment this code, project is fine.

Environment:

IDE: MDK 5.2.5

Compiler: armclang v6.9

SRC: c/c++ file.

Board: stm32f4 series(CPU Cortex-M4, Arch armv7-M).

Parents
  • Thanks for your response, but it's unrelated. I just find the problem: use iostream series function in c++ files without disabling “Half Host Mode”, will result in this issue. I add "__asm(".global __use_no_semihosting");" in the head of main.cpp then the compiler comes out errorr. Then I redefined related functions(eg. fflush(), fgetc()). Now my project works fine.

Reply
  • Thanks for your response, but it's unrelated. I just find the problem: use iostream series function in c++ files without disabling “Half Host Mode”, will result in this issue. I add "__asm(".global __use_no_semihosting");" in the head of main.cpp then the compiler comes out errorr. Then I redefined related functions(eg. fflush(), fgetc()). Now my project works fine.

Children