mirror of
				https://github.com/ThrowTheSwitch/CMock
				synced 2025-10-31 01:06:12 -04:00 
			
		
		
		
	
		
			
				
	
	
		
			133 lines
		
	
	
		
			5.0 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			133 lines
		
	
	
		
			5.0 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
| # =========================================================================
 | |
| #   CMock - Automatic Mock Generation for C
 | |
| #   ThrowTheSwitch.org
 | |
| #   Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
 | |
| #   SPDX-License-Identifier: MIT
 | |
| # =========================================================================
 | |
| 
 | |
| 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 'test\'
 | |
|   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:
 | |
|       - 'src/'
 | |
|       - '../../src/'
 | |
|       - '../../vendor/unity/src/'
 | |
|       - '../../vendor/unity/examples/example_3/helper/'
 | |
|       - './build/mocks/'
 | |
|       - [*tools_root, 'arm\inc\']
 | |
|       - *unit_tests_path
 | |
|   defines:
 | |
|     prefix: '-D'
 | |
|     items:
 | |
|   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
 | |
| :cmock:
 | |
|   # Core conffiguration
 | |
|   :plugins:  []                    # What plugins should be used by CMock?
 | |
|   :verbosity:  2                   # the options being 0 errors only, 1 warnings and errors, 2 normal info, 3 verbose
 | |
|   :when_no_prototypes:  :warn      # the options being :ignore, :warn, or :erro
 | |
| 
 | |
|   # File configuration
 | |
|   :mock_path:  './build/mocks'     # Subdirectory to store mocks when generated (default: mocks)
 | |
|   :skeleton_path:  ''              # Subdirectory to store stubs when generated (default: '')
 | |
|   :mock_prefix:  'Mock'            # Prefix to append to filenames for mocks
 | |
|   :mock_suffix:  ''                # Suffix to append to filenames for mocks
 | |
| 
 | |
|   # Parser configuration
 | |
|   :strippables:  ['(?:__attribute__\s*\([ (]*.*?[ )]*\)+)']
 | |
|   :attributes:
 | |
|      - __ramfunc
 | |
|      - __irq
 | |
|      - __fiq
 | |
|      - register
 | |
|      - extern
 | |
|   :c_calling_conventions:
 | |
|      - __stdcall
 | |
|      - __cdecl
 | |
|      - __fastcall
 | |
|   :treat_externs:  :exclude        # the options being :include or :exclud
 | |
|   :treat_inlines:  :exclude        # the options being :include or :exclud
 | |
| 
 | |
|   # Type handling configuration
 | |
|   #:unity_helper_path: ''          # specify a string of where to find a unity_helper.h file to discover custom type assertions
 | |
|   #:treat_as:  {}                  # optionally add additional types to map custom types
 | |
|   #:treat_as_array:  {}            # hint to cmock that these types are pointers to something
 | |
|   #:treat_as_void:  []             # hint to cmock that these types are actually aliases of void
 | |
|   :memcmp_if_unknown:  true        # allow cmock to use the memory comparison assertions for unknown types
 | |
|   :when_ptr:  :compare_data        # hint to cmock how to handle pointers in general, the options being :compare_ptr, :compare_data, or :smart
 | |
| 
 | |
|   # Mock generation configuration
 | |
|   :weak:  ''                       # Symbol to use to declare weak functions
 | |
|   :enforce_strict_ordering: false  # Do we want cmock to enforce ordering of all function calls?
 | |
|   :fail_on_unexpected_calls: true  # Do we want cmock to fail when it encounters a function call that wasn't expected?
 | |
|   :callback_include_count: true    # Do we want cmock to include the number of calls to this callback, when using callbacks?
 | |
|   :callback_after_arg_check: false # Do we want cmock to enforce an argument check first when using a callback?
 | |
|   :includes:                       # You can add additional includes here, or specify the location with the options below
 | |
|     - Types.h
 | |
|   #:includes_h_pre_orig_header: [] 
 | |
|   #:includes_h_post_orig_header: []
 | |
|   #:includes_c_pre_header:  []
 | |
|   #:includes_c_post_header:  []
 | |
|   #:array_size_type:  []            # Specify a type or types that should be used for array lengths
 | |
|   #:array_size_name:  'size|len'    # Specify a name or names that CMock might automatically recognize as the length of an array
 | |
|   :exclude_setjmp_h:  false        # Don't use setjmp when running CMock. Note that this might result in late reporting or out-of-order failures.
 |