We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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).
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.
sstream_compile_failed said:Half Host Mode
You mean semihosting ?
http://www.keil.com/support/man/docs/armcc/armcc_pge1358787046598.htm