1include_guard(GLOBAL)
2
3
4if (CONFIG_USE_middleware_baremetal)
5# Add set(CONFIG_USE_middleware_baremetal true) in config.cmake to use this component
6
7message("middleware_baremetal component is included from ${CMAKE_CURRENT_LIST_FILE}.")
8
9if(CONFIG_USE_COMPONENT_CONFIGURATION)
10  message("===>Import configuration from ${CMAKE_CURRENT_LIST_FILE}")
11
12  target_compile_definitions(${MCUX_SDK_PROJECT_NAME} PUBLIC
13    -DSDK_OS_BAREMETAL
14  )
15
16endif()
17
18
19endif()
20
21
22if (CONFIG_USE_utilities_misc_utilities)
23# Add set(CONFIG_USE_utilities_misc_utilities true) in config.cmake to use this component
24
25message("utilities_misc_utilities component is included from ${CMAKE_CURRENT_LIST_FILE}.")
26
27if(CONFIG_TOOLCHAIN STREQUAL armgcc)
28  target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
29      ${CMAKE_CURRENT_LIST_DIR}/../../utilities/misc_utilities/fsl_sbrk.c
30      ${CMAKE_CURRENT_LIST_DIR}/../../utilities/misc_utilities/fsl_syscall_stub.c
31  )
32endif()
33
34if(CONFIG_CORE STREQUAL cm4f AND (CONFIG_TOOLCHAIN STREQUAL armgcc OR CONFIG_TOOLCHAIN STREQUAL mcux))
35  target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
36      ${CMAKE_CURRENT_LIST_DIR}/../../utilities/misc_utilities/fsl_memcpy.S
37  )
38endif()
39
40
41endif()
42
43
44if (CONFIG_USE_driver_mx25r_flash)
45# Add set(CONFIG_USE_driver_mx25r_flash true) in config.cmake to use this component
46
47message("driver_mx25r_flash component is included from ${CMAKE_CURRENT_LIST_FILE}.")
48
49target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
50  ${CMAKE_CURRENT_LIST_DIR}/../../components/mx25r_flash/mx25r_flash.c
51)
52
53target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
54  ${CMAKE_CURRENT_LIST_DIR}/../../components/mx25r_flash/.
55)
56
57
58endif()
59
60
61if (CONFIG_USE_driver_pf1550)
62# Add set(CONFIG_USE_driver_pf1550 true) in config.cmake to use this component
63
64message("driver_pf1550 component is included from ${CMAKE_CURRENT_LIST_FILE}.")
65
66target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
67  ${CMAKE_CURRENT_LIST_DIR}/../../components/pf1550/fsl_pf1550.c
68  ${CMAKE_CURRENT_LIST_DIR}/../../components/pf1550/fsl_pf1550_charger.c
69)
70
71target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
72  ${CMAKE_CURRENT_LIST_DIR}/../../components/pf1550/.
73)
74
75
76endif()
77
78
79if (CONFIG_USE_driver_pf3000)
80# Add set(CONFIG_USE_driver_pf3000 true) in config.cmake to use this component
81
82message("driver_pf3000 component is included from ${CMAKE_CURRENT_LIST_FILE}.")
83
84target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
85  ${CMAKE_CURRENT_LIST_DIR}/../../components/pf3000/fsl_pf3000.c
86)
87
88target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
89  ${CMAKE_CURRENT_LIST_DIR}/../../components/pf3000/.
90)
91
92
93endif()
94
95
96if (CONFIG_USE_DEVICES_Project_Template_MK22F51212)
97# Add set(CONFIG_USE_DEVICES_Project_Template_MK22F51212 true) in config.cmake to use this component
98
99message("DEVICES_Project_Template_MK22F51212 component is included from ${CMAKE_CURRENT_LIST_FILE}.")
100
101if(CONFIG_USE_component_uart_adapter AND (CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12) AND CONFIG_USE_device_MK22F51212_startup AND CONFIG_USE_driver_adc16 AND CONFIG_USE_driver_clock AND CONFIG_USE_driver_common AND CONFIG_USE_driver_dspi AND CONFIG_USE_driver_gpio AND CONFIG_USE_driver_i2c AND CONFIG_USE_driver_port AND CONFIG_USE_driver_rtc AND CONFIG_USE_driver_smc AND CONFIG_USE_driver_uart AND ((CONFIG_USE_component_serial_manager AND CONFIG_USE_utility_assert AND CONFIG_USE_utility_debug_console) OR (CONFIG_USE_utility_assert_lite AND CONFIG_USE_utility_debug_console_lite)))
102
103add_config_file(${CMAKE_CURRENT_LIST_DIR}/project_template/board.h "" DEVICES_Project_Template_MK22F51212.MK22F51212)
104add_config_file(${CMAKE_CURRENT_LIST_DIR}/project_template/board.c "" DEVICES_Project_Template_MK22F51212.MK22F51212)
105add_config_file(${CMAKE_CURRENT_LIST_DIR}/project_template/clock_config.h "" DEVICES_Project_Template_MK22F51212.MK22F51212)
106add_config_file(${CMAKE_CURRENT_LIST_DIR}/project_template/clock_config.c "" DEVICES_Project_Template_MK22F51212.MK22F51212)
107add_config_file(${CMAKE_CURRENT_LIST_DIR}/project_template/pin_mux.h "" DEVICES_Project_Template_MK22F51212.MK22F51212)
108add_config_file(${CMAKE_CURRENT_LIST_DIR}/project_template/pin_mux.c "" DEVICES_Project_Template_MK22F51212.MK22F51212)
109add_config_file(${CMAKE_CURRENT_LIST_DIR}/project_template/peripherals.h "" DEVICES_Project_Template_MK22F51212.MK22F51212)
110add_config_file(${CMAKE_CURRENT_LIST_DIR}/project_template/peripherals.c "" DEVICES_Project_Template_MK22F51212.MK22F51212)
111
112target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
113  ${CMAKE_CURRENT_LIST_DIR}/project_template/.
114)
115
116else()
117
118message(SEND_ERROR "DEVICES_Project_Template_MK22F51212.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
119
120endif()
121
122endif()
123
124
125if (CONFIG_USE_device_MK22F51212_startup)
126# Add set(CONFIG_USE_device_MK22F51212_startup true) in config.cmake to use this component
127
128message("device_MK22F51212_startup component is included from ${CMAKE_CURRENT_LIST_FILE}.")
129
130if(CONFIG_USE_device_MK22F51212_system)
131
132if(CONFIG_TOOLCHAIN STREQUAL armgcc)
133  target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
134      ${CMAKE_CURRENT_LIST_DIR}/./gcc/startup_MK22F51212.S
135  )
136endif()
137
138if(CONFIG_TOOLCHAIN STREQUAL mcux)
139  target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
140      ${CMAKE_CURRENT_LIST_DIR}/./mcuxpresso/startup_mk22f51212.c
141      ${CMAKE_CURRENT_LIST_DIR}/./mcuxpresso/startup_mk22f51212.cpp
142  )
143endif()
144
145else()
146
147message(SEND_ERROR "device_MK22F51212_startup.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
148
149endif()
150
151endif()
152
153
154if (CONFIG_USE_device_MK22F51212_CMSIS)
155# Add set(CONFIG_USE_device_MK22F51212_CMSIS true) in config.cmake to use this component
156
157message("device_MK22F51212_CMSIS component is included from ${CMAKE_CURRENT_LIST_FILE}.")
158
159if(CONFIG_USE_CMSIS_Include_core_cm AND (CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12))
160
161target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
162  ${CMAKE_CURRENT_LIST_DIR}/./.
163)
164
165else()
166
167message(SEND_ERROR "device_MK22F51212_CMSIS.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
168
169endif()
170
171endif()
172
173
174if (CONFIG_USE_RTE_Device)
175# Add set(CONFIG_USE_RTE_Device true) in config.cmake to use this component
176
177message("RTE_Device component is included from ${CMAKE_CURRENT_LIST_FILE}.")
178
179if((CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12) AND CONFIG_USE_driver_dmamux AND CONFIG_USE_driver_edma)
180
181add_config_file(${CMAKE_CURRENT_LIST_DIR}/template/RTE_Device.h "" RTE_Device.MK22F51212)
182
183target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
184  ${CMAKE_CURRENT_LIST_DIR}/template/.
185)
186
187else()
188
189message(SEND_ERROR "RTE_Device.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
190
191endif()
192
193endif()
194
195
196if (CONFIG_USE_driver_sai_edma)
197# Add set(CONFIG_USE_driver_sai_edma true) in config.cmake to use this component
198
199message("driver_sai_edma component is included from ${CMAKE_CURRENT_LIST_FILE}.")
200
201if(CONFIG_USE_driver_edma AND CONFIG_USE_driver_sai AND (CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12))
202
203target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
204  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/sai/fsl_sai_edma.c
205)
206
207target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
208  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/sai/.
209)
210
211else()
212
213message(SEND_ERROR "driver_sai_edma.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
214
215endif()
216
217endif()
218
219
220if (CONFIG_USE_driver_lpuart_edma)
221# Add set(CONFIG_USE_driver_lpuart_edma true) in config.cmake to use this component
222
223message("driver_lpuart_edma component is included from ${CMAKE_CURRENT_LIST_FILE}.")
224
225if(CONFIG_USE_driver_edma AND CONFIG_USE_driver_lpuart AND (CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12))
226
227target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
228  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/lpuart/fsl_lpuart_edma.c
229)
230
231target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
232  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/lpuart/.
233)
234
235else()
236
237message(SEND_ERROR "driver_lpuart_edma.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
238
239endif()
240
241endif()
242
243
244if (CONFIG_USE_driver_clock)
245# Add set(CONFIG_USE_driver_clock true) in config.cmake to use this component
246
247message("driver_clock component is included from ${CMAKE_CURRENT_LIST_FILE}.")
248
249if(CONFIG_USE_driver_common)
250
251target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
252  ${CMAKE_CURRENT_LIST_DIR}/drivers/fsl_clock.c
253)
254
255target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
256  ${CMAKE_CURRENT_LIST_DIR}/drivers/.
257)
258
259else()
260
261message(SEND_ERROR "driver_clock.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
262
263endif()
264
265endif()
266
267
268if (CONFIG_USE_component_serial_manager_uart)
269# Add set(CONFIG_USE_component_serial_manager_uart true) in config.cmake to use this component
270
271message("component_serial_manager_uart component is included from ${CMAKE_CURRENT_LIST_FILE}.")
272
273if(CONFIG_USE_component_uart_adapter AND CONFIG_USE_component_serial_manager AND (CONFIG_USE_driver_lpuart OR CONFIG_USE_driver_uart))
274
275target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
276  ${CMAKE_CURRENT_LIST_DIR}/../../components/serial_manager/fsl_component_serial_port_uart.c
277)
278
279target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
280  ${CMAKE_CURRENT_LIST_DIR}/../../components/serial_manager/.
281)
282
283if(CONFIG_USE_COMPONENT_CONFIGURATION)
284  message("===>Import configuration from ${CMAKE_CURRENT_LIST_FILE}")
285
286  target_compile_definitions(${MCUX_SDK_PROJECT_NAME} PUBLIC
287    -DSERIAL_PORT_TYPE_UART=1
288  )
289
290endif()
291
292else()
293
294message(SEND_ERROR "component_serial_manager_uart.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
295
296endif()
297
298endif()
299
300
301if (CONFIG_USE_utility_debug_console_lite)
302# Add set(CONFIG_USE_utility_debug_console_lite true) in config.cmake to use this component
303
304message("utility_debug_console_lite component is included from ${CMAKE_CURRENT_LIST_FILE}.")
305
306if(CONFIG_USE_component_uart_adapter AND (CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12) AND CONFIG_USE_driver_common)
307
308target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
309  ${CMAKE_CURRENT_LIST_DIR}/../../utilities/str/fsl_str.c
310  ${CMAKE_CURRENT_LIST_DIR}/../../utilities/debug_console_lite/fsl_debug_console.c
311)
312
313target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
314  ${CMAKE_CURRENT_LIST_DIR}/../../utilities/str
315  ${CMAKE_CURRENT_LIST_DIR}/../../utilities/debug_console_lite
316)
317
318else()
319
320message(SEND_ERROR "utility_debug_console_lite.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
321
322endif()
323
324endif()
325
326
327if (CONFIG_USE_driver_cmsis_i2c)
328# Add set(CONFIG_USE_driver_cmsis_i2c true) in config.cmake to use this component
329
330message("driver_cmsis_i2c component is included from ${CMAKE_CURRENT_LIST_FILE}.")
331
332if(CONFIG_USE_driver_i2c_edma AND (CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12) AND CONFIG_USE_driver_i2c AND CONFIG_USE_CMSIS_Driver_Include_I2C AND CONFIG_USE_RTE_Device)
333
334target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
335  ${CMAKE_CURRENT_LIST_DIR}/../../cmsis_drivers/i2c/fsl_i2c_cmsis.c
336)
337
338target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
339  ${CMAKE_CURRENT_LIST_DIR}/../../cmsis_drivers/i2c/.
340)
341
342else()
343
344message(SEND_ERROR "driver_cmsis_i2c.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
345
346endif()
347
348endif()
349
350
351if (CONFIG_USE_driver_cmsis_lpuart)
352# Add set(CONFIG_USE_driver_cmsis_lpuart true) in config.cmake to use this component
353
354message("driver_cmsis_lpuart component is included from ${CMAKE_CURRENT_LIST_FILE}.")
355
356if(CONFIG_USE_driver_lpuart_edma AND (CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12) AND CONFIG_USE_driver_lpuart AND CONFIG_USE_CMSIS_Driver_Include_USART AND CONFIG_USE_RTE_Device)
357
358target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
359  ${CMAKE_CURRENT_LIST_DIR}/../../cmsis_drivers/lpuart/fsl_lpuart_cmsis.c
360)
361
362target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
363  ${CMAKE_CURRENT_LIST_DIR}/../../cmsis_drivers/lpuart/.
364)
365
366else()
367
368message(SEND_ERROR "driver_cmsis_lpuart.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
369
370endif()
371
372endif()
373
374
375if (CONFIG_USE_driver_cmsis_uart)
376# Add set(CONFIG_USE_driver_cmsis_uart true) in config.cmake to use this component
377
378message("driver_cmsis_uart component is included from ${CMAKE_CURRENT_LIST_FILE}.")
379
380if(CONFIG_USE_driver_uart_edma AND (CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12) AND CONFIG_USE_driver_uart AND CONFIG_USE_CMSIS_Driver_Include_USART AND CONFIG_USE_RTE_Device)
381
382target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
383  ${CMAKE_CURRENT_LIST_DIR}/../../cmsis_drivers/uart/fsl_uart_cmsis.c
384)
385
386target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
387  ${CMAKE_CURRENT_LIST_DIR}/../../cmsis_drivers/uart/.
388)
389
390else()
391
392message(SEND_ERROR "driver_cmsis_uart.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
393
394endif()
395
396endif()
397
398
399if (CONFIG_USE_driver_dspi_edma)
400# Add set(CONFIG_USE_driver_dspi_edma true) in config.cmake to use this component
401
402message("driver_dspi_edma component is included from ${CMAKE_CURRENT_LIST_FILE}.")
403
404if(CONFIG_USE_driver_edma AND CONFIG_USE_driver_dspi)
405
406target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
407  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/dspi/fsl_dspi_edma.c
408)
409
410target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
411  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/dspi/.
412)
413
414else()
415
416message(SEND_ERROR "driver_dspi_edma.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
417
418endif()
419
420endif()
421
422
423if (CONFIG_USE_driver_i2c_edma)
424# Add set(CONFIG_USE_driver_i2c_edma true) in config.cmake to use this component
425
426message("driver_i2c_edma component is included from ${CMAKE_CURRENT_LIST_FILE}.")
427
428if(CONFIG_USE_driver_edma AND CONFIG_USE_driver_i2c)
429
430target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
431  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/i2c/fsl_i2c_edma.c
432)
433
434target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
435  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/i2c/.
436)
437
438else()
439
440message(SEND_ERROR "driver_i2c_edma.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
441
442endif()
443
444endif()
445
446
447if (CONFIG_USE_driver_uart_edma)
448# Add set(CONFIG_USE_driver_uart_edma true) in config.cmake to use this component
449
450message("driver_uart_edma component is included from ${CMAKE_CURRENT_LIST_FILE}.")
451
452if(CONFIG_USE_driver_edma AND CONFIG_USE_driver_uart)
453
454target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
455  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/uart/fsl_uart_edma.c
456)
457
458target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
459  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/uart/.
460)
461
462else()
463
464message(SEND_ERROR "driver_uart_edma.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
465
466endif()
467
468endif()
469
470
471if (CONFIG_USE_utility_notifier)
472# Add set(CONFIG_USE_utility_notifier true) in config.cmake to use this component
473
474message("utility_notifier component is included from ${CMAKE_CURRENT_LIST_FILE}.")
475
476if(CONFIG_USE_driver_common)
477
478target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
479  ${CMAKE_CURRENT_LIST_DIR}/../../utilities/notifier/fsl_notifier.c
480)
481
482target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
483  ${CMAKE_CURRENT_LIST_DIR}/../../utilities/notifier/.
484)
485
486else()
487
488message(SEND_ERROR "utility_notifier.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
489
490endif()
491
492endif()
493
494
495if (CONFIG_USE_device_MK22F51212_system)
496# Add set(CONFIG_USE_device_MK22F51212_system true) in config.cmake to use this component
497
498message("device_MK22F51212_system component is included from ${CMAKE_CURRENT_LIST_FILE}.")
499
500if(CONFIG_USE_device_MK22F51212_CMSIS)
501
502target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
503  ${CMAKE_CURRENT_LIST_DIR}/./system_MK22F51212.c
504)
505
506target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
507  ${CMAKE_CURRENT_LIST_DIR}/./.
508)
509
510else()
511
512message(SEND_ERROR "device_MK22F51212_system.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
513
514endif()
515
516endif()
517
518
519if (CONFIG_USE_utility_assert)
520# Add set(CONFIG_USE_utility_assert true) in config.cmake to use this component
521
522message("utility_assert component is included from ${CMAKE_CURRENT_LIST_FILE}.")
523
524if(CONFIG_USE_utility_debug_console)
525
526target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
527  ${CMAKE_CURRENT_LIST_DIR}/../../utilities/assert/fsl_assert.c
528)
529
530else()
531
532message(SEND_ERROR "utility_assert.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
533
534endif()
535
536endif()
537
538
539if (CONFIG_USE_utility_assert_lite)
540# Add set(CONFIG_USE_utility_assert_lite true) in config.cmake to use this component
541
542message("utility_assert_lite component is included from ${CMAKE_CURRENT_LIST_FILE}.")
543
544if(CONFIG_USE_utility_debug_console_lite)
545
546target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
547  ${CMAKE_CURRENT_LIST_DIR}/../../utilities/assert/fsl_assert.c
548)
549
550else()
551
552message(SEND_ERROR "utility_assert_lite.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
553
554endif()
555
556endif()
557
558
559if (CONFIG_USE_utility_str)
560# Add set(CONFIG_USE_utility_str true) in config.cmake to use this component
561
562message("utility_str component is included from ${CMAKE_CURRENT_LIST_FILE}.")
563
564if(CONFIG_USE_driver_common)
565
566target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
567  ${CMAKE_CURRENT_LIST_DIR}/../../utilities/str/fsl_str.c
568)
569
570target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
571  ${CMAKE_CURRENT_LIST_DIR}/../../utilities/str
572)
573
574else()
575
576message(SEND_ERROR "utility_str.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
577
578endif()
579
580endif()
581
582
583if (CONFIG_USE_utility_debug_console)
584# Add set(CONFIG_USE_utility_debug_console true) in config.cmake to use this component
585
586message("utility_debug_console component is included from ${CMAKE_CURRENT_LIST_FILE}.")
587
588if(CONFIG_USE_component_serial_manager AND CONFIG_USE_driver_common)
589
590target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
591  ${CMAKE_CURRENT_LIST_DIR}/../../utilities/str/fsl_str.c
592  ${CMAKE_CURRENT_LIST_DIR}/../../utilities/debug_console/fsl_debug_console.c
593)
594
595target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
596  ${CMAKE_CURRENT_LIST_DIR}/../../utilities/str
597  ${CMAKE_CURRENT_LIST_DIR}/../../utilities/debug_console
598)
599
600else()
601
602message(SEND_ERROR "utility_debug_console.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
603
604endif()
605
606endif()
607
608
609if (CONFIG_USE_driver_cmsis_dspi)
610# Add set(CONFIG_USE_driver_cmsis_dspi true) in config.cmake to use this component
611
612message("driver_cmsis_dspi component is included from ${CMAKE_CURRENT_LIST_FILE}.")
613
614if((CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12) AND CONFIG_USE_driver_dspi_edma AND CONFIG_USE_CMSIS_Driver_Include_SPI AND CONFIG_USE_RTE_Device)
615
616target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
617  ${CMAKE_CURRENT_LIST_DIR}/../../cmsis_drivers/dspi/fsl_dspi_cmsis.c
618)
619
620target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
621  ${CMAKE_CURRENT_LIST_DIR}/../../cmsis_drivers/dspi/.
622)
623
624else()
625
626message(SEND_ERROR "driver_cmsis_dspi.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
627
628endif()
629
630endif()
631
632
633if (CONFIG_USE_component_audio_sai_edma_adapter)
634# Add set(CONFIG_USE_component_audio_sai_edma_adapter true) in config.cmake to use this component
635
636message("component_audio_sai_edma_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.")
637
638if(CONFIG_USE_driver_common AND CONFIG_USE_driver_sai_edma)
639
640target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
641  ${CMAKE_CURRENT_LIST_DIR}/../../components/audio/fsl_adapter_sai.c
642)
643
644target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
645  ${CMAKE_CURRENT_LIST_DIR}/../../components/audio/.
646)
647
648else()
649
650message(SEND_ERROR "component_audio_sai_edma_adapter.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
651
652endif()
653
654endif()
655
656
657if (CONFIG_USE_component_button)
658# Add set(CONFIG_USE_component_button true) in config.cmake to use this component
659
660message("component_button component is included from ${CMAKE_CURRENT_LIST_FILE}.")
661
662if(CONFIG_USE_driver_common AND CONFIG_USE_component_timer_manager AND (CONFIG_USE_component_gpio_adapter))
663
664target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
665  ${CMAKE_CURRENT_LIST_DIR}/../../components/button/fsl_component_button.c
666)
667
668target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
669  ${CMAKE_CURRENT_LIST_DIR}/../../components/button/.
670)
671
672else()
673
674message(SEND_ERROR "component_button.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
675
676endif()
677
678endif()
679
680
681if (CONFIG_USE_driver_codec)
682# Add set(CONFIG_USE_driver_codec true) in config.cmake to use this component
683
684message("driver_codec component is included from ${CMAKE_CURRENT_LIST_FILE}.")
685
686if(CONFIG_USE_driver_common AND (CONFIG_USE_component_wm8904_adapter OR CONFIG_USE_component_wm8960_adapter OR CONFIG_USE_component_sgtl_adapter OR CONFIG_USE_component_da7212_adapter OR CONFIG_USE_component_cs42888_adapter OR CONFIG_USE_component_codec_adapters))
687
688target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
689  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/fsl_codec_common.c
690)
691
692target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
693  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/.
694)
695
696if(CONFIG_USE_COMPONENT_CONFIGURATION)
697  message("===>Import configuration from ${CMAKE_CURRENT_LIST_FILE}")
698
699  target_compile_definitions(${MCUX_SDK_PROJECT_NAME} PUBLIC
700    -DSDK_I2C_BASED_COMPONENT_USED=1
701  )
702
703endif()
704
705else()
706
707message(SEND_ERROR "driver_codec.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
708
709endif()
710
711endif()
712
713
714if (CONFIG_USE_component_codec_adapters)
715# Add set(CONFIG_USE_component_codec_adapters true) in config.cmake to use this component
716
717message("component_codec_adapters component is included from ${CMAKE_CURRENT_LIST_FILE}.")
718
719if((CONFIG_USE_driver_codec AND CONFIG_USE_component_wm8904_adapter) OR (CONFIG_USE_driver_codec AND CONFIG_USE_component_wm8960_adapter) OR (CONFIG_USE_driver_codec AND CONFIG_USE_component_sgtl_adapter) OR (CONFIG_USE_driver_codec AND CONFIG_USE_component_da7212_adapter) OR (CONFIG_USE_driver_codec AND CONFIG_USE_component_cs42888_adapter))
720
721target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
722  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/port/fsl_codec_adapter.c
723)
724
725target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
726  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/port
727)
728
729if(CONFIG_USE_COMPONENT_CONFIGURATION)
730  message("===>Import configuration from ${CMAKE_CURRENT_LIST_FILE}")
731
732  target_compile_definitions(${MCUX_SDK_PROJECT_NAME} PUBLIC
733    -DCODEC_MULTI_ADAPTERS=1
734  )
735
736endif()
737
738else()
739
740message(SEND_ERROR "component_codec_adapters.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
741
742endif()
743
744endif()
745
746
747if (CONFIG_USE_component_wm8904_adapter)
748# Add set(CONFIG_USE_component_wm8904_adapter true) in config.cmake to use this component
749
750message("component_wm8904_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.")
751
752if(CONFIG_USE_driver_wm8904 AND CONFIG_USE_driver_codec)
753
754target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
755  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/port/wm8904/fsl_codec_wm8904_adapter.c
756)
757
758target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
759  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/port/wm8904
760  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/port
761)
762
763else()
764
765message(SEND_ERROR "component_wm8904_adapter.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
766
767endif()
768
769endif()
770
771
772if (CONFIG_USE_component_wm8960_adapter)
773# Add set(CONFIG_USE_component_wm8960_adapter true) in config.cmake to use this component
774
775message("component_wm8960_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.")
776
777if(CONFIG_USE_driver_wm8960 AND CONFIG_USE_driver_codec)
778
779target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
780  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/port/wm8960/fsl_codec_wm8960_adapter.c
781)
782
783target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
784  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/port/wm8960
785  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/port
786)
787
788else()
789
790message(SEND_ERROR "component_wm8960_adapter.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
791
792endif()
793
794endif()
795
796
797if (CONFIG_USE_component_cs42888_adapter)
798# Add set(CONFIG_USE_component_cs42888_adapter true) in config.cmake to use this component
799
800message("component_cs42888_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.")
801
802if(CONFIG_USE_driver_cs42888 AND CONFIG_USE_driver_codec)
803
804target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
805  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/port/cs42888/fsl_codec_cs42888_adapter.c
806)
807
808target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
809  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/port/cs42888
810  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/port
811)
812
813else()
814
815message(SEND_ERROR "component_cs42888_adapter.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
816
817endif()
818
819endif()
820
821
822if (CONFIG_USE_component_sgtl_adapter)
823# Add set(CONFIG_USE_component_sgtl_adapter true) in config.cmake to use this component
824
825message("component_sgtl_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.")
826
827if(CONFIG_USE_driver_sgtl5000 AND CONFIG_USE_driver_codec)
828
829target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
830  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/port/sgtl5000/fsl_codec_sgtl_adapter.c
831)
832
833target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
834  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/port/sgtl5000
835  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/port
836)
837
838else()
839
840message(SEND_ERROR "component_sgtl_adapter.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
841
842endif()
843
844endif()
845
846
847if (CONFIG_USE_component_da7212_adapter)
848# Add set(CONFIG_USE_component_da7212_adapter true) in config.cmake to use this component
849
850message("component_da7212_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.")
851
852if(CONFIG_USE_driver_dialog7212 AND CONFIG_USE_driver_codec)
853
854target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
855  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/port/da7212/fsl_codec_da7212_adapter.c
856)
857
858target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
859  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/port/da7212
860  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/port
861)
862
863else()
864
865message(SEND_ERROR "component_da7212_adapter.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
866
867endif()
868
869endif()
870
871
872if (CONFIG_USE_component_codec_i2c)
873# Add set(CONFIG_USE_component_codec_i2c true) in config.cmake to use this component
874
875message("component_codec_i2c component is included from ${CMAKE_CURRENT_LIST_FILE}.")
876
877if(CONFIG_USE_driver_common AND (CONFIG_USE_component_i2c_adapter))
878
879target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
880  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/i2c/fsl_codec_i2c.c
881)
882
883target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
884  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/i2c/.
885)
886
887if(CONFIG_USE_COMPONENT_CONFIGURATION)
888  message("===>Import configuration from ${CMAKE_CURRENT_LIST_FILE}")
889
890  target_compile_definitions(${MCUX_SDK_PROJECT_NAME} PUBLIC
891    -DSDK_I2C_BASED_COMPONENT_USED=1
892  )
893
894endif()
895
896else()
897
898message(SEND_ERROR "component_codec_i2c.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
899
900endif()
901
902endif()
903
904
905if (CONFIG_USE_component_crc_adapter)
906# Add set(CONFIG_USE_component_crc_adapter true) in config.cmake to use this component
907
908message("component_crc_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.")
909
910if(CONFIG_USE_driver_common AND CONFIG_USE_driver_crc)
911
912target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
913  ${CMAKE_CURRENT_LIST_DIR}/../../components/crc/fsl_adapter_crc.c
914)
915
916target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
917  ${CMAKE_CURRENT_LIST_DIR}/../../components/crc/.
918)
919
920else()
921
922message(SEND_ERROR "component_crc_adapter.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
923
924endif()
925
926endif()
927
928
929if (CONFIG_USE_component_software_crc_adapter)
930# Add set(CONFIG_USE_component_software_crc_adapter true) in config.cmake to use this component
931
932message("component_software_crc_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.")
933
934if(CONFIG_USE_driver_common)
935
936target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
937  ${CMAKE_CURRENT_LIST_DIR}/../../components/crc/fsl_adapter_software_crc.c
938)
939
940target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
941  ${CMAKE_CURRENT_LIST_DIR}/../../components/crc/.
942)
943
944else()
945
946message(SEND_ERROR "component_software_crc_adapter.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
947
948endif()
949
950endif()
951
952
953if (CONFIG_USE_driver_cs42888)
954# Add set(CONFIG_USE_driver_cs42888 true) in config.cmake to use this component
955
956message("driver_cs42888 component is included from ${CMAKE_CURRENT_LIST_FILE}.")
957
958if(CONFIG_USE_driver_common AND CONFIG_USE_component_codec_i2c)
959
960target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
961  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/cs42888/fsl_cs42888.c
962)
963
964target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
965  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/cs42888/.
966)
967
968if(CONFIG_USE_COMPONENT_CONFIGURATION)
969  message("===>Import configuration from ${CMAKE_CURRENT_LIST_FILE}")
970
971  target_compile_definitions(${MCUX_SDK_PROJECT_NAME} PUBLIC
972    -DSDK_I2C_BASED_COMPONENT_USED=1
973    -DCODEC_CS42888_ENABLE
974  )
975
976endif()
977
978else()
979
980message(SEND_ERROR "driver_cs42888.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
981
982endif()
983
984endif()
985
986
987if (CONFIG_USE_driver_dialog7212)
988# Add set(CONFIG_USE_driver_dialog7212 true) in config.cmake to use this component
989
990message("driver_dialog7212 component is included from ${CMAKE_CURRENT_LIST_FILE}.")
991
992if(CONFIG_USE_driver_common AND CONFIG_USE_component_codec_i2c)
993
994target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
995  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/da7212/fsl_dialog7212.c
996)
997
998target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
999  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/da7212/.
1000)
1001
1002if(CONFIG_USE_COMPONENT_CONFIGURATION)
1003  message("===>Import configuration from ${CMAKE_CURRENT_LIST_FILE}")
1004
1005  target_compile_definitions(${MCUX_SDK_PROJECT_NAME} PUBLIC
1006    -DSDK_I2C_BASED_COMPONENT_USED=1
1007    -DBOARD_USE_CODEC=1
1008    -DCODEC_DA7212_ENABLE
1009  )
1010
1011endif()
1012
1013else()
1014
1015message(SEND_ERROR "driver_dialog7212.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1016
1017endif()
1018
1019endif()
1020
1021
1022if (CONFIG_USE_component_eeprom_InternalFlash)
1023# Add set(CONFIG_USE_component_eeprom_InternalFlash true) in config.cmake to use this component
1024
1025message("component_eeprom_InternalFlash component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1026
1027if(CONFIG_USE_driver_common AND CONFIG_USE_component_flash_adapter)
1028
1029target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1030  ${CMAKE_CURRENT_LIST_DIR}/../../components/extern_flash/fsl_adapter_eeprom_InternalFlash.c
1031)
1032
1033target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1034  ${CMAKE_CURRENT_LIST_DIR}/../../components/extern_flash/.
1035)
1036
1037else()
1038
1039message(SEND_ERROR "component_eeprom_InternalFlash.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1040
1041endif()
1042
1043endif()
1044
1045
1046if (CONFIG_USE_driver_ft5406)
1047# Add set(CONFIG_USE_driver_ft5406 true) in config.cmake to use this component
1048
1049message("driver_ft5406 component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1050
1051if(CONFIG_USE_driver_common)
1052
1053target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1054  ${CMAKE_CURRENT_LIST_DIR}/../../components/ft5406/fsl_ft5406.c
1055)
1056
1057target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1058  ${CMAKE_CURRENT_LIST_DIR}/../../components/ft5406/.
1059)
1060
1061else()
1062
1063message(SEND_ERROR "driver_ft5406.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1064
1065endif()
1066
1067endif()
1068
1069
1070if (CONFIG_USE_driver_ft6x06)
1071# Add set(CONFIG_USE_driver_ft6x06 true) in config.cmake to use this component
1072
1073message("driver_ft6x06 component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1074
1075if(CONFIG_USE_CMSIS_Driver_Include_I2C)
1076
1077target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1078  ${CMAKE_CURRENT_LIST_DIR}/../../components/ft6x06/fsl_ft6x06.c
1079)
1080
1081target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1082  ${CMAKE_CURRENT_LIST_DIR}/../../components/ft6x06/.
1083)
1084
1085else()
1086
1087message(SEND_ERROR "driver_ft6x06.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1088
1089endif()
1090
1091endif()
1092
1093
1094if (CONFIG_USE_driver_fxos8700cq)
1095# Add set(CONFIG_USE_driver_fxos8700cq true) in config.cmake to use this component
1096
1097message("driver_fxos8700cq component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1098
1099if(CONFIG_USE_driver_common)
1100
1101target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1102  ${CMAKE_CURRENT_LIST_DIR}/../../components/fxos8700cq/fsl_fxos.c
1103)
1104
1105target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1106  ${CMAKE_CURRENT_LIST_DIR}/../../components/fxos8700cq/.
1107)
1108
1109else()
1110
1111message(SEND_ERROR "driver_fxos8700cq.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1112
1113endif()
1114
1115endif()
1116
1117
1118if (CONFIG_USE_component_gpio_adapter)
1119# Add set(CONFIG_USE_component_gpio_adapter true) in config.cmake to use this component
1120
1121message("component_gpio_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1122
1123if(CONFIG_USE_driver_gpio AND CONFIG_USE_driver_port)
1124
1125target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1126  ${CMAKE_CURRENT_LIST_DIR}/../../components/gpio/fsl_adapter_gpio.c
1127)
1128
1129target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1130  ${CMAKE_CURRENT_LIST_DIR}/../../components/gpio/.
1131)
1132
1133else()
1134
1135message(SEND_ERROR "component_gpio_adapter.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1136
1137endif()
1138
1139endif()
1140
1141
1142if (CONFIG_USE_component_i2c_adapter)
1143# Add set(CONFIG_USE_component_i2c_adapter true) in config.cmake to use this component
1144
1145message("component_i2c_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1146
1147if(CONFIG_USE_driver_common AND CONFIG_USE_driver_i2c)
1148
1149target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1150  ${CMAKE_CURRENT_LIST_DIR}/../../components/i2c/fsl_adapter_i2c.c
1151)
1152
1153target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1154  ${CMAKE_CURRENT_LIST_DIR}/../../components/i2c/.
1155)
1156
1157else()
1158
1159message(SEND_ERROR "component_i2c_adapter.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1160
1161endif()
1162
1163endif()
1164
1165
1166if (CONFIG_USE_driver_ili9341)
1167# Add set(CONFIG_USE_driver_ili9341 true) in config.cmake to use this component
1168
1169message("driver_ili9341 component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1170
1171if(CONFIG_USE_driver_common)
1172
1173target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1174  ${CMAKE_CURRENT_LIST_DIR}/../../components/ili9341/fsl_ili9341.c
1175)
1176
1177target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1178  ${CMAKE_CURRENT_LIST_DIR}/../../components/ili9341/.
1179)
1180
1181else()
1182
1183message(SEND_ERROR "driver_ili9341.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1184
1185endif()
1186
1187endif()
1188
1189
1190if (CONFIG_USE_component_flash_adapter)
1191# Add set(CONFIG_USE_component_flash_adapter true) in config.cmake to use this component
1192
1193message("component_flash_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1194
1195if(CONFIG_USE_driver_common AND CONFIG_USE_driver_flash)
1196
1197target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1198  ${CMAKE_CURRENT_LIST_DIR}/../../components/internal_flash/fsl_adapter_flash.c
1199)
1200
1201target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1202  ${CMAKE_CURRENT_LIST_DIR}/../../components/internal_flash/.
1203)
1204
1205else()
1206
1207message(SEND_ERROR "component_flash_adapter.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1208
1209endif()
1210
1211endif()
1212
1213
1214if (CONFIG_USE_component_led)
1215# Add set(CONFIG_USE_component_led true) in config.cmake to use this component
1216
1217message("component_led component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1218
1219if(CONFIG_USE_driver_common AND CONFIG_USE_component_timer_manager AND (CONFIG_USE_component_gpio_adapter))
1220
1221target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1222  ${CMAKE_CURRENT_LIST_DIR}/../../components/led/fsl_component_led.c
1223)
1224
1225target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1226  ${CMAKE_CURRENT_LIST_DIR}/../../components/led/.
1227)
1228
1229else()
1230
1231message(SEND_ERROR "component_led.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1232
1233endif()
1234
1235endif()
1236
1237
1238if (CONFIG_USE_component_lists)
1239# Add set(CONFIG_USE_component_lists true) in config.cmake to use this component
1240
1241message("component_lists component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1242
1243if(CONFIG_USE_driver_common)
1244
1245target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1246  ${CMAKE_CURRENT_LIST_DIR}/../../components/lists/fsl_component_generic_list.c
1247)
1248
1249target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1250  ${CMAKE_CURRENT_LIST_DIR}/../../components/lists/.
1251)
1252
1253else()
1254
1255message(SEND_ERROR "component_lists.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1256
1257endif()
1258
1259endif()
1260
1261
1262if (CONFIG_USE_component_log)
1263# Add set(CONFIG_USE_component_log true) in config.cmake to use this component
1264
1265message("component_log component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1266
1267if(CONFIG_USE_driver_common AND CONFIG_USE_utility_str)
1268
1269target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1270  ${CMAKE_CURRENT_LIST_DIR}/../../components/log/fsl_component_log.c
1271)
1272
1273target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1274  ${CMAKE_CURRENT_LIST_DIR}/../../components/log/.
1275)
1276
1277else()
1278
1279message(SEND_ERROR "component_log.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1280
1281endif()
1282
1283endif()
1284
1285
1286if (CONFIG_USE_component_log_backend_debugconsole)
1287# Add set(CONFIG_USE_component_log_backend_debugconsole true) in config.cmake to use this component
1288
1289message("component_log_backend_debugconsole component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1290
1291if(CONFIG_USE_driver_common AND CONFIG_USE_component_log AND CONFIG_USE_utility_debug_console)
1292
1293target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1294  ${CMAKE_CURRENT_LIST_DIR}/../../components/log/fsl_component_log_backend_debugconsole.c
1295)
1296
1297target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1298  ${CMAKE_CURRENT_LIST_DIR}/../../components/log/.
1299)
1300
1301else()
1302
1303message(SEND_ERROR "component_log_backend_debugconsole.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1304
1305endif()
1306
1307endif()
1308
1309
1310if (CONFIG_USE_component_log_backend_debugconsole_lite)
1311# Add set(CONFIG_USE_component_log_backend_debugconsole_lite true) in config.cmake to use this component
1312
1313message("component_log_backend_debugconsole_lite component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1314
1315if(CONFIG_USE_driver_common AND CONFIG_USE_component_log AND CONFIG_USE_utility_debug_console_lite)
1316
1317target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1318  ${CMAKE_CURRENT_LIST_DIR}/../../components/log/fsl_component_log_backend_debugconsole.c
1319)
1320
1321target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1322  ${CMAKE_CURRENT_LIST_DIR}/../../components/log/.
1323)
1324
1325else()
1326
1327message(SEND_ERROR "component_log_backend_debugconsole_lite.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1328
1329endif()
1330
1331endif()
1332
1333
1334if (CONFIG_USE_component_log_backend_ringbuffer)
1335# Add set(CONFIG_USE_component_log_backend_ringbuffer true) in config.cmake to use this component
1336
1337message("component_log_backend_ringbuffer component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1338
1339if(CONFIG_USE_driver_common AND CONFIG_USE_component_log)
1340
1341target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1342  ${CMAKE_CURRENT_LIST_DIR}/../../components/log/fsl_component_log_backend_ringbuffer.c
1343)
1344
1345target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1346  ${CMAKE_CURRENT_LIST_DIR}/../../components/log/.
1347)
1348
1349else()
1350
1351message(SEND_ERROR "component_log_backend_ringbuffer.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1352
1353endif()
1354
1355endif()
1356
1357
1358if (CONFIG_USE_component_mem_manager)
1359# Add set(CONFIG_USE_component_mem_manager true) in config.cmake to use this component
1360
1361message("component_mem_manager component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1362
1363if(CONFIG_USE_driver_common AND CONFIG_USE_component_lists)
1364
1365target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1366  ${CMAKE_CURRENT_LIST_DIR}/../../components/mem_manager/fsl_component_mem_manager.c
1367)
1368
1369target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1370  ${CMAKE_CURRENT_LIST_DIR}/../../components/mem_manager/.
1371)
1372
1373else()
1374
1375message(SEND_ERROR "component_mem_manager.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1376
1377endif()
1378
1379endif()
1380
1381
1382if (CONFIG_USE_component_mem_manager_light)
1383# Add set(CONFIG_USE_component_mem_manager_light true) in config.cmake to use this component
1384
1385message("component_mem_manager_light component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1386
1387if(CONFIG_USE_driver_common AND CONFIG_USE_component_lists)
1388
1389target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1390  ${CMAKE_CURRENT_LIST_DIR}/../../components/mem_manager/fsl_component_mem_manager_light.c
1391)
1392
1393target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1394  ${CMAKE_CURRENT_LIST_DIR}/../../components/mem_manager/.
1395)
1396
1397else()
1398
1399message(SEND_ERROR "component_mem_manager_light.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1400
1401endif()
1402
1403endif()
1404
1405
1406if (CONFIG_USE_driver_mma8451q)
1407# Add set(CONFIG_USE_driver_mma8451q true) in config.cmake to use this component
1408
1409message("driver_mma8451q component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1410
1411if(CONFIG_USE_driver_common)
1412
1413target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1414  ${CMAKE_CURRENT_LIST_DIR}/../../components/mma8451q/fsl_mma.c
1415)
1416
1417target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1418  ${CMAKE_CURRENT_LIST_DIR}/../../components/mma8451q/.
1419)
1420
1421else()
1422
1423message(SEND_ERROR "driver_mma8451q.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1424
1425endif()
1426
1427endif()
1428
1429
1430if (CONFIG_USE_component_panic)
1431# Add set(CONFIG_USE_component_panic true) in config.cmake to use this component
1432
1433message("component_panic component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1434
1435if(CONFIG_USE_driver_common)
1436
1437target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1438  ${CMAKE_CURRENT_LIST_DIR}/../../components/panic/fsl_component_panic.c
1439)
1440
1441target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1442  ${CMAKE_CURRENT_LIST_DIR}/../../components/panic/.
1443)
1444
1445else()
1446
1447message(SEND_ERROR "component_panic.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1448
1449endif()
1450
1451endif()
1452
1453
1454if (CONFIG_USE_component_pwm_ftm_adapter)
1455# Add set(CONFIG_USE_component_pwm_ftm_adapter true) in config.cmake to use this component
1456
1457message("component_pwm_ftm_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1458
1459if(CONFIG_USE_driver_common AND CONFIG_USE_driver_ftm)
1460
1461target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1462  ${CMAKE_CURRENT_LIST_DIR}/../../components/pwm/fsl_adapter_pwm_ftm.c
1463)
1464
1465target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1466  ${CMAKE_CURRENT_LIST_DIR}/../../components/pwm/.
1467)
1468
1469else()
1470
1471message(SEND_ERROR "component_pwm_ftm_adapter.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1472
1473endif()
1474
1475endif()
1476
1477
1478if (CONFIG_USE_component_reset_adapter)
1479# Add set(CONFIG_USE_component_reset_adapter true) in config.cmake to use this component
1480
1481message("component_reset_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1482
1483if(CONFIG_USE_driver_common)
1484
1485target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1486  ${CMAKE_CURRENT_LIST_DIR}/../../components/reset/fsl_adapter_reset.c
1487)
1488
1489target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1490  ${CMAKE_CURRENT_LIST_DIR}/../../components/reset/.
1491)
1492
1493else()
1494
1495message(SEND_ERROR "component_reset_adapter.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1496
1497endif()
1498
1499endif()
1500
1501
1502if (CONFIG_USE_component_rnga_adapter)
1503# Add set(CONFIG_USE_component_rnga_adapter true) in config.cmake to use this component
1504
1505message("component_rnga_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1506
1507if(CONFIG_USE_driver_common AND CONFIG_USE_driver_rnga)
1508
1509target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1510  ${CMAKE_CURRENT_LIST_DIR}/../../components/rng/fsl_adapter_rnga.c
1511)
1512
1513target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1514  ${CMAKE_CURRENT_LIST_DIR}/../../components/rng/.
1515)
1516
1517else()
1518
1519message(SEND_ERROR "component_rnga_adapter.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1520
1521endif()
1522
1523endif()
1524
1525
1526if (CONFIG_USE_component_software_rng_adapter)
1527# Add set(CONFIG_USE_component_software_rng_adapter true) in config.cmake to use this component
1528
1529message("component_software_rng_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1530
1531if(CONFIG_USE_driver_common)
1532
1533target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1534  ${CMAKE_CURRENT_LIST_DIR}/../../components/rng/fsl_adapter_software_rng.c
1535)
1536
1537target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1538  ${CMAKE_CURRENT_LIST_DIR}/../../components/rng/.
1539)
1540
1541else()
1542
1543message(SEND_ERROR "component_software_rng_adapter.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1544
1545endif()
1546
1547endif()
1548
1549
1550if (CONFIG_USE_component_rtc)
1551# Add set(CONFIG_USE_component_rtc true) in config.cmake to use this component
1552
1553message("component_rtc component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1554
1555if(CONFIG_USE_driver_common AND CONFIG_USE_driver_rtc)
1556
1557target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1558  ${CMAKE_CURRENT_LIST_DIR}/../../components/rtc/fsl_adapter_rtc.c
1559)
1560
1561target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1562  ${CMAKE_CURRENT_LIST_DIR}/../../components/rtc/.
1563)
1564
1565if(CONFIG_USE_COMPONENT_CONFIGURATION)
1566  message("===>Import configuration from ${CMAKE_CURRENT_LIST_FILE}")
1567
1568  target_compile_definitions(${MCUX_SDK_PROJECT_NAME} PUBLIC
1569    -DRTC_LEGACY_FUNCTION_PROTOTYPE=1
1570  )
1571
1572endif()
1573
1574else()
1575
1576message(SEND_ERROR "component_rtc.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1577
1578endif()
1579
1580endif()
1581
1582
1583if (CONFIG_USE_component_serial_manager)
1584# Add set(CONFIG_USE_component_serial_manager true) in config.cmake to use this component
1585
1586message("component_serial_manager component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1587
1588if(CONFIG_USE_driver_common AND CONFIG_USE_component_lists AND (CONFIG_USE_component_serial_manager_uart OR CONFIG_USE_component_serial_manager_usb_cdc OR CONFIG_USE_component_serial_manager_virtual OR CONFIG_USE_component_serial_manager_swo OR CONFIG_USE_component_serial_manager_spi))
1589
1590target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1591  ${CMAKE_CURRENT_LIST_DIR}/../../components/serial_manager/fsl_component_serial_manager.c
1592)
1593
1594target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1595  ${CMAKE_CURRENT_LIST_DIR}/../../components/serial_manager/.
1596)
1597
1598else()
1599
1600message(SEND_ERROR "component_serial_manager.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1601
1602endif()
1603
1604endif()
1605
1606
1607if (CONFIG_USE_component_serial_manager_spi)
1608# Add set(CONFIG_USE_component_serial_manager_spi true) in config.cmake to use this component
1609
1610message("component_serial_manager_spi component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1611
1612if(CONFIG_USE_component_serial_manager AND ((CONFIG_USE_driver_dspi AND CONFIG_USE_component_dspi_adapter)))
1613
1614target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1615  ${CMAKE_CURRENT_LIST_DIR}/../../components/serial_manager/fsl_component_serial_port_spi.c
1616)
1617
1618target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1619  ${CMAKE_CURRENT_LIST_DIR}/../../components/serial_manager/.
1620)
1621
1622if(CONFIG_USE_COMPONENT_CONFIGURATION)
1623  message("===>Import configuration from ${CMAKE_CURRENT_LIST_FILE}")
1624
1625  target_compile_definitions(${MCUX_SDK_PROJECT_NAME} PUBLIC
1626    -DSERIAL_PORT_TYPE_SPI=1
1627    -DSERIAL_PORT_TYPE_SPI_MASTER=1
1628    -DSERIAL_PORT_TYPE_SPI_SLAVE=1
1629    -DSERIAL_MANAGER_NON_BLOCKING_MODE=1
1630  )
1631
1632endif()
1633
1634else()
1635
1636message(SEND_ERROR "component_serial_manager_spi.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1637
1638endif()
1639
1640endif()
1641
1642
1643if (CONFIG_USE_component_serial_manager_usb_cdc)
1644# Add set(CONFIG_USE_component_serial_manager_usb_cdc true) in config.cmake to use this component
1645
1646message("component_serial_manager_usb_cdc component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1647
1648if(CONFIG_USE_component_serial_manager AND CONFIG_USE_middleware_usb_device_cdc_external AND CONFIG_USE_driver_common)
1649
1650target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1651  ${CMAKE_CURRENT_LIST_DIR}/../../components/serial_manager/fsl_component_serial_port_usb.c
1652  ${CMAKE_CURRENT_LIST_DIR}/../../components/serial_manager/usb_cdc_adapter/usb_device_descriptor.c
1653)
1654
1655target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1656  ${CMAKE_CURRENT_LIST_DIR}/../../components/serial_manager/.
1657  ${CMAKE_CURRENT_LIST_DIR}/../../components/serial_manager/usb_cdc_adapter
1658)
1659
1660if(CONFIG_USE_COMPONENT_CONFIGURATION)
1661  message("===>Import configuration from ${CMAKE_CURRENT_LIST_FILE}")
1662
1663  target_compile_definitions(${MCUX_SDK_PROJECT_NAME} PUBLIC
1664    -DSERIAL_PORT_TYPE_USBCDC=1
1665    -DDEBUG_CONSOLE_TRANSFER_NON_BLOCKING
1666    -DUSB_DEVICE_CONFIG_CDC_ACM=1
1667  )
1668
1669endif()
1670
1671else()
1672
1673message(SEND_ERROR "component_serial_manager_usb_cdc.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1674
1675endif()
1676
1677endif()
1678
1679
1680if (CONFIG_USE_component_serial_manager_virtual)
1681# Add set(CONFIG_USE_component_serial_manager_virtual true) in config.cmake to use this component
1682
1683message("component_serial_manager_virtual component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1684
1685if(CONFIG_USE_component_serial_manager AND CONFIG_USE_driver_common)
1686
1687target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1688  ${CMAKE_CURRENT_LIST_DIR}/../../components/serial_manager/fsl_component_serial_port_virtual.c
1689)
1690
1691target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1692  ${CMAKE_CURRENT_LIST_DIR}/../../components/serial_manager/.
1693)
1694
1695if(CONFIG_USE_COMPONENT_CONFIGURATION)
1696  message("===>Import configuration from ${CMAKE_CURRENT_LIST_FILE}")
1697
1698  target_compile_definitions(${MCUX_SDK_PROJECT_NAME} PUBLIC
1699    -DSERIAL_PORT_TYPE_VIRTUAL=1
1700    -DDEBUG_CONSOLE_TRANSFER_NON_BLOCKING
1701  )
1702
1703endif()
1704
1705else()
1706
1707message(SEND_ERROR "component_serial_manager_virtual.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1708
1709endif()
1710
1711endif()
1712
1713
1714if (CONFIG_USE_component_serial_manager_swo)
1715# Add set(CONFIG_USE_component_serial_manager_swo true) in config.cmake to use this component
1716
1717message("component_serial_manager_swo component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1718
1719if((CONFIG_CORE STREQUAL cm4f) AND CONFIG_USE_driver_common AND CONFIG_USE_component_serial_manager)
1720
1721target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1722  ${CMAKE_CURRENT_LIST_DIR}/../../components/serial_manager/fsl_component_serial_port_swo.c
1723)
1724
1725target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1726  ${CMAKE_CURRENT_LIST_DIR}/../../components/serial_manager/.
1727)
1728
1729if(CONFIG_USE_COMPONENT_CONFIGURATION)
1730  message("===>Import configuration from ${CMAKE_CURRENT_LIST_FILE}")
1731
1732  target_compile_definitions(${MCUX_SDK_PROJECT_NAME} PUBLIC
1733    -DSERIAL_PORT_TYPE_SWO=1
1734  )
1735
1736endif()
1737
1738else()
1739
1740message(SEND_ERROR "component_serial_manager_swo.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1741
1742endif()
1743
1744endif()
1745
1746
1747if (CONFIG_USE_driver_sgtl5000)
1748# Add set(CONFIG_USE_driver_sgtl5000 true) in config.cmake to use this component
1749
1750message("driver_sgtl5000 component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1751
1752if(CONFIG_USE_driver_common AND CONFIG_USE_component_codec_i2c)
1753
1754target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1755  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/sgtl5000/fsl_sgtl5000.c
1756)
1757
1758target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1759  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/sgtl5000/.
1760)
1761
1762if(CONFIG_USE_COMPONENT_CONFIGURATION)
1763  message("===>Import configuration from ${CMAKE_CURRENT_LIST_FILE}")
1764
1765  target_compile_definitions(${MCUX_SDK_PROJECT_NAME} PUBLIC
1766    -DSDK_I2C_BASED_COMPONENT_USED=1
1767    -DBOARD_USE_CODEC=1
1768    -DCODEC_SGTL5000_ENABLE
1769  )
1770
1771endif()
1772
1773else()
1774
1775message(SEND_ERROR "driver_sgtl5000.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1776
1777endif()
1778
1779endif()
1780
1781
1782if (CONFIG_USE_utility_shell)
1783# Add set(CONFIG_USE_utility_shell true) in config.cmake to use this component
1784
1785message("utility_shell component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1786
1787if(CONFIG_USE_utility_str AND CONFIG_USE_component_lists AND CONFIG_USE_driver_common)
1788
1789target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1790  ${CMAKE_CURRENT_LIST_DIR}/../../utilities/shell/fsl_shell.c
1791)
1792
1793target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1794  ${CMAKE_CURRENT_LIST_DIR}/../../utilities/shell/.
1795)
1796
1797if(CONFIG_USE_COMPONENT_CONFIGURATION)
1798  message("===>Import configuration from ${CMAKE_CURRENT_LIST_FILE}")
1799
1800  target_compile_definitions(${MCUX_SDK_PROJECT_NAME} PUBLIC
1801    -DDEBUG_CONSOLE_RX_ENABLE=0
1802  )
1803
1804endif()
1805
1806else()
1807
1808message(SEND_ERROR "utility_shell.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1809
1810endif()
1811
1812endif()
1813
1814
1815if (CONFIG_USE_component_dspi_adapter)
1816# Add set(CONFIG_USE_component_dspi_adapter true) in config.cmake to use this component
1817
1818message("component_dspi_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1819
1820if(CONFIG_USE_driver_common AND CONFIG_USE_driver_dspi)
1821
1822target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1823  ${CMAKE_CURRENT_LIST_DIR}/../../components/spi/fsl_adapter_dspi.c
1824)
1825
1826target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1827  ${CMAKE_CURRENT_LIST_DIR}/../../components/spi/.
1828)
1829
1830else()
1831
1832message(SEND_ERROR "component_dspi_adapter.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1833
1834endif()
1835
1836endif()
1837
1838
1839if (CONFIG_USE_driver_ssd1963)
1840# Add set(CONFIG_USE_driver_ssd1963 true) in config.cmake to use this component
1841
1842message("driver_ssd1963 component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1843
1844if(CONFIG_USE_driver_dbi)
1845
1846target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1847  ${CMAKE_CURRENT_LIST_DIR}/../../components/ssd1963/fsl_ssd1963.c
1848)
1849
1850target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1851  ${CMAKE_CURRENT_LIST_DIR}/../../components/ssd1963/.
1852)
1853
1854else()
1855
1856message(SEND_ERROR "driver_ssd1963.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1857
1858endif()
1859
1860endif()
1861
1862
1863if (CONFIG_USE_component_pit_time_stamp_adapter)
1864# Add set(CONFIG_USE_component_pit_time_stamp_adapter true) in config.cmake to use this component
1865
1866message("component_pit_time_stamp_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1867
1868if(CONFIG_USE_driver_common AND CONFIG_USE_driver_pit)
1869
1870target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1871  ${CMAKE_CURRENT_LIST_DIR}/../../components/time_stamp/fsl_adapter_pit_time_stamp.c
1872)
1873
1874target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1875  ${CMAKE_CURRENT_LIST_DIR}/../../components/time_stamp/.
1876)
1877
1878else()
1879
1880message(SEND_ERROR "component_pit_time_stamp_adapter.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1881
1882endif()
1883
1884endif()
1885
1886
1887if (CONFIG_USE_component_lptmr_time_stamp_adapter)
1888# Add set(CONFIG_USE_component_lptmr_time_stamp_adapter true) in config.cmake to use this component
1889
1890message("component_lptmr_time_stamp_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1891
1892if(CONFIG_USE_driver_common AND CONFIG_USE_driver_lptmr)
1893
1894target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1895  ${CMAKE_CURRENT_LIST_DIR}/../../components/time_stamp/fsl_adapter_lptmr_time_stamp.c
1896)
1897
1898target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1899  ${CMAKE_CURRENT_LIST_DIR}/../../components/time_stamp/.
1900)
1901
1902else()
1903
1904message(SEND_ERROR "component_lptmr_time_stamp_adapter.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1905
1906endif()
1907
1908endif()
1909
1910
1911if (CONFIG_USE_component_ftm_adapter)
1912# Add set(CONFIG_USE_component_ftm_adapter true) in config.cmake to use this component
1913
1914message("component_ftm_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1915
1916if(CONFIG_USE_driver_common AND CONFIG_USE_driver_ftm)
1917
1918target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1919  ${CMAKE_CURRENT_LIST_DIR}/../../components/timer/fsl_adapter_ftm.c
1920)
1921
1922target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1923  ${CMAKE_CURRENT_LIST_DIR}/../../components/timer/.
1924)
1925
1926else()
1927
1928message(SEND_ERROR "component_ftm_adapter.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1929
1930endif()
1931
1932endif()
1933
1934
1935if (CONFIG_USE_component_lptmr_adapter)
1936# Add set(CONFIG_USE_component_lptmr_adapter true) in config.cmake to use this component
1937
1938message("component_lptmr_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1939
1940if(CONFIG_USE_driver_common AND CONFIG_USE_driver_lptmr)
1941
1942target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1943  ${CMAKE_CURRENT_LIST_DIR}/../../components/timer/fsl_adapter_lptmr.c
1944)
1945
1946target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1947  ${CMAKE_CURRENT_LIST_DIR}/../../components/timer/.
1948)
1949
1950else()
1951
1952message(SEND_ERROR "component_lptmr_adapter.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1953
1954endif()
1955
1956endif()
1957
1958
1959if (CONFIG_USE_component_pit_adapter)
1960# Add set(CONFIG_USE_component_pit_adapter true) in config.cmake to use this component
1961
1962message("component_pit_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1963
1964if(CONFIG_USE_driver_common AND CONFIG_USE_driver_pit)
1965
1966target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1967  ${CMAKE_CURRENT_LIST_DIR}/../../components/timer/fsl_adapter_pit.c
1968)
1969
1970target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1971  ${CMAKE_CURRENT_LIST_DIR}/../../components/timer/.
1972)
1973
1974else()
1975
1976message(SEND_ERROR "component_pit_adapter.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1977
1978endif()
1979
1980endif()
1981
1982
1983if (CONFIG_USE_component_timer_manager)
1984# Add set(CONFIG_USE_component_timer_manager true) in config.cmake to use this component
1985
1986message("component_timer_manager component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1987
1988if(CONFIG_USE_driver_common AND CONFIG_USE_component_lists AND (CONFIG_USE_component_ftm_adapter OR CONFIG_USE_component_lptmr_adapter OR CONFIG_USE_component_pit_adapter))
1989
1990target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1991  ${CMAKE_CURRENT_LIST_DIR}/../../components/timer_manager/fsl_component_timer_manager.c
1992)
1993
1994target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1995  ${CMAKE_CURRENT_LIST_DIR}/../../components/timer_manager/.
1996)
1997
1998else()
1999
2000message(SEND_ERROR "component_timer_manager.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
2001
2002endif()
2003
2004endif()
2005
2006
2007if (CONFIG_USE_component_lpuart_adapter)
2008# Add set(CONFIG_USE_component_lpuart_adapter true) in config.cmake to use this component
2009
2010message("component_lpuart_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.")
2011
2012if(CONFIG_USE_driver_common AND CONFIG_USE_driver_lpuart)
2013
2014target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
2015  ${CMAKE_CURRENT_LIST_DIR}/../../components/uart/fsl_adapter_lpuart.c
2016)
2017
2018target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
2019  ${CMAKE_CURRENT_LIST_DIR}/../../components/uart/.
2020)
2021
2022else()
2023
2024message(SEND_ERROR "component_lpuart_adapter.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
2025
2026endif()
2027
2028endif()
2029
2030
2031if (CONFIG_USE_component_lpuart_dma_adapter)
2032# Add set(CONFIG_USE_component_lpuart_dma_adapter true) in config.cmake to use this component
2033
2034message("component_lpuart_dma_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.")
2035
2036if(CONFIG_USE_component_lpuart_adapter AND CONFIG_USE_component_timer_manager AND (CONFIG_USE_driver_lpuart_edma))
2037
2038target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
2039  ${CMAKE_CURRENT_LIST_DIR}/../../components/uart/fsl_adapter_lpuart.c
2040)
2041
2042target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
2043  ${CMAKE_CURRENT_LIST_DIR}/../../components/uart/.
2044)
2045
2046if(CONFIG_USE_COMPONENT_CONFIGURATION)
2047  message("===>Import configuration from ${CMAKE_CURRENT_LIST_FILE}")
2048
2049  target_compile_definitions(${MCUX_SDK_PROJECT_NAME} PUBLIC
2050    -DHAL_UART_DMA_ENABLE=1
2051  )
2052
2053endif()
2054
2055else()
2056
2057message(SEND_ERROR "component_lpuart_dma_adapter.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
2058
2059endif()
2060
2061endif()
2062
2063
2064if (CONFIG_USE_component_uart_adapter)
2065# Add set(CONFIG_USE_component_uart_adapter true) in config.cmake to use this component
2066
2067message("component_uart_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.")
2068
2069if(CONFIG_USE_driver_common AND CONFIG_USE_driver_uart)
2070
2071target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
2072  ${CMAKE_CURRENT_LIST_DIR}/../../components/uart/fsl_adapter_uart.c
2073)
2074
2075target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
2076  ${CMAKE_CURRENT_LIST_DIR}/../../components/uart/.
2077)
2078
2079else()
2080
2081message(SEND_ERROR "component_uart_adapter.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
2082
2083endif()
2084
2085endif()
2086
2087
2088if (CONFIG_USE_driver_wm8904)
2089# Add set(CONFIG_USE_driver_wm8904 true) in config.cmake to use this component
2090
2091message("driver_wm8904 component is included from ${CMAKE_CURRENT_LIST_FILE}.")
2092
2093if(CONFIG_USE_driver_common AND CONFIG_USE_component_codec_i2c)
2094
2095target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
2096  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/wm8904/fsl_wm8904.c
2097)
2098
2099target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
2100  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/wm8904/.
2101)
2102
2103if(CONFIG_USE_COMPONENT_CONFIGURATION)
2104  message("===>Import configuration from ${CMAKE_CURRENT_LIST_FILE}")
2105
2106  target_compile_definitions(${MCUX_SDK_PROJECT_NAME} PUBLIC
2107    -DSDK_I2C_BASED_COMPONENT_USED=1
2108    -DBOARD_USE_CODEC=1
2109    -DCODEC_WM8904_ENABLE
2110  )
2111
2112endif()
2113
2114else()
2115
2116message(SEND_ERROR "driver_wm8904.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
2117
2118endif()
2119
2120endif()
2121
2122
2123if (CONFIG_USE_driver_wm8960)
2124# Add set(CONFIG_USE_driver_wm8960 true) in config.cmake to use this component
2125
2126message("driver_wm8960 component is included from ${CMAKE_CURRENT_LIST_FILE}.")
2127
2128if(CONFIG_USE_driver_common AND CONFIG_USE_component_codec_i2c)
2129
2130target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
2131  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/wm8960/fsl_wm8960.c
2132)
2133
2134target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
2135  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/wm8960/.
2136)
2137
2138if(CONFIG_USE_COMPONENT_CONFIGURATION)
2139  message("===>Import configuration from ${CMAKE_CURRENT_LIST_FILE}")
2140
2141  target_compile_definitions(${MCUX_SDK_PROJECT_NAME} PUBLIC
2142    -DSDK_I2C_BASED_COMPONENT_USED=1
2143    -DBOARD_USE_CODEC=1
2144    -DCODEC_WM8960_ENABLE
2145  )
2146
2147endif()
2148
2149else()
2150
2151message(SEND_ERROR "driver_wm8960.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
2152
2153endif()
2154
2155endif()
2156
2157
2158if (CONFIG_USE_driver_common)
2159# Add set(CONFIG_USE_driver_common true) in config.cmake to use this component
2160
2161message("driver_common component is included from ${CMAKE_CURRENT_LIST_FILE}.")
2162
2163if(CONFIG_USE_driver_clock AND CONFIG_USE_device_MK22F51212_CMSIS)
2164
2165target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
2166  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/common/fsl_common.c
2167)
2168
2169if(CONFIG_CORE STREQUAL cm4f)
2170  target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
2171      ${CMAKE_CURRENT_LIST_DIR}/../../drivers/common/fsl_common_arm.c
2172  )
2173endif()
2174
2175target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
2176  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/common/.
2177)
2178
2179else()
2180
2181message(SEND_ERROR "driver_common.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
2182
2183endif()
2184
2185endif()
2186
2187
2188if (CONFIG_USE_driver_adc16)
2189# Add set(CONFIG_USE_driver_adc16 true) in config.cmake to use this component
2190
2191message("driver_adc16 component is included from ${CMAKE_CURRENT_LIST_FILE}.")
2192
2193if((CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12) AND CONFIG_USE_driver_common)
2194
2195target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
2196  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/adc16/fsl_adc16.c
2197)
2198
2199target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
2200  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/adc16/.
2201)
2202
2203else()
2204
2205message(SEND_ERROR "driver_adc16.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
2206
2207endif()
2208
2209endif()
2210
2211
2212if (CONFIG_USE_driver_cmp)
2213# Add set(CONFIG_USE_driver_cmp true) in config.cmake to use this component
2214
2215message("driver_cmp component is included from ${CMAKE_CURRENT_LIST_FILE}.")
2216
2217if((CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12) AND CONFIG_USE_driver_common)
2218
2219target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
2220  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/cmp/fsl_cmp.c
2221)
2222
2223target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
2224  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/cmp/.
2225)
2226
2227else()
2228
2229message(SEND_ERROR "driver_cmp.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
2230
2231endif()
2232
2233endif()
2234
2235
2236if (CONFIG_USE_driver_crc)
2237# Add set(CONFIG_USE_driver_crc true) in config.cmake to use this component
2238
2239message("driver_crc component is included from ${CMAKE_CURRENT_LIST_FILE}.")
2240
2241if((CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12) AND CONFIG_USE_driver_common)
2242
2243target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
2244  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/crc/fsl_crc.c
2245)
2246
2247target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
2248  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/crc/.
2249)
2250
2251else()
2252
2253message(SEND_ERROR "driver_crc.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
2254
2255endif()
2256
2257endif()
2258
2259
2260if (CONFIG_USE_driver_dac)
2261# Add set(CONFIG_USE_driver_dac true) in config.cmake to use this component
2262
2263message("driver_dac component is included from ${CMAKE_CURRENT_LIST_FILE}.")
2264
2265if((CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12) AND CONFIG_USE_driver_common)
2266
2267target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
2268  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/dac/fsl_dac.c
2269)
2270
2271target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
2272  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/dac/.
2273)
2274
2275else()
2276
2277message(SEND_ERROR "driver_dac.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
2278
2279endif()
2280
2281endif()
2282
2283
2284if (CONFIG_USE_driver_dmamux)
2285# Add set(CONFIG_USE_driver_dmamux true) in config.cmake to use this component
2286
2287message("driver_dmamux component is included from ${CMAKE_CURRENT_LIST_FILE}.")
2288
2289if((CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12) AND CONFIG_USE_driver_common)
2290
2291target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
2292  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/dmamux/fsl_dmamux.c
2293)
2294
2295target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
2296  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/dmamux/.
2297)
2298
2299else()
2300
2301message(SEND_ERROR "driver_dmamux.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
2302
2303endif()
2304
2305endif()
2306
2307
2308if (CONFIG_USE_driver_dspi)
2309# Add set(CONFIG_USE_driver_dspi true) in config.cmake to use this component
2310
2311message("driver_dspi component is included from ${CMAKE_CURRENT_LIST_FILE}.")
2312
2313if((CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12) AND CONFIG_USE_driver_common)
2314
2315target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
2316  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/dspi/fsl_dspi.c
2317)
2318
2319target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
2320  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/dspi/.
2321)
2322
2323else()
2324
2325message(SEND_ERROR "driver_dspi.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
2326
2327endif()
2328
2329endif()
2330
2331
2332if (CONFIG_USE_driver_dspi_freertos)
2333# Add set(CONFIG_USE_driver_dspi_freertos true) in config.cmake to use this component
2334
2335message("driver_dspi_freertos component is included from ${CMAKE_CURRENT_LIST_FILE}.")
2336
2337if(CONFIG_USE_driver_dspi AND CONFIG_USE_middleware_freertos-kernel)
2338
2339target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
2340  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/dspi/fsl_dspi_freertos.c
2341)
2342
2343target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
2344  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/dspi/.
2345)
2346
2347else()
2348
2349message(SEND_ERROR "driver_dspi_freertos.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
2350
2351endif()
2352
2353endif()
2354
2355
2356if (CONFIG_USE_driver_edma)
2357# Add set(CONFIG_USE_driver_edma true) in config.cmake to use this component
2358
2359message("driver_edma component is included from ${CMAKE_CURRENT_LIST_FILE}.")
2360
2361if((CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12) AND CONFIG_USE_driver_common AND CONFIG_USE_driver_dmamux)
2362
2363target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
2364  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/edma/fsl_edma.c
2365)
2366
2367target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
2368  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/edma/.
2369)
2370
2371else()
2372
2373message(SEND_ERROR "driver_edma.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
2374
2375endif()
2376
2377endif()
2378
2379
2380if (CONFIG_USE_driver_ewm)
2381# Add set(CONFIG_USE_driver_ewm true) in config.cmake to use this component
2382
2383message("driver_ewm component is included from ${CMAKE_CURRENT_LIST_FILE}.")
2384
2385if((CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12) AND CONFIG_USE_driver_common)
2386
2387target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
2388  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/ewm/fsl_ewm.c
2389)
2390
2391target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
2392  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/ewm/.
2393)
2394
2395else()
2396
2397message(SEND_ERROR "driver_ewm.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
2398
2399endif()
2400
2401endif()
2402
2403
2404if (CONFIG_USE_driver_flash)
2405# Add set(CONFIG_USE_driver_flash true) in config.cmake to use this component
2406
2407message("driver_flash component is included from ${CMAKE_CURRENT_LIST_FILE}.")
2408
2409if(CONFIG_USE_driver_common)
2410
2411target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
2412  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/flash/fsl_ftfx_controller.c
2413  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/flash/fsl_ftfx_flash.c
2414  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/flash/fsl_ftfx_cache.c
2415  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/flash/fsl_ftfx_flexnvm.c
2416)
2417
2418target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
2419  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/flash/.
2420)
2421
2422else()
2423
2424message(SEND_ERROR "driver_flash.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
2425
2426endif()
2427
2428endif()
2429
2430
2431if (CONFIG_USE_driver_flexbus)
2432# Add set(CONFIG_USE_driver_flexbus true) in config.cmake to use this component
2433
2434message("driver_flexbus component is included from ${CMAKE_CURRENT_LIST_FILE}.")
2435
2436if((CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12) AND CONFIG_USE_driver_common)
2437
2438target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
2439  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/flexbus/fsl_flexbus.c
2440)
2441
2442target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
2443  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/flexbus/.
2444)
2445
2446else()
2447
2448message(SEND_ERROR "driver_flexbus.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
2449
2450endif()
2451
2452endif()
2453
2454
2455if (CONFIG_USE_driver_ftm)
2456# Add set(CONFIG_USE_driver_ftm true) in config.cmake to use this component
2457
2458message("driver_ftm component is included from ${CMAKE_CURRENT_LIST_FILE}.")
2459
2460if((CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12) AND CONFIG_USE_driver_common)
2461
2462target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
2463  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/ftm/fsl_ftm.c
2464)
2465
2466target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
2467  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/ftm/.
2468)
2469
2470else()
2471
2472message(SEND_ERROR "driver_ftm.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
2473
2474endif()
2475
2476endif()
2477
2478
2479if (CONFIG_USE_driver_gpio)
2480# Add set(CONFIG_USE_driver_gpio true) in config.cmake to use this component
2481
2482message("driver_gpio component is included from ${CMAKE_CURRENT_LIST_FILE}.")
2483
2484if((CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12) AND CONFIG_USE_driver_common)
2485
2486target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
2487  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/gpio/fsl_gpio.c
2488)
2489
2490target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
2491  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/gpio/.
2492)
2493
2494else()
2495
2496message(SEND_ERROR "driver_gpio.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
2497
2498endif()
2499
2500endif()
2501
2502
2503if (CONFIG_USE_driver_i2c)
2504# Add set(CONFIG_USE_driver_i2c true) in config.cmake to use this component
2505
2506message("driver_i2c component is included from ${CMAKE_CURRENT_LIST_FILE}.")
2507
2508if((CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12) AND CONFIG_USE_driver_common)
2509
2510target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
2511  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/i2c/fsl_i2c.c
2512)
2513
2514target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
2515  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/i2c/.
2516)
2517
2518else()
2519
2520message(SEND_ERROR "driver_i2c.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
2521
2522endif()
2523
2524endif()
2525
2526
2527if (CONFIG_USE_driver_i2c_freertos)
2528# Add set(CONFIG_USE_driver_i2c_freertos true) in config.cmake to use this component
2529
2530message("driver_i2c_freertos component is included from ${CMAKE_CURRENT_LIST_FILE}.")
2531
2532if(CONFIG_USE_driver_i2c AND CONFIG_USE_middleware_freertos-kernel)
2533
2534target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
2535  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/i2c/fsl_i2c_freertos.c
2536)
2537
2538target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
2539  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/i2c/.
2540)
2541
2542else()
2543
2544message(SEND_ERROR "driver_i2c_freertos.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
2545
2546endif()
2547
2548endif()
2549
2550
2551if (CONFIG_USE_driver_llwu)
2552# Add set(CONFIG_USE_driver_llwu true) in config.cmake to use this component
2553
2554message("driver_llwu component is included from ${CMAKE_CURRENT_LIST_FILE}.")
2555
2556if((CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12) AND CONFIG_USE_driver_common)
2557
2558target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
2559  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/llwu/fsl_llwu.c
2560)
2561
2562target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
2563  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/llwu/.
2564)
2565
2566else()
2567
2568message(SEND_ERROR "driver_llwu.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
2569
2570endif()
2571
2572endif()
2573
2574
2575if (CONFIG_USE_driver_lptmr)
2576# Add set(CONFIG_USE_driver_lptmr true) in config.cmake to use this component
2577
2578message("driver_lptmr component is included from ${CMAKE_CURRENT_LIST_FILE}.")
2579
2580if((CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12) AND CONFIG_USE_driver_common)
2581
2582target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
2583  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/lptmr/fsl_lptmr.c
2584)
2585
2586target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
2587  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/lptmr/.
2588)
2589
2590else()
2591
2592message(SEND_ERROR "driver_lptmr.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
2593
2594endif()
2595
2596endif()
2597
2598
2599if (CONFIG_USE_driver_lpuart)
2600# Add set(CONFIG_USE_driver_lpuart true) in config.cmake to use this component
2601
2602message("driver_lpuart component is included from ${CMAKE_CURRENT_LIST_FILE}.")
2603
2604if((CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12) AND CONFIG_USE_driver_common)
2605
2606target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
2607  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/lpuart/fsl_lpuart.c
2608)
2609
2610target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
2611  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/lpuart/.
2612)
2613
2614else()
2615
2616message(SEND_ERROR "driver_lpuart.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
2617
2618endif()
2619
2620endif()
2621
2622
2623if (CONFIG_USE_driver_lpuart_freertos)
2624# Add set(CONFIG_USE_driver_lpuart_freertos true) in config.cmake to use this component
2625
2626message("driver_lpuart_freertos component is included from ${CMAKE_CURRENT_LIST_FILE}.")
2627
2628if(CONFIG_USE_driver_lpuart AND CONFIG_USE_middleware_freertos-kernel)
2629
2630target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
2631  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/lpuart/fsl_lpuart_freertos.c
2632)
2633
2634target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
2635  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/lpuart/.
2636)
2637
2638else()
2639
2640message(SEND_ERROR "driver_lpuart_freertos.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
2641
2642endif()
2643
2644endif()
2645
2646
2647if (CONFIG_USE_driver_pdb)
2648# Add set(CONFIG_USE_driver_pdb true) in config.cmake to use this component
2649
2650message("driver_pdb component is included from ${CMAKE_CURRENT_LIST_FILE}.")
2651
2652if((CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12) AND CONFIG_USE_driver_common)
2653
2654target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
2655  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/pdb/fsl_pdb.c
2656)
2657
2658target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
2659  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/pdb/.
2660)
2661
2662else()
2663
2664message(SEND_ERROR "driver_pdb.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
2665
2666endif()
2667
2668endif()
2669
2670
2671if (CONFIG_USE_driver_pit)
2672# Add set(CONFIG_USE_driver_pit true) in config.cmake to use this component
2673
2674message("driver_pit component is included from ${CMAKE_CURRENT_LIST_FILE}.")
2675
2676if((CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12) AND CONFIG_USE_driver_common)
2677
2678target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
2679  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/pit/fsl_pit.c
2680)
2681
2682target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
2683  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/pit/.
2684)
2685
2686else()
2687
2688message(SEND_ERROR "driver_pit.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
2689
2690endif()
2691
2692endif()
2693
2694
2695if (CONFIG_USE_driver_pmc)
2696# Add set(CONFIG_USE_driver_pmc true) in config.cmake to use this component
2697
2698message("driver_pmc component is included from ${CMAKE_CURRENT_LIST_FILE}.")
2699
2700if((CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12) AND CONFIG_USE_driver_common)
2701
2702target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
2703  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/pmc/fsl_pmc.c
2704)
2705
2706target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
2707  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/pmc/.
2708)
2709
2710else()
2711
2712message(SEND_ERROR "driver_pmc.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
2713
2714endif()
2715
2716endif()
2717
2718
2719if (CONFIG_USE_driver_port)
2720# Add set(CONFIG_USE_driver_port true) in config.cmake to use this component
2721
2722message("driver_port component is included from ${CMAKE_CURRENT_LIST_FILE}.")
2723
2724if((CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12) AND CONFIG_USE_driver_common)
2725
2726target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
2727  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/port/.
2728)
2729
2730else()
2731
2732message(SEND_ERROR "driver_port.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
2733
2734endif()
2735
2736endif()
2737
2738
2739if (CONFIG_USE_driver_rcm)
2740# Add set(CONFIG_USE_driver_rcm true) in config.cmake to use this component
2741
2742message("driver_rcm component is included from ${CMAKE_CURRENT_LIST_FILE}.")
2743
2744if((CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12) AND CONFIG_USE_driver_common)
2745
2746target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
2747  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/rcm/fsl_rcm.c
2748)
2749
2750target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
2751  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/rcm/.
2752)
2753
2754else()
2755
2756message(SEND_ERROR "driver_rcm.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
2757
2758endif()
2759
2760endif()
2761
2762
2763if (CONFIG_USE_driver_rnga)
2764# Add set(CONFIG_USE_driver_rnga true) in config.cmake to use this component
2765
2766message("driver_rnga component is included from ${CMAKE_CURRENT_LIST_FILE}.")
2767
2768if((CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12) AND CONFIG_USE_driver_common)
2769
2770target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
2771  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/rnga/fsl_rnga.c
2772)
2773
2774target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
2775  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/rnga/.
2776)
2777
2778else()
2779
2780message(SEND_ERROR "driver_rnga.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
2781
2782endif()
2783
2784endif()
2785
2786
2787if (CONFIG_USE_driver_rtc)
2788# Add set(CONFIG_USE_driver_rtc true) in config.cmake to use this component
2789
2790message("driver_rtc component is included from ${CMAKE_CURRENT_LIST_FILE}.")
2791
2792if((CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12) AND CONFIG_USE_driver_common)
2793
2794target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
2795  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/rtc/fsl_rtc.c
2796)
2797
2798target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
2799  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/rtc/.
2800)
2801
2802else()
2803
2804message(SEND_ERROR "driver_rtc.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
2805
2806endif()
2807
2808endif()
2809
2810
2811if (CONFIG_USE_driver_sai)
2812# Add set(CONFIG_USE_driver_sai true) in config.cmake to use this component
2813
2814message("driver_sai component is included from ${CMAKE_CURRENT_LIST_FILE}.")
2815
2816if((CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12) AND CONFIG_USE_driver_common)
2817
2818target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
2819  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/sai/fsl_sai.c
2820)
2821
2822target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
2823  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/sai/.
2824)
2825
2826else()
2827
2828message(SEND_ERROR "driver_sai.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
2829
2830endif()
2831
2832endif()
2833
2834
2835if (CONFIG_USE_driver_sim)
2836# Add set(CONFIG_USE_driver_sim true) in config.cmake to use this component
2837
2838message("driver_sim component is included from ${CMAKE_CURRENT_LIST_FILE}.")
2839
2840if((CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12) AND CONFIG_USE_driver_common)
2841
2842target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
2843  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/sim/fsl_sim.c
2844)
2845
2846target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
2847  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/sim/.
2848)
2849
2850else()
2851
2852message(SEND_ERROR "driver_sim.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
2853
2854endif()
2855
2856endif()
2857
2858
2859if (CONFIG_USE_driver_smc)
2860# Add set(CONFIG_USE_driver_smc true) in config.cmake to use this component
2861
2862message("driver_smc component is included from ${CMAKE_CURRENT_LIST_FILE}.")
2863
2864if((CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12) AND CONFIG_USE_driver_common)
2865
2866target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
2867  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/smc/fsl_smc.c
2868)
2869
2870target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
2871  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/smc/.
2872)
2873
2874else()
2875
2876message(SEND_ERROR "driver_smc.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
2877
2878endif()
2879
2880endif()
2881
2882
2883if (CONFIG_USE_driver_uart)
2884# Add set(CONFIG_USE_driver_uart true) in config.cmake to use this component
2885
2886message("driver_uart component is included from ${CMAKE_CURRENT_LIST_FILE}.")
2887
2888if(CONFIG_USE_driver_common AND (CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12))
2889
2890target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
2891  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/uart/fsl_uart.c
2892)
2893
2894target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
2895  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/uart/.
2896)
2897
2898else()
2899
2900message(SEND_ERROR "driver_uart.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
2901
2902endif()
2903
2904endif()
2905
2906
2907if (CONFIG_USE_driver_uart_freertos)
2908# Add set(CONFIG_USE_driver_uart_freertos true) in config.cmake to use this component
2909
2910message("driver_uart_freertos component is included from ${CMAKE_CURRENT_LIST_FILE}.")
2911
2912if(CONFIG_USE_driver_uart AND CONFIG_USE_middleware_freertos-kernel)
2913
2914target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
2915  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/uart/fsl_uart_freertos.c
2916)
2917
2918target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
2919  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/uart/.
2920)
2921
2922else()
2923
2924message(SEND_ERROR "driver_uart_freertos.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
2925
2926endif()
2927
2928endif()
2929
2930
2931if (CONFIG_USE_driver_vref)
2932# Add set(CONFIG_USE_driver_vref true) in config.cmake to use this component
2933
2934message("driver_vref component is included from ${CMAKE_CURRENT_LIST_FILE}.")
2935
2936if((CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12) AND CONFIG_USE_driver_common)
2937
2938target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
2939  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/vref/fsl_vref.c
2940)
2941
2942target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
2943  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/vref/.
2944)
2945
2946else()
2947
2948message(SEND_ERROR "driver_vref.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
2949
2950endif()
2951
2952endif()
2953
2954
2955if (CONFIG_USE_driver_wdog)
2956# Add set(CONFIG_USE_driver_wdog true) in config.cmake to use this component
2957
2958message("driver_wdog component is included from ${CMAKE_CURRENT_LIST_FILE}.")
2959
2960if((CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12) AND CONFIG_USE_driver_common)
2961
2962target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
2963  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/wdog/fsl_wdog.c
2964)
2965
2966target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
2967  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/wdog/.
2968)
2969
2970else()
2971
2972message(SEND_ERROR "driver_wdog.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
2973
2974endif()
2975
2976endif()
2977
2978
2979if (CONFIG_USE_driver_dbi)
2980# Add set(CONFIG_USE_driver_dbi true) in config.cmake to use this component
2981
2982message("driver_dbi component is included from ${CMAKE_CURRENT_LIST_FILE}.")
2983
2984if(CONFIG_USE_driver_common)
2985
2986target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
2987  ${CMAKE_CURRENT_LIST_DIR}/../../components/video/display/dbi/.
2988)
2989
2990else()
2991
2992message(SEND_ERROR "driver_dbi.MK22F51212 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
2993
2994endif()
2995
2996endif()
2997
2998