-
Notifications
You must be signed in to change notification settings - Fork 120
/
Makefile
1096 lines (1004 loc) · 44.1 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
###############################################################################
#
# Copyright 2014, 2015, Mariano Cerdeiro
# Copyright 2014, 2015, 2016, Juan Cecconi (Numetron, UTN-FRBA)
# Copyright 2014, 2015, Esteban Volentini (LabMicro, UNT)
# All rights reserved
#
# This file is part of CIAA Firmware.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its
# contributors may be used to endorse or promote products derived from this
# software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
###############################################################################
######################## DO NOT CHANGE THIS FILE ##############################
###############################################################################
# You dont have to change this file, never.
#
# Copy Makefile.config to Makefile.mine and set the variables.
#
# Makefile.mine will be included by this root Makefile and your configurations
# in Makefile.mine will be ignored due to .gitignore.
#
# Please take into account to check and compare your Makefile.mine every time
# that Makefile.config is updated, you may have to adapt your Makefile.mine
# if Makefile.config is changed.
#
###############################################################################
-include Makefile.mine
###############################################################################
# ARCH, CPUTYPE and CPU following are supported
# +--------------+---------------+----------------+--------------+---------------+
# | ARCH | CPUTYPE | CPU | COMPILER | BOARD |
# +--------------+---------------+----------------+--------------+---------------+
# | x86 | ia32 | | gcc | ciaa_sim_ia32 |
# | | ia64 | | | ciaa_sim_ia64 |
# +--------------+---------------+----------------+--------------+---------------+
# | cortexM4 | lpc43xx | lpc4337 | gcc | edu_ciaa_nxp |
# | | | | | ciaa_nxp |
# | | lpc5410x | lpc54102 | gcc | pico_ciaa |
# | | k60_120 | mk60fx512vlq15 | gcc | ciaa_fsl |
# +--------------+---------------+----------------+--------------+---------------+
# | mips | pic32 | pic32mz | gcc | ciaa_pic |
# +--------------+---------------+----------------+--------------+---------------+
# | sparcV8 | leon3 | leon3nfp | gcc | leon3_fpga_nfp|
# +--------------+---------------+----------------+--------------+---------------+
#
# Default values for ciaa_sim_ia64
ifeq ($(BOARD),ciaa_sim_ia64)
ARCH ?= x86
CPUTYPE ?= ia64
CPU ?= none
COMPILER ?= gcc
endif
# Default values for ciaa_sim_ia32
ifeq ($(BOARD),ciaa_sim_ia32)
ARCH ?= x86
CPUTYPE ?= ia32
CPU ?= none
COMPILER ?= gcc
endif
# Default values for ciaa_pic
ifeq ($(BOARD),ciaa_pic)
ARCH ?= mips
CPUTYPE ?= pic32
CPU ?= pic32mz
COMPILER ?= gcc
endif
# Default values for edu_ciaa_nxp
ifeq ($(BOARD),edu_ciaa_nxp)
ARCH ?= cortexM4
CPUTYPE ?= lpc43xx
CPU ?= lpc4337
COMPILER ?= gcc
endif
# Default values for ciaa_nxp
ifeq ($(BOARD),ciaa_nxp)
ARCH ?= cortexM4
CPUTYPE ?= lpc43xx
CPU ?= lpc4337
COMPILER ?= gcc
endif
# Default values for pico_ciaa
ifeq ($(BOARD),pico_ciaa)
ARCH ?= cortexM4
CPUTYPE ?= lpc5410x
CPU ?= lpc54102
COMPILER ?= gcc
endif
# Default values for ciaa_fsl
ifeq ($(BOARD),ciaa_fsl)
ARCH ?= cortexM4
CPUTYPE ?= k60_120
CPU ?= mk60fx512vlq15
COMPILER ?= gcc
endif
# Default values for leon3_fpga
ifeq ($(BOARD),leon3_fpga_nfp)
ARCH ?= sparcV8
CPUTYPE ?= leon3
CPU ?= leon3nfp
COMPILER ?= gcc
endif
# Default values in other case
ARCH ?= x86
CPUTYPE ?= ia32
CPU ?= none
COMPILER ?= gcc
BOARD ?= none
# export defined vars to the environment
export ARCH
export CPUTYPE
export CPU
export COMPILER
export BOARD
DS ?= /
# Project
#
# Available projects are:
# examples/blinking (example with rtos and posix)
# examples/blinking_base (example without rtos and without posix)
# examples/blinking_wo_rtos (example with posix without rtos)
# examples/blinking_wo_posix (example with rtos without rtos)
# examples/blinking_modbus (example with rtos, posix and using modbus)
#
PROJECT_PATH ?= examples$(DS)blinking
# rtostests options
#
RTOSTESTS_DEBUG_CTESTS ?= 0
RTOSTESTS_CLEAN_GENERATE ?= 1
RTOSTESTS_CTEST ?=
RTOSTESTS_SUBTEST ?=
RTOSTESTS_RAM_EXEC ?= 0
# dependencies options
#
# Compile and make dependencies, or compile only and skip dependencies
MAKE_DEPENDENCIES ?= 1
#
# tools
WIN_TOOL_PATH ?=
LINUX_TOOLS_PATH ?= $(DS)opt$(DS)ciaa_tools
kconfig ?= $(LINUX_TOOLS_PATH)$(DS)kconfig$(DS)kconfig-qtconf
###############################################################################
# CIAA Firmware version information
CIAA_FIRMWARE_VER = master-0.0.0
###############################################################################
# get OS
#
# This part of the makefile is used to detect your OS. Depending on the OS
ifeq ($(OS),Windows_NT)
# WINDOWS
# Command line separator
CS = ;
# Command for multiline echo
MULTILINE_ECHO = echo -e
# convert paths from cygwin to win (used to convert path for compiler)
define cyg2win
`cygpath -w $(1)`
endef
define cp4c
$(if $(findstring tst_,$(MAKECMDGOALS)),$(1),$(call cyg2win,$(1)))
endef
# Libraries group linker parameters
START_GROUP = -Xlinker --start-group
END_GROUP = -Xlinker --end-group
else
# NON WINDOWS OS
# Command line separator
CS = ;
# Comand for multiline echo
MULTILINE_ECHO = echo -n
define cyg2win
$(1)
endef
define cp4c
$(1)
endef
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
# LINUX
# Libraries group linker parameters
START_GROUP = -Xlinker --start-group
END_GROUP = -Xlinker --end-group
endif
ifeq ($(UNAME_S),Darwin)
# MACOS
# Determine wich FTDI Drivers are loaded
ifeq ($(FTDI_KEXT),)
FTDI_KEXT := $(shell kextstat | grep -o com.apple.driver.AppleUSBFTDI )
FTDI_KEXT += $(shell kextstat | grep -o com.FTDI.driver.FTDIUSBSerialDriver )
endif
# Compile in 32 bits mode
ifeq ($(ARCH),x86)
CFLAGS += -m32 -Wno-typedef-redefinition
# 32 bits non relocable excutable image
LFLAGS += -m32 -Xlinker -no_pie
# Libraries group linker parameters
START_GROUP = -all_load
END_GROUP =
else
START_GROUP = -Xlinker --start-group
END_GROUP = -Xlinker --end-group
endif
endif
endif
###############################################################################
# get root dir
ROOT_DIR := .
# out dir
OUT_DIR = $(ROOT_DIR)$(DS)out
# object dir
OBJ_DIR = $(OUT_DIR)$(DS)obj
# lib dir
LIB_DIR = $(OUT_DIR)$(DS)lib
# bin dir
BIN_DIR = $(OUT_DIR)$(DS)bin
# rtos gen dir
GEN_DIR = $(OUT_DIR)$(DS)gen
# rtos test gen dir
RTOS_TEST_GEN_DIR = $(OUT_DIR)$(DS)rtos
# etc dir (configuration dir)
ETC_DIR = $(OUT_DIR)$(DS)etc
# include needed project
include $(PROJECT_PATH)$(DS)mak$(DS)Makefile
# base module is always needed and included
MODS += modules$(DS)base
# include needed modules
include $(foreach module, $(MODS), $(module)$(DS)mak$(DS)Makefile)
.DEFAULT_GOAL := $(PROJECT_NAME)
# add include files
INCLUDE += $(foreach LIB, $(LIBS), $($(LIB)_INC_PATH))
#Adds include project file if We wanto to do a project build
ifneq ($(findstring tst_, $(MAKECMDGOALS)),tst_)
CFLAGS += $(foreach inc, $(INC_FILES), -I$(call cp4c,$(inc)))
endif
CFLAGS += $(foreach inc, $(INCLUDE), -I$(inc))
CFLAGS += -DARCH=$(ARCH) -DCPUTYPE=$(CPUTYPE) -DCPU=$(CPU) -DBOARD=$(BOARD)
TARGET_NAME ?= $(BIN_DIR)$(DS)$(PROJECT_NAME)
LD_TARGET = $(TARGET_NAME).$(LD_EXTENSION)
# create list of object files for a Lib (without DIR), based on source file %.c and %.s
$(foreach LIB, $(LIBS), $(eval $(LIB)_OBJ_FILES = $(notdir $(patsubst %.c,%.o,$(patsubst %.s,%.o,$(patsubst %.S,%.o,$(patsubst %.cpp,%.o,$($(LIB)_SRC_FILES))))))))
# Complete list of object files (without DIR), based on source file %.c and %.s
$(foreach LIB, $(LIBS), $(eval LIBS_OBJ_FILES += $($(LIB)_OBJ_FILES)))
# Complete Libs Source Files for debug Info
$(foreach LIB, $(LIBS), $(eval LIBS_SRC_FILES += $($(LIB)_SRC_FILES)))
# Complete Libs Source Dirs for vpath search (duplicates removed by sort)
$(foreach LIB, $(LIBS), $(eval LIBS_SRC_DIRS += $(sort $(dir $($(LIB)_SRC_FILES)))))
# Add the search patterns
vpath %.c $($(PROJECT_NAME)_SRC_PATH)
vpath %.c $(LIBS_SRC_DIRS)
vpath %.s $(LIBS_SRC_DIRS)
vpath %.S $(LIBS_SRC_DIRS)
vpath %.cpp $(LIBS_SRC_DIRS)
vpath %.o $(OBJ_DIR)
vpath %.oil $(ETC_DIR)
vpath %.poil $(dir $(POIL_FILES))
#rule for library
define librule
$(LIB_DIR)$(DS)$(strip $(1)).a : $(2)
@echo ' '
@echo ===============================================================================
@echo Creating library $(1)
$(AR) -crs $(LIB_DIR)$(DS)$(strip $(1)).a $(foreach obj,$(2),$(OBJ_DIR)$(DS)$(obj))
@echo ' '
endef
OBJ_FILES = $(notdir $(patsubst %.c,%.o,$(patsubst %.s,%.o,$(patsubst %.S,%.o,$(SRC_FILES)))))
OIL_4_GEN += $(foreach OIL, $(notdir $(patsubst %.poil,%.oil,$(POIL_FILES))), $(ETC_DIR)$(DS)$(OIL)) $(OIL_FILES)
OIL_4_GEN_DEP += $(notdir $(foreach OIL, $(notdir $(patsubst %.poil,%.oil,$(POIL_FILES))), $(ETC_DIR)$(DS)$(OIL))) $(OIL_FILES)
# create rule for library
# lib.a : lib_OBJ_FILES.o
$(foreach LIB, $(LIBS), $(eval $(call librule, $(LIB), $($(LIB)_OBJ_FILES))) )
$(foreach LIB, $(LIBS), $(eval $(LIB) : $(LIB_DIR)$(DS)$(LIB).a ) )
###################### START UNIT TEST PART OF MAKE FILE ######################
# Gets all Modules Names
DIRS := $(sort $(dir $(wildcard modules$(DS)*$(DS))))
ALL_MODS := $(subst modules, , $(DIRS))
ALL_MODS := $(subst $(DS), , $(ALL_MODS))
MOCKS_OUT_DIR = $(OUT_DIR)$(DS)ceedling$(DS)mocks
RUNNERS_OUT_DIR = $(OUT_DIR)$(DS)ceedling$(DS)runners
FILES_TO_MOCK = $(foreach DIR, $(DIRS), $(wildcard $(DIR)inc$(DS)*.h))
FILES_MOCKED = $(foreach MOCKED, $(FILES_TO_MOCK), $(MOCKS_OUT_DIR)$(DS)mock_$(notdir $(MOCKED)))
###############################################################################
# rule for tst_<mod>[_file]
ifeq ($(findstring tst_, $(MAKECMDGOALS)),tst_)
# get module to be tested and store it in tst_mod variable
tst_mod = $(firstword $(filter-out tst,$(subst _, ,$(MAKECMDGOALS))))
# get file to be tested (if present) and store it in tst_file
# this shall be done multiple times, one time for each possible _, no 3 _ are supported in the test file name
tst_file := $(word 2,$(filter-out tst,$(subst _, ,$(MAKECMDGOALS))))
ifneq ($(word 3,$(filter-out tst,$(subst _, ,$(MAKECMDGOALS)))),)
tst_file := $(join $(tst_file),_$(word 3,$(filter-out tst,$(subst _, ,$(MAKECMDGOALS)))))
endif
ifneq ($(word 4,$(filter-out tst,$(subst _, ,$(MAKECMDGOALS)))),)
tst_file := $(join $(tst_file),_$(word 4,$(filter-out tst,$(subst _, ,$(MAKECMDGOALS)))))
endif
ifneq ($(word 5,$(filter-out tst,$(subst _, ,$(MAKECMDGOALS)))),)
tst_file := $(join $(tst_file),_$(word 5,$(filter-out tst,$(subst _, ,$(MAKECMDGOALS)))))
endif
# if tst_file is all the variable shall be reset and all tests shall be executed
ifeq ($(tst_file),all)
tst_file :=
endif
# include corresponding makefile
include modules$(DS)$(tst_mod)$(DS)mak$(DS)Makefile
# include test makefile
include modules$(DS)$(tst_mod)$(DS)test$(DS)utest$(DS)mak$(DS)Makefile
# get list of unit test sources
ifneq ($(tst_file),)
# definitions if to run only a specific unit test
# include modules needed for this module
include $(foreach mod,$($(tst_mod)_TST_MOD),modules$(DS)$(mod)$(DS)mak$(DS)Makefile)
MTEST_SRC_FILES = $($(tst_mod)_PATH)$(DS)test$(DS)utest$(DS)src$(DS)test_$(tst_file).c
UNITY_INC = externals$(DS)ceedling$(DS)vendor$(DS)unity$(DS)src \
externals$(DS)ceedling$(DS)vendor$(DS)cmock$(DS)src \
out$(DS)ceedling$(DS)mocks \
$(foreach mod,$($(tst_mod)_TST_MOD),$($(mod)_INC_PATH)) \
$($(tst_mod)_TST_INC_PATH) \
$($(tst_mod)_INC_PATH)
UNITY_SRC = modules$(DS)$(tst_mod)$(DS)test$(DS)utest$(DS)src$(DS)test_$(tst_file).c \
$(RUNNERS_OUT_DIR)$(DS)test_$(tst_file)_Runner.c \
modules$(DS)$(tst_mod)$(DS)src$(DS)$(tst_file).c \
externals$(DS)ceedling$(DS)vendor$(DS)unity$(DS)src$(DS)unity.c \
externals$(DS)ceedling$(DS)vendor$(DS)cmock$(DS)src$(DS)cmock.c \
$(foreach file,$(filter-out $(tst_file).c,$(notdir $($(tst_mod)_SRC_FILES))), out$(DS)ceedling$(DS)mocks$(DS)mock_$(file)) \
$(foreach mods,$($(tst_mod)_TST_MOD), $(foreach files, $(notdir $($(mods)_SRC_FILES)), out$(DS)ceedling$(DS)mocks$(DS)mock_$(files))) \
$(foreach tst_mocks, $($(tst_mod)_TST_MOCKS), out$(DS)ceedling$(DS)mocks$(DS)mock_$(tst_mocks))
# Needed Unity Obj files
UNITY_OBJ = $(notdir $(UNITY_SRC:.c=.o))
# Add the search patterns
$(foreach U_SRC, $(sort $(dir $(UNITY_SRC))), $(eval vpath %.c $(U_SRC)))
CFLAGS += -ggdb -c #-Wall -Werror #see issue #28
CFLAGS += $(foreach inc, $(UNITY_INC), -I$(inc))
CFLAGS += -DARCH=$(ARCH) -DCPUTYPE=$(CPUTYPE) -DCPU=$(CPU) -DUNITY_EXCLUDE_STDINT_H -DCIAA_UNIT_TEST --coverage
else
# get all test target for the selected module
MTEST := $(notdir $(wildcard $($(tst_mod)_PATH)$(DS)test$(DS)utest$(DS)src$(DS)test_*.c))
MTEST := $(subst test_,,$(MTEST))
MTEST := $(subst .c,,$(MTEST))
MTEST := $(foreach tst, $(MTEST),tst_$(tst_mod)_$(tst))
endif
tst_link: $(UNITY_OBJ)
@echo ' '
@echo ===============================================================================
@echo Linking Test
gcc $(addprefix $(OBJ_DIR)$(DS),$(UNITY_OBJ)) -lgcov -o out$(DS)bin$(DS)$(tst_file).bin
# rule for tst_<mod>_<file>
tst_$(tst_mod)_$(tst_file): $(RUNNERS_OUT_DIR)$(DS)$(notdir $(MTEST_SRC_FILES:.c=_Runner.c)) tst_link
@echo ' '
@echo ===============================================================================
@echo Testing from module $(tst_mod) the file $(tst_file)
@echo === CEEDLING START ====
$(BIN_DIR)$(DS)$(tst_file).bin
@echo === CEEDLING END ===
gcov -abclu modules$(DS)$(tst_mod)$(DS)src$(DS)$(tst_file).c -o out$(DS)obj$(DS)
# rule for tst_<mod>
tst_$(tst_mod)_all:
@echo ' '
@echo ===============================================================================
@echo Testing the module $(tst_mod)
@echo Testing $(MTEST)
$(foreach tst,$(MTEST),make $(tst) $(CS))
tst_$(tst_mod):
@echo ' '
@echo ===============================================================================
@echo For the module $(tst_mod) following units can be tested:
@$(MULTILINE_ECHO) " $(foreach unit, $(MTEST), $(unit)\n)"
#tst_$(tst_mod): $(MTEST_SRC_FILES:.c=_Runner.c) tst_link
# @echo ===============================================================================
# @echo Testing the module $(tst_mod)
# @$(MULTILINE_ECHO) "Testing following .c Files: \n $(foreach src, $($(tst_mod)_SRC_FILES), $(src)\n)"
# @$(MULTILINE_ECHO) "Following Unity Test found: \n $(foreach src, $(MTEST_SRC_FILES), $(src)\n)"
# out/bin/test.bin
endif
results:
externals$(DS)lcov$(DS)bin$(DS)lcov -c -d . -o coverage.info -b .
externals$(DS)lcov$(DS)bin$(DS)genhtml coverage.info --output-directory $(OUT_DIR)$(DS)coverage
###############################################################################
# rule to generate the mocks
mocks:
@echo ' '
@echo ===============================================================================
@$(MULTILINE_ECHO) "Creating Mocks for: \n $(foreach mock, $(FILES_TO_MOCK), $(mock)\n)"
ruby externals$(DS)ceedling$(DS)vendor$(DS)cmock$(DS)lib$(DS)cmock.rb -omodules$(DS)tools$(DS)ceedling$(DS)project.yml $(FILES_TO_MOCK)
###############################################################################
# rule to check trailing spaces
code_sanity:
@echo ' '
@echo ===============================================================================
@echo Checking for trailing spaces
@./modules/tools/scripts/check_trailing_spaces.sh
###############################################################################
# rule to run osek oil generator tests
osek_oil_gen_tst:
PWD =$(shell pwd)
SHUNIT = $(PWD)$(DS)externals$(DS)shunit$(DS)shunit2.sh
TESTS = $(PWD)$(DS)modules$(DS)tools$(DS)generator$(DS)tests$(DS)ftest
FIXTURES = $(TESTS)$(DS)fixtures
EXPECTED = $(TESTS)$(DS)expected
TMP = $(TESTS)$(DS)tmp
osek_oil_gen_tst: code_sanity
@echo ' '
@echo ===============================================================================
@echo Unit testing the module rtos_gen
php externals$(DS)phpunit$(DS)phpunit.phar modules$(DS)tools$(DS)generator$(DS)tests$(DS)utest$(DS)
@echo ' '
@echo ===============================================================================
@echo Functional testing the module rtos_gen
# TODO: make make dynamically call every test
@${TESTS}${DS}test_generator.sh $(SHUNIT) $(TESTS) $(DS) $(FIXTURES) $(EXPECTED) $(TMP)
@${TESTS}${DS}test_stdoutwriter.sh $(SHUNIT) $(TESTS) $(DS) $(FIXTURES) $(EXPECTED) $(TMP)
###############################################################################
# rule to inform about all available tests
tst:
@echo "+-----------------------------------------------------------------------------+"
@echo "| Unit Tests |"
@echo "+-----------------------------------------------------------------------------+"
@$(MULTILINE_ECHO) "Following tst rules have been created:\n $(foreach TST,$(ALL_MODS), tst_$(TST): run unit tests of $(TST)\n)"
$(RUNNERS_OUT_DIR)$(DS)test_%_Runner.c : test_%.c
@echo ' '
@echo ===============================================================================
@echo Creating Runner for $<
@echo " in $(RUNNERS_OUT_DIR)$(DS)$(notdir $@)"
ruby externals$(DS)ceedling$(DS)vendor$(DS)unity$(DS)auto$(DS)generate_test_runner.rb $< $(RUNNERS_OUT_DIR)$(DS)$(notdir $@) modules$(DS)tools$(DS)ceedling$(DS)project.yml
###################### ENDS UNIT TEST PART OF MAKE FILE #######################
###############################################################################
# rule to generate OILs files
%.oil : %.poil
@echo ' '
@echo ===============================================================================
@echo Generate OIL File $(ETC_DIR)$(DS)$(notdir $@) from $^
@echo ' '
$(CC) -E -x c++ -Imodules$(DS)base$(DS)inc -DBOARD=$(BOARD) -DARCH=$(ARCH) -DCPUTYPE=$(CPUTYPE) -DCPU=$(CPU) $^ | grep -v "^#.*" > $(ETC_DIR)$(DS)$(notdir $@)
###############################################################################
# Rule to compile
%.o : %.c
@echo ' '
@echo ===============================================================================
@echo Compiling 'c' file: $<
@echo ' '
$(CC) $(CFLAGS) $(call cp4c,$<) -o $(OBJ_DIR)$(DS)$@
ifeq ($(MAKE_DEPENDENCIES),1)
@echo ' '
@echo Generating dependencies...
$(CC) -MM $(CFLAGS) $(call cp4c,$<) > $(OBJ_DIR)$(DS)$(@:.o=.d)
else
@echo ' '
@echo Skipping make dependencies...
endif
%.o : %.cpp
@echo ' '
@echo ===============================================================================
@echo Compiling 'c++' file: $<
@echo ' '
$(CPP) $(CFLAGS) $(call cp4c,$<) -o $(OBJ_DIR)$(DS)$@
%.o : %.s
@echo ' '
@echo ===============================================================================
@echo Compiling 'asm' file: $<
@echo ' '
$(AS) $(AFLAGS) $(call cp4c,$<) -o $(OBJ_DIR)$(DS)$@
%.o : %.S
@echo ' '
@echo ===============================================================================
@echo Compiling 'asm' with C preprocessing file: $<
@echo ' '
$(CC) $(CFLAGS) -x assembler-with-cpp $(call cp4c,$<) -o $(OBJ_DIR)$(DS)$@
###############################################################################
# Incremental Build (IDE: Build)
# link rule
# New rules for LIBS dependencies
$(foreach LIB, $(LIBS), $(eval -include $(addprefix $(OBJ_DIR)$(DS),$($(LIB)_OBJ_FILES:.o=.d))))
# New rules for project dependencies
$(foreach LIB, $(LIBS), $(eval -include $(addprefix $(OBJ_DIR)$(DS),$(OBJ_FILES:.o=.d))))
# libs with contains sources
LIBS_WITH_SRC = $(foreach LIB, $(LIBS), $(if $(filter %.c,$($(LIB)_SRC_FILES)),$(LIB)))
$(PROJECT_NAME) : $(rtos_GENERATED_FILES) $(LIBS_WITH_SRC) $(OBJ_FILES)
@echo ' '
@echo ===============================================================================
@echo Linking file: $(LD_TARGET)
@echo ' '
$(CC) $(foreach obj,$(OBJ_FILES),$(OBJ_DIR)$(DS)$(obj)) $(START_GROUP) $(foreach lib, $(LIBS_WITH_SRC), $(LIB_DIR)$(DS)$(lib).a) $(END_GROUP) -o $(LD_TARGET) $(LFLAGS)
@echo ' '
@echo ===============================================================================
@echo Post Building $(PROJECT_NAME)
@echo ' '
$(POST_BUILD)
###############################################################################
# debug rule
-include modules$(DS)tools$(DS)gdb$(DS)mak$(DS)Makefile
debug: $(PROJECT_NAME)
# if CPU is not entered shows an error
ifeq ($(CPU),)
@echo ERROR: The CPU variable of your makefile is empty.
else
@echo ===============================================================================
@echo Starting GDB...
@echo ' '
$(GDB) $(GDB_FLAGS)
endif
###############################################################################
# rtos OSEK generation
generate : gen.intermediate
# The following 2 rules are needed to avoid that the generator is called once
# per file to be generated.
$(rtos_GENERATED_FILES) : gen.intermediate
.INTERMEDIATE: gen.intermediate
gen.intermediate : $(OIL_4_GEN_DEP)
ifneq ($(strip $(OIL_FILES) $(POIL_FILES)),)
ifdef MCORE
@echo "*** Generating OSEK using multicore options! ***"
php modules$(DS)tools$(DS)generator$(DS)generator.php --cmdline -l -v \
-DARCH=$(ARCH) -DCPUTYPE=$(CPUTYPE) -DCPU=$(CPU) -DMCORE=$(MCORE) \
-c $(OIL_FILES) -t $(foreach TMP, $(rtos_GEN_FILES), $(TMP)) -o $(GEN_DIR)
else
@echo ' '
@echo ===============================================================================
@echo Run RTOS Generator
@echo ' '
php modules$(DS)tools$(DS)generator$(DS)generator.php --cmdline -l -v \
-DARCH=$(ARCH) -DCPUTYPE=$(CPUTYPE) -DCPU=$(CPU) \
-c $(OIL_4_GEN) -t $(foreach TMP, $(rtos_GEN_FILES), $(TMP)) -o $(GEN_DIR)
endif
else
@echo ' '
@echo ===============================================================================
@echo "Skipping Generator...there is not a config file (*.oil/*.oilx/*.poil) available (project without RTOS or baremetal project)"
@echo ' '
endif
###############################################################################
# doxygen
doxygen:
@echo running doxygen
doxygen modules$(DS)tools$(DS)doxygen$(DS)doxygen.cnf
###############################################################################
# Unload and reload OSX FTDI drivers
unload:
ifneq ($(FTDI_KEXT),)
@echo ===============================================================================
@echo =$(FTDI_KEXT)=
@echo ' '
@echo Unloading FTDI OSX drivers
$(foreach DRIVER, $(FTDI_KEXT), sudo kextunload -b $(DRIVER) )
endif
reload:
ifeq ($(UNAME_S),Darwin)
@echo ===============================================================================
@echo ' '
@echo Reloading FTDI OSX drivers
ifneq ($(strip $(FTDI_KEXT)),)
$(foreach DRIVER, $(FTDI_KEXT), sudo kextload -b $(DRIVER) )
else
sudo kextload -b com.apple.driver.AppleUSBFTDI
endif
endif
###############################################################################
# openocd
include modules$(DS)tools$(DS)openocd$(DS)mak$(DS)Makefile
openocd: unload
# if windows or posix shows an error
ifeq ($(ARCH),x86)
@echo ERROR: You can not start openocd in Windows nor Linux
else
# if CPU is not entered shows an error
ifeq ($(CPU),)
@echo ERROR: The CPU variable of your makefile is empty.
else
ifeq ($(OPENOCD_CFG),)
@echo ERROR: Your CPU: $(CPU) may not be supported...
else
@echo ===============================================================================
@echo Starting OpenOCD...
@echo ' '
$(OPENOCD_BIN) $(OPENOCD_FLAGS)
endif
endif
endif
@make reload FTDI_KEXT=$(FTDI_KEXT)
###############################################################################
# Take make arguments into MAKE_ARGS variable
MAKE_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
# ...and turn them into do-nothing targets
$(eval $(MAKE_ARGS):;@:)
###############################################################################
# erase memory, syntax: erase [FLASH|QSPI]
erase: unload
# if windows or posix shows an error
ifeq ($(ARCH),x86)
@echo ERROR: You can not start openocd in Windows nor Linux
else
# if CPU is not entered shows an error
ifeq ($(CPU),)
@echo ERROR: The CPU variable of your makefile is empty.
else
ifeq ($(OPENOCD_CFG),)
@echo ERROR: Your CPU: $(CPU) may not be supported...
else
ifeq ($(words $(MAKE_ARGS)),0)
# command line: make erase
@echo ===============================================================================
@echo Starting OpenOCD and erasing all...
@echo "(after downloading a new firmware please do a hardware reset!)"
@echo ' '
$(OPENOCD_BIN) $(OPENOCD_FLAGS) -c "init" -c "halt 0" -c "$(MASS_ERASE_COMMAND)" -c "shutdown"
else
ifeq ($(words $(MAKE_ARGS)),1)
ifeq ($(CPUTYPE),k60_120)
@echo 'Not supported on Kinetis processors'
else
ifeq ($(word 1, $(MAKE_ARGS)),FLASH)
@echo ===============================================================================
@echo Starting OpenOCD and erasing all...
@echo "(after downloading a new firmware please do a hardware reset!)"
@echo ' '
$(OPENOCD_BIN) $(OPENOCD_FLAGS) -c "init" -c "halt 0" -c "$(FLASH_ERASE_COMMAND) $(TARGET_DOWNLOAD_FLASH_BANK) 0 last" -c "shutdown"
else
ifeq ($(word 1, $(MAKE_ARGS)),QSPI)
@echo ===============================================================================
@echo Starting OpenOCD and erasing all...
@echo "(after downloading a new firmware please do a hardware reset!)"
@echo ' '
$(OPENOCD_BIN) $(OPENOCD_FLAGS) -c "init" -c "halt 0" -c "$(FLASH_ERASE_COMMAND) $(TARGET_DOWNLOAD_QSPI_BANK) 0 last" -c "shutdown"
else
@echo 'Error...unknown memory type'
endif
endif
endif
else
@echo 'Error...unknown arguments'
endif
endif
endif
endif
endif
@make reload FTDI_KEXT=$(FTDI_KEXT)
###############################################################################
# Download to target, syntax download [file]
download: unload
# if windows or posix shows an error
ifeq ($(ARCH),x86)
@echo ERROR: You can not start openocd in Windows nor Linux
else
# if CPU is not entered shows an error
ifeq ($(CPU),)
@echo ERROR: The CPU variable of your makefile is empty.
else
ifeq ($(OPENOCD_CFG),)
@echo ERROR: Your CPU: $(CPU) may not be supported...
else
@echo ===============================================================================
@echo Starting OpenOCD and downloading...
@echo ' '
ifeq ($(words $(MAKE_ARGS)),0)
# command line: make download
$(OPENOCD_BIN) $(OPENOCD_FLAGS) -c "init" -c "halt 0" -c "$(FLASH_WRITE_COMMAND) $(TARGET_NAME).$(TARGET_DOWNLOAD_EXTENSION) $(TARGET_DOWNLOAD_FLASH_BASE_ADDR) $(TARGET_DOWNLOAD_EXTENSION)" -c "reset run" -c "shutdown"
else
ifeq ($(words $(MAKE_ARGS)),1)
# command line: make download [File]
$(OPENOCD_BIN) $(OPENOCD_FLAGS) -c "init" -c "halt 0" -c "$(FLASH_WRITE_COMMAND) $(word 1,$(MAKE_ARGS)) $(TARGET_DOWNLOAD_FLASH_BASE_ADDR) $(TARGET_DOWNLOAD_EXTENSION)" -c "reset run" -c "shutdown"
else
$(OPENOCD_BIN) $(OPENOCD_FLAGS) -c "init" -c "halt 0" -c "$(FLASH_WRITE_COMMAND) $(word 1,$(MAKE_ARGS)) $(TARGET_DOWNLOAD_$(word 2,$(MAKE_ARGS))_BASE_ADDR) $(TARGET_DOWNLOAD_EXTENSION)" -c "reset run" -c "shutdown"
endif
endif
endif
endif
endif
@make reload FTDI_KEXT=$(FTDI_KEXT)
###############################################################################
# version
ifeq ($(MAKECMDGOALS),version)
include $(foreach module, $(ALL_MODS), modules$(DS)$(module)$(DS)mak$(DS)Makefile)
endif
version:
@echo CIAA Firmware version: $(CIAA_FIRMWARE_VER)
@$(MULTILINE_ECHO) " $(foreach mod, $(ALL_MODS), $(mod): $($(mod)_VERSION)\n)"
###############################################################################
# performs a firmware release
release:
@if [ `make version | grep master-0.0.0 | wc -l` -eq 1 ]; then echo "ERROR: please perform a release branch (e.g. release/1.0.x) and set the variable CIAA_FIRMWARE_VER correctly.\nERROR: Releases shall not be created based on master."; exit 1; fi
@echo If you continue you will lost:
@echo " * Ignored files from repo"
@echo " * not commited changes"
@echo " * the file ../Firmware.zip will be overwritten"
@echo " * the file ../Firmware.tar.gz will be overwritten"
@echo
@read -p "you may want to press CTRL-C to cancel or any other key to continue... " y
@echo Cleaning
git clean -xdf
@echo Removing ../Firmware.zip
rm -f ..$(DS)Firmware.zip
@echo Generating ../Firmware.zip
zip -r ..$(DS)Firmware.zip . -x *.git*
@echo -f Removing ..$(DS)Firmware.tar.gz
tar -zcvf ..$(DS)Firmware.tar.gz --exclude "*.git*" .
###############################################################################
# help
help:
@echo "+-----------------------------------------------------------------------------+"
@echo "| General Help |"
@echo "+-----------------------------------------------------------------------------+"
@echo menuconfig..........: starts the CIAA Firmware configurator
@echo info................: general information about the make environment
@echo info_\<mod\>..........: same as info but reporting information of a library
@echo info_ext_\<mod\>......: same as info_\<mod\> but for an external library
@echo version.............: dislpays the version of each module
@echo "release.............: performs a firmware release (do not use it)"
@echo "+-----------------------------------------------------------------------------+"
@echo "| FreeOSEK (CIAA RTOS based on OSEK Standard) |"
@echo "+-----------------------------------------------------------------------------+"
@echo generate............: generates the ciaaRTOS
@echo rtostests...........: run FreeOSEK conformace tests
@echo "+-----------------------------------------------------------------------------+"
@echo "| Unit Tests |"
@echo "+-----------------------------------------------------------------------------+"
@echo mocks...............: generate the mocks for all header files
@echo tst.................: displays possible tests
@echo tst_\<mod\>...........: shows all unit test of a specific module
@echo tst_\<mod\>_\<unit\>....: runs the specific unit test
@echo tst_\<mod\>_all.......: runs all unit tests of a specific module
@echo results.............: create results report
@echo ci..................: run the continuous integration
@echo "+-----------------------------------------------------------------------------+"
@echo "| Debugging / Running / Programming |"
@echo "+-----------------------------------------------------------------------------+"
@echo "run.........................: execute the binary file (Win/Posix only)"
@echo debug.......................: starts gdb for debug Win/Posix or target
@echo openocd.....................: starts openocd for $(ARCH)
@echo "download [file] [FLASH|QSPI]: download .bin firmware file to the target"
@echo "erase [FLASH|QSPI]..........: erase all the flash"
@echo "+-----------------------------------------------------------------------------+"
@echo "| Building |"
@echo "+-----------------------------------------------------------------------------+"
@echo clean...............: cleans generated, object, binary, etc. files
@echo clean_generate......: performs make clean and make generate
@echo all.................: performs make clean, make generate and make
@echo generate_make.......: performs make generate and make
@echo "Link2RAM............: performs make (incremental build) and links to RAM"
###############################################################################
# menuconfig
menuconfig:
@echo Starting Configurator
$(kconfig) modules$(DS)ciaak$(DS)etc$(DS)ciaaconfig.cfg
###############################################################################
# info for aspecific module
ifeq ($(findstring info_, $(MAKECMDGOALS)),info_)
info_mod = $(subst info_,,$(MAKECMDGOALS))
ext = 0
ifeq ($(findstring info_ext_, $(MAKECMDGOALS)),info_ext_)
info_mod = $(subst info_ext_,,$(MAKECMDGOALS))
ext = 1
endif
ifeq ($(ext),1)
# include corresponding makefile
include externals$(DS)$(info_mod)$(DS)mak$(DS)Makefile
else
# include corresponding makefile
include modules$(DS)$(info_mod)$(DS)mak$(DS)Makefile
endif
# create the corresponding info_<mod> rule
info_ext_$(info_mod) :
@echo ===============================================================================
@echo Info of ext_$(info_mod)
@echo Path........: $(ext_$(info_mod)_PATH)
@$(MULTILINE_ECHO) "Include path: \n $(foreach inc, $(ext_$(info_mod)_INC_PATH), $(inc)\n)"
@echo Source path.: $(ext_$(info_mod)_SRC_PATH)
@$(MULTILINE_ECHO) "Source files:\n $(foreach src, $(ext_$(info_mod)_SRC_FILES), $(src)\n)"
# create the corresponding info_<mod> rule
info_$(info_mod) :
@echo ===============================================================================
@echo Info of $(info_mod)
@echo Path........: $($(info_mod)_PATH)
@$(MULTILINE_ECHO) "Include path: \n $(foreach inc, $($(info_mod)_INC_PATH), $(inc)\n)"
@echo Source path.: $($(info_mod)_SRC_PATH)
@$(MULTILINE_ECHO) "Source files:\n $(foreach src, $($(info_mod)_SRC_FILES), $(src)\n)"
endif
###############################################################################
# information
info:
@echo "+-----------------------------------------------------------------------------+"
@echo "| Enable Config Info |"
@echo "+-----------------------------------------------------------------------------+"
@echo Project Path.......: $(PROJECT_PATH)
@echo Project Name.......: $(PROJECT_NAME)
@echo BOARD/ARCH/CPUTYPE/CPU...: $(BOARD)/$(ARCH)/$(CPUTYPE)/$(CPU)
@echo enable modules.....: $(MODS)
@echo libraries..........: $(LIBS)
@echo libraris with srcs.: $(LIBS_WITH_SRC)
@echo RTOS config........: $(POIL_FILES) $(OIL_FILES)
# @echo Lib Src dirs.......: $(LIBS_SRC_DIRS)
# @echo Lib Src Files......: $(LIBS_SRC_FILES)
# @echo Lib Obj Files......: $(LIBS_OBJ_FILES)
# @echo Project Src Path...: $($(PROJECT_NAME)_SRC_PATH)
@echo Includes...........: $(INCLUDE)
@echo use make info_\<mod\>: to get information of a specific module. eg: make info_posix
@echo "+-----------------------------------------------------------------------------+"
@echo "| CIAA Firmware Info |"
@echo "+-----------------------------------------------------------------------------+"
@echo CIAA Firmware ver..: $(CIAA_FIRMWARE_VER)
@echo Available modules..: $(ALL_MODS)
@echo "+-----------------------------------------------------------------------------+"
@echo "| Compiler Info |"
@echo "+-----------------------------------------------------------------------------+"
@echo Compiler...........: $(COMPILER)
@echo CC.................: $(CC)
@echo AR.................: $(AR)
@echo LD.................: $(LD)
@echo Compile C Flags....: $(CFLAGS)
@echo Compile ASM Flags..: $(AFLAGS)
@echo Target Name........: $(TARGET_NAME)
@echo Src Files..........: $(SRC_FILES)
@echo Obj Files..........: $(OBJ_FILES)
@echo Linker Flags.......: $(LFLAGS)
@echo Linker Extension...: $(LD_EXTENSION)
@echo Linker Target......: $(LD_TARGET)
###############################################################################
# clean
.PHONY: clean generate all run multicore unload reload
clean:
@echo Removing libraries
@rm -rf $(LIB_DIR)$(DS)*
ifneq ($(KEEP_BIN), 1)
@echo Removing bin files
@rm -rf $(BIN_DIR)$(DS)*
endif
@echo Removing RTOS generated files
@rm -rf $(GEN_DIR)$(DS)*
@echo Removing mocks
@rm -rf $(MOCKS_OUT_DIR)$(DS)*
@echo Removing Unity Runners files
@rm -rf $(RUNNERS_OUT_DIR)$(DS)*
@echo Removing doxygen files
@rm -rf $(OUT_DIR)$(DS)doc$(DS)*
@echo Removing ci outputs
@rm -rf $(OUT_DIR)$(DS)ci$(DS)*
@echo Removing coverage
@rm -rf $(OUT_DIR)$(DS)coverage$(DS)*
@echo Removing object files
@rm -rf $(OBJ_DIR)$(DS)*
@echo Removing oil configuration files
@rm -rf $(ETC_DIR)$(DS)*
@echo Removing Download files
@rm -rf $(OUT_DIR)$(DS)download
clean_rtostests:
@echo Removing RTOS Test generated project files
@rm -rf $(RTOS_TEST_GEN_DIR)$(DS)*
###############################################################################
# Generates docbook documentation
docbook:
xsltproc /usr/share/xml/docbook/stylesheet/docbook-xsl/fo/docbook.xsl doc/documentation.xml > out/docbook/documentation.fo
fop -fo out/docbook/documentation.fo -pdf out/docbook/documentation.pdf
###############################################################################
# clean and generate (IDE: Build Clean)
clean_generate: clean generate
###############################################################################
# Incremental Build (IDE: Build)
all: clean generate
make
###############################################################################
# generate and make (IDE: Generate and Make)
generate_make: generate
make
###############################################################################
# make linking to RAM
Link2RAM:
make LINKER_SCRIPT=$(LINKER_SCRIPT_RAM_EXEC)
###############################################################################
# Run the bin file
run:
# if windows or posix shows an error
ifeq ($(ARCH),x86)
@echo ' '
@echo ===============================================================================
@echo Running the file: $(LD_TARGET)
$(LD_TARGET)
else
@echo ERROR: You can not run this binary due to you are not in Windows nor Linux ARCH
endif
###############################################################################
# Run all FreeOSEK Tests
include modules$(DS)rtos$(DS)tst$(DS)ctest$(DS)mak$(DS)Makefile
rtostests:
mkdir -p $(OUT_DIR)$(DS)doc$(DS)ctest
@echo GDB:$(GDB) $(GFLAGS) > $(OUT_DIR)$(DS)doc$(DS)ctest$(DS)ctest.cnf
@echo CLEAN_GENERATE:$(RTOSTESTS_CLEAN_GENERATE) >> $(OUT_DIR)$(DS)doc$(DS)ctest$(DS)ctest.cnf
@echo RAM_EXEC:$(RTOSTESTS_RAM_EXEC) >> $(OUT_DIR)$(DS)doc$(DS)ctest$(DS)ctest.cnf
@echo BINDIR:$(BIN_DIR)>> $(OUT_DIR)$(DS)doc$(DS)ctest$(DS)ctest.cnf
@echo DEBUG_CTESTS:$(RTOSTESTS_DEBUG_CTESTS)>> $(OUT_DIR)$(DS)doc$(DS)ctest$(DS)ctest.cnf
@echo DIR:$(DS)>> $(OUT_DIR)$(DS)doc$(DS)ctest$(DS)ctest.cnf
@echo ARCH:$(ARCH)>> $(OUT_DIR)$(DS)doc$(DS)ctest$(DS)ctest.cnf
@echo CPUTYPE:$(CPUTYPE)>> $(OUT_DIR)$(DS)doc$(DS)ctest$(DS)ctest.cnf
@echo CPU:$(CPU)>> $(OUT_DIR)$(DS)doc$(DS)ctest$(DS)ctest.cnf
@echo RES:$(OUT_DIR)$(DS)rtos$(DS)doc$(DS)ctest$(DS)ctestresults.log>>$(OUT_DIR)$(DS)doc$(DS)ctest$(DS)ctest.cnf
@echo LOG:$(OUT_DIR)$(DS)rtos$(DS)doc$(DS)ctest$(DS)ctest.log>>$(OUT_DIR)$(DS)doc$(DS)ctest$(DS)ctest.cnf
@echo LOGFULL:$(OUT_DIR)$(DS)rtos$(DS)doc$(DS)ctest$(DS)ctestfull.log>>$(OUT_DIR)$(DS)doc$(DS)ctest$(DS)ctest.cnf