I am learning arm-none-eabi compiler recently. I want to ask some questions

ares@NCRSERVER  ~/testArm  ls
hello.cpp  libc.a  libm.a

int main()
std::cout<<“hello world”<<std::endl;
return 0;

arm-none-eabi-g++ --specs=rdimon.specs -mcpu=cortex-a9 -mfloat-abi=softfp -lgcc -lc -lm -lrdimon -o hello hello.cpp

/home/ares/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: /home/ares/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/lib/libstdc++.a(cxx11-ios_failure.o): in function `(anonymous namespace)::__io_category_instance()':
cxx11-ios_failure.cc:(.text._ZN12_GLOBAL__N_122__io_category_instanceEv+0xc): undefined reference to `__sync_synchronize'
/home/ares/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: /home/ares/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/lib/libstdc++.a(locale.o): in function `std::locale::_Impl::_M_install_cache(std::locale::facet const*, unsigned int)':
locale.cc:(.text._ZNSt6locale5_Impl16_M_install_cacheEPKNS_5facetEj+0x18): undefined reference to `__sync_synchronize'
/home/ares/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: /home/ares/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/lib/libstdc++.a(locale_init.o): in function `(anonymous namespace)::get_locale_mutex()':
locale_init.cc:(.text._ZN12_GLOBAL__N_116get_locale_mutexEv+0xc): undefined reference to `__sync_synchronize'
collect2: error: ld returned 1 exit status

This is just a simple hello world program.
The basic reason for doing this is that I think the compilation of profile makefile is too slow. Even Linux is very slow. I want to rewrite ninja.make with cmake

I used vscode + CCLS + clang 9.0 to rebuild a development environment.
At present, my development environment of win10 and Linux based on sdl2-lvgl-pros_simulator has been built. I hope to integrate the project for the convenience of students

I have seen this issue when using newer gcc instead of gcc7 for compiling PROS projects. You can either downgrade your compiler or stub out the __sync_synchronize() implementation.

Not sure what level of simulation do you plan, but I’ve successfully used slightly modified https://github.com/littlevgl/lv_sim_eclipse_sdl before to test LVGL based UIs. The only trouble is that PROS currently package v5.3.x of LVGL while the linked simulator uses v6 (with slightly different APIs)

1 Like
#include <iostream>
extern "C" void __sync_synchronize() {}
int main()
        std::cout<<"hello world"<<std::endl;
        return 0;

this is all right

I think you plan to upgrade lvgl6. X, so it’s changed to 6.0

This is for us to rewrite almost all the graphical modules

It’s not that the API is slightly different. It’s totally different. All the action functions have changed

What version of the kernel are you using? This should be fixed in the latest version.