提交 04adb2d2 编写于 作者: J jsalling

Fix trailing whitespace CRLF, no code changes

 Now that the project is using .gitattributes, get rid of CRLF in the repo.
上级 edfba379
Unity Test API
==============
[![Unity Build Status](https://api.travis-ci.org/ThrowTheSwitch/Unity.png?branch=master)](https://travis-ci.org/ThrowTheSwitch/Unity)
__Copyright (c) 2007 - 2014 Unity Project by Mike Karlesky, Mark VanderVoord, and Greg Williams__
Running Tests
-------------
RUN_TEST(func, linenum)
Each Test is run within the macro `RUN_TEST`. This macro performs necessary setup before the test is called and handles cleanup and result tabulation afterwards.
Ignoring Tests
--------------
There are times when a test is incomplete or not valid for some reason. At these times, TEST_IGNORE can be called. Control will immediately be returned to the caller of the test, and no failures will be returned.
TEST_IGNORE()
Ignore this test and return immediately
TEST_IGNORE_MESSAGE (message)
Ignore this test and return immediately. Output a message stating why the test was ignored.
Aborting Tests
--------------
There are times when a test will contain an infinite loop on error conditions, or there may be reason to escape from the test early without executing the rest of the test. A pair of macros support this functionality in Unity. The first `TEST_PROTECT` sets up the feature, and handles emergency abort cases. `TEST_ABORT` can then be used at any time within the tests to return to the last `TEST_PROTECT` call.
TEST_PROTECT()
Setup and Catch macro
TEST_ABORT()
Abort Test macro
Example:
main()
{
if (TEST_PROTECT() == 0)
{
MyTest();
}
}
If MyTest calls `TEST_ABORT`, program control will immediately return to `TEST_PROTECT` with a non-zero return value.
Unity Assertion Summary
=======================
Basic Validity Tests
--------------------
TEST_ASSERT_TRUE(condition)
Evaluates whatever code is in condition and fails if it evaluates to false
TEST_ASSERT_FALSE(condition)
Evaluates whatever code is in condition and fails if it evaluates to true
TEST_ASSERT(condition)
Another way of calling `TEST_ASSERT_TRUE`
TEST_ASSERT_UNLESS(condition)
Another way of calling `TEST_ASSERT_FALSE`
TEST_FAIL()
TEST_FAIL_MESSAGE(message)
This test is automatically marked as a failure. The message is output stating why.
Numerical Assertions: Integers
------------------------------
TEST_ASSERT_EQUAL_INT(expected, actual)
TEST_ASSERT_EQUAL_INT8(expected, actual)
TEST_ASSERT_EQUAL_INT16(expected, actual)
TEST_ASSERT_EQUAL_INT32(expected, actual)
TEST_ASSERT_EQUAL_INT64(expected, actual)
Compare two integers for equality and display errors as signed integers. A cast will be performed
to your natural integer size so often this can just be used. When you need to specify the exact size,
like when comparing arrays, you can use a specific version:
TEST_ASSERT_EQUAL_UINT(expected, actual)
TEST_ASSERT_EQUAL_UINT8(expected, actual)
TEST_ASSERT_EQUAL_UINT16(expected, actual)
TEST_ASSERT_EQUAL_UINT32(expected, actual)
TEST_ASSERT_EQUAL_UINT64(expected, actual)
Compare two integers for equality and display errors as unsigned integers. Like INT, there are
variants for different sizes also.
TEST_ASSERT_EQUAL_HEX(expected, actual)
TEST_ASSERT_EQUAL_HEX8(expected, actual)
TEST_ASSERT_EQUAL_HEX16(expected, actual)
TEST_ASSERT_EQUAL_HEX32(expected, actual)
TEST_ASSERT_EQUAL_HEX64(expected, actual)
Compares two integers for equality and display errors as hexadecimal. Like the other integer comparisons,
you can specify the size... here the size will also effect how many nibbles are shown (for example, `HEX16`
will show 4 nibbles).
_ARRAY
You can append `_ARRAY` to any of these macros to make an array comparison of that type. Here you will
need to care a bit more about the actual size of the value being checked. You will also specify an
additional argument which is the number of elements to compare. For example:
TEST_ASSERT_EQUAL_HEX8_ARRAY(expected, actual, elements)
TEST_ASSERT_EQUAL(expected, actual)
Another way of calling TEST_ASSERT_EQUAL_INT
TEST_ASSERT_INT_WITHIN(delta, expected, actual)
Asserts that the actual value is within plus or minus delta of the expected value. This also comes in
size specific variants.
Numerical Assertions: Bitwise
-----------------------------
TEST_ASSERT_BITS(mask, expected, actual)
Use an integer mask to specify which bits should be compared between two other integers. High bits in the mask are compared, low bits ignored.
TEST_ASSERT_BITS_HIGH(mask, actual)
Use an integer mask to specify which bits should be inspected to determine if they are all set high. High bits in the mask are compared, low bits ignored.
TEST_ASSERT_BITS_LOW(mask, actual)
Use an integer mask to specify which bits should be inspected to determine if they are all set low. High bits in the mask are compared, low bits ignored.
TEST_ASSERT_BIT_HIGH(bit, actual)
Test a single bit and verify that it is high. The bit is specified 0-31 for a 32-bit integer.
TEST_ASSERT_BIT_LOW(bit, actual)
Test a single bit and verify that it is low. The bit is specified 0-31 for a 32-bit integer.
Numerical Assertions: Floats
----------------------------
TEST_ASSERT_FLOAT_WITHIN(delta, expected, actual)
Asserts that the actual value is within plus or minus delta of the expected value.
TEST_ASSERT_EQUAL_FLOAT(expected, actual)
TEST_ASSERT_EQUAL_DOUBLE(expected, actual)
Asserts that two floating point values are "equal" within a small % delta of the expected value.
String Assertions
-----------------
TEST_ASSERT_EQUAL_STRING(expected, actual)
Compare two null-terminate strings. Fail if any character is different or if the lengths are different.
TEST_ASSERT_EQUAL_STRING_LEN(expected, actual, len)
Compare two strings. Fail if any character is different, stop comparing after len characters.
TEST_ASSERT_EQUAL_STRING_MESSAGE(expected, actual, message)
Compare two null-terminate strings. Fail if any character is different or if the lengths are different. Output a custom message on failure.
TEST_ASSERT_EQUAL_STRING_LEN_MESSAGE(expected, actual, len, message)
Compare two strings. Fail if any character is different, stop comparing after len characters. Output a custom message on failure.
Pointer Assertions
------------------
Most pointer operations can be performed by simply using the integer comparisons above. However, a couple of special cases are added for clarity.
TEST_ASSERT_NULL(pointer)
Fails if the pointer is not equal to NULL
TEST_ASSERT_NOT_NULL(pointer)
Fails if the pointer is equal to NULL
Memory Assertions
-----------------
TEST_ASSERT_EQUAL_MEMORY(expected, actual, len)
Compare two blocks of memory. This is a good generic assertion for types that can't be coerced into acting like
standard types... but since it's a memory compare, you have to be careful that your data types are packed.
_MESSAGE
--------
you can append _MESSAGE to any of the macros to make them take an additional argument. This argument
is a string that will be printed at the end of the failure strings. This is useful for specifying more
information about the problem.
Unity Test API
==============
[![Unity Build Status](https://api.travis-ci.org/ThrowTheSwitch/Unity.png?branch=master)](https://travis-ci.org/ThrowTheSwitch/Unity)
__Copyright (c) 2007 - 2014 Unity Project by Mike Karlesky, Mark VanderVoord, and Greg Williams__
Running Tests
-------------
RUN_TEST(func, linenum)
Each Test is run within the macro `RUN_TEST`. This macro performs necessary setup before the test is called and handles cleanup and result tabulation afterwards.
Ignoring Tests
--------------
There are times when a test is incomplete or not valid for some reason. At these times, TEST_IGNORE can be called. Control will immediately be returned to the caller of the test, and no failures will be returned.
TEST_IGNORE()
Ignore this test and return immediately
TEST_IGNORE_MESSAGE (message)
Ignore this test and return immediately. Output a message stating why the test was ignored.
Aborting Tests
--------------
There are times when a test will contain an infinite loop on error conditions, or there may be reason to escape from the test early without executing the rest of the test. A pair of macros support this functionality in Unity. The first `TEST_PROTECT` sets up the feature, and handles emergency abort cases. `TEST_ABORT` can then be used at any time within the tests to return to the last `TEST_PROTECT` call.
TEST_PROTECT()
Setup and Catch macro
TEST_ABORT()
Abort Test macro
Example:
main()
{
if (TEST_PROTECT() == 0)
{
MyTest();
}
}
If MyTest calls `TEST_ABORT`, program control will immediately return to `TEST_PROTECT` with a non-zero return value.
Unity Assertion Summary
=======================
Basic Validity Tests
--------------------
TEST_ASSERT_TRUE(condition)
Evaluates whatever code is in condition and fails if it evaluates to false
TEST_ASSERT_FALSE(condition)
Evaluates whatever code is in condition and fails if it evaluates to true
TEST_ASSERT(condition)
Another way of calling `TEST_ASSERT_TRUE`
TEST_ASSERT_UNLESS(condition)
Another way of calling `TEST_ASSERT_FALSE`
TEST_FAIL()
TEST_FAIL_MESSAGE(message)
This test is automatically marked as a failure. The message is output stating why.
Numerical Assertions: Integers
------------------------------
TEST_ASSERT_EQUAL_INT(expected, actual)
TEST_ASSERT_EQUAL_INT8(expected, actual)
TEST_ASSERT_EQUAL_INT16(expected, actual)
TEST_ASSERT_EQUAL_INT32(expected, actual)
TEST_ASSERT_EQUAL_INT64(expected, actual)
Compare two integers for equality and display errors as signed integers. A cast will be performed
to your natural integer size so often this can just be used. When you need to specify the exact size,
like when comparing arrays, you can use a specific version:
TEST_ASSERT_EQUAL_UINT(expected, actual)
TEST_ASSERT_EQUAL_UINT8(expected, actual)
TEST_ASSERT_EQUAL_UINT16(expected, actual)
TEST_ASSERT_EQUAL_UINT32(expected, actual)
TEST_ASSERT_EQUAL_UINT64(expected, actual)
Compare two integers for equality and display errors as unsigned integers. Like INT, there are
variants for different sizes also.
TEST_ASSERT_EQUAL_HEX(expected, actual)
TEST_ASSERT_EQUAL_HEX8(expected, actual)
TEST_ASSERT_EQUAL_HEX16(expected, actual)
TEST_ASSERT_EQUAL_HEX32(expected, actual)
TEST_ASSERT_EQUAL_HEX64(expected, actual)
Compares two integers for equality and display errors as hexadecimal. Like the other integer comparisons,
you can specify the size... here the size will also effect how many nibbles are shown (for example, `HEX16`
will show 4 nibbles).
_ARRAY
You can append `_ARRAY` to any of these macros to make an array comparison of that type. Here you will
need to care a bit more about the actual size of the value being checked. You will also specify an
additional argument which is the number of elements to compare. For example:
TEST_ASSERT_EQUAL_HEX8_ARRAY(expected, actual, elements)
TEST_ASSERT_EQUAL(expected, actual)
Another way of calling TEST_ASSERT_EQUAL_INT
TEST_ASSERT_INT_WITHIN(delta, expected, actual)
Asserts that the actual value is within plus or minus delta of the expected value. This also comes in
size specific variants.
Numerical Assertions: Bitwise
-----------------------------
TEST_ASSERT_BITS(mask, expected, actual)
Use an integer mask to specify which bits should be compared between two other integers. High bits in the mask are compared, low bits ignored.
TEST_ASSERT_BITS_HIGH(mask, actual)
Use an integer mask to specify which bits should be inspected to determine if they are all set high. High bits in the mask are compared, low bits ignored.
TEST_ASSERT_BITS_LOW(mask, actual)
Use an integer mask to specify which bits should be inspected to determine if they are all set low. High bits in the mask are compared, low bits ignored.
TEST_ASSERT_BIT_HIGH(bit, actual)
Test a single bit and verify that it is high. The bit is specified 0-31 for a 32-bit integer.
TEST_ASSERT_BIT_LOW(bit, actual)
Test a single bit and verify that it is low. The bit is specified 0-31 for a 32-bit integer.
Numerical Assertions: Floats
----------------------------
TEST_ASSERT_FLOAT_WITHIN(delta, expected, actual)
Asserts that the actual value is within plus or minus delta of the expected value.
TEST_ASSERT_EQUAL_FLOAT(expected, actual)
TEST_ASSERT_EQUAL_DOUBLE(expected, actual)
Asserts that two floating point values are "equal" within a small % delta of the expected value.
String Assertions
-----------------
TEST_ASSERT_EQUAL_STRING(expected, actual)
Compare two null-terminate strings. Fail if any character is different or if the lengths are different.
TEST_ASSERT_EQUAL_STRING_LEN(expected, actual, len)
Compare two strings. Fail if any character is different, stop comparing after len characters.
TEST_ASSERT_EQUAL_STRING_MESSAGE(expected, actual, message)
Compare two null-terminate strings. Fail if any character is different or if the lengths are different. Output a custom message on failure.
TEST_ASSERT_EQUAL_STRING_LEN_MESSAGE(expected, actual, len, message)
Compare two strings. Fail if any character is different, stop comparing after len characters. Output a custom message on failure.
Pointer Assertions
------------------
Most pointer operations can be performed by simply using the integer comparisons above. However, a couple of special cases are added for clarity.
TEST_ASSERT_NULL(pointer)
Fails if the pointer is not equal to NULL
TEST_ASSERT_NOT_NULL(pointer)
Fails if the pointer is equal to NULL
Memory Assertions
-----------------
TEST_ASSERT_EQUAL_MEMORY(expected, actual, len)
Compare two blocks of memory. This is a good generic assertion for types that can't be coerced into acting like
standard types... but since it's a memory compare, you have to be careful that your data types are packed.
_MESSAGE
--------
you can append _MESSAGE to any of the macros to make them take an additional argument. This argument
is a string that will be printed at the end of the failure strings. This is useful for specifying more
information about the problem.
# ==========================================
# Unity Project - A Test Framework for C
# Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
# [Released under MIT License. Please refer to license.txt for details]
# ==========================================
HERE = File.expand_path(File.dirname(__FILE__)) + '/'
require 'rake'
require 'rake/clean'
require 'rake/testtask'
require HERE + 'rakefile_helper'
TEMP_DIRS = [
File.join(HERE, 'build')
]
TEMP_DIRS.each do |dir|
directory(dir)
CLOBBER.include(dir)
end
task :prepare_for_tests => TEMP_DIRS
include RakefileHelpers
# Load default configuration, for now
DEFAULT_CONFIG_FILE = 'gcc_auto_stdint.yml'
configure_toolchain(DEFAULT_CONFIG_FILE)
task :unit => [:prepare_for_tests] do
run_tests
end
desc "Build and test Unity Framework"
task :all => [:clean, :unit]
task :default => [:clobber, :all]
task :ci => [:no_color, :default]
task :cruise => [:no_color, :default]
desc "Load configuration"
task :config, :config_file do |t, args|
configure_toolchain(args[:config_file])
end
task :no_color do
$colour_output = false
end
# ==========================================
# Unity Project - A Test Framework for C
# Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
# [Released under MIT License. Please refer to license.txt for details]
# ==========================================
HERE = File.expand_path(File.dirname(__FILE__)) + '/'
require 'rake'
require 'rake/clean'
require 'rake/testtask'
require HERE + 'rakefile_helper'
TEMP_DIRS = [
File.join(HERE, 'build')
]
TEMP_DIRS.each do |dir|
directory(dir)
CLOBBER.include(dir)
end
task :prepare_for_tests => TEMP_DIRS
include RakefileHelpers
# Load default configuration, for now
DEFAULT_CONFIG_FILE = 'gcc_auto_stdint.yml'
configure_toolchain(DEFAULT_CONFIG_FILE)
task :unit => [:prepare_for_tests] do
run_tests
end
desc "Build and test Unity Framework"
task :all => [:clean, :unit]
task :default => [:clobber, :all]
task :ci => [:no_color, :default]
task :cruise => [:no_color, :default]
desc "Load configuration"
task :config, :config_file do |t, args|
configure_toolchain(args[:config_file])
end
task :no_color do
$colour_output = false
end
# ==========================================
# Unity Project - A Test Framework for C
# Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
# [Released under MIT License. Please refer to license.txt for details]
# ==========================================
require 'yaml'
require 'fileutils'
require HERE+'../../auto/unity_test_summary'
require HERE+'../../auto/generate_test_runner'
require HERE+'../../auto/colour_reporter'
module RakefileHelpers
C_EXTENSION = '.c'
def load_configuration(config_file)
unless ($configured)
$cfg_file = HERE+"../../test/targets/#{config_file}" unless (config_file =~ /[\\|\/]/)
$cfg = YAML.load(File.read($cfg_file))
$colour_output = false unless $cfg['colour']
$configured = true if (config_file != DEFAULT_CONFIG_FILE)
end
end
def configure_clean
CLEAN.include($cfg['compiler']['build_path'] + '*.*') unless $cfg['compiler']['build_path'].nil?
end
def configure_toolchain(config_file=DEFAULT_CONFIG_FILE)
config_file += '.yml' unless config_file =~ /\.yml$/
config_file = config_file unless config_file =~ /[\\|\/]/
load_configuration(config_file)
configure_clean
end
def tackit(strings)
if strings.is_a?(Array)
result = "\"#{strings.join}\""
else
result = strings
end
return result
end
def squash(prefix, items)
result = ''
items.each { |item| result += " #{prefix}#{tackit(item)}" }
return result
end
def build_compiler_fields
command = tackit($cfg['compiler']['path'])
if $cfg['compiler']['defines']['items'].nil?
defines = ''
else
defines = squash($cfg['compiler']['defines']['prefix'], $cfg['compiler']['defines']['items'] + ['UNITY_OUTPUT_CHAR=UnityOutputCharSpy_OutputChar'])
end
options = squash('', $cfg['compiler']['options'])
includes = squash($cfg['compiler']['includes']['prefix'], $cfg['compiler']['includes']['items'])
includes = includes.gsub(/\\ /, ' ').gsub(/\\\"/, '"').gsub(/\\$/, '') # Remove trailing slashes (for IAR)
return {:command => command, :defines => defines, :options => options, :includes => includes}
end
def compile(file, defines=[])
compiler = build_compiler_fields
unity_include = $cfg['compiler']['includes']['prefix']+'../../src'
cmd_str = "#{compiler[:command]}#{compiler[:defines]}#{compiler[:options]}#{compiler[:includes]} #{unity_include} #{file} " +
"#{$cfg['compiler']['object_files']['prefix']}#{$cfg['compiler']['object_files']['destination']}" +
"#{File.basename(file, C_EXTENSION)}#{$cfg['compiler']['object_files']['extension']}"
execute(cmd_str)
end
def build_linker_fields
command = tackit($cfg['linker']['path'])
if $cfg['linker']['options'].nil?
options = ''
else
options = squash('', $cfg['linker']['options'])
end
if ($cfg['linker']['includes'].nil? || $cfg['linker']['includes']['items'].nil?)
includes = ''
else
includes = squash($cfg['linker']['includes']['prefix'], $cfg['linker']['includes']['items'])
end
includes = includes.gsub(/\\ /, ' ').gsub(/\\\"/, '"').gsub(/\\$/, '') # Remove trailing slashes (for IAR)
return {:command => command, :options => options, :includes => includes}
end
def link_it(exe_name, obj_list)
linker = build_linker_fields
cmd_str = "#{linker[:command]}#{linker[:options]}#{linker[:includes]} " +
(obj_list.map{|obj|"#{$cfg['linker']['object_files']['path']}#{obj} "}).join +
$cfg['linker']['bin_files']['prefix'] + ' ' +
$cfg['linker']['bin_files']['destination'] +
exe_name + $cfg['linker']['bin_files']['extension']
execute(cmd_str)
end
def build_simulator_fields
return nil if $cfg['simulator'].nil?
if $cfg['simulator']['path'].nil?
command = ''
else
command = (tackit($cfg['simulator']['path']) + ' ')
end
if $cfg['simulator']['pre_support'].nil?
pre_support = ''
else
pre_support = squash('', $cfg['simulator']['pre_support'])
end
if $cfg['simulator']['post_support'].nil?
post_support = ''
else
post_support = squash('', $cfg['simulator']['post_support'])
end
return {:command => command, :pre_support => pre_support, :post_support => post_support}
end
def execute(command_string, verbose=true)
report command_string
output = `#{command_string}`.chomp
report(output) if (verbose && !output.nil? && (output.length > 0))
if ($?.exitstatus != 0)
raise "Command failed. (Returned #{$?.exitstatus})"
end
return output
end
def report_summary
summary = UnityTestSummary.new
summary.set_root_path(HERE)
results_glob = "#{$cfg['compiler']['build_path']}*.test*"
results_glob.gsub!(/\\/, '/')
results = Dir[results_glob]
summary.set_targets(results)
summary.run
end
def run_tests
report 'Running Unity system tests...'
# Tack on TEST define for compiling unit tests
load_configuration($cfg_file)
test_defines = ['TEST']
$cfg['compiler']['defines']['items'] = [] if $cfg['compiler']['defines']['items'].nil?
# Get a list of all source files needed
src_files = Dir[HERE+'src/*.c']
src_files += Dir[HERE+'test/*.c']
src_files += Dir[HERE+'test/main/*.c']
src_files << '../../src/unity.c'
# Build object files
src_files.each { |f| compile(f, test_defines) }
obj_list = src_files.map {|f| File.basename(f.ext($cfg['compiler']['object_files']['extension'])) }
# Link the test executable
test_base = "framework_test"
link_it(test_base, obj_list)
# Execute unit test and generate results file
simulator = build_simulator_fields
executable = $cfg['linker']['bin_files']['destination'] + test_base + $cfg['linker']['bin_files']['extension']
if simulator.nil?
cmd_str = executable + " -v -r"
else
cmd_str = "#{simulator[:command]} #{simulator[:pre_support]} #{executable} #{simulator[:post_support]}"
end
output = execute(cmd_str)
test_results = $cfg['compiler']['build_path'] + test_base
if output.match(/OK$/m).nil?
test_results += '.testfail'
else
test_results += '.testpass'
end
File.open(test_results, 'w') { |f| f.print output }
end
end
# ==========================================
# Unity Project - A Test Framework for C
# Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
# [Released under MIT License. Please refer to license.txt for details]
# ==========================================
require 'yaml'
require 'fileutils'
require HERE+'../../auto/unity_test_summary'
require HERE+'../../auto/generate_test_runner'
require HERE+'../../auto/colour_reporter'
module RakefileHelpers
C_EXTENSION = '.c'
def load_configuration(config_file)
unless ($configured)
$cfg_file = HERE+"../../test/targets/#{config_file}" unless (config_file =~ /[\\|\/]/)
$cfg = YAML.load(File.read($cfg_file))
$colour_output = false unless $cfg['colour']
$configured = true if (config_file != DEFAULT_CONFIG_FILE)
end
end
def configure_clean
CLEAN.include($cfg['compiler']['build_path'] + '*.*') unless $cfg['compiler']['build_path'].nil?
end
def configure_toolchain(config_file=DEFAULT_CONFIG_FILE)
config_file += '.yml' unless config_file =~ /\.yml$/
config_file = config_file unless config_file =~ /[\\|\/]/
load_configuration(config_file)
configure_clean
end
def tackit(strings)
if strings.is_a?(Array)
result = "\"#{strings.join}\""
else
result = strings
end
return result
end
def squash(prefix, items)
result = ''
items.each { |item| result += " #{prefix}#{tackit(item)}" }
return result
end
def build_compiler_fields
command = tackit($cfg['compiler']['path'])
if $cfg['compiler']['defines']['items'].nil?
defines = ''
else
defines = squash($cfg['compiler']['defines']['prefix'], $cfg['compiler']['defines']['items'] + ['UNITY_OUTPUT_CHAR=UnityOutputCharSpy_OutputChar'])
end
options = squash('', $cfg['compiler']['options'])
includes = squash($cfg['compiler']['includes']['prefix'], $cfg['compiler']['includes']['items'])
includes = includes.gsub(/\\ /, ' ').gsub(/\\\"/, '"').gsub(/\\$/, '') # Remove trailing slashes (for IAR)
return {:command => command, :defines => defines, :options => options, :includes => includes}
end
def compile(file, defines=[])
compiler = build_compiler_fields
unity_include = $cfg['compiler']['includes']['prefix']+'../../src'
cmd_str = "#{compiler[:command]}#{compiler[:defines]}#{compiler[:options]}#{compiler[:includes]} #{unity_include} #{file} " +
"#{$cfg['compiler']['object_files']['prefix']}#{$cfg['compiler']['object_files']['destination']}" +
"#{File.basename(file, C_EXTENSION)}#{$cfg['compiler']['object_files']['extension']}"
execute(cmd_str)
end
def build_linker_fields
command = tackit($cfg['linker']['path'])
if $cfg['linker']['options'].nil?
options = ''
else
options = squash('', $cfg['linker']['options'])
end
if ($cfg['linker']['includes'].nil? || $cfg['linker']['includes']['items'].nil?)
includes = ''
else
includes = squash($cfg['linker']['includes']['prefix'], $cfg['linker']['includes']['items'])
end
includes = includes.gsub(/\\ /, ' ').gsub(/\\\"/, '"').gsub(/\\$/, '') # Remove trailing slashes (for IAR)
return {:command => command, :options => options, :includes => includes}
end
def link_it(exe_name, obj_list)
linker = build_linker_fields
cmd_str = "#{linker[:command]}#{linker[:options]}#{linker[:includes]} " +
(obj_list.map{|obj|"#{$cfg['linker']['object_files']['path']}#{obj} "}).join +
$cfg['linker']['bin_files']['prefix'] + ' ' +
$cfg['linker']['bin_files']['destination'] +
exe_name + $cfg['linker']['bin_files']['extension']
execute(cmd_str)
end
def build_simulator_fields
return nil if $cfg['simulator'].nil?
if $cfg['simulator']['path'].nil?
command = ''
else
command = (tackit($cfg['simulator']['path']) + ' ')
end
if $cfg['simulator']['pre_support'].nil?
pre_support = ''
else
pre_support = squash('', $cfg['simulator']['pre_support'])
end
if $cfg['simulator']['post_support'].nil?
post_support = ''
else
post_support = squash('', $cfg['simulator']['post_support'])
end
return {:command => command, :pre_support => pre_support, :post_support => post_support}
end
def execute(command_string, verbose=true)
report command_string
output = `#{command_string}`.chomp
report(output) if (verbose && !output.nil? && (output.length > 0))
if ($?.exitstatus != 0)
raise "Command failed. (Returned #{$?.exitstatus})"
end
return output
end
def report_summary
summary = UnityTestSummary.new
summary.set_root_path(HERE)
results_glob = "#{$cfg['compiler']['build_path']}*.test*"
results_glob.gsub!(/\\/, '/')
results = Dir[results_glob]
summary.set_targets(results)
summary.run
end
def run_tests
report 'Running Unity system tests...'
# Tack on TEST define for compiling unit tests
load_configuration($cfg_file)
test_defines = ['TEST']
$cfg['compiler']['defines']['items'] = [] if $cfg['compiler']['defines']['items'].nil?
# Get a list of all source files needed
src_files = Dir[HERE+'src/*.c']
src_files += Dir[HERE+'test/*.c']
src_files += Dir[HERE+'test/main/*.c']
src_files << '../../src/unity.c'
# Build object files
src_files.each { |f| compile(f, test_defines) }
obj_list = src_files.map {|f| File.basename(f.ext($cfg['compiler']['object_files']['extension'])) }
# Link the test executable
test_base = "framework_test"
link_it(test_base, obj_list)
# Execute unit test and generate results file
simulator = build_simulator_fields
executable = $cfg['linker']['bin_files']['destination'] + test_base + $cfg['linker']['bin_files']['extension']
if simulator.nil?
cmd_str = executable + " -v -r"
else
cmd_str = "#{simulator[:command]} #{simulator[:pre_support]} #{executable} #{simulator[:post_support]}"
end
output = execute(cmd_str)
test_results = $cfg['compiler']['build_path'] + test_base
if output.match(/OK$/m).nil?
test_results += '.testfail'
else
test_results += '.testpass'
end
File.open(test_results, 'w') { |f| f.print output }
end
end
此差异已折叠。
此差异已折叠。
---
compiler:
path: clang
source_path: '../src/'
unit_tests_path: &unit_tests_path 'tests/'
build_path: &build_path 'build/'
options:
- '-c'
- '-Wall'
- '-Wextra'
- '-Werror'
- '-Wcast-qual'
- '-Wconversion'
- '-Wdisabled-optimization'
- '-Wformat=2'
- '-Winit-self'
- '-Winline'
- '-Winvalid-pch'
- '-Wmissing-declarations'
- '-Wmissing-include-dirs'
- '-Wmissing-prototypes'
- '-Wnonnull'
- '-Wpacked'
- '-Wpointer-arith'
- '-Wredundant-decls'
- '-Wswitch-default'
- '-Wstrict-aliasing'
- '-Wstrict-overflow=5'
- '-Wuninitialized'
- '-Wunused'
# - '-Wunreachable-code'
- '-Wreturn-type'
- '-Wshadow'
- '-Wundef'
- '-Wwrite-strings'
- '-Wno-missing-declarations'
- '-Wno-missing-prototypes'
- '-Wno-nested-externs'
- '-Wno-redundant-decls'
- '-Wno-unused-parameter'
- '-Wno-variadic-macros'
- '-Wbad-function-cast'
- '-fms-extensions'
- '-fno-omit-frame-pointer'
- '-ffloat-store'
- '-fno-common'
- '-fstrict-aliasing'
- '-std=gnu99'
- '-pedantic'
- '-O0'
includes:
prefix: '-I'
items:
- 'src/'
- '../src/'
- *unit_tests_path
defines:
prefix: '-D'
items:
- UNITY_OUTPUT_CHAR=putcharSpy
- UNITY_INCLUDE_DOUBLE
- UNITY_SUPPORT_64
- UNITY_OUTPUT_RESULTS_FILE
object_files:
prefix: '-o'
extension: '.o'
destination: *build_path
linker:
path: clang
options:
- -lm
- '-m64'
includes:
prefix: '-I'
object_files:
path: *build_path
extension: '.o'
bin_files:
prefix: '-o'
extension: '.exe'
destination: *build_path
colour: true
:unity:
:plugins: []
---
compiler:
path: clang
source_path: '../src/'
unit_tests_path: &unit_tests_path 'tests/'
build_path: &build_path 'build/'
options:
- '-c'
- '-Wall'
- '-Wextra'
- '-Werror'
- '-Wcast-qual'
- '-Wconversion'
- '-Wdisabled-optimization'
- '-Wformat=2'
- '-Winit-self'
- '-Winline'
- '-Winvalid-pch'
- '-Wmissing-declarations'
- '-Wmissing-include-dirs'
- '-Wmissing-prototypes'
- '-Wnonnull'
- '-Wpacked'
- '-Wpointer-arith'
- '-Wredundant-decls'
- '-Wswitch-default'
- '-Wstrict-aliasing'
- '-Wstrict-overflow=5'
- '-Wuninitialized'
- '-Wunused'
# - '-Wunreachable-code'
- '-Wreturn-type'
- '-Wshadow'
- '-Wundef'
- '-Wwrite-strings'
- '-Wno-missing-declarations'
- '-Wno-missing-prototypes'
- '-Wno-nested-externs'
- '-Wno-redundant-decls'
- '-Wno-unused-parameter'
- '-Wno-variadic-macros'
- '-Wbad-function-cast'
- '-fms-extensions'
- '-fno-omit-frame-pointer'
- '-ffloat-store'
- '-fno-common'
- '-fstrict-aliasing'
- '-std=gnu99'
- '-pedantic'
- '-O0'
includes:
prefix: '-I'
items:
- 'src/'
- '../src/'
- *unit_tests_path
defines:
prefix: '-D'
items:
- UNITY_OUTPUT_CHAR=putcharSpy
- UNITY_INCLUDE_DOUBLE
- UNITY_SUPPORT_64
- UNITY_OUTPUT_RESULTS_FILE
object_files:
prefix: '-o'
extension: '.o'
destination: *build_path
linker:
path: clang
options:
- -lm
- '-m64'
includes:
prefix: '-I'
object_files:
path: *build_path
extension: '.o'
bin_files:
prefix: '-o'
extension: '.exe'
destination: *build_path
colour: true
:unity:
:plugins: []
---
compiler:
path: clang
source_path: '../src/'
unit_tests_path: &unit_tests_path 'tests/'
build_path: &build_path 'build/'
options:
- '-c'
- '-Wall'
- '-Wextra'
- '-Werror'
- '-Wcast-qual'
- '-Wconversion'
- '-Wdisabled-optimization'
- '-Wformat=2'
- '-Winit-self'
- '-Winline'
- '-Winvalid-pch'
- '-Wmissing-declarations'
- '-Wmissing-include-dirs'
- '-Wmissing-prototypes'
- '-Wnonnull'
- '-Wpacked'
- '-Wpointer-arith'
- '-Wredundant-decls'
- '-Wswitch-default'
- '-Wstrict-aliasing'
- '-Wstrict-overflow=5'
- '-Wuninitialized'
- '-Wunused'
# - '-Wunreachable-code'
- '-Wreturn-type'
- '-Wshadow'
- '-Wundef'
- '-Wwrite-strings'
- '-Wno-missing-declarations'
- '-Wno-missing-prototypes'
- '-Wno-nested-externs'
- '-Wno-redundant-decls'
- '-Wno-unused-parameter'
- '-Wno-variadic-macros'
- '-Wbad-function-cast'
- '-fms-extensions'
- '-fno-omit-frame-pointer'
- '-ffloat-store'
- '-fno-common'
- '-fstrict-aliasing'
- '-std=gnu99'
- '-pedantic'
- '-O0'
includes:
prefix: '-I'
items:
- 'src/'
- '../src/'
- *unit_tests_path
defines:
prefix: '-D'
items:
- UNITY_OUTPUT_CHAR=putcharSpy
- UNITY_INCLUDE_DOUBLE
- UNITY_SUPPORT_TEST_CASES
- UNITY_SUPPORT_64
object_files:
prefix: '-o'
extension: '.o'
destination: *build_path
linker:
path: clang
options:
- -lm
- '-m64'
includes:
prefix: '-I'
object_files:
path: *build_path
extension: '.o'
bin_files:
prefix: '-o'
extension: '.exe'
destination: *build_path
colour: true
:unity:
:plugins: []
---
compiler:
path: clang
source_path: '../src/'
unit_tests_path: &unit_tests_path 'tests/'
build_path: &build_path 'build/'
options:
- '-c'
- '-Wall'
- '-Wextra'
- '-Werror'
- '-Wcast-qual'
- '-Wconversion'
- '-Wdisabled-optimization'
- '-Wformat=2'
- '-Winit-self'
- '-Winline'
- '-Winvalid-pch'
- '-Wmissing-declarations'
- '-Wmissing-include-dirs'
- '-Wmissing-prototypes'
- '-Wnonnull'
- '-Wpacked'
- '-Wpointer-arith'
- '-Wredundant-decls'
- '-Wswitch-default'
- '-Wstrict-aliasing'
- '-Wstrict-overflow=5'
- '-Wuninitialized'
- '-Wunused'
# - '-Wunreachable-code'
- '-Wreturn-type'
- '-Wshadow'
- '-Wundef'
- '-Wwrite-strings'
- '-Wno-missing-declarations'
- '-Wno-missing-prototypes'
- '-Wno-nested-externs'
- '-Wno-redundant-decls'
- '-Wno-unused-parameter'
- '-Wno-variadic-macros'
- '-Wbad-function-cast'
- '-fms-extensions'
- '-fno-omit-frame-pointer'
- '-ffloat-store'
- '-fno-common'
- '-fstrict-aliasing'
- '-std=gnu99'
- '-pedantic'
- '-O0'
includes:
prefix: '-I'
items:
- 'src/'
- '../src/'
- *unit_tests_path
defines:
prefix: '-D'
items:
- UNITY_OUTPUT_CHAR=putcharSpy
- UNITY_INCLUDE_DOUBLE
- UNITY_SUPPORT_TEST_CASES
- UNITY_SUPPORT_64
object_files:
prefix: '-o'
extension: '.o'
destination: *build_path
linker:
path: clang
options:
- -lm
- '-m64'
includes:
prefix: '-I'
object_files:
path: *build_path
extension: '.o'
bin_files:
prefix: '-o'
extension: '.exe'
destination: *build_path
colour: true
:unity:
:plugins: []
compiler:
path: gcc
source_path: '../src/'
unit_tests_path: &unit_tests_path 'tests/'
build_path: &build_path 'build/'
options:
- '-c'
- '-m32'
- '-Wall'
- '-Wno-address'
- '-std=c99'
- '-pedantic'
includes:
prefix: '-I'
items:
- 'src/'
- '../src/'
- *unit_tests_path
defines:
prefix: '-D'
items:
- UNITY_OUTPUT_CHAR=putcharSpy
- UNITY_EXCLUDE_STDINT_H
- UNITY_EXCLUDE_LIMITS_H
- UNITY_EXCLUDE_SIZEOF
- UNITY_INCLUDE_DOUBLE
- UNITY_SUPPORT_TEST_CASES
- UNITY_INT_WIDTH=32
- UNITY_LONG_WIDTH=32
object_files:
prefix: '-o'
extension: '.o'
destination: *build_path
linker:
path: gcc
options:
- -lm
- '-m32'
includes:
prefix: '-I'
object_files:
path: *build_path
extension: '.o'
bin_files:
prefix: '-o'
extension: '.exe'
destination: *build_path
colour: true
:unity:
:plugins: []
compiler:
path: gcc
source_path: '../src/'
unit_tests_path: &unit_tests_path 'tests/'
build_path: &build_path 'build/'
options:
- '-c'
- '-m32'
- '-Wall'
- '-Wno-address'
- '-std=c99'
- '-pedantic'
includes:
prefix: '-I'
items:
- 'src/'
- '../src/'
- *unit_tests_path
defines:
prefix: '-D'
items:
- UNITY_OUTPUT_CHAR=putcharSpy
- UNITY_EXCLUDE_STDINT_H
- UNITY_EXCLUDE_LIMITS_H
- UNITY_EXCLUDE_SIZEOF
- UNITY_INCLUDE_DOUBLE
- UNITY_SUPPORT_TEST_CASES
- UNITY_INT_WIDTH=32
- UNITY_LONG_WIDTH=32
object_files:
prefix: '-o'
extension: '.o'
destination: *build_path
linker:
path: gcc
options:
- -lm
- '-m32'
includes:
prefix: '-I'
object_files:
path: *build_path
extension: '.o'
bin_files:
prefix: '-o'
extension: '.exe'
destination: *build_path
colour: true
:unity:
:plugins: []
compiler:
path: gcc
source_path: '../src/'
unit_tests_path: &unit_tests_path 'tests/'
build_path: &build_path 'build/'
options:
- '-c'
- '-m64'
- '-Wall'
- '-Wno-address'
- '-std=c99'
- '-pedantic'
includes:
prefix: '-I'
items:
- 'src/'
- '../src/'
- *unit_tests_path
defines:
prefix: '-D'
items:
- UNITY_OUTPUT_CHAR=putcharSpy
- UNITY_EXCLUDE_STDINT_H
- UNITY_EXCLUDE_LIMITS_H
- UNITY_EXCLUDE_SIZEOF
- UNITY_INCLUDE_DOUBLE
- UNITY_SUPPORT_TEST_CASES
- UNITY_SUPPORT_64
- UNITY_INT_WIDTH=32
- UNITY_LONG_WIDTH=64
object_files:
prefix: '-o'
extension: '.o'
destination: *build_path
linker:
path: gcc
options:
- -lm
- '-m64'
includes:
prefix: '-I'
object_files:
path: *build_path
extension: '.o'
bin_files:
prefix: '-o'
extension: '.exe'
destination: *build_path
colour: true
:unity:
:plugins: []
compiler:
path: gcc
source_path: '../src/'
unit_tests_path: &unit_tests_path 'tests/'
build_path: &build_path 'build/'
options:
- '-c'
- '-m64'
- '-Wall'
- '-Wno-address'
- '-std=c99'
- '-pedantic'
includes:
prefix: '-I'
items:
- 'src/'
- '../src/'
- *unit_tests_path
defines:
prefix: '-D'
items:
- UNITY_OUTPUT_CHAR=putcharSpy
- UNITY_EXCLUDE_STDINT_H
- UNITY_EXCLUDE_LIMITS_H
- UNITY_EXCLUDE_SIZEOF
- UNITY_INCLUDE_DOUBLE
- UNITY_SUPPORT_TEST_CASES
- UNITY_SUPPORT_64
- UNITY_INT_WIDTH=32
- UNITY_LONG_WIDTH=64
object_files:
prefix: '-o'
extension: '.o'
destination: *build_path
linker:
path: gcc
options:
- -lm
- '-m64'
includes:
prefix: '-I'
object_files:
path: *build_path
extension: '.o'
bin_files:
prefix: '-o'
extension: '.exe'
destination: *build_path
colour: true
:unity:
:plugins: []
compiler:
path: gcc
source_path: '../src/'
unit_tests_path: &unit_tests_path 'tests/'
build_path: &build_path 'build/'
options:
- '-c'
- '-m64'
- '-Wall'
- '-Wno-address'
- '-std=c99'
- '-pedantic'
includes:
prefix: '-I'
items:
- 'src/'
- '../src/'
- *unit_tests_path
defines:
prefix: '-D'
items:
- UNITY_OUTPUT_CHAR=putcharSpy
- UNITY_EXCLUDE_STDINT_H
- UNITY_INCLUDE_DOUBLE
- UNITY_SUPPORT_TEST_CASES
- UNITY_SUPPORT_64
object_files:
prefix: '-o'
extension: '.o'
destination: *build_path
linker:
path: gcc
options:
- -lm
- '-m64'
includes:
prefix: '-I'
object_files:
path: *build_path
extension: '.o'
bin_files:
prefix: '-o'
extension: '.exe'
destination: *build_path
colour: true
:unity:
:plugins: []
compiler:
path: gcc
source_path: '../src/'
unit_tests_path: &unit_tests_path 'tests/'
build_path: &build_path 'build/'
options:
- '-c'
- '-m64'
- '-Wall'
- '-Wno-address'
- '-std=c99'
- '-pedantic'
includes:
prefix: '-I'
items:
- 'src/'
- '../src/'
- *unit_tests_path
defines:
prefix: '-D'
items:
- UNITY_OUTPUT_CHAR=putcharSpy
- UNITY_EXCLUDE_STDINT_H
- UNITY_INCLUDE_DOUBLE
- UNITY_SUPPORT_TEST_CASES
- UNITY_SUPPORT_64
object_files:
prefix: '-o'
extension: '.o'
destination: *build_path
linker:
path: gcc
options:
- -lm
- '-m64'
includes:
prefix: '-I'
object_files:
path: *build_path
extension: '.o'
bin_files:
prefix: '-o'
extension: '.exe'
destination: *build_path
colour: true
:unity:
:plugins: []
compiler:
path: gcc
source_path: '../src/'
unit_tests_path: &unit_tests_path 'tests/'
build_path: &build_path 'build/'
options:
- '-c'
- '-m64'
- '-Wall'
- '-Wno-address'
- '-std=c99'
- '-pedantic'
includes:
prefix: '-I'
items:
- 'src/'
- '../src/'
- *unit_tests_path
defines:
prefix: '-D'
items:
- UNITY_OUTPUT_CHAR=putcharSpy
- UNITY_EXCLUDE_STDINT_H
- UNITY_EXCLUDE_LIMITS_H
- UNITY_INCLUDE_DOUBLE
- UNITY_SUPPORT_TEST_CASES
- UNITY_SUPPORT_64
object_files:
prefix: '-o'
extension: '.o'
destination: *build_path
linker:
path: gcc
options:
- -lm
- '-m64'
includes:
prefix: '-I'
object_files:
path: *build_path
extension: '.o'
bin_files:
prefix: '-o'
extension: '.exe'
destination: *build_path
colour: true
:unity:
:plugins: []
compiler:
path: gcc
source_path: '../src/'
unit_tests_path: &unit_tests_path 'tests/'
build_path: &build_path 'build/'
options:
- '-c'
- '-m64'
- '-Wall'
- '-Wno-address'
- '-std=c99'
- '-pedantic'
includes:
prefix: '-I'
items:
- 'src/'
- '../src/'
- *unit_tests_path
defines:
prefix: '-D'
items:
- UNITY_OUTPUT_CHAR=putcharSpy
- UNITY_EXCLUDE_STDINT_H
- UNITY_EXCLUDE_LIMITS_H
- UNITY_INCLUDE_DOUBLE
- UNITY_SUPPORT_TEST_CASES
- UNITY_SUPPORT_64
object_files:
prefix: '-o'
extension: '.o'
destination: *build_path
linker:
path: gcc
options:
- -lm
- '-m64'
includes:
prefix: '-I'
object_files:
path: *build_path
extension: '.o'
bin_files:
prefix: '-o'
extension: '.exe'
destination: *build_path
colour: true
:unity:
:plugins: []
compiler:
path: gcc
source_path: '../src/'
unit_tests_path: &unit_tests_path 'tests/'
build_path: &build_path 'build/'
options:
- '-c'
- '-m64'
- '-Wall'
- '-Wno-address'
- '-std=c99'
- '-pedantic'
- '-Wextra'
- '-Werror'
- '-Wpointer-arith'
- '-Wcast-align'
- '-Wwrite-strings'
- '-Wswitch-default'
- '-Wunreachable-code'
- '-Winit-self'
- '-Wmissing-field-initializers'
- '-Wno-unknown-pragmas'
- '-Wstrict-prototypes'
- '-Wundef'
- '-Wold-style-definition'
includes:
prefix: '-I'
items:
- 'src/'
- '../src/'
- *unit_tests_path
defines:
prefix: '-D'
items:
- UNITY_OUTPUT_CHAR=putcharSpy
- UNITY_INCLUDE_DOUBLE
- UNITY_SUPPORT_TEST_CASES
- UNITY_SUPPORT_64
object_files:
prefix: '-o'
extension: '.o'
destination: *build_path
linker:
path: gcc
options:
- -lm
- '-m64'
includes:
prefix: '-I'
object_files:
path: *build_path
extension: '.o'
bin_files:
prefix: '-o'
extension: '.exe'
destination: *build_path
colour: true
:unity:
:plugins: []
compiler:
path: gcc
source_path: '../src/'
unit_tests_path: &unit_tests_path 'tests/'
build_path: &build_path 'build/'
options:
- '-c'
- '-m64'
- '-Wall'
- '-Wno-address'
- '-std=c99'
- '-pedantic'
- '-Wextra'
- '-Werror'
- '-Wpointer-arith'
- '-Wcast-align'
- '-Wwrite-strings'
- '-Wswitch-default'
- '-Wunreachable-code'
- '-Winit-self'
- '-Wmissing-field-initializers'
- '-Wno-unknown-pragmas'
- '-Wstrict-prototypes'
- '-Wundef'
- '-Wold-style-definition'
includes:
prefix: '-I'
items:
- 'src/'
- '../src/'
- *unit_tests_path
defines:
prefix: '-D'
items:
- UNITY_OUTPUT_CHAR=putcharSpy
- UNITY_INCLUDE_DOUBLE
- UNITY_SUPPORT_TEST_CASES
- UNITY_SUPPORT_64
object_files:
prefix: '-o'
extension: '.o'
destination: *build_path
linker:
path: gcc
options:
- -lm
- '-m64'
includes:
prefix: '-I'
object_files:
path: *build_path
extension: '.o'
bin_files:
prefix: '-o'
extension: '.exe'
destination: *build_path
colour: true
:unity:
:plugins: []
compiler:
path: gcc
source_path: '../src/'
unit_tests_path: &unit_tests_path 'tests/'
build_path: &build_path 'build/'
options:
- '-c'
- '-m64'
- '-Wall'
- '-Wno-address'
- '-std=c99'
- '-pedantic'
includes:
prefix: '-I'
items:
- 'src/'
- '../src/'
- *unit_tests_path
defines:
prefix: '-D'
items:
- UNITY_OUTPUT_CHAR=putcharSpy
- UNITY_EXCLUDE_MATH_H
- UNITY_INCLUDE_DOUBLE
- UNITY_SUPPORT_TEST_CASES
- UNITY_SUPPORT_64
object_files:
prefix: '-o'
extension: '.o'
destination: *build_path
linker:
path: gcc
options:
- -lm
- '-m64'
includes:
prefix: '-I'
object_files:
path: *build_path
extension: '.o'
bin_files:
prefix: '-o'
extension: '.exe'
destination: *build_path
colour: true
:unity:
:plugins: []
compiler:
path: gcc
source_path: '../src/'
unit_tests_path: &unit_tests_path 'tests/'
build_path: &build_path 'build/'
options:
- '-c'
- '-m64'
- '-Wall'
- '-Wno-address'
- '-std=c99'
- '-pedantic'
includes:
prefix: '-I'
items:
- 'src/'
- '../src/'
- *unit_tests_path
defines:
prefix: '-D'
items:
- UNITY_OUTPUT_CHAR=putcharSpy
- UNITY_EXCLUDE_MATH_H
- UNITY_INCLUDE_DOUBLE
- UNITY_SUPPORT_TEST_CASES
- UNITY_SUPPORT_64
object_files:
prefix: '-o'
extension: '.o'
destination: *build_path
linker:
path: gcc
options:
- -lm
- '-m64'
includes:
prefix: '-I'
object_files:
path: *build_path
extension: '.o'
bin_files:
prefix: '-o'
extension: '.exe'
destination: *build_path
colour: true
:unity:
:plugins: []
# rumor has it that this yaml file works for the standard edition of the
# hitech PICC18 compiler, but not the pro version.
#
compiler:
path: cd build && picc18
source_path: '..\src\'
unit_tests_path: &unit_tests_path 'tests\'
build_path: &build_path 'build\'
options:
- --chip=18F87J10
- --ide=hitide
- --q #quiet please
- --asmlist
- --codeoffset=0
- --emi=wordwrite # External memory interface protocol
- --warn=0 # allow all normal warning messages
- --errors=10 # Number of errors before aborting compile
- --char=unsigned
- -Bl # Large memory model
- -G # generate symbol file
- --cp=16 # 16-bit pointers
- --double=24
- -N255 # 255-char symbol names
- --opt=none # Do not use any compiler optimziations
- -c # compile only
- -M
includes:
prefix: '-I'
items:
- 'c:/Projects/NexGen/Prototypes/CMockTest/src/'
- 'c:/Projects/NexGen/Prototypes/CMockTest/mocks/'
- 'c:/CMock/src/'
- 'c:/CMock/examples/src/'
- 'c:/CMock/vendor/unity/src/'
- 'c:/CMock/vendor/unity/examples/helper/'
- *unit_tests_path
defines:
prefix: '-D'
items:
- UNITY_INT_WIDTH=16
- UNITY_POINTER_WIDTH=16
- CMOCK_MEM_STATIC
- CMOCK_MEM_SIZE=3000
- UNITY_SUPPORT_TEST_CASES
- _PICC18
object_files:
# prefix: '-O' # Hi-Tech doesn't want a prefix. They key off of filename .extensions, instead
extension: '.obj'
destination: *build_path
linker:
path: cd build && picc18
options:
- --chip=18F87J10
- --ide=hitide
- --cp=24 # 24-bit pointers. Is this needed for linker??
- --double=24 # Is this needed for linker??
- -Lw # Scan the pic87*w.lib in the lib/ of the compiler installation directory
- --summary=mem,file # info listing
- --summary=+psect
- --summary=+hex
- --output=+intel
- --output=+mcof
- --runtime=+init # Directs startup code to copy idata, ibigdata and ifardata psects from ROM to RAM.
- --runtime=+clear # Directs startup code to clear bss, bigbss, rbss and farbss psects
- --runtime=+clib # link in the c-runtime
- --runtime=+keep # Keep the generated startup src after its obj is linked
- -G # Generate src-level symbol file
- -MIWasTheLastToBuild.map
- --warn=0 # allow all normal warning messages
- -Bl # Large memory model (probably not needed for linking)
includes:
prefix: '-I'
object_files:
path: *build_path
extension: '.obj'
bin_files:
prefix: '-O'
extension: '.hex'
destination: *build_path
simulator:
path:
pre_support:
- 'java -client -jar ' # note space
- ['C:\Program Files\HI-TECH Software\HI-TIDE\3.15\lib\', 'simpic18.jar']
- 18F87J10
post_support:
:cmock:
:plugins: []
:includes:
- Types.h
:suite_teardown: |
if (num_failures)
_FAILED_TEST();
else
_PASSED_TESTS();
return 0;
colour: true
# rumor has it that this yaml file works for the standard edition of the
# hitech PICC18 compiler, but not the pro version.
#
compiler:
path: cd build && picc18
source_path: '..\src\'
unit_tests_path: &unit_tests_path 'tests\'
build_path: &build_path 'build\'
options:
- --chip=18F87J10
- --ide=hitide
- --q #quiet please
- --asmlist
- --codeoffset=0
- --emi=wordwrite # External memory interface protocol
- --warn=0 # allow all normal warning messages
- --errors=10 # Number of errors before aborting compile
- --char=unsigned
- -Bl # Large memory model
- -G # generate symbol file
- --cp=16 # 16-bit pointers
- --double=24
- -N255 # 255-char symbol names
- --opt=none # Do not use any compiler optimziations
- -c # compile only
- -M
includes:
prefix: '-I'
items:
- 'c:/Projects/NexGen/Prototypes/CMockTest/src/'
- 'c:/Projects/NexGen/Prototypes/CMockTest/mocks/'
- 'c:/CMock/src/'
- 'c:/CMock/examples/src/'
- 'c:/CMock/vendor/unity/src/'
- 'c:/CMock/vendor/unity/examples/helper/'
- *unit_tests_path
defines:
prefix: '-D'
items:
- UNITY_INT_WIDTH=16
- UNITY_POINTER_WIDTH=16
- CMOCK_MEM_STATIC
- CMOCK_MEM_SIZE=3000
- UNITY_SUPPORT_TEST_CASES
- _PICC18
object_files:
# prefix: '-O' # Hi-Tech doesn't want a prefix. They key off of filename .extensions, instead
extension: '.obj'
destination: *build_path
linker:
path: cd build && picc18
options:
- --chip=18F87J10
- --ide=hitide
- --cp=24 # 24-bit pointers. Is this needed for linker??
- --double=24 # Is this needed for linker??
- -Lw # Scan the pic87*w.lib in the lib/ of the compiler installation directory
- --summary=mem,file # info listing
- --summary=+psect
- --summary=+hex
- --output=+intel
- --output=+mcof
- --runtime=+init # Directs startup code to copy idata, ibigdata and ifardata psects from ROM to RAM.
- --runtime=+clear # Directs startup code to clear bss, bigbss, rbss and farbss psects
- --runtime=+clib # link in the c-runtime
- --runtime=+keep # Keep the generated startup src after its obj is linked
- -G # Generate src-level symbol file
- -MIWasTheLastToBuild.map
- --warn=0 # allow all normal warning messages
- -Bl # Large memory model (probably not needed for linking)
includes:
prefix: '-I'
object_files:
path: *build_path
extension: '.obj'
bin_files:
prefix: '-O'
extension: '.hex'
destination: *build_path
simulator:
path:
pre_support:
- 'java -client -jar ' # note space
- ['C:\Program Files\HI-TECH Software\HI-TIDE\3.15\lib\', 'simpic18.jar']
- 18F87J10
post_support:
:cmock:
:plugins: []
:includes:
- Types.h
:suite_teardown: |
if (num_failures)
_FAILED_TEST();
else
_PASSED_TESTS();
return 0;
colour: true
tools_root: &tools_root 'C:\Program Files\IAR Systems\Embedded Workbench 4.0 Kickstart\'
compiler:
path: [*tools_root, 'arm\bin\iccarm.exe']
source_path: '..\src\'
unit_tests_path: &unit_tests_path 'tests\'
build_path: &build_path 'build\'
options:
- --dlib_config
- [*tools_root, 'arm\lib\dl4tptinl8n.h']
- -z3
- --no_cse
- --no_unroll
- --no_inline
- --no_code_motion
- --no_tbaa
- --no_clustering
- --no_scheduling
- --debug
- --cpu_mode thumb
- --endian little
- --cpu ARM7TDMI
- --stack_align 4
- --interwork
- -e
- --silent
- --warnings_are_errors
- --fpu None
- --diag_suppress Pa050
includes:
prefix: '-I'
items:
- [*tools_root, 'arm\inc\']
- 'src\'
- '..\src\'
- *unit_tests_path
- 'vendor\unity\src\'
defines:
prefix: '-D'
items:
- UNITY_SUPPORT_64
- 'UNITY_SUPPORT_TEST_CASES'
object_files:
prefix: '-o'
extension: '.r79'
destination: *build_path
linker:
path: [*tools_root, 'common\bin\xlink.exe']
options:
- -rt
- [*tools_root, 'arm\lib\dl4tptinl8n.r79']
- -D_L_EXTMEM_START=0
- -D_L_EXTMEM_SIZE=0
- -D_L_HEAP_SIZE=120
- -D_L_STACK_SIZE=32
- -e_small_write=_formatted_write
- -s
- __program_start
- -f
- [*tools_root, '\arm\config\lnkarm.xcl']
includes:
prefix: '-I'
items:
- [*tools_root, 'arm\config\']
- [*tools_root, 'arm\lib\']
object_files:
path: *build_path
extension: '.r79'
bin_files:
prefix: '-o'
extension: '.d79'
destination: *build_path
simulator:
path: [*tools_root, 'common\bin\CSpyBat.exe']
pre_support:
- --silent
- [*tools_root, 'arm\bin\armproc.dll']
- [*tools_root, 'arm\bin\armsim.dll']
post_support:
- --plugin
- [*tools_root, 'arm\bin\armbat.dll']
- --backend
- -B
- -p
- [*tools_root, 'arm\config\ioat91sam7X256.ddf']
- -d
- sim
colour: true
:unity:
:plugins: []
tools_root: &tools_root 'C:\Program Files\IAR Systems\Embedded Workbench 4.0 Kickstart\'
compiler:
path: [*tools_root, 'arm\bin\iccarm.exe']
source_path: '..\src\'
unit_tests_path: &unit_tests_path 'tests\'
build_path: &build_path 'build\'
options:
- --dlib_config
- [*tools_root, 'arm\lib\dl4tptinl8n.h']
- -z3
- --no_cse
- --no_unroll
- --no_inline
- --no_code_motion
- --no_tbaa
- --no_clustering
- --no_scheduling
- --debug
- --cpu_mode thumb
- --endian little
- --cpu ARM7TDMI
- --stack_align 4
- --interwork
- -e
- --silent
- --warnings_are_errors
- --fpu None
- --diag_suppress Pa050
includes:
prefix: '-I'
items:
- [*tools_root, 'arm\inc\']
- 'src\'
- '..\src\'
- *unit_tests_path
- 'vendor\unity\src\'
defines:
prefix: '-D'
items:
- UNITY_SUPPORT_64
- 'UNITY_SUPPORT_TEST_CASES'
object_files:
prefix: '-o'
extension: '.r79'
destination: *build_path
linker:
path: [*tools_root, 'common\bin\xlink.exe']
options:
- -rt
- [*tools_root, 'arm\lib\dl4tptinl8n.r79']
- -D_L_EXTMEM_START=0
- -D_L_EXTMEM_SIZE=0
- -D_L_HEAP_SIZE=120
- -D_L_STACK_SIZE=32
- -e_small_write=_formatted_write
- -s
- __program_start
- -f
- [*tools_root, '\arm\config\lnkarm.xcl']
includes:
prefix: '-I'
items:
- [*tools_root, 'arm\config\']
- [*tools_root, 'arm\lib\']
object_files:
path: *build_path
extension: '.r79'
bin_files:
prefix: '-o'
extension: '.d79'
destination: *build_path
simulator:
path: [*tools_root, 'common\bin\CSpyBat.exe']
pre_support:
- --silent
- [*tools_root, 'arm\bin\armproc.dll']
- [*tools_root, 'arm\bin\armsim.dll']
post_support:
- --plugin
- [*tools_root, 'arm\bin\armbat.dll']
- --backend
- -B
- -p
- [*tools_root, 'arm\config\ioat91sam7X256.ddf']
- -d
- sim
colour: true
:unity:
:plugins: []
tools_root: &tools_root 'C:\Program Files\IAR Systems\Embedded Workbench 5.3\'
compiler:
path: [*tools_root, 'arm\bin\iccarm.exe']
source_path: '..\src\'
unit_tests_path: &unit_tests_path 'tests\'
build_path: &build_path 'build\'
options:
- --dlib_config
- [*tools_root, 'arm\inc\DLib_Config_Normal.h']
- --no_cse
- --no_unroll
- --no_inline
- --no_code_motion
- --no_tbaa
- --no_clustering
- --no_scheduling
- --debug
- --cpu_mode thumb
- --endian=little
- --cpu=ARM7TDMI
- --interwork
- --warnings_are_errors
- --fpu=None
- --diag_suppress=Pa050
- --diag_suppress=Pe111
- -e
- -On
includes:
prefix: '-I'
items:
- [*tools_root, 'arm\inc\']
- 'src\'
- '..\src\'
- *unit_tests_path
- 'vendor\unity\src\'
- 'iar\iar_v5\incIAR\'
defines:
prefix: '-D'
items:
- UNITY_SUPPORT_64
- 'UNITY_SUPPORT_TEST_CASES'
object_files:
prefix: '-o'
extension: '.r79'
destination: *build_path
linker:
path: [*tools_root, 'arm\bin\ilinkarm.exe']
options:
- --redirect _Printf=_PrintfLarge
- --redirect _Scanf=_ScanfSmall
- --semihosting
- --entry __iar_program_start
- --config
- [*tools_root, 'arm\config\generic.icf']
object_files:
path: *build_path
extension: '.o'
bin_files:
prefix: '-o'
extension: '.out'
destination: *build_path
simulator:
path: [*tools_root, 'common\bin\CSpyBat.exe']
pre_support:
- --silent
- [*tools_root, 'arm\bin\armproc.dll']
- [*tools_root, 'arm\bin\armsim.dll']
post_support:
- --plugin
- [*tools_root, 'arm\bin\armbat.dll']
- --backend
- -B
- -p
- [*tools_root, 'arm\config\debugger\atmel\ioat91sam7X256.ddf']
- -d
- sim
colour: true
:unity:
:plugins: []
tools_root: &tools_root 'C:\Program Files\IAR Systems\Embedded Workbench 5.3\'
compiler:
path: [*tools_root, 'arm\bin\iccarm.exe']
source_path: '..\src\'
unit_tests_path: &unit_tests_path 'tests\'
build_path: &build_path 'build\'
options:
- --dlib_config
- [*tools_root, 'arm\inc\DLib_Config_Normal.h']
- --no_cse
- --no_unroll
- --no_inline
- --no_code_motion
- --no_tbaa
- --no_clustering
- --no_scheduling
- --debug
- --cpu_mode thumb
- --endian=little
- --cpu=ARM7TDMI
- --interwork
- --warnings_are_errors
- --fpu=None
- --diag_suppress=Pa050
- --diag_suppress=Pe111
- -e
- -On
includes:
prefix: '-I'
items:
- [*tools_root, 'arm\inc\']
- 'src\'
- '..\src\'
- *unit_tests_path
- 'vendor\unity\src\'
- 'iar\iar_v5\incIAR\'
defines:
prefix: '-D'
items:
- UNITY_SUPPORT_64
- 'UNITY_SUPPORT_TEST_CASES'
object_files:
prefix: '-o'
extension: '.r79'
destination: *build_path
linker:
path: [*tools_root, 'arm\bin\ilinkarm.exe']
options:
- --redirect _Printf=_PrintfLarge
- --redirect _Scanf=_ScanfSmall
- --semihosting
- --entry __iar_program_start
- --config
- [*tools_root, 'arm\config\generic.icf']
object_files:
path: *build_path
extension: '.o'
bin_files:
prefix: '-o'
extension: '.out'
destination: *build_path
simulator:
path: [*tools_root, 'common\bin\CSpyBat.exe']
pre_support:
- --silent
- [*tools_root, 'arm\bin\armproc.dll']
- [*tools_root, 'arm\bin\armsim.dll']
post_support:
- --plugin
- [*tools_root, 'arm\bin\armbat.dll']
- --backend
- -B
- -p
- [*tools_root, 'arm\config\debugger\atmel\ioat91sam7X256.ddf']
- -d
- sim
colour: true
:unity:
:plugins: []
tools_root: &tools_root 'C:\Program Files\IAR Systems\Embedded Workbench 5.3\'
compiler:
path: [*tools_root, 'arm\bin\iccarm.exe']
source_path: '..\src\'
unit_tests_path: &unit_tests_path 'tests\'
build_path: &build_path 'build\'
options:
- --dlib_config
- [*tools_root, 'arm\inc\DLib_Config_Normal.h']
- --no_cse
- --no_unroll
- --no_inline
- --no_code_motion
- --no_tbaa
- --no_clustering
- --no_scheduling
- --debug
- --cpu_mode thumb
- --endian=little
- --cpu=ARM7TDMI
- --interwork
- --warnings_are_errors
- --fpu=None
- --diag_suppress=Pa050
- --diag_suppress=Pe111
- -e
- -On
includes:
prefix: '-I'
items:
- [*tools_root, 'arm\inc\']
- 'src\'
- '..\src\'
- *unit_tests_path
- 'vendor\unity\src\'
- 'iar\iar_v5\incIAR\'
defines:
prefix: '-D'
items:
- UNITY_SUPPORT_64
- 'UNITY_SUPPORT_TEST_CASES'
object_files:
prefix: '-o'
extension: '.r79'
destination: *build_path
linker:
path: [*tools_root, 'arm\bin\ilinkarm.exe']
options:
- --redirect _Printf=_PrintfLarge
- --redirect _Scanf=_ScanfSmall
- --semihosting
- --entry __iar_program_start
- --config
- [*tools_root, 'arm\config\generic.icf']
object_files:
path: *build_path
extension: '.o'
bin_files:
prefix: '-o'
extension: '.out'
destination: *build_path
simulator:
path: [*tools_root, 'common\bin\CSpyBat.exe']
pre_support:
- --silent
- [*tools_root, 'arm\bin\armproc.dll']
- [*tools_root, 'arm\bin\armsim.dll']
post_support:
- --plugin
- [*tools_root, 'arm\bin\armbat.dll']
- --backend
- -B
- -p
- [*tools_root, 'arm\config\debugger\atmel\ioat91sam7X256.ddf']
- -d
- sim
colour: true
:unity:
:plugins: []
tools_root: &tools_root 'C:\Program Files\IAR Systems\Embedded Workbench 5.3\'
compiler:
path: [*tools_root, 'arm\bin\iccarm.exe']
source_path: '..\src\'
unit_tests_path: &unit_tests_path 'tests\'
build_path: &build_path 'build\'
options:
- --dlib_config
- [*tools_root, 'arm\inc\DLib_Config_Normal.h']
- --no_cse
- --no_unroll
- --no_inline
- --no_code_motion
- --no_tbaa
- --no_clustering
- --no_scheduling
- --debug
- --cpu_mode thumb
- --endian=little
- --cpu=ARM7TDMI
- --interwork
- --warnings_are_errors
- --fpu=None
- --diag_suppress=Pa050
- --diag_suppress=Pe111
- -e
- -On
includes:
prefix: '-I'
items:
- [*tools_root, 'arm\inc\']
- 'src\'
- '..\src\'
- *unit_tests_path
- 'vendor\unity\src\'
- 'iar\iar_v5\incIAR\'
defines:
prefix: '-D'
items:
- UNITY_SUPPORT_64
- 'UNITY_SUPPORT_TEST_CASES'
object_files:
prefix: '-o'
extension: '.r79'
destination: *build_path
linker:
path: [*tools_root, 'arm\bin\ilinkarm.exe']
options:
- --redirect _Printf=_PrintfLarge
- --redirect _Scanf=_ScanfSmall
- --semihosting
- --entry __iar_program_start
- --config
- [*tools_root, 'arm\config\generic.icf']
object_files:
path: *build_path
extension: '.o'
bin_files:
prefix: '-o'
extension: '.out'
destination: *build_path
simulator:
path: [*tools_root, 'common\bin\CSpyBat.exe']
pre_support:
- --silent
- [*tools_root, 'arm\bin\armproc.dll']
- [*tools_root, 'arm\bin\armsim.dll']
post_support:
- --plugin
- [*tools_root, 'arm\bin\armbat.dll']
- --backend
- -B
- -p
- [*tools_root, 'arm\config\debugger\atmel\ioat91sam7X256.ddf']
- -d
- sim
colour: true
:unity:
:plugins: []
#Default tool path for IAR 5.4 on Windows XP 64bit
tools_root: &tools_root 'C:\Program Files (x86)\IAR Systems\Embedded Workbench 5.4 Kickstart\'
compiler:
path: [*tools_root, 'arm\bin\iccarm.exe']
source_path: '..\src\'
unit_tests_path: &unit_tests_path 'tests\'
build_path: &build_path 'build\'
options:
- --diag_suppress=Pa050
#- --diag_suppress=Pe111
- --debug
- --endian=little
- --cpu=Cortex-M3
- --no_path_in_file_macros
- -e
- --fpu=None
- --dlib_config
- [*tools_root, 'arm\inc\DLib_Config_Normal.h']
#- --preinclude --preinclude C:\Vss\T2 Working\common\system.h
- --interwork
- --warnings_are_errors
# - Ohz
- -Oh
# - --no_cse
# - --no_unroll
# - --no_inline
# - --no_code_motion
# - --no_tbaa
# - --no_clustering
# - --no_scheduling
includes:
prefix: '-I'
items:
- [*tools_root, 'arm\inc\']
- 'src\'
- '..\src\'
- *unit_tests_path
- 'vendor\unity\src\'
- 'iar\iar_v5\incIAR\'
defines:
prefix: '-D'
items:
- ewarm
- PART_LM3S9B92
- TARGET_IS_TEMPEST_RB1
- USE_ROM_DRIVERS
- UART_BUFFERED
- UNITY_SUPPORT_64
object_files:
prefix: '-o'
extension: '.r79'
destination: *build_path
linker:
path: [*tools_root, 'arm\bin\ilinkarm.exe']
options:
- --redirect _Printf=_PrintfLarge
- --redirect _Scanf=_ScanfSmall
- --semihosting
- --entry __iar_program_start
- --config
- [*tools_root, 'arm\config\generic.icf']
# - ['C:\Temp\lm3s9b92.icf']
object_files:
path: *build_path
extension: '.o'
bin_files:
prefix: '-o'
extension: '.out'
destination: *build_path
simulator:
path: [*tools_root, 'common\bin\CSpyBat.exe']
pre_support:
#- --silent
- [*tools_root, 'arm\bin\armproc.dll']
- [*tools_root, 'arm\bin\armsim2.dll']
post_support:
- --plugin
- [*tools_root, 'arm\bin\armbat.dll']
- --backend
- -B
- --endian=little
- --cpu=Cortex-M3
- --fpu=None
- -p
- [*tools_root, 'arm\config\debugger\TexasInstruments\iolm3sxxxx.ddf']
- --semihosting
- --device=LM3SxBxx
#- -d
#- sim
colour: true
:unity:
:plugins: []
#Default tool path for IAR 5.4 on Windows XP 64bit
tools_root: &tools_root 'C:\Program Files (x86)\IAR Systems\Embedded Workbench 5.4 Kickstart\'
compiler:
path: [*tools_root, 'arm\bin\iccarm.exe']
source_path: '..\src\'
unit_tests_path: &unit_tests_path 'tests\'
build_path: &build_path 'build\'
options:
- --diag_suppress=Pa050
#- --diag_suppress=Pe111
- --debug
- --endian=little
- --cpu=Cortex-M3
- --no_path_in_file_macros
- -e
- --fpu=None
- --dlib_config
- [*tools_root, 'arm\inc\DLib_Config_Normal.h']
#- --preinclude --preinclude C:\Vss\T2 Working\common\system.h
- --interwork
- --warnings_are_errors
# - Ohz
- -Oh
# - --no_cse
# - --no_unroll
# - --no_inline
# - --no_code_motion
# - --no_tbaa
# - --no_clustering
# - --no_scheduling
includes:
prefix: '-I'
items:
- [*tools_root, 'arm\inc\']
- 'src\'
- '..\src\'
- *unit_tests_path
- 'vendor\unity\src\'
- 'iar\iar_v5\incIAR\'
defines:
prefix: '-D'
items:
- ewarm
- PART_LM3S9B92
- TARGET_IS_TEMPEST_RB1
- USE_ROM_DRIVERS
- UART_BUFFERED
- UNITY_SUPPORT_64
object_files:
prefix: '-o'
extension: '.r79'
destination: *build_path
linker:
path: [*tools_root, 'arm\bin\ilinkarm.exe']
options:
- --redirect _Printf=_PrintfLarge
- --redirect _Scanf=_ScanfSmall
- --semihosting
- --entry __iar_program_start
- --config
- [*tools_root, 'arm\config\generic.icf']
# - ['C:\Temp\lm3s9b92.icf']
object_files:
path: *build_path
extension: '.o'
bin_files:
prefix: '-o'
extension: '.out'
destination: *build_path
simulator:
path: [*tools_root, 'common\bin\CSpyBat.exe']
pre_support:
#- --silent
- [*tools_root, 'arm\bin\armproc.dll']
- [*tools_root, 'arm\bin\armsim2.dll']
post_support:
- --plugin
- [*tools_root, 'arm\bin\armbat.dll']
- --backend
- -B
- --endian=little
- --cpu=Cortex-M3
- --fpu=None
- -p
- [*tools_root, 'arm\config\debugger\TexasInstruments\iolm3sxxxx.ddf']
- --semihosting
- --device=LM3SxBxx
#- -d
#- sim
colour: true
:unity:
:plugins: []
# unit testing under iar compiler / simulator for STM32 Cortex-M3
tools_root: &tools_root 'C:\Program Files\IAR Systems\Embedded Workbench 5.4\'
compiler:
path: [*tools_root, 'arm\bin\iccarm.exe']
source_path: '..\src\'
unit_tests_path: &unit_tests_path 'tests\'
build_path: &build_path 'build\'
options:
- --dlib_config
- [*tools_root, 'arm\inc\DLib_Config_Normal.h']
- --no_cse
- --no_unroll
- --no_inline
- --no_code_motion
- --no_tbaa
- --no_clustering
- --no_scheduling
- --debug
- --cpu_mode thumb
- --endian=little
- --cpu=Cortex-M3
- --interwork
- --warnings_are_errors
- --fpu=None
- --diag_suppress=Pa050
- --diag_suppress=Pe111
- -e
- -On
includes:
prefix: '-I'
items:
- [*tools_root, 'arm\inc\']
- 'src\'
- '..\src\'
- *unit_tests_path
- 'vendor\unity\src\'
- 'iar\iar_v5\incIAR\'
defines:
prefix: '-D'
items:
- 'IAR'
- 'UNITY_SUPPORT_64'
- 'UNITY_SUPPORT_TEST_CASES'
object_files:
prefix: '-o'
extension: '.r79'
destination: *build_path
linker:
path: [*tools_root, 'arm\bin\ilinkarm.exe']
options:
- --redirect _Printf=_PrintfLarge
- --redirect _Scanf=_ScanfSmall
- --semihosting
- --entry __iar_program_start
- --config
- [*tools_root, 'arm\config\generic_cortex.icf']
object_files:
path: *build_path
extension: '.o'
bin_files:
prefix: '-o'
extension: '.out'
destination: *build_path
simulator:
path: [*tools_root, 'common\bin\CSpyBat.exe']
pre_support:
- --silent
- [*tools_root, 'arm\bin\armproc.dll']
- [*tools_root, 'arm\bin\armsim.dll']
post_support:
- --plugin
- [*tools_root, 'arm\bin\armbat.dll']
- --backend
- -B
- -p
- [*tools_root, 'arm\config\debugger\ST\iostm32f107xx.ddf']
- --cpu=Cortex-M3
- -d
- sim
colour: true
:unity:
:plugins: []
# unit testing under iar compiler / simulator for STM32 Cortex-M3
tools_root: &tools_root 'C:\Program Files\IAR Systems\Embedded Workbench 5.4\'
compiler:
path: [*tools_root, 'arm\bin\iccarm.exe']
source_path: '..\src\'
unit_tests_path: &unit_tests_path 'tests\'
build_path: &build_path 'build\'
options:
- --dlib_config
- [*tools_root, 'arm\inc\DLib_Config_Normal.h']
- --no_cse
- --no_unroll
- --no_inline
- --no_code_motion
- --no_tbaa
- --no_clustering
- --no_scheduling
- --debug
- --cpu_mode thumb
- --endian=little
- --cpu=Cortex-M3
- --interwork
- --warnings_are_errors
- --fpu=None
- --diag_suppress=Pa050
- --diag_suppress=Pe111
- -e
- -On
includes:
prefix: '-I'
items:
- [*tools_root, 'arm\inc\']
- 'src\'
- '..\src\'
- *unit_tests_path
- 'vendor\unity\src\'
- 'iar\iar_v5\incIAR\'
defines:
prefix: '-D'
items:
- 'IAR'
- 'UNITY_SUPPORT_64'
- 'UNITY_SUPPORT_TEST_CASES'
object_files:
prefix: '-o'
extension: '.r79'
destination: *build_path
linker:
path: [*tools_root, 'arm\bin\ilinkarm.exe']
options:
- --redirect _Printf=_PrintfLarge
- --redirect _Scanf=_ScanfSmall
- --semihosting
- --entry __iar_program_start
- --config
- [*tools_root, 'arm\config\generic_cortex.icf']
object_files:
path: *build_path
extension: '.o'
bin_files:
prefix: '-o'
extension: '.out'
destination: *build_path
simulator:
path: [*tools_root, 'common\bin\CSpyBat.exe']
pre_support:
- --silent
- [*tools_root, 'arm\bin\armproc.dll']
- [*tools_root, 'arm\bin\armsim.dll']
post_support:
- --plugin
- [*tools_root, 'arm\bin\armbat.dll']
- --backend
- -B
- -p
- [*tools_root, 'arm\config\debugger\ST\iostm32f107xx.ddf']
- --cpu=Cortex-M3
- -d
- sim
colour: true
:unity:
:plugins: []
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册