• Как скомпилировать простой проект для ARM STM32 в Sublime Text 3 ?

    allsettingsdone
    @allsettingsdone Автор вопроса
    Вообщем проблема на пути к её исчерпыванию. Я просто попробовал использовать более новую версию make.exe (4.1 против 3.81) и при сборке получаю теперь следующее:
    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]

    При этом создаются следующие файлы: main.d, main.lst, main.o, test1.elf, test1.hex, test1.lss, test1.map.
    Ответ написан
    Комментировать
  • Как скомпилировать простой С++ проект для ARM в sublime text3?

    allsettingsdone
    @allsettingsdone Автор вопроса
    Shetani, да это частично помогло, но теперь при попытке сборки пишется такое:
    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]


    Для правильной работы проекта, я немного изменил его настройки(теперь при сборке он вызывает make, а не компилятор):
    {
    	"folders":
    	[
    		{
    			"path": "."
    		}
    	],
    
    	"build_systems":
    	[
    		{
    			"name": "arm build",
    			"cmd": ["make"],
    			"working_dir": "${project_path}/"
    		}
    	],
    
    	"settings":
    	{
    		"sublimeclang_options":
    		[
    			"-std=c++11",
    			"-Wall",
    			"-I${project_path}/"
    		]
    	}
    }


    И вот makefile соответственно:
    all:
    	arm-none-eabi-gcc main.cpp


    Что можно предпринять в данном случае? (PS: никогда раньше не писал makefile и вообще работал только из IDE).
    Ответ написан