Answer the question
In order to leave comments, you need to log in
How to compile a simple project for ARM STM32 in Sublime Text 3?
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
perhaps the code itself needs to be corrected - for example: int main() {..}
on void main() {..}
well or return after the cycle to push ..
I don’t remember exactly, but the error strongly resembles something like that ..
In general, the problem is on the way to its exhaustion. I just tried using a newer version of make.exe (4.1 vs 3.81) and when I build I get this:
makefile:296: warning: overriding recipe for target '.'
makefile:293: warning: ignoring old recipe for target '.'
makefile:299: warning: overriding recipe for target '.'
makefile:296: warning: ignoring old recipe for target '.'
makefile:302: warning: overriding recipe for target '.'
makefile:299: warning: ignoring old recipe for target '.'
--- building test1. defines: -DSTM32F030x6 -DVER_MAJOR=0 -DVER_MINOR=1 -DHSE_VALUE=8000000
makefile:296: warning: overriding recipe for target '.'
makefile:293: warning: ignoring old recipe for target '.'
makefile:299: warning: overriding recipe for target '.'
makefile:296: warning: ignoring old recipe for target '.'
makefile:302: warning: overriding recipe for target '.'
makefile:299: warning: ignoring old recipe for target '.'
makefile:296: warning: overriding recipe for target '.'
makefile:293: warning: ignoring old recipe for target '.'
makefile:299: warning: overriding recipe for target '.'
makefile:296: warning: ignoring old recipe for target '.'
makefile:302: warning: overriding recipe for target '.'
makefile:299: warning: ignoring old recipe for target '.'
--- compiling main.cpp...
--- linking...
c:/program files (x86)/gnu tools arm embedded/4.8 2014q2/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: warning: cannot find entry symbol Reset_Handler; defaulting to 08000000
makefile:296: warning: overriding recipe for target '.'
makefile:293: warning: ignoring old recipe for target '.'
makefile:299: warning: overriding recipe for target '.'
makefile:296: warning: ignoring old recipe for target '.'
makefile:302: warning: overriding recipe for target '.'
makefile:299: warning: ignoring old recipe for target '.'
--- make hex...
makefile:296: warning: overriding recipe for target '.'
makefile:293: warning: ignoring old recipe for target '.'
makefile:299: warning: overriding recipe for target '.'
makefile:296: warning: ignoring old recipe for target '.'
makefile:302: warning: overriding recipe for target '.'
makefile:299: warning: ignoring old recipe for target '.'
--- making asm-lst...
text data bss dec hex filename
0 0 768 768 300 ./test1.elf
"Errors: none"
[Finished in 0.6s]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question