Answer the question
In order to leave comments, you need to log in
How to compile simple C++ project for ARM in sublime text3?
I installed the compiler "GNU Tools ARM Embedded" and Make, PATH was added to the system, here is the contents of the st3.sublime-project project file:
{
"folders":
[
{
"follow_symlinks": true,
"path": "."
}
],
"build_systems":
[
{
"name": "ARM build",
"cmd": ["make"],
"working_dir": "${project_path}"
}
]
}
int main(void)
{
while(1)
{
}
}
arm-none-eabi-gcc main.cpp
[Finished in 0.4s with exit code 2]
[cmd: ['make']]
[dir: X:\st3]
c:/program files (x86)/gnu tools arm embedded/4.8 2014q2/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib\libc.a(lib_a-exit.o): In function `exit':
exit.c:(.text.exit+0x2c): undefined reference to `_exit'
collect2.exe: error: ld returned 1 exit status
make: *** [all] Error 1
TARGET = arm-none-eabi-
CHIP = STM32F0XX
LDSCRIPT = STM32F030x6.ld
all:
arm-none-eabi-gcc main.cpp
Answer the question
In order to leave comments, you need to log in
You don't seem to have an error in the C++ file. Maybe somewhere along the way Russian is present, for example.
Shetani, Yes, it partially helped, but now when I try to assemble it, this is written:
arm-none-eabi-gcc main.cpp
c:/program files (x86)/gnu tools arm embedded/4.8 2014q2/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib\libc.a(lib_a-exit.o): In function `exit':
exit.c:(.text.exit+0x2c): undefined reference to `_exit'
collect2.exe: error: ld returned 1 exit status
make: *** [all] Error 1
[Finished in 0.3s with exit code 2]
{
"folders":
[
{
"path": "."
}
],
"build_systems":
[
{
"name": "arm build",
"cmd": ["make"],
"working_dir": "${project_path}/"
}
],
"settings":
{
"sublimeclang_options":
[
"-std=c++11",
"-Wall",
"-I${project_path}/"
]
}
}
all:
arm-none-eabi-gcc main.cpp
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question