mirror of https://github.com/ARMmbed/mbed-os.git
Merge remote-tracking branch 'upstream/master'
commit
d47cefa39c
|
@ -323,14 +323,14 @@ int USBHostMSD::disk_initialize() {
|
|||
return readCapacity();
|
||||
}
|
||||
|
||||
int USBHostMSD::disk_write(const uint8_t* buffer, uint64_t block_number, uint8_t count) {
|
||||
int USBHostMSD::disk_write(const uint8_t* buffer, uint32_t block_number, uint32_t count) {
|
||||
USB_DBG("FILESYSTEM: write block: %lld, count: %d", block_number, count);
|
||||
if (!disk_init) {
|
||||
disk_initialize();
|
||||
}
|
||||
if (!disk_init)
|
||||
return -1;
|
||||
for (uint64_t b = block_number; b < block_number + count; b++) {
|
||||
for (uint32_t b = block_number; b < block_number + count; b++) {
|
||||
if (dataTransfer((uint8_t*)buffer, b, 1, HOST_TO_DEVICE))
|
||||
return -1;
|
||||
buffer += 512;
|
||||
|
@ -338,14 +338,14 @@ int USBHostMSD::disk_write(const uint8_t* buffer, uint64_t block_number, uint8_t
|
|||
return 0;
|
||||
}
|
||||
|
||||
int USBHostMSD::disk_read(uint8_t* buffer, uint64_t block_number, uint8_t count) {
|
||||
int USBHostMSD::disk_read(uint8_t* buffer, uint32_t block_number, uint32_t count) {
|
||||
USB_DBG("FILESYSTEM: read block: %lld, count: %d", block_number, count);
|
||||
if (!disk_init) {
|
||||
disk_initialize();
|
||||
}
|
||||
if (!disk_init)
|
||||
return -1;
|
||||
for (uint64_t b = block_number; b < block_number + count; b++) {
|
||||
for (uint32_t b = block_number; b < block_number + count; b++) {
|
||||
if (dataTransfer((uint8_t*)buffer, b, 1, DEVICE_TO_HOST))
|
||||
return -1;
|
||||
buffer += 512;
|
||||
|
@ -353,7 +353,7 @@ int USBHostMSD::disk_read(uint8_t* buffer, uint64_t block_number, uint8_t count)
|
|||
return 0;
|
||||
}
|
||||
|
||||
uint64_t USBHostMSD::disk_sectors() {
|
||||
uint32_t USBHostMSD::disk_sectors() {
|
||||
USB_DBG("FILESYSTEM: sectors");
|
||||
if (!disk_init) {
|
||||
disk_initialize();
|
||||
|
|
|
@ -59,10 +59,10 @@ protected:
|
|||
// From FATFileSystem
|
||||
virtual int disk_initialize();
|
||||
virtual int disk_status() {return 0;};
|
||||
virtual int disk_read(uint8_t* buffer, uint64_t sector, uint8_t count);
|
||||
virtual int disk_write(const uint8_t* buffer, uint64_t sector, uint8_t count);
|
||||
virtual int disk_read(uint8_t* buffer, uint32_t sector, uint32_t count);
|
||||
virtual int disk_write(const uint8_t* buffer, uint32_t sector, uint32_t count);
|
||||
virtual int disk_sync() {return 0;};
|
||||
virtual uint64_t disk_sectors();
|
||||
virtual uint32_t disk_sectors();
|
||||
|
||||
private:
|
||||
USBHost * host;
|
||||
|
@ -104,7 +104,7 @@ private:
|
|||
int getMaxLun();
|
||||
|
||||
int blockSize;
|
||||
uint64_t blockCount;
|
||||
uint32_t blockCount;
|
||||
|
||||
int msd_intf;
|
||||
bool msd_device_found;
|
||||
|
|
|
@ -84,10 +84,10 @@ public:
|
|||
|
||||
virtual int disk_initialize() { return 0; }
|
||||
virtual int disk_status() { return 0; }
|
||||
virtual int disk_read(uint8_t * buffer, uint64_t sector, uint8_t count) = 0;
|
||||
virtual int disk_write(const uint8_t * buffer, uint64_t sector, uint8_t count) = 0;
|
||||
virtual int disk_read(uint8_t *buffer, uint32_t sector, uint32_t count) = 0;
|
||||
virtual int disk_write(const uint8_t *buffer, uint32_t sector, uint32_t count) = 0;
|
||||
virtual int disk_sync() { return 0; }
|
||||
virtual uint64_t disk_sectors() = 0;
|
||||
virtual uint32_t disk_sectors() = 0;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -223,12 +223,12 @@ int SDFileSystem::disk_initialize() {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int SDFileSystem::disk_write(const uint8_t* buffer, uint64_t block_number, uint8_t count) {
|
||||
int SDFileSystem::disk_write(const uint8_t* buffer, uint32_t block_number, uint32_t count) {
|
||||
if (!_is_initialized) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (uint64_t b = block_number; b < block_number + count; b++) {
|
||||
for (uint32_t b = block_number; b < block_number + count; b++) {
|
||||
// set write address for single block (CMD24)
|
||||
if (_cmd(24, b * cdv) != 0) {
|
||||
return 1;
|
||||
|
@ -242,12 +242,12 @@ int SDFileSystem::disk_write(const uint8_t* buffer, uint64_t block_number, uint8
|
|||
return 0;
|
||||
}
|
||||
|
||||
int SDFileSystem::disk_read(uint8_t* buffer, uint64_t block_number, uint8_t count) {
|
||||
int SDFileSystem::disk_read(uint8_t* buffer, uint32_t block_number, uint32_t count) {
|
||||
if (!_is_initialized) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (uint64_t b = block_number; b < block_number + count; b++) {
|
||||
for (uint32_t b = block_number; b < block_number + count; b++) {
|
||||
// set read address for single block (CMD17)
|
||||
if (_cmd(17, b * cdv) != 0) {
|
||||
return 1;
|
||||
|
@ -271,7 +271,7 @@ int SDFileSystem::disk_status() {
|
|||
}
|
||||
|
||||
int SDFileSystem::disk_sync() { return 0; }
|
||||
uint64_t SDFileSystem::disk_sectors() { return _sectors; }
|
||||
uint32_t SDFileSystem::disk_sectors() { return _sectors; }
|
||||
|
||||
|
||||
// PRIVATE FUNCTIONS
|
||||
|
@ -443,11 +443,11 @@ static uint32_t ext_bits(unsigned char *data, int msb, int lsb) {
|
|||
return bits;
|
||||
}
|
||||
|
||||
uint64_t SDFileSystem::_sd_sectors() {
|
||||
uint32_t SDFileSystem::_sd_sectors() {
|
||||
uint32_t c_size, c_size_mult, read_bl_len;
|
||||
uint32_t block_len, mult, blocknr, capacity;
|
||||
uint32_t hc_c_size;
|
||||
uint64_t blocks;
|
||||
uint32_t blocks;
|
||||
|
||||
// CMD9, Response R2 (R1 byte + 16-byte block read)
|
||||
if (_cmdx(9, 0) != 0) {
|
||||
|
|
|
@ -54,10 +54,10 @@ public:
|
|||
SDFileSystem(PinName mosi, PinName miso, PinName sclk, PinName cs, const char* name);
|
||||
virtual int disk_initialize();
|
||||
virtual int disk_status();
|
||||
virtual int disk_read(uint8_t* buffer, uint64_t block_number, uint8_t count);
|
||||
virtual int disk_write(const uint8_t* buffer, uint64_t block_number, uint8_t count);
|
||||
virtual int disk_read(uint8_t* buffer, uint32_t block_number, uint32_t count);
|
||||
virtual int disk_write(const uint8_t* buffer, uint32_t block_number, uint32_t count);
|
||||
virtual int disk_sync();
|
||||
virtual uint64_t disk_sectors();
|
||||
virtual uint32_t disk_sectors();
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -71,8 +71,8 @@ protected:
|
|||
|
||||
int _read(uint8_t * buffer, uint32_t length);
|
||||
int _write(const uint8_t *buffer, uint32_t length);
|
||||
uint64_t _sd_sectors();
|
||||
uint64_t _sectors;
|
||||
uint32_t _sd_sectors();
|
||||
uint32_t _sectors;
|
||||
|
||||
void set_init_sck(uint32_t sck) { _init_sck = sck; }
|
||||
// Note: The highest SPI clock rate is 20 MHz for MMC and 25 MHz for SD
|
||||
|
|
|
@ -19,7 +19,7 @@ from os.path import join, exists, basename
|
|||
from shutil import copytree, rmtree, copy
|
||||
|
||||
from workspace_tools.utils import mkdir
|
||||
from workspace_tools.export import uvision4, codesourcery, codered, gccarm, ds5_5, iar, emblocks, coide, kds, zip, simplicityv3
|
||||
from workspace_tools.export import uvision4, codesourcery, codered, gccarm, ds5_5, iar, emblocks, coide, kds, zip, simplicityv3, atmelstudio
|
||||
from workspace_tools.export.exporters import zip_working_directory_and_clean_up, OldLibrariesException
|
||||
from workspace_tools.targets import TARGET_NAMES, EXPORT_MAP
|
||||
|
||||
|
@ -34,6 +34,7 @@ EXPORTERS = {
|
|||
'coide' : coide.CoIDE,
|
||||
'kds' : kds.KDS,
|
||||
'simplicityv3' : simplicityv3.SimplicityV3,
|
||||
'atmelstudio' : atmelstudio.AtmelStudio,
|
||||
}
|
||||
|
||||
ERROR_MESSAGE_UNSUPPORTED_TOOLCHAIN = """
|
||||
|
|
|
@ -0,0 +1,75 @@
|
|||
"""
|
||||
mbed SDK
|
||||
Copyright (c) 2011-2015 ARM Limited
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
"""
|
||||
import uuid
|
||||
from exporters import Exporter
|
||||
from os.path import splitext, basename, dirname
|
||||
|
||||
|
||||
class AtmelStudio(Exporter):
|
||||
NAME = 'AtmelStudio'
|
||||
TOOLCHAIN = 'GCC_ARM'
|
||||
|
||||
TARGETS = [
|
||||
'SAMD21J18A',
|
||||
'SAMR21G18A',
|
||||
'SAMD21G18A',
|
||||
'SAML21J18A',
|
||||
]
|
||||
|
||||
DOT_IN_RELATIVE_PATH = True
|
||||
|
||||
def generate(self):
|
||||
|
||||
source_files = []
|
||||
dirs = []
|
||||
for r_type in ['s_sources', 'c_sources', 'cpp_sources']:
|
||||
r = getattr(self.resources, r_type)
|
||||
if r:
|
||||
for source in r:
|
||||
source_files.append(source[2:])
|
||||
dirs.append(dirname(source[2:]))
|
||||
|
||||
source_folders = []
|
||||
for e in dirs:
|
||||
if e and e not in source_folders:
|
||||
source_folders.append(e)
|
||||
|
||||
libraries = []
|
||||
for lib in self.resources.libraries:
|
||||
l, _ = splitext(basename(lib))
|
||||
libraries.append(l[3:])
|
||||
|
||||
solution_uuid = '{' + str(uuid.uuid4()) + '}'
|
||||
project_uuid = '{' + str(uuid.uuid4()) + '}'
|
||||
|
||||
ctx = {
|
||||
'target': self.target,
|
||||
'name': self.program_name,
|
||||
'source_files': source_files,
|
||||
'source_folders': source_folders,
|
||||
'object_files': self.resources.objects,
|
||||
'include_paths': self.resources.inc_dirs,
|
||||
'library_paths': self.resources.lib_dirs,
|
||||
'linker_script': self.resources.linker_script,
|
||||
'libraries': libraries,
|
||||
'symbols': self.get_symbols(),
|
||||
'solution_uuid': solution_uuid.upper(),
|
||||
'project_uuid': project_uuid.upper()
|
||||
}
|
||||
target = self.target.lower()
|
||||
self.gen_file('atmelstudio6_2.atsln.tmpl', ctx, '%s.atsln' % self.program_name)
|
||||
self.gen_file('atmelstudio6_2.cppproj.tmpl', ctx, '%s.cppproj' % self.program_name)
|
|
@ -0,0 +1,20 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Atmel Studio Solution File, Format Version 11.00
|
||||
Project("{{solution_uuid}}") = "{{name}}", "{{name}}.cppproj", "{{project_uuid}}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|ARM = Debug|ARM
|
||||
Release|ARM = Release|ARM
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{{project_uuid}}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{{project_uuid}}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{{project_uuid}}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{{project_uuid}}.Release|ARM.Build.0 = Release|ARM
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,176 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectVersion>6.2</ProjectVersion>
|
||||
<ToolchainName>com.Atmel.ARMGCC.CPP</ToolchainName>
|
||||
<ProjectGuid>{{project_uuid}}</ProjectGuid>
|
||||
<avrdevice>AT{{target}}</avrdevice>
|
||||
<avrdeviceseries>none</avrdeviceseries>
|
||||
<OutputType>Executable</OutputType>
|
||||
<Language>CPP</Language>
|
||||
<OutputFileName>$(MSBuildProjectName)</OutputFileName>
|
||||
<OutputFileExtension>.elf</OutputFileExtension>
|
||||
<OutputDirectory>$(MSBuildProjectDirectory)\$(Configuration)</OutputDirectory>
|
||||
<AssemblyName>AtmelStudio6_2</AssemblyName>
|
||||
<Name>AtmelStudio6_2</Name>
|
||||
<RootNamespace>AtmelStudio6_2</RootNamespace>
|
||||
<ToolchainFlavour>Native</ToolchainFlavour>
|
||||
<KeepTimersRunning>true</KeepTimersRunning>
|
||||
<OverrideVtor>false</OverrideVtor>
|
||||
<CacheFlash>true</CacheFlash>
|
||||
<ProgFlashFromRam>true</ProgFlashFromRam>
|
||||
<RamSnippetAddress />
|
||||
<UncachedRange />
|
||||
<preserveEEPROM>true</preserveEEPROM>
|
||||
<OverrideVtorValue />
|
||||
<BootSegment>2</BootSegment>
|
||||
<eraseonlaunchrule>1</eraseonlaunchrule>
|
||||
<AsfFrameworkConfig>
|
||||
<framework-data xmlns="">
|
||||
<options />
|
||||
<configurations />
|
||||
<files />
|
||||
<documentation help="" />
|
||||
<offline-documentation help="" />
|
||||
</framework-data>
|
||||
</AsfFrameworkConfig>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||
<ToolchainSettings>
|
||||
<ArmGccCpp>
|
||||
<armgcc.common.outputfiles.hex>True</armgcc.common.outputfiles.hex>
|
||||
<armgcc.common.outputfiles.lss>True</armgcc.common.outputfiles.lss>
|
||||
<armgcc.common.outputfiles.eep>True</armgcc.common.outputfiles.eep>
|
||||
<armgcc.common.outputfiles.bin>True</armgcc.common.outputfiles.bin>
|
||||
<armgcc.common.outputfiles.srec>True</armgcc.common.outputfiles.srec>
|
||||
<armgcc.compiler.symbols.DefSymbols>
|
||||
<ListValues>
|
||||
<Value>NDEBUG</Value>
|
||||
{% for s in symbols %}<Value>{{s}}</Value>
|
||||
{% endfor %}
|
||||
</ListValues>
|
||||
</armgcc.compiler.symbols.DefSymbols>
|
||||
<armgcc.compiler.directories.IncludePaths>
|
||||
<ListValues>
|
||||
{% for i in include_paths %}<Value>../{{i}}</Value>
|
||||
{% endfor %}
|
||||
</ListValues>
|
||||
</armgcc.compiler.directories.IncludePaths>
|
||||
<armgcc.compiler.optimization.level>Optimize for size (-Os)</armgcc.compiler.optimization.level>
|
||||
<armgcc.compiler.optimization.PrepareFunctionsForGarbageCollection>True</armgcc.compiler.optimization.PrepareFunctionsForGarbageCollection>
|
||||
<armgcc.compiler.warnings.AllWarnings>True</armgcc.compiler.warnings.AllWarnings>
|
||||
<armgcc.compiler.miscellaneous.OtherFlags>-std=gnu99 -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -MMD -MP</armgcc.compiler.miscellaneous.OtherFlags>
|
||||
<armgcccpp.compiler.symbols.DefSymbols>
|
||||
<ListValues>
|
||||
<Value>NDEBUG</Value>
|
||||
{% for s in symbols %}<Value>{{s}}</Value>
|
||||
{% endfor %}
|
||||
</ListValues>
|
||||
</armgcccpp.compiler.symbols.DefSymbols>
|
||||
<armgcccpp.compiler.directories.IncludePaths>
|
||||
<ListValues>
|
||||
{% for i in include_paths %}<Value>../{{i}}</Value>
|
||||
{% endfor %}
|
||||
</ListValues>
|
||||
</armgcccpp.compiler.directories.IncludePaths>
|
||||
<armgcccpp.compiler.optimization.level>Optimize for size (-Os)</armgcccpp.compiler.optimization.level>
|
||||
<armgcccpp.compiler.optimization.PrepareFunctionsForGarbageCollection>True</armgcccpp.compiler.optimization.PrepareFunctionsForGarbageCollection>
|
||||
<armgcccpp.compiler.warnings.AllWarnings>True</armgcccpp.compiler.warnings.AllWarnings>
|
||||
<armgcccpp.compiler.miscellaneous.OtherFlags>-std=gnu++98 -fno-rtti -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -MMD -MP</armgcccpp.compiler.miscellaneous.OtherFlags>
|
||||
<armgcccpp.linker.libraries.Libraries>
|
||||
<ListValues>
|
||||
<Value>libm</Value>
|
||||
</ListValues>
|
||||
</armgcccpp.linker.libraries.Libraries>
|
||||
<armgcccpp.linker.libraries.LibrarySearchPaths>
|
||||
<ListValues>
|
||||
</ListValues>
|
||||
</armgcccpp.linker.libraries.LibrarySearchPaths>
|
||||
<armgcccpp.linker.optimization.GarbageCollectUnusedSections>True</armgcccpp.linker.optimization.GarbageCollectUnusedSections>
|
||||
<armgcccpp.linker.miscellaneous.LinkerFlags>{% for p in library_paths %}-L../{{p}} {% endfor %} {% for f in object_files %}../{{f}} {% endfor %} {% for lib in libraries %}-l{{lib}} {% endfor %} -T../{{linker_script}} -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -Wl,--cref -lstdc++ -lsupc++ -lm -lgcc -Wl,--start-group -lc -lc -lnosys -Wl,--end-group </armgcccpp.linker.miscellaneous.LinkerFlags>
|
||||
<armgcccpp.preprocessingassembler.general.IncludePaths>
|
||||
<ListValues>
|
||||
{% for i in include_paths %}<Value>../{{i}}</Value>
|
||||
{% endfor %}
|
||||
</ListValues>
|
||||
</armgcccpp.preprocessingassembler.general.IncludePaths>
|
||||
</ArmGccCpp>
|
||||
</ToolchainSettings>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
<ToolchainSettings>
|
||||
<ArmGccCpp>
|
||||
<armgcc.common.outputfiles.hex>True</armgcc.common.outputfiles.hex>
|
||||
<armgcc.common.outputfiles.lss>True</armgcc.common.outputfiles.lss>
|
||||
<armgcc.common.outputfiles.eep>True</armgcc.common.outputfiles.eep>
|
||||
<armgcc.common.outputfiles.bin>True</armgcc.common.outputfiles.bin>
|
||||
<armgcc.common.outputfiles.srec>True</armgcc.common.outputfiles.srec>
|
||||
<armgcc.compiler.symbols.DefSymbols>
|
||||
<ListValues>
|
||||
<Value>DEBUG</Value>
|
||||
{% for s in symbols %}<Value>{{s}}</Value>
|
||||
{% endfor %}
|
||||
</ListValues>
|
||||
</armgcc.compiler.symbols.DefSymbols>
|
||||
<armgcc.compiler.directories.IncludePaths>
|
||||
<ListValues>
|
||||
{% for i in include_paths %}<Value>../{{i}}</Value>
|
||||
{% endfor %}
|
||||
</ListValues>
|
||||
</armgcc.compiler.directories.IncludePaths>
|
||||
<armgcc.compiler.optimization.level>Optimize (-O1)</armgcc.compiler.optimization.level>
|
||||
<armgcc.compiler.optimization.PrepareFunctionsForGarbageCollection>True</armgcc.compiler.optimization.PrepareFunctionsForGarbageCollection>
|
||||
<armgcc.compiler.optimization.DebugLevel>Maximum (-g3)</armgcc.compiler.optimization.DebugLevel>
|
||||
<armgcc.compiler.warnings.AllWarnings>True</armgcc.compiler.warnings.AllWarnings>
|
||||
<armgcc.compiler.miscellaneous.OtherFlags>-std=gnu99 -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -MMD -MP</armgcc.compiler.miscellaneous.OtherFlags>
|
||||
<armgcccpp.compiler.symbols.DefSymbols>
|
||||
<ListValues>
|
||||
<Value>DEBUG</Value>
|
||||
{% for s in symbols %}<Value>{{s}}</Value>
|
||||
{% endfor %}
|
||||
</ListValues>
|
||||
</armgcccpp.compiler.symbols.DefSymbols>
|
||||
<armgcccpp.compiler.directories.IncludePaths>
|
||||
<ListValues>
|
||||
{% for i in include_paths %}<Value>../{{i}}</Value>
|
||||
{% endfor %}
|
||||
</ListValues>
|
||||
</armgcccpp.compiler.directories.IncludePaths>
|
||||
<armgcccpp.compiler.optimization.level>Optimize (-O1)</armgcccpp.compiler.optimization.level>
|
||||
<armgcccpp.compiler.optimization.PrepareFunctionsForGarbageCollection>True</armgcccpp.compiler.optimization.PrepareFunctionsForGarbageCollection>
|
||||
<armgcccpp.compiler.optimization.DebugLevel>Maximum (-g3)</armgcccpp.compiler.optimization.DebugLevel>
|
||||
<armgcccpp.compiler.warnings.AllWarnings>True</armgcccpp.compiler.warnings.AllWarnings>
|
||||
<armgcccpp.compiler.miscellaneous.OtherFlags>-std=gnu++98 -fno-rtti -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -MMD -MP</armgcccpp.compiler.miscellaneous.OtherFlags>
|
||||
<armgcccpp.linker.libraries.Libraries>
|
||||
<ListValues>
|
||||
<Value>libm</Value>
|
||||
</ListValues>
|
||||
</armgcccpp.linker.libraries.Libraries>
|
||||
<armgcccpp.linker.libraries.LibrarySearchPaths>
|
||||
<ListValues>
|
||||
</ListValues>
|
||||
</armgcccpp.linker.libraries.LibrarySearchPaths>
|
||||
<armgcccpp.linker.optimization.GarbageCollectUnusedSections>True</armgcccpp.linker.optimization.GarbageCollectUnusedSections>
|
||||
<armgcccpp.linker.miscellaneous.LinkerFlags>{% for p in library_paths %}-L../{{p}} {% endfor %} {% for f in object_files %}../{{f}} {% endfor %} {% for lib in libraries %}-l{{lib}} {% endfor %} -T../{{linker_script}} -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -Wl,--cref -lstdc++ -lsupc++ -lm -lgcc -Wl,--start-group -lc -lc -lnosys -Wl,--end-group </armgcccpp.linker.miscellaneous.LinkerFlags>
|
||||
<armgcccpp.assembler.debugging.DebugLevel>Default (-g)</armgcccpp.assembler.debugging.DebugLevel>
|
||||
<armgcccpp.preprocessingassembler.general.IncludePaths>
|
||||
<ListValues>
|
||||
{% for i in include_paths %}<Value>../{{i}}</Value>
|
||||
{% endfor %}
|
||||
</ListValues>
|
||||
</armgcccpp.preprocessingassembler.general.IncludePaths>
|
||||
<armgcccpp.preprocessingassembler.debugging.DebugLevel>Default (-Wa,-g)</armgcccpp.preprocessingassembler.debugging.DebugLevel>
|
||||
</ArmGccCpp>
|
||||
</ToolchainSettings>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
{% for f in source_folders %}<Folder Include="{{f}}" />
|
||||
{% endfor %}
|
||||
{% for s in source_files %}<Compile Include="{{s}}">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
{% endfor %}
|
||||
</ItemGroup>
|
||||
<Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Compiler.targets" />
|
||||
</Project>
|
|
@ -14,7 +14,7 @@ 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
|
||||
LD = $(GCC_BIN)arm-none-eabi-g++
|
||||
OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy
|
||||
OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump
|
||||
SIZE = $(GCC_BIN)arm-none-eabi-size
|
||||
|
@ -26,7 +26,7 @@ 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
|
||||
LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lgcc -Wl,--start-group -lc -lc -lnosys -Wl,--end-group
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CC_FLAGS += -DDEBUG -O0
|
||||
|
|
|
@ -14,7 +14,7 @@ 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
|
||||
LD = $(GCC_BIN)arm-none-eabi-g++
|
||||
OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy
|
||||
OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump
|
||||
SIZE = $(GCC_BIN)arm-none-eabi-size
|
||||
|
@ -26,7 +26,7 @@ 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
|
||||
LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lgcc -Wl,--start-group -lc -lc -lnosys -Wl,--end-group
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CC_FLAGS += -DDEBUG -O0
|
||||
|
|
|
@ -14,7 +14,7 @@ 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
|
||||
LD = $(GCC_BIN)arm-none-eabi-g++
|
||||
OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy
|
||||
OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump
|
||||
SIZE = $(GCC_BIN)arm-none-eabi-size
|
||||
|
@ -26,7 +26,7 @@ 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
|
||||
LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lgcc -Wl,--start-group -lc -lc -lnosys -Wl,--end-group
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CC_FLAGS += -DDEBUG -O0
|
||||
|
|
|
@ -14,7 +14,7 @@ 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
|
||||
LD = $(GCC_BIN)arm-none-eabi-g++
|
||||
OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy
|
||||
OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump
|
||||
SIZE = $(GCC_BIN)arm-none-eabi-size
|
||||
|
@ -26,7 +26,7 @@ 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
|
||||
LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lgcc -Wl,--start-group -lc -lc -lnosys -Wl,--end-group
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CC_FLAGS += -DDEBUG -O0
|
||||
|
|
|
@ -174,19 +174,20 @@ def add_project_run(projectRuns, project):
|
|||
|
||||
elem[project['project']] = project
|
||||
|
||||
def update_project_run_results(project_to_update, project):
|
||||
project_to_update['pass'] = project['pass']
|
||||
project_to_update['result'] = project['result']
|
||||
|
||||
if 'buildOutput' in project:
|
||||
def update_project_run_results(project_to_update, project, is_build):
|
||||
if is_build:
|
||||
project_to_update['buildPass'] = project['buildPass']
|
||||
project_to_update['buildResult'] = project['buildResult']
|
||||
project_to_update['buildOutput'] = project['buildOutput']
|
||||
else:
|
||||
project_to_update['testPass'] = project['testPass']
|
||||
project_to_update['testResult'] = project['testResult']
|
||||
project_to_update['testOutput'] = project['testOutput']
|
||||
|
||||
def update_project_run(projectRuns, project):
|
||||
def update_project_run(projectRuns, project, is_build):
|
||||
found_project = find_project_run(projectRuns, project)
|
||||
if found_project:
|
||||
update_project_run_results(found_project, project)
|
||||
update_project_run_results(found_project, project, is_build)
|
||||
else:
|
||||
add_project_run(projectRuns, project)
|
||||
|
||||
|
@ -245,18 +246,27 @@ def add_report(project_run_data, report_file, is_build, build_id, host_os):
|
|||
|
||||
errors = test_case.findall('error')
|
||||
failures = test_case.findall('failure')
|
||||
projectRunPass = None
|
||||
result = None
|
||||
|
||||
if errors:
|
||||
projectRun['pass'] = False
|
||||
projectRun['result'] = errors[0].attrib['message']
|
||||
projectRunPass = False
|
||||
result = errors[0].attrib['message']
|
||||
elif failures:
|
||||
projectRun['pass'] = False
|
||||
projectRun['result'] = failures[0].attrib['message']
|
||||
projectRunPass = False
|
||||
result = failures[0].attrib['message']
|
||||
else:
|
||||
projectRun['pass'] = True
|
||||
projectRun['result'] = 'OK'
|
||||
projectRunPass = True
|
||||
result = 'OK'
|
||||
|
||||
update_project_run(project_run_data['projectRuns'], projectRun)
|
||||
if is_build:
|
||||
projectRun['buildPass'] = projectRunPass
|
||||
projectRun['buildResult'] = result
|
||||
else:
|
||||
projectRun['testPass'] = projectRunPass
|
||||
projectRun['testResult'] = result
|
||||
|
||||
update_project_run(project_run_data['projectRuns'], projectRun, is_build)
|
||||
|
||||
def main(arguments):
|
||||
# Register and parse command line arguments
|
||||
|
|
Loading…
Reference in New Issue