mirror of https://github.com/ARMmbed/mbed-os.git
[Nucleo_F103RB] exporter to gcc_arm and coide
parent
df25f50023
commit
2d61dff9c4
|
@ -33,6 +33,7 @@ class CoIDE(Exporter):
|
|||
'NUCLEO_L152RE',
|
||||
'NUCLEO_F030R8',
|
||||
'NUCLEO_F072RB',
|
||||
'NUCLEO_F103RB',
|
||||
'NUCLEO_F302R8',
|
||||
'NUCLEO_F334R8',
|
||||
'NUCLEO_F401RE',
|
||||
|
|
|
@ -0,0 +1,168 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<Project version="2G - 1.7.5" name="{{name}}">
|
||||
<Target name="Release" isCurrent="1">
|
||||
<Device manufacturerId="9" manufacturerName="ST" chipId="310" chipName="STM32F103RB" boardId="" boardName=""/>
|
||||
<BuildOption>
|
||||
<Compile>
|
||||
<Option name="OptimizationLevel" value="4"/>
|
||||
<Option name="UseFPU" value="0"/>
|
||||
<Option name="UserEditCompiler" value="-fno-common; -fmessage-length=0; -Wall; -fno-strict-aliasing; -fno-rtti; -fno-exceptions; -ffunction-sections; -fdata-sections; -std=gnu++98"/>
|
||||
<Option name="FPU" value="1"/>
|
||||
<Option name="SupportCPlusplus" value="1"/>
|
||||
<Includepaths>
|
||||
{% for path in include_paths %} <Includepath path="{{path}}"/> {% endfor %}
|
||||
</Includepaths>
|
||||
<DefinedSymbols>
|
||||
{% for s in symbols %} <Define name="{{s}}"/> {% endfor %}
|
||||
</DefinedSymbols>
|
||||
</Compile>
|
||||
<Link useDefault="0">
|
||||
<Option name="DiscardUnusedSection" value="1"/>
|
||||
<Option name="UserEditLinkder" value=""/>
|
||||
<Option name="UseMemoryLayout" value="0"/>
|
||||
<Option name="LTO" value="0"/>
|
||||
<Option name="IsNewStartupCode" value="1"/>
|
||||
<Option name="Library" value="Not use C Library"/>
|
||||
<Option name="nostartfiles" value="0"/>
|
||||
<Option name="UserEditLinker" value="-Wl,--wrap,main; --specs=nano.specs; -u _printf_float; -u _scanf_float; {% for file in object_files %}
|
||||
${project.path}/{{file}}; {% endfor %} {% for p in library_paths %}-L${project.path}/{{p}}; {% endfor %}"/>
|
||||
<LinkedLibraries>
|
||||
{% for lib in libraries %}
|
||||
<Libset dir="" libs="{{lib}}"/>
|
||||
{% endfor %}
|
||||
<Libset dir="" libs="stdc++"/>
|
||||
<Libset dir="" libs="supc++"/>
|
||||
<Libset dir="" libs="m"/>
|
||||
<Libset dir="" libs="gcc"/>
|
||||
<Libset dir="" libs="c"/>
|
||||
<Libset dir="" libs="nosys"/>
|
||||
</LinkedLibraries>
|
||||
<MemoryAreas debugInFlashNotRAM="1">
|
||||
<Memory name="IROM1" type="ReadOnly" size="0x00020000" startValue="0x08000000"/>
|
||||
<Memory name="IRAM1" type="ReadWrite" size="0x00004F14" startValue="0x200000EC"/>
|
||||
<Memory name="IROM2" type="ReadOnly" size="" startValue=""/>
|
||||
<Memory name="IRAM2" type="ReadWrite" size="" startValue=""/>
|
||||
</MemoryAreas>
|
||||
<LocateLinkFile path="{{scatter_file}}" type="0"/>
|
||||
</Link>
|
||||
<Output>
|
||||
<Option name="OutputFileType" value="0"/>
|
||||
<Option name="Path" value="./"/>
|
||||
<Option name="Name" value="{{name}}"/>
|
||||
<Option name="HEX" value="1"/>
|
||||
<Option name="BIN" value="1"/>
|
||||
</Output>
|
||||
<User>
|
||||
<UserRun name="Run#1" type="Before" checked="0" value=""/>
|
||||
<UserRun name="Run#1" type="After" checked="0" value=""/>
|
||||
</User>
|
||||
</BuildOption>
|
||||
<DebugOption>
|
||||
<Option name="org.coocox.codebugger.gdbjtag.core.adapter" value="ST-Link"/>
|
||||
<Option name="org.coocox.codebugger.gdbjtag.core.debugMode" value="SWD"/>
|
||||
<Option name="org.coocox.codebugger.gdbjtag.core.clockDiv" value="1M"/>
|
||||
<Option name="org.coocox.codebugger.gdbjtag.corerunToMain" value="1"/>
|
||||
<Option name="org.coocox.codebugger.gdbjtag.core.jlinkgdbserver" value=""/>
|
||||
<Option name="org.coocox.codebugger.gdbjtag.core.userDefineGDBScript" value=""/>
|
||||
<Option name="org.coocox.codebugger.gdbjtag.core.targetEndianess" value="0"/>
|
||||
<Option name="org.coocox.codebugger.gdbjtag.core.jlinkResetMode" value="Type 0: Normal"/>
|
||||
<Option name="org.coocox.codebugger.gdbjtag.core.resetMode" value="SYSRESETREQ"/>
|
||||
<Option name="org.coocox.codebugger.gdbjtag.core.ifSemihost" value="0"/>
|
||||
<Option name="org.coocox.codebugger.gdbjtag.core.ifCacheRom" value="1"/>
|
||||
<Option name="org.coocox.codebugger.gdbjtag.core.ipAddress" value="127.0.0.1"/>
|
||||
<Option name="org.coocox.codebugger.gdbjtag.core.portNumber" value="2009"/>
|
||||
<Option name="org.coocox.codebugger.gdbjtag.core.autoDownload" value="1"/>
|
||||
<Option name="org.coocox.codebugger.gdbjtag.core.verify" value="1"/>
|
||||
<Option name="org.coocox.codebugger.gdbjtag.core.downloadFuction" value="Erase Effected"/>
|
||||
<Option name="org.coocox.codebugger.gdbjtag.core.defaultAlgorithm" value="./STM32F10x_MD_128.elf"/>
|
||||
</DebugOption>
|
||||
<ExcludeFile/>
|
||||
</Target>
|
||||
<Target name="Debug" isCurrent="0">
|
||||
<Device manufacturerId="9" manufacturerName="ST" chipId="310" chipName="STM32F103RB" boardId="" boardName=""/>
|
||||
<BuildOption>
|
||||
<Compile>
|
||||
<Option name="OptimizationLevel" value="0"/>
|
||||
<Option name="UseFPU" value="0"/>
|
||||
<Option name="UserEditCompiler" value="-fno-common; -fmessage-length=0; -Wall; -fno-strict-aliasing; -fno-rtti; -fno-exceptions; -ffunction-sections; -fdata-sections; -std=gnu++98"/>
|
||||
<Option name="FPU" value="1"/>
|
||||
<Option name="SupportCPlusplus" value="1"/>
|
||||
<Includepaths>
|
||||
{% for path in include_paths %} <Includepath path="{{path}}"/> {% endfor %}
|
||||
</Includepaths>
|
||||
<DefinedSymbols>
|
||||
{% for s in symbols %} <Define name="{{s}}"/> {% endfor %}
|
||||
</DefinedSymbols>
|
||||
</Compile>
|
||||
<Link useDefault="0">
|
||||
<Option name="DiscardUnusedSection" value="1"/>
|
||||
<Option name="UserEditLinkder" value=""/>
|
||||
<Option name="UseMemoryLayout" value="0"/>
|
||||
<Option name="LTO" value="0"/>
|
||||
<Option name="IsNewStartupCode" value="1"/>
|
||||
<Option name="Library" value="Not use C Library"/>
|
||||
<Option name="nostartfiles" value="0"/>
|
||||
<Option name="UserEditLinker" value="-Wl,--wrap,main; --specs=nano.specs; -u _printf_float; -u _scanf_float; {% for file in object_files %}
|
||||
${project.path}/{{file}}; {% endfor %} {% for p in library_paths %}-L${project.path}/{{p}}; {% endfor %}"/>
|
||||
<LinkedLibraries>
|
||||
{% for lib in libraries %}
|
||||
<Libset dir="" libs="{{lib}}"/>
|
||||
{% endfor %}
|
||||
<Libset dir="" libs="stdc++"/>
|
||||
<Libset dir="" libs="supc++"/>
|
||||
<Libset dir="" libs="m"/>
|
||||
<Libset dir="" libs="gcc"/>
|
||||
<Libset dir="" libs="c"/>
|
||||
<Libset dir="" libs="nosys"/>
|
||||
</LinkedLibraries>
|
||||
<MemoryAreas debugInFlashNotRAM="1">
|
||||
<Memory name="IROM1" type="ReadOnly" size="0x00020000" startValue="0x08000000"/>
|
||||
<Memory name="IRAM1" type="ReadWrite" size="0x00004F14" startValue="0x200000EC"/>
|
||||
<Memory name="IROM2" type="ReadOnly" size="" startValue=""/>
|
||||
<Memory name="IRAM2" type="ReadWrite" size="" startValue=""/>
|
||||
</MemoryAreas>
|
||||
<LocateLinkFile path="{{scatter_file}}" type="0"/>
|
||||
</Link>
|
||||
<Output>
|
||||
<Option name="OutputFileType" value="0"/>
|
||||
<Option name="Path" value="./"/>
|
||||
<Option name="Name" value="{{name}}"/>
|
||||
<Option name="HEX" value="1"/>
|
||||
<Option name="BIN" value="1"/>
|
||||
</Output>
|
||||
<User>
|
||||
<UserRun name="Run#1" type="Before" checked="0" value=""/>
|
||||
<UserRun name="Run#1" type="After" checked="0" value=""/>
|
||||
</User>
|
||||
</BuildOption>
|
||||
<DebugOption>
|
||||
<Option name="org.coocox.codebugger.gdbjtag.core.adapter" value="ST-Link"/>
|
||||
<Option name="org.coocox.codebugger.gdbjtag.core.debugMode" value="SWD"/>
|
||||
<Option name="org.coocox.codebugger.gdbjtag.core.clockDiv" value="1M"/>
|
||||
<Option name="org.coocox.codebugger.gdbjtag.corerunToMain" value="1"/>
|
||||
<Option name="org.coocox.codebugger.gdbjtag.core.jlinkgdbserver" value=""/>
|
||||
<Option name="org.coocox.codebugger.gdbjtag.core.userDefineGDBScript" value=""/>
|
||||
<Option name="org.coocox.codebugger.gdbjtag.core.targetEndianess" value="0"/>
|
||||
<Option name="org.coocox.codebugger.gdbjtag.core.jlinkResetMode" value="Type 0: Normal"/>
|
||||
<Option name="org.coocox.codebugger.gdbjtag.core.resetMode" value="SYSRESETREQ"/>
|
||||
<Option name="org.coocox.codebugger.gdbjtag.core.ifSemihost" value="0"/>
|
||||
<Option name="org.coocox.codebugger.gdbjtag.core.ifCacheRom" value="1"/>
|
||||
<Option name="org.coocox.codebugger.gdbjtag.core.ipAddress" value="127.0.0.1"/>
|
||||
<Option name="org.coocox.codebugger.gdbjtag.core.portNumber" value="2009"/>
|
||||
<Option name="org.coocox.codebugger.gdbjtag.core.autoDownload" value="1"/>
|
||||
<Option name="org.coocox.codebugger.gdbjtag.core.verify" value="1"/>
|
||||
<Option name="org.coocox.codebugger.gdbjtag.core.downloadFuction" value="Erase Effected"/>
|
||||
<Option name="org.coocox.codebugger.gdbjtag.core.defaultAlgorithm" value="./STM32F10x_MD_128.elf"/>
|
||||
</DebugOption>
|
||||
<ExcludeFile/>
|
||||
</Target>
|
||||
<Components path="./"/>
|
||||
<Files>
|
||||
{% for file in source_files %}
|
||||
<File name="sources/{{file.path}}" path="{{file.path}}" type="{{file.type}}"/>
|
||||
{% endfor %}
|
||||
{% for file in header_files %}
|
||||
<File name="headers/{{file.path}}" path="{{file.path}}" type="{{file.type}}"/>
|
||||
{% endfor %}
|
||||
</Files>
|
||||
</Project>
|
|
@ -0,0 +1,71 @@
|
|||
# This file was automagically generated by mbed.org. For more information,
|
||||
# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded
|
||||
|
||||
GCC_BIN =
|
||||
PROJECT = {{name}}
|
||||
OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %}
|
||||
SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %}
|
||||
INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %}
|
||||
LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %}
|
||||
LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %}
|
||||
LINKER_SCRIPT = {{linker_script}}
|
||||
|
||||
###############################################################################
|
||||
AS = $(GCC_BIN)arm-none-eabi-as
|
||||
CC = $(GCC_BIN)arm-none-eabi-gcc
|
||||
CPP = $(GCC_BIN)arm-none-eabi-g++
|
||||
LD = $(GCC_BIN)arm-none-eabi-gcc
|
||||
OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy
|
||||
OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump
|
||||
SIZE = $(GCC_BIN)arm-none-eabi-size
|
||||
|
||||
CPU = -mcpu=cortex-m3 -mthumb
|
||||
CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fno-rtti
|
||||
CC_FLAGS += -MMD -MP
|
||||
CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %}
|
||||
|
||||
LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main
|
||||
LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref
|
||||
LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CC_FLAGS += -DDEBUG -O0
|
||||
else
|
||||
CC_FLAGS += -DNDEBUG -Os
|
||||
endif
|
||||
|
||||
all: $(PROJECT).bin $(PROJECT).hex size
|
||||
|
||||
clean:
|
||||
rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS)
|
||||
|
||||
.s.o:
|
||||
$(AS) $(CPU) -o $@ $<
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $<
|
||||
|
||||
.cpp.o:
|
||||
$(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 $(INCLUDE_PATHS) -o $@ $<
|
||||
|
||||
|
||||
$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS)
|
||||
$(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS)
|
||||
|
||||
$(PROJECT).bin: $(PROJECT).elf
|
||||
@$(OBJCOPY) -O binary $< $@
|
||||
|
||||
$(PROJECT).hex: $(PROJECT).elf
|
||||
@$(OBJCOPY) -O ihex $< $@
|
||||
|
||||
$(PROJECT).lst: $(PROJECT).elf
|
||||
@$(OBJDUMP) -Sdh $< > $@
|
||||
|
||||
lst: $(PROJECT).lst
|
||||
|
||||
size:
|
||||
$(SIZE) $(PROJECT).elf
|
||||
|
||||
DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d)
|
||||
-include $(DEPS)
|
||||
|
|
@ -59,6 +59,7 @@ class GccArm(Exporter):
|
|||
'NUCLEO_F030R8',
|
||||
'NUCLEO_F070RB',
|
||||
'NUCLEO_F072RB',
|
||||
'NUCLEO_F103RB',
|
||||
'NUCLEO_F302R8',
|
||||
'NUCLEO_F334R8',
|
||||
'DISCO_L053C8',
|
||||
|
|
Loading…
Reference in New Issue