--- # Notes: # Sample project C code is not presently written to produce a release artifact. # As such, release build options are disabled. # This sample, therefore, only demonstrates running a collection of unit tests. :project: :use_exceptions: FALSE :use_test_preprocessor: FALSE :use_auxiliary_dependencies: TRUE :build_root: build :release_build: TRUE :test_file_prefix: test_ :which_ceedling: vendor/ceedling :default_tasks: - test:all #:release_build: # :output: MyApp.out # :use_assembly: FALSE :environment: - :path: - C:\Program Files (x86)\Microchip\xc16\v1.35\bin - C:\Ruby25-x64\bin - C:\cygwin64\bin - C:\msys64\mingw64\bin :extension: :executable: .out :paths: :test: - +:test/** - +:src/lib/utilities/test/ - +:src/lib/eeprom_dam/test/ #- +:src/lib/usb/test/ - -:test/support :source: - src/** - vendor/** :support: - test/support :include: # Any header files not already in the source search path - "C:/Program Files (x86)/Microchip/xc16/v1.35/support/generic/h/" - "C:/Program Files (x86)/Microchip/xc16/v1.35/support/PIC24F/h/" :defines: # in order to add common defines: # 1) remove the trailing [] from the :common: section # 2) add entries to the :common: section (e.g. :test: has TEST defined) :commmon: &common_defines - __PIC24FJ1024GB610__ - UNITY_INT_WIDTH=16 # Int length is 16 bits - CMOCK_MEM_INDEX_TYPE=uint32_t # This needs to be big enough to point anywhere in Cmock's memory space (usually an unsigned int) - CMOCK_MEM_PTR_AS_INT=uint32_t # This is used internally to hold pointers. It needs to be big - CMOCK_MEM_ALIGN=1 # The way to align your data. Default is 2 which aligns to 4 bytes. 1 aligns to 2 bytes. 0 is off. 3 is 8 bytes - CMOCK_MEM_SIZE=16384 # In static mode this is the total amount of memory you are allocating to Cmock. In dynamic mode this is the size of each chunk allocated at once :test: - *common_defines - TEST - __XC16__ :test_preprocess: - *common_defines - TEST :cmock: :mock_prefix: mock_ :when_no_prototypes: :warn :enforce_strict_ordering: TRUE :plugins: - :ignore - :callback - :return_thru_ptr - :ignore_arg :treat_as: uint8: HEX8 uint16: HEX16 uint32: UINT32 int8: INT8 bool: UINT8 :gcov: :html_report_type: basic :tools: # Compiler for test and source-under-test code. ${1}: input source. ${2}: output object :test_compiler: :executable: xc16-gcc :name: 'MPLAB x16' :arguments: - -mcpu=24FJ1024GB610 - -x c - -c - ${1} # Source code input file (Ruby method call param list sub) - -o ${2} # Object file output (Ruby method call param list sub) # These upper case names are Ruby global constants that Ceedling builds # # COLLECTION_ indicates that Ceedling did some work to assemble the list. eg expanding path globs - -I"$": COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE # Expands to -I search paths - -I"$": COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR # Expands to -I search paths - -D$: COLLECTION_DEFINES_TEST_AND_VENDOR # Expands to all -D defined symbols - -Wall #- -Werror # Can't keep this on during testing becuase of a CMock pointer warning # Linker to generate test fixture executables. ${1}: input objects. ${2}: output binary :test_linker: :executable: xc16-gcc :arguments: - -mcpu=24FJ1024GB610 - ${1} # List of object files to link (Ruby method call param list sub) - -o "./build/release/TestBuild.out" - -Wl,-Tp24FJ1024GB610.gld,-Map=./build/release/TestOutput.map,--report-mem,--heap=1024 # Executable test fixture :test_fixture: :executable: ruby # Our test fixture is a ruby script :name: "Microchip simulator test fixture" :stderr_redirect: :win #inform Ceedling what model of $stderr capture to use :arguments: - test/simulation/sim_test_fixture.rb # This is the script to execute that will execute the tests on the simulator :release_compiler: :executable: xc16-gcc :arguments: - -mcpu=24FJ1024GB610 - -x c - -c - ${1} # Source code input file (Ruby method call param list sub) - -o ${2} # Object file output (Ruby method call param list sub) # These upper case names are Ruby global constants that Ceedling builds # # COLLECTION_ indicates that Ceedling did some work to assemble the list. eg expanding path globs - -I"$": COLLECTION_PATHS_RELEASE_TOOLCHAIN_INCLUDE # Expands to -I search paths - -I"$": COLLECTION_PATHS_SOURCE_INCLUDE_VENDOR # Expands to -I search paths - -D$: COLLECTION_DEFINES_RELEASE_AND_VENDOR # Expands to all -D defined symbols - -Wall #- -Werror # Can't keep this on during testing becuase of a CMock pointer warning - -mlarge-code - -mlarge-data # Linker to generate test fixture executables. ${1}: input objects. ${2}: output binary :release_linker: :executable: xc16-gcc :arguments: - -mcpu=24FJ1024GB610 - ${1} # List of object files to link (Ruby method call param list sub) - -o ${2} - -Wl,-Tp24FJ1024GB610.gld,-Map=./build/release/scheduler.map,--report-mem # LIBRARIES # These libraries are automatically injected into the build process. Those specified as # common will be used in all types of builds. Otherwise, libraries can be injected in just # tests or releases. These options are MERGED with the options in supplemental yaml files. :libraries: :placement: :end :flag: "${1}" # or "-L ${1}" for example :common: &common_libraries [] :test: - *common_libraries :release: - *common_libraries :plugins: :load_paths: - vendor/ceedling/plugins :enabled: - stdout_pretty_tests_report - module_generator - xml_tests_report ...