I need to compile and run the simplest C ++ code under ARM . Trying to do:
$arm-none-eabi-g++ -mthumb -mcpu=cortex-m3 -static --specs=nosys.specs test.cpp At the output I get the file:
$file a.out a.out: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, not stripped At startup:
$qemu-arm -cpu cortex-m3 a.out qemu: uncaught target signal 11 (Segmentation fault) - core dumped Ошибка сегментирования (core dumped) What's my mistake? Run produced on Fedora . Code:
#include <iostream> int main() { std::cout << "Hello World!" << std::endl; return 0; }