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_phy-common)
45# Add set(CONFIG_USE_driver_phy-common true) in config.cmake to use this component
46
47message("driver_phy-common component is included from ${CMAKE_CURRENT_LIST_FILE}.")
48
49target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
50  ${CMAKE_CURRENT_LIST_DIR}/../../components/phy/.
51)
52
53
54endif()
55
56
57if (CONFIG_USE_driver_srtm)
58# Add set(CONFIG_USE_driver_srtm true) in config.cmake to use this component
59
60message("driver_srtm component is included from ${CMAKE_CURRENT_LIST_FILE}.")
61
62target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
63  ${CMAKE_CURRENT_LIST_DIR}/../../components/srtm/srtm/srtm_channel.c
64  ${CMAKE_CURRENT_LIST_DIR}/../../components/srtm/srtm/srtm_dispatcher.c
65  ${CMAKE_CURRENT_LIST_DIR}/../../components/srtm/srtm/srtm_message.c
66  ${CMAKE_CURRENT_LIST_DIR}/../../components/srtm/srtm/srtm_peercore.c
67  ${CMAKE_CURRENT_LIST_DIR}/../../components/srtm/srtm/srtm_service.c
68  ${CMAKE_CURRENT_LIST_DIR}/../../components/srtm/port/srtm_message_pool.c
69)
70
71target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
72  ${CMAKE_CURRENT_LIST_DIR}/../../components/srtm/include
73  ${CMAKE_CURRENT_LIST_DIR}/../../components/srtm/srtm
74  ${CMAKE_CURRENT_LIST_DIR}/../../components/srtm/port
75)
76
77
78endif()
79
80
81if (CONFIG_USE_DEVICES_Project_Template_MIMX8MM6)
82# Add set(CONFIG_USE_DEVICES_Project_Template_MIMX8MM6 true) in config.cmake to use this component
83
84message("DEVICES_Project_Template_MIMX8MM6 component is included from ${CMAKE_CURRENT_LIST_FILE}.")
85
86if((CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxLZ OR CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxKZ) AND CONFIG_USE_device_MIMX8MM6_CMSIS AND CONFIG_USE_device_MIMX8MM6_startup AND CONFIG_USE_driver_clock AND CONFIG_USE_driver_common AND CONFIG_USE_driver_iuart AND CONFIG_USE_driver_rdc AND ((CONFIG_USE_utility_assert AND CONFIG_USE_utility_debug_console) OR (CONFIG_USE_utility_assert_lite AND CONFIG_USE_utility_debug_console_lite)))
87
88add_config_file(${CMAKE_CURRENT_LIST_DIR}/project_template/board.h "" DEVICES_Project_Template_MIMX8MM6.MIMX8MM6)
89add_config_file(${CMAKE_CURRENT_LIST_DIR}/project_template/board.c "" DEVICES_Project_Template_MIMX8MM6.MIMX8MM6)
90add_config_file(${CMAKE_CURRENT_LIST_DIR}/project_template/clock_config.h "" DEVICES_Project_Template_MIMX8MM6.MIMX8MM6)
91add_config_file(${CMAKE_CURRENT_LIST_DIR}/project_template/clock_config.c "" DEVICES_Project_Template_MIMX8MM6.MIMX8MM6)
92add_config_file(${CMAKE_CURRENT_LIST_DIR}/project_template/pin_mux.h "" DEVICES_Project_Template_MIMX8MM6.MIMX8MM6)
93add_config_file(${CMAKE_CURRENT_LIST_DIR}/project_template/pin_mux.c "" DEVICES_Project_Template_MIMX8MM6.MIMX8MM6)
94add_config_file(${CMAKE_CURRENT_LIST_DIR}/project_template/peripherals.h "" DEVICES_Project_Template_MIMX8MM6.MIMX8MM6)
95add_config_file(${CMAKE_CURRENT_LIST_DIR}/project_template/peripherals.c "" DEVICES_Project_Template_MIMX8MM6.MIMX8MM6)
96
97target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
98  ${CMAKE_CURRENT_LIST_DIR}/project_template/.
99)
100
101else()
102
103message(SEND_ERROR "DEVICES_Project_Template_MIMX8MM6.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
104
105endif()
106
107endif()
108
109
110if (CONFIG_USE_device_MIMX8MM6_CMSIS)
111# Add set(CONFIG_USE_device_MIMX8MM6_CMSIS true) in config.cmake to use this component
112
113message("device_MIMX8MM6_CMSIS component is included from ${CMAKE_CURRENT_LIST_FILE}.")
114
115if(CONFIG_USE_CMSIS_Include_core_cm AND (CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxLZ OR CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxKZ))
116
117target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
118  ${CMAKE_CURRENT_LIST_DIR}/./.
119)
120
121else()
122
123message(SEND_ERROR "device_MIMX8MM6_CMSIS.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
124
125endif()
126
127endif()
128
129
130if (CONFIG_USE_RTE_Device)
131# Add set(CONFIG_USE_RTE_Device true) in config.cmake to use this component
132
133message("RTE_Device component is included from ${CMAKE_CURRENT_LIST_FILE}.")
134
135if((CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxLZ OR CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxKZ))
136
137add_config_file(${CMAKE_CURRENT_LIST_DIR}/template/RTE_Device.h "" RTE_Device.MIMX8MM6)
138
139target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
140  ${CMAKE_CURRENT_LIST_DIR}/template/.
141)
142
143else()
144
145message(SEND_ERROR "RTE_Device.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
146
147endif()
148
149endif()
150
151
152if (CONFIG_USE_driver_clock)
153# Add set(CONFIG_USE_driver_clock true) in config.cmake to use this component
154
155message("driver_clock component is included from ${CMAKE_CURRENT_LIST_FILE}.")
156
157if(CONFIG_USE_driver_common)
158
159target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
160  ${CMAKE_CURRENT_LIST_DIR}/drivers/fsl_clock.c
161)
162
163target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
164  ${CMAKE_CURRENT_LIST_DIR}/drivers/.
165)
166
167else()
168
169message(SEND_ERROR "driver_clock.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
170
171endif()
172
173endif()
174
175
176if (CONFIG_USE_driver_enet)
177# Add set(CONFIG_USE_driver_enet true) in config.cmake to use this component
178
179message("driver_enet component is included from ${CMAKE_CURRENT_LIST_FILE}.")
180
181if(CONFIG_USE_driver_memory AND (CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxLZ OR CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxKZ) AND CONFIG_USE_driver_common)
182
183target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
184  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/enet/fsl_enet.c
185)
186
187target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
188  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/enet/.
189)
190
191else()
192
193message(SEND_ERROR "driver_enet.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
194
195endif()
196
197endif()
198
199
200if (CONFIG_USE_driver_sdma)
201# Add set(CONFIG_USE_driver_sdma true) in config.cmake to use this component
202
203message("driver_sdma component is included from ${CMAKE_CURRENT_LIST_FILE}.")
204
205if(CONFIG_USE_driver_memory AND (CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxLZ OR CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxKZ) AND CONFIG_USE_driver_common)
206
207target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
208  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/sdma/fsl_sdma.c
209)
210
211target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
212  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/sdma/.
213)
214
215else()
216
217message(SEND_ERROR "driver_sdma.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
218
219endif()
220
221endif()
222
223
224if (CONFIG_USE_component_serial_manager_uart)
225# Add set(CONFIG_USE_component_serial_manager_uart true) in config.cmake to use this component
226
227message("component_serial_manager_uart component is included from ${CMAKE_CURRENT_LIST_FILE}.")
228
229if(CONFIG_USE_component_iuart_adapter AND CONFIG_USE_component_serial_manager AND (CONFIG_USE_driver_iuart))
230
231target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
232  ${CMAKE_CURRENT_LIST_DIR}/../../components/serial_manager/fsl_component_serial_port_uart.c
233)
234
235target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
236  ${CMAKE_CURRENT_LIST_DIR}/../../components/serial_manager/.
237)
238
239if(CONFIG_USE_COMPONENT_CONFIGURATION)
240  message("===>Import configuration from ${CMAKE_CURRENT_LIST_FILE}")
241
242  target_compile_definitions(${MCUX_SDK_PROJECT_NAME} PUBLIC
243    -DSERIAL_PORT_TYPE_UART=1
244  )
245
246endif()
247
248else()
249
250message(SEND_ERROR "component_serial_manager_uart.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
251
252endif()
253
254endif()
255
256
257if (CONFIG_USE_utility_debug_console_lite)
258# Add set(CONFIG_USE_utility_debug_console_lite true) in config.cmake to use this component
259
260message("utility_debug_console_lite component is included from ${CMAKE_CURRENT_LIST_FILE}.")
261
262if(CONFIG_USE_component_iuart_adapter AND (CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxLZ OR CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxKZ) AND CONFIG_USE_driver_common)
263
264target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
265  ${CMAKE_CURRENT_LIST_DIR}/../../utilities/str/fsl_str.c
266  ${CMAKE_CURRENT_LIST_DIR}/../../utilities/debug_console_lite/fsl_debug_console.c
267)
268
269target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
270  ${CMAKE_CURRENT_LIST_DIR}/../../utilities/str
271  ${CMAKE_CURRENT_LIST_DIR}/../../utilities/debug_console_lite
272)
273
274else()
275
276message(SEND_ERROR "utility_debug_console_lite.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
277
278endif()
279
280endif()
281
282
283if (CONFIG_USE_driver_ecspi_sdma)
284# Add set(CONFIG_USE_driver_ecspi_sdma true) in config.cmake to use this component
285
286message("driver_ecspi_sdma component is included from ${CMAKE_CURRENT_LIST_FILE}.")
287
288if(CONFIG_USE_driver_sdma AND CONFIG_USE_driver_ecspi)
289
290target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
291  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/ecspi/fsl_ecspi_sdma.c
292)
293
294target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
295  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/ecspi/.
296)
297
298else()
299
300message(SEND_ERROR "driver_ecspi_sdma.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
301
302endif()
303
304endif()
305
306
307if (CONFIG_USE_driver_iuart_sdma)
308# Add set(CONFIG_USE_driver_iuart_sdma true) in config.cmake to use this component
309
310message("driver_iuart_sdma component is included from ${CMAKE_CURRENT_LIST_FILE}.")
311
312if(CONFIG_USE_driver_sdma AND CONFIG_USE_driver_iuart)
313
314target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
315  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/iuart/fsl_uart_sdma.c
316)
317
318target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
319  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/iuart/.
320)
321
322else()
323
324message(SEND_ERROR "driver_iuart_sdma.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
325
326endif()
327
328endif()
329
330
331if (CONFIG_USE_driver_sai_sdma)
332# Add set(CONFIG_USE_driver_sai_sdma true) in config.cmake to use this component
333
334message("driver_sai_sdma component is included from ${CMAKE_CURRENT_LIST_FILE}.")
335
336if(CONFIG_USE_driver_sdma AND CONFIG_USE_driver_sai)
337
338target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
339  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/sai/fsl_sai_sdma.c
340)
341
342target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
343  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/sai/.
344)
345
346else()
347
348message(SEND_ERROR "driver_sai_sdma.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
349
350endif()
351
352endif()
353
354
355if (CONFIG_USE_driver_iomuxc)
356# Add set(CONFIG_USE_driver_iomuxc true) in config.cmake to use this component
357
358message("driver_iomuxc component is included from ${CMAKE_CURRENT_LIST_FILE}.")
359
360if(CONFIG_USE_driver_common AND (CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxLZ OR CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxKZ))
361
362target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
363  ${CMAKE_CURRENT_LIST_DIR}/drivers/.
364)
365
366else()
367
368message(SEND_ERROR "driver_iomuxc.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
369
370endif()
371
372endif()
373
374
375if (CONFIG_USE_driver_memory)
376# Add set(CONFIG_USE_driver_memory true) in config.cmake to use this component
377
378message("driver_memory component is included from ${CMAKE_CURRENT_LIST_FILE}.")
379
380if(CONFIG_USE_driver_common AND (CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxLZ OR CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxKZ))
381
382target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
383  ${CMAKE_CURRENT_LIST_DIR}/drivers/.
384)
385
386else()
387
388message(SEND_ERROR "driver_memory.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
389
390endif()
391
392endif()
393
394
395if (CONFIG_USE_device_MIMX8MM6_system)
396# Add set(CONFIG_USE_device_MIMX8MM6_system true) in config.cmake to use this component
397
398message("device_MIMX8MM6_system component is included from ${CMAKE_CURRENT_LIST_FILE}.")
399
400if(CONFIG_USE_device_MIMX8MM6_CMSIS)
401
402target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
403  ${CMAKE_CURRENT_LIST_DIR}/./system_MIMX8MM6_cm4.c
404)
405
406target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
407  ${CMAKE_CURRENT_LIST_DIR}/./.
408)
409
410else()
411
412message(SEND_ERROR "device_MIMX8MM6_system.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
413
414endif()
415
416endif()
417
418
419if (CONFIG_USE_device_MIMX8MM6_startup)
420# Add set(CONFIG_USE_device_MIMX8MM6_startup true) in config.cmake to use this component
421
422message("device_MIMX8MM6_startup component is included from ${CMAKE_CURRENT_LIST_FILE}.")
423
424if(CONFIG_USE_device_MIMX8MM6_system)
425
426if(CONFIG_TOOLCHAIN STREQUAL armgcc)
427  target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
428      ${CMAKE_CURRENT_LIST_DIR}/./gcc/startup_MIMX8MM6_cm4.S
429  )
430endif()
431
432if(CONFIG_TOOLCHAIN STREQUAL mcux)
433  target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
434      ${CMAKE_CURRENT_LIST_DIR}/./mcuxpresso/startup_MIMX8MM6_cm4.c
435      ${CMAKE_CURRENT_LIST_DIR}/./mcuxpresso/startup_MIMX8MM6_cm4.cpp
436  )
437endif()
438
439else()
440
441message(SEND_ERROR "device_MIMX8MM6_startup.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
442
443endif()
444
445endif()
446
447
448if (CONFIG_USE_utility_assert)
449# Add set(CONFIG_USE_utility_assert true) in config.cmake to use this component
450
451message("utility_assert component is included from ${CMAKE_CURRENT_LIST_FILE}.")
452
453if(CONFIG_USE_utility_debug_console)
454
455target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
456  ${CMAKE_CURRENT_LIST_DIR}/../../utilities/assert/fsl_assert.c
457)
458
459else()
460
461message(SEND_ERROR "utility_assert.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
462
463endif()
464
465endif()
466
467
468if (CONFIG_USE_utility_assert_lite)
469# Add set(CONFIG_USE_utility_assert_lite true) in config.cmake to use this component
470
471message("utility_assert_lite component is included from ${CMAKE_CURRENT_LIST_FILE}.")
472
473if(CONFIG_USE_utility_debug_console_lite)
474
475target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
476  ${CMAKE_CURRENT_LIST_DIR}/../../utilities/assert/fsl_assert.c
477)
478
479else()
480
481message(SEND_ERROR "utility_assert_lite.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
482
483endif()
484
485endif()
486
487
488if (CONFIG_USE_utility_str)
489# Add set(CONFIG_USE_utility_str true) in config.cmake to use this component
490
491message("utility_str component is included from ${CMAKE_CURRENT_LIST_FILE}.")
492
493if(CONFIG_USE_driver_common)
494
495target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
496  ${CMAKE_CURRENT_LIST_DIR}/../../utilities/str/fsl_str.c
497)
498
499target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
500  ${CMAKE_CURRENT_LIST_DIR}/../../utilities/str
501)
502
503else()
504
505message(SEND_ERROR "utility_str.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
506
507endif()
508
509endif()
510
511
512if (CONFIG_USE_utility_debug_console)
513# Add set(CONFIG_USE_utility_debug_console true) in config.cmake to use this component
514
515message("utility_debug_console component is included from ${CMAKE_CURRENT_LIST_FILE}.")
516
517if(CONFIG_USE_component_serial_manager AND CONFIG_USE_driver_common)
518
519target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
520  ${CMAKE_CURRENT_LIST_DIR}/../../utilities/str/fsl_str.c
521  ${CMAKE_CURRENT_LIST_DIR}/../../utilities/debug_console/fsl_debug_console.c
522)
523
524target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
525  ${CMAKE_CURRENT_LIST_DIR}/../../utilities/str
526  ${CMAKE_CURRENT_LIST_DIR}/../../utilities/debug_console
527)
528
529else()
530
531message(SEND_ERROR "utility_debug_console.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
532
533endif()
534
535endif()
536
537
538if (CONFIG_USE_driver_cmsis_ecspi)
539# Add set(CONFIG_USE_driver_cmsis_ecspi true) in config.cmake to use this component
540
541message("driver_cmsis_ecspi component is included from ${CMAKE_CURRENT_LIST_FILE}.")
542
543if((CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxLZ OR CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxKZ) AND CONFIG_USE_driver_ecspi AND CONFIG_USE_CMSIS_Driver_Include_SPI AND CONFIG_USE_RTE_Device)
544
545target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
546  ${CMAKE_CURRENT_LIST_DIR}/../../cmsis_drivers/ecspi/fsl_ecspi_cmsis.c
547)
548
549target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
550  ${CMAKE_CURRENT_LIST_DIR}/../../cmsis_drivers/ecspi/.
551)
552
553else()
554
555message(SEND_ERROR "driver_cmsis_ecspi.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
556
557endif()
558
559endif()
560
561
562if (CONFIG_USE_driver_cmsis_enet)
563# Add set(CONFIG_USE_driver_cmsis_enet true) in config.cmake to use this component
564
565message("driver_cmsis_enet component is included from ${CMAKE_CURRENT_LIST_FILE}.")
566
567if((CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxLZ OR CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxKZ) AND CONFIG_USE_driver_enet AND CONFIG_USE_CMSIS_Driver_Include_Ethernet_MAC AND CONFIG_USE_CMSIS_Driver_Include_Ethernet_PHY AND CONFIG_USE_CMSIS_Driver_Include_Ethernet AND CONFIG_USE_RTE_Device AND CONFIG_USE_driver_phy-common)
568
569target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
570  ${CMAKE_CURRENT_LIST_DIR}/../../cmsis_drivers/enet/fsl_enet_cmsis.c
571  ${CMAKE_CURRENT_LIST_DIR}/../../cmsis_drivers/enet/fsl_enet_phy_cmsis.c
572)
573
574target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
575  ${CMAKE_CURRENT_LIST_DIR}/../../cmsis_drivers/enet/.
576)
577
578else()
579
580message(SEND_ERROR "driver_cmsis_enet.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
581
582endif()
583
584endif()
585
586
587if (CONFIG_USE_driver_cmsis_ii2c)
588# Add set(CONFIG_USE_driver_cmsis_ii2c true) in config.cmake to use this component
589
590message("driver_cmsis_ii2c component is included from ${CMAKE_CURRENT_LIST_FILE}.")
591
592if((CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxLZ OR CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxKZ) AND CONFIG_USE_driver_ii2c AND CONFIG_USE_CMSIS_Driver_Include_I2C AND CONFIG_USE_RTE_Device)
593
594target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
595  ${CMAKE_CURRENT_LIST_DIR}/../../cmsis_drivers/ii2c/fsl_i2c_cmsis.c
596)
597
598target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
599  ${CMAKE_CURRENT_LIST_DIR}/../../cmsis_drivers/ii2c/.
600)
601
602else()
603
604message(SEND_ERROR "driver_cmsis_ii2c.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
605
606endif()
607
608endif()
609
610
611if (CONFIG_USE_driver_cmsis_iuart)
612# Add set(CONFIG_USE_driver_cmsis_iuart true) in config.cmake to use this component
613
614message("driver_cmsis_iuart component is included from ${CMAKE_CURRENT_LIST_FILE}.")
615
616if((CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxLZ OR CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxKZ) AND CONFIG_USE_driver_iuart AND CONFIG_USE_CMSIS_Driver_Include_USART AND CONFIG_USE_RTE_Device)
617
618target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
619  ${CMAKE_CURRENT_LIST_DIR}/../../cmsis_drivers/iuart/fsl_uart_cmsis.c
620)
621
622target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
623  ${CMAKE_CURRENT_LIST_DIR}/../../cmsis_drivers/iuart/.
624)
625
626else()
627
628message(SEND_ERROR "driver_cmsis_iuart.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
629
630endif()
631
632endif()
633
634
635if (CONFIG_USE_driver_ak4497)
636# Add set(CONFIG_USE_driver_ak4497 true) in config.cmake to use this component
637
638message("driver_ak4497 component is included from ${CMAKE_CURRENT_LIST_FILE}.")
639
640if(CONFIG_USE_driver_common AND CONFIG_USE_component_codec_i2c)
641
642target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
643  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/ak4497/fsl_ak4497.c
644)
645
646target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
647  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/ak4497/.
648)
649
650if(CONFIG_USE_COMPONENT_CONFIGURATION)
651  message("===>Import configuration from ${CMAKE_CURRENT_LIST_FILE}")
652
653  target_compile_definitions(${MCUX_SDK_PROJECT_NAME} PUBLIC
654    -DCODEC_AK4497_ENABLE
655  )
656
657endif()
658
659else()
660
661message(SEND_ERROR "driver_ak4497.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
662
663endif()
664
665endif()
666
667
668if (CONFIG_USE_driver_codec)
669# Add set(CONFIG_USE_driver_codec true) in config.cmake to use this component
670
671message("driver_codec component is included from ${CMAKE_CURRENT_LIST_FILE}.")
672
673if(CONFIG_USE_driver_common AND (CONFIG_USE_component_wm8524_adapter OR CONFIG_USE_component_ak4497_adapter OR CONFIG_USE_component_codec_adapters))
674
675target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
676  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/fsl_codec_common.c
677)
678
679target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
680  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/.
681)
682
683if(CONFIG_USE_COMPONENT_CONFIGURATION)
684  message("===>Import configuration from ${CMAKE_CURRENT_LIST_FILE}")
685
686  target_compile_definitions(${MCUX_SDK_PROJECT_NAME} PUBLIC
687    -DSDK_I2C_BASED_COMPONENT_USED=1
688  )
689
690endif()
691
692else()
693
694message(SEND_ERROR "driver_codec.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
695
696endif()
697
698endif()
699
700
701if (CONFIG_USE_component_codec_adapters)
702# Add set(CONFIG_USE_component_codec_adapters true) in config.cmake to use this component
703
704message("component_codec_adapters component is included from ${CMAKE_CURRENT_LIST_FILE}.")
705
706if((CONFIG_USE_driver_codec AND CONFIG_USE_component_wm8524_adapter) OR (CONFIG_USE_driver_codec AND CONFIG_USE_component_ak4497_adapter))
707
708target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
709  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/port/fsl_codec_adapter.c
710)
711
712target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
713  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/port
714)
715
716if(CONFIG_USE_COMPONENT_CONFIGURATION)
717  message("===>Import configuration from ${CMAKE_CURRENT_LIST_FILE}")
718
719  target_compile_definitions(${MCUX_SDK_PROJECT_NAME} PUBLIC
720    -DCODEC_MULTI_ADAPTERS=1
721  )
722
723endif()
724
725else()
726
727message(SEND_ERROR "component_codec_adapters.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
728
729endif()
730
731endif()
732
733
734if (CONFIG_USE_component_wm8524_adapter)
735# Add set(CONFIG_USE_component_wm8524_adapter true) in config.cmake to use this component
736
737message("component_wm8524_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.")
738
739if(CONFIG_USE_driver_wm8524 AND CONFIG_USE_driver_codec)
740
741target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
742  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/port/wm8524/fsl_codec_wm8524_adapter.c
743)
744
745target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
746  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/port/wm8524
747  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/port
748)
749
750else()
751
752message(SEND_ERROR "component_wm8524_adapter.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
753
754endif()
755
756endif()
757
758
759if (CONFIG_USE_component_ak4497_adapter)
760# Add set(CONFIG_USE_component_ak4497_adapter true) in config.cmake to use this component
761
762message("component_ak4497_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.")
763
764if(CONFIG_USE_driver_ak4497 AND CONFIG_USE_driver_codec)
765
766target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
767  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/port/ak4497/fsl_codec_ak4497_adapter.c
768)
769
770target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
771  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/port/ak4497
772  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/port
773)
774
775else()
776
777message(SEND_ERROR "component_ak4497_adapter.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
778
779endif()
780
781endif()
782
783
784if (CONFIG_USE_component_codec_i2c)
785# Add set(CONFIG_USE_component_codec_i2c true) in config.cmake to use this component
786
787message("component_codec_i2c component is included from ${CMAKE_CURRENT_LIST_FILE}.")
788
789if(CONFIG_USE_driver_common AND (CONFIG_USE_component_ii2c_adapter))
790
791target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
792  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/i2c/fsl_codec_i2c.c
793)
794
795target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
796  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/i2c/.
797)
798
799if(CONFIG_USE_COMPONENT_CONFIGURATION)
800  message("===>Import configuration from ${CMAKE_CURRENT_LIST_FILE}")
801
802  target_compile_definitions(${MCUX_SDK_PROJECT_NAME} PUBLIC
803    -DSDK_I2C_BASED_COMPONENT_USED=1
804  )
805
806endif()
807
808else()
809
810message(SEND_ERROR "component_codec_i2c.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
811
812endif()
813
814endif()
815
816
817if (CONFIG_USE_component_ii2c_adapter)
818# Add set(CONFIG_USE_component_ii2c_adapter true) in config.cmake to use this component
819
820message("component_ii2c_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.")
821
822if(CONFIG_USE_driver_common AND CONFIG_USE_driver_ii2c)
823
824target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
825  ${CMAKE_CURRENT_LIST_DIR}/../../components/i2c/fsl_adapter_ii2c.c
826)
827
828target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
829  ${CMAKE_CURRENT_LIST_DIR}/../../components/i2c/.
830)
831
832else()
833
834message(SEND_ERROR "component_ii2c_adapter.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
835
836endif()
837
838endif()
839
840
841if (CONFIG_USE_component_lists)
842# Add set(CONFIG_USE_component_lists true) in config.cmake to use this component
843
844message("component_lists component is included from ${CMAKE_CURRENT_LIST_FILE}.")
845
846if(CONFIG_USE_driver_common)
847
848target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
849  ${CMAKE_CURRENT_LIST_DIR}/../../components/lists/fsl_component_generic_list.c
850)
851
852target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
853  ${CMAKE_CURRENT_LIST_DIR}/../../components/lists/.
854)
855
856else()
857
858message(SEND_ERROR "component_lists.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
859
860endif()
861
862endif()
863
864
865if (CONFIG_USE_driver_phy-device-rtl8211f)
866# Add set(CONFIG_USE_driver_phy-device-rtl8211f true) in config.cmake to use this component
867
868message("driver_phy-device-rtl8211f component is included from ${CMAKE_CURRENT_LIST_FILE}.")
869
870if(CONFIG_USE_driver_phy-common)
871
872target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
873  ${CMAKE_CURRENT_LIST_DIR}/../../components/phy/device/phyrtl8211f/fsl_phyrtl8211f.c
874)
875
876target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
877  ${CMAKE_CURRENT_LIST_DIR}/../../components/phy/device/phyrtl8211f/.
878)
879
880else()
881
882message(SEND_ERROR "driver_phy-device-rtl8211f.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
883
884endif()
885
886endif()
887
888
889if (CONFIG_USE_driver_phy-device-ar8031)
890# Add set(CONFIG_USE_driver_phy-device-ar8031 true) in config.cmake to use this component
891
892message("driver_phy-device-ar8031 component is included from ${CMAKE_CURRENT_LIST_FILE}.")
893
894if(CONFIG_USE_driver_phy-common)
895
896target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
897  ${CMAKE_CURRENT_LIST_DIR}/../../components/phy/device/phyar8031/fsl_phyar8031.c
898)
899
900target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
901  ${CMAKE_CURRENT_LIST_DIR}/../../components/phy/device/phyar8031/.
902)
903
904else()
905
906message(SEND_ERROR "driver_phy-device-ar8031.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
907
908endif()
909
910endif()
911
912
913if (CONFIG_USE_component_serial_manager)
914# Add set(CONFIG_USE_component_serial_manager true) in config.cmake to use this component
915
916message("component_serial_manager component is included from ${CMAKE_CURRENT_LIST_FILE}.")
917
918if(CONFIG_USE_driver_common AND CONFIG_USE_component_lists AND (CONFIG_USE_component_serial_manager_uart OR CONFIG_USE_component_serial_manager_virtual OR CONFIG_USE_component_serial_manager_swo))
919
920target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
921  ${CMAKE_CURRENT_LIST_DIR}/../../components/serial_manager/fsl_component_serial_manager.c
922)
923
924target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
925  ${CMAKE_CURRENT_LIST_DIR}/../../components/serial_manager/.
926)
927
928else()
929
930message(SEND_ERROR "component_serial_manager.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
931
932endif()
933
934endif()
935
936
937if (CONFIG_USE_component_serial_manager_virtual)
938# Add set(CONFIG_USE_component_serial_manager_virtual true) in config.cmake to use this component
939
940message("component_serial_manager_virtual component is included from ${CMAKE_CURRENT_LIST_FILE}.")
941
942if(CONFIG_USE_component_serial_manager AND CONFIG_USE_driver_common)
943
944target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
945  ${CMAKE_CURRENT_LIST_DIR}/../../components/serial_manager/fsl_component_serial_port_virtual.c
946)
947
948target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
949  ${CMAKE_CURRENT_LIST_DIR}/../../components/serial_manager/.
950)
951
952if(CONFIG_USE_COMPONENT_CONFIGURATION)
953  message("===>Import configuration from ${CMAKE_CURRENT_LIST_FILE}")
954
955  target_compile_definitions(${MCUX_SDK_PROJECT_NAME} PUBLIC
956    -DSERIAL_PORT_TYPE_VIRTUAL=1
957    -DDEBUG_CONSOLE_TRANSFER_NON_BLOCKING
958  )
959
960endif()
961
962else()
963
964message(SEND_ERROR "component_serial_manager_virtual.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
965
966endif()
967
968endif()
969
970
971if (CONFIG_USE_component_serial_manager_swo)
972# Add set(CONFIG_USE_component_serial_manager_swo true) in config.cmake to use this component
973
974message("component_serial_manager_swo component is included from ${CMAKE_CURRENT_LIST_FILE}.")
975
976if((CONFIG_CORE STREQUAL cm4f) AND CONFIG_USE_driver_common AND CONFIG_USE_component_serial_manager)
977
978target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
979  ${CMAKE_CURRENT_LIST_DIR}/../../components/serial_manager/fsl_component_serial_port_swo.c
980)
981
982target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
983  ${CMAKE_CURRENT_LIST_DIR}/../../components/serial_manager/.
984)
985
986if(CONFIG_USE_COMPONENT_CONFIGURATION)
987  message("===>Import configuration from ${CMAKE_CURRENT_LIST_FILE}")
988
989  target_compile_definitions(${MCUX_SDK_PROJECT_NAME} PUBLIC
990    -DSERIAL_PORT_TYPE_SWO=1
991  )
992
993endif()
994
995else()
996
997message(SEND_ERROR "component_serial_manager_swo.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
998
999endif()
1000
1001endif()
1002
1003
1004if (CONFIG_USE_component_silicon_id_imx8)
1005# Add set(CONFIG_USE_component_silicon_id_imx8 true) in config.cmake to use this component
1006
1007message("component_silicon_id_imx8 component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1008
1009if((CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxLZ OR CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxKZ) AND CONFIG_USE_component_silicon_id)
1010
1011target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1012  ${CMAKE_CURRENT_LIST_DIR}/../../components/silicon_id/socs/imx8/fsl_silicon_id_soc.c
1013)
1014
1015target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1016  ${CMAKE_CURRENT_LIST_DIR}/../../components/silicon_id/socs/imx8/..
1017)
1018
1019else()
1020
1021message(SEND_ERROR "component_silicon_id_imx8.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1022
1023endif()
1024
1025endif()
1026
1027
1028if (CONFIG_USE_component_silicon_id)
1029# Add set(CONFIG_USE_component_silicon_id true) in config.cmake to use this component
1030
1031message("component_silicon_id component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1032
1033if((CONFIG_USE_driver_common AND CONFIG_USE_component_silicon_id_imx8))
1034
1035target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1036  ${CMAKE_CURRENT_LIST_DIR}/../../components/silicon_id/fsl_silicon_id.c
1037)
1038
1039target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1040  ${CMAKE_CURRENT_LIST_DIR}/../../components/silicon_id/.
1041)
1042
1043else()
1044
1045message(SEND_ERROR "component_silicon_id.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1046
1047endif()
1048
1049endif()
1050
1051
1052if (CONFIG_USE_driver_srtm_freertos)
1053# Add set(CONFIG_USE_driver_srtm_freertos true) in config.cmake to use this component
1054
1055message("driver_srtm_freertos component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1056
1057if(CONFIG_USE_driver_srtm)
1058
1059target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1060  ${CMAKE_CURRENT_LIST_DIR}/../../components/srtm/port/srtm_heap_freertos.c
1061  ${CMAKE_CURRENT_LIST_DIR}/../../components/srtm/port/srtm_mutex_freertos.c
1062  ${CMAKE_CURRENT_LIST_DIR}/../../components/srtm/port/srtm_sem_freertos.c
1063)
1064
1065else()
1066
1067message(SEND_ERROR "driver_srtm_freertos.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1068
1069endif()
1070
1071endif()
1072
1073
1074if (CONFIG_USE_component_iuart_adapter)
1075# Add set(CONFIG_USE_component_iuart_adapter true) in config.cmake to use this component
1076
1077message("component_iuart_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1078
1079if(CONFIG_USE_driver_common AND CONFIG_USE_driver_iuart)
1080
1081target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1082  ${CMAKE_CURRENT_LIST_DIR}/../../components/uart/fsl_adapter_iuart.c
1083)
1084
1085target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1086  ${CMAKE_CURRENT_LIST_DIR}/../../components/uart/.
1087)
1088
1089else()
1090
1091message(SEND_ERROR "component_iuart_adapter.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1092
1093endif()
1094
1095endif()
1096
1097
1098if (CONFIG_USE_driver_wm8524)
1099# Add set(CONFIG_USE_driver_wm8524 true) in config.cmake to use this component
1100
1101message("driver_wm8524 component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1102
1103if(CONFIG_USE_driver_common)
1104
1105target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1106  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/wm8524/fsl_wm8524.c
1107)
1108
1109target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1110  ${CMAKE_CURRENT_LIST_DIR}/../../components/codec/wm8524/.
1111)
1112
1113if(CONFIG_USE_COMPONENT_CONFIGURATION)
1114  message("===>Import configuration from ${CMAKE_CURRENT_LIST_FILE}")
1115
1116  target_compile_definitions(${MCUX_SDK_PROJECT_NAME} PUBLIC
1117    -DSDK_I2C_BASED_COMPONENT_USED=1
1118    -DBOARD_USE_CODEC=1
1119    -DCODEC_WM8524_ENABLE
1120  )
1121
1122endif()
1123
1124else()
1125
1126message(SEND_ERROR "driver_wm8524.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1127
1128endif()
1129
1130endif()
1131
1132
1133if (CONFIG_USE_driver_common)
1134# Add set(CONFIG_USE_driver_common true) in config.cmake to use this component
1135
1136message("driver_common component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1137
1138if(CONFIG_USE_driver_clock AND CONFIG_USE_device_MIMX8MM6_CMSIS)
1139
1140target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1141  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/common/fsl_common.c
1142)
1143
1144if(CONFIG_CORE STREQUAL cm4f)
1145  target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1146      ${CMAKE_CURRENT_LIST_DIR}/../../drivers/common/fsl_common_arm.c
1147  )
1148endif()
1149
1150target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1151  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/common/.
1152)
1153
1154else()
1155
1156message(SEND_ERROR "driver_common.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1157
1158endif()
1159
1160endif()
1161
1162
1163if (CONFIG_USE_driver_cache_lmem)
1164# Add set(CONFIG_USE_driver_cache_lmem true) in config.cmake to use this component
1165
1166message("driver_cache_lmem component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1167
1168if((CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxLZ OR CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxKZ) AND CONFIG_USE_driver_common)
1169
1170target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1171  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/cache/lmem/fsl_cache.c
1172)
1173
1174target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1175  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/cache/lmem/.
1176)
1177
1178else()
1179
1180message(SEND_ERROR "driver_cache_lmem.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1181
1182endif()
1183
1184endif()
1185
1186
1187if (CONFIG_USE_driver_ecspi)
1188# Add set(CONFIG_USE_driver_ecspi true) in config.cmake to use this component
1189
1190message("driver_ecspi component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1191
1192if((CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxLZ OR CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxKZ) AND CONFIG_USE_driver_common)
1193
1194target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1195  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/ecspi/fsl_ecspi.c
1196)
1197
1198target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1199  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/ecspi/.
1200)
1201
1202else()
1203
1204message(SEND_ERROR "driver_ecspi.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1205
1206endif()
1207
1208endif()
1209
1210
1211if (CONFIG_USE_driver_ecspi_freertos)
1212# Add set(CONFIG_USE_driver_ecspi_freertos true) in config.cmake to use this component
1213
1214message("driver_ecspi_freertos component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1215
1216if(CONFIG_USE_driver_ecspi AND CONFIG_USE_middleware_freertos-kernel)
1217
1218target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1219  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/ecspi/fsl_ecspi_freertos.c
1220)
1221
1222target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1223  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/ecspi/.
1224)
1225
1226else()
1227
1228message(SEND_ERROR "driver_ecspi_freertos.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1229
1230endif()
1231
1232endif()
1233
1234
1235if (CONFIG_USE_driver_gpc_2)
1236# Add set(CONFIG_USE_driver_gpc_2 true) in config.cmake to use this component
1237
1238message("driver_gpc_2 component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1239
1240if((CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxLZ OR CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxKZ) AND CONFIG_USE_driver_common)
1241
1242target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1243  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/gpc_2/fsl_gpc.c
1244)
1245
1246target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1247  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/gpc_2/.
1248)
1249
1250else()
1251
1252message(SEND_ERROR "driver_gpc_2.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1253
1254endif()
1255
1256endif()
1257
1258
1259if (CONFIG_USE_driver_gpt)
1260# Add set(CONFIG_USE_driver_gpt true) in config.cmake to use this component
1261
1262message("driver_gpt component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1263
1264if((CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxLZ OR CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxKZ) AND CONFIG_USE_driver_common)
1265
1266target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1267  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/gpt/fsl_gpt.c
1268)
1269
1270target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1271  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/gpt/.
1272)
1273
1274else()
1275
1276message(SEND_ERROR "driver_gpt.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1277
1278endif()
1279
1280endif()
1281
1282
1283if (CONFIG_USE_driver_igpio)
1284# Add set(CONFIG_USE_driver_igpio true) in config.cmake to use this component
1285
1286message("driver_igpio component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1287
1288if((CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxLZ OR CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxKZ) AND CONFIG_USE_driver_common)
1289
1290target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1291  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/igpio/fsl_gpio.c
1292)
1293
1294target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1295  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/igpio/.
1296)
1297
1298else()
1299
1300message(SEND_ERROR "driver_igpio.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1301
1302endif()
1303
1304endif()
1305
1306
1307if (CONFIG_USE_driver_ii2c)
1308# Add set(CONFIG_USE_driver_ii2c true) in config.cmake to use this component
1309
1310message("driver_ii2c component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1311
1312if((CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxLZ OR CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxKZ))
1313
1314target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1315  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/ii2c/fsl_i2c.c
1316)
1317
1318target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1319  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/ii2c/.
1320)
1321
1322else()
1323
1324message(SEND_ERROR "driver_ii2c.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1325
1326endif()
1327
1328endif()
1329
1330
1331if (CONFIG_USE_driver_ii2c_freertos)
1332# Add set(CONFIG_USE_driver_ii2c_freertos true) in config.cmake to use this component
1333
1334message("driver_ii2c_freertos component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1335
1336if(CONFIG_USE_driver_ii2c AND CONFIG_USE_middleware_freertos-kernel)
1337
1338target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1339  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/ii2c/fsl_i2c_freertos.c
1340)
1341
1342target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1343  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/ii2c/.
1344)
1345
1346else()
1347
1348message(SEND_ERROR "driver_ii2c_freertos.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1349
1350endif()
1351
1352endif()
1353
1354
1355if (CONFIG_USE_driver_ipwm)
1356# Add set(CONFIG_USE_driver_ipwm true) in config.cmake to use this component
1357
1358message("driver_ipwm component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1359
1360if((CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxLZ OR CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxKZ))
1361
1362target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1363  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/ipwm/fsl_pwm.c
1364)
1365
1366target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1367  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/ipwm/.
1368)
1369
1370else()
1371
1372message(SEND_ERROR "driver_ipwm.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1373
1374endif()
1375
1376endif()
1377
1378
1379if (CONFIG_USE_driver_iuart)
1380# Add set(CONFIG_USE_driver_iuart true) in config.cmake to use this component
1381
1382message("driver_iuart component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1383
1384if((CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxLZ OR CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxKZ))
1385
1386target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1387  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/iuart/fsl_uart.c
1388)
1389
1390target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1391  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/iuart/.
1392)
1393
1394else()
1395
1396message(SEND_ERROR "driver_iuart.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1397
1398endif()
1399
1400endif()
1401
1402
1403if (CONFIG_USE_driver_iuart_freertos)
1404# Add set(CONFIG_USE_driver_iuart_freertos true) in config.cmake to use this component
1405
1406message("driver_iuart_freertos component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1407
1408if(CONFIG_USE_driver_iuart AND CONFIG_USE_middleware_freertos-kernel)
1409
1410target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1411  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/iuart/fsl_uart_freertos.c
1412)
1413
1414target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1415  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/iuart/.
1416)
1417
1418else()
1419
1420message(SEND_ERROR "driver_iuart_freertos.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1421
1422endif()
1423
1424endif()
1425
1426
1427if (CONFIG_USE_driver_mu)
1428# Add set(CONFIG_USE_driver_mu true) in config.cmake to use this component
1429
1430message("driver_mu component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1431
1432if((CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxLZ OR CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxKZ) AND CONFIG_USE_driver_common)
1433
1434target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1435  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/mu/fsl_mu.c
1436)
1437
1438target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1439  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/mu/.
1440)
1441
1442else()
1443
1444message(SEND_ERROR "driver_mu.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1445
1446endif()
1447
1448endif()
1449
1450
1451if (CONFIG_USE_driver_pdm)
1452# Add set(CONFIG_USE_driver_pdm true) in config.cmake to use this component
1453
1454message("driver_pdm component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1455
1456if((CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxLZ OR CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxKZ) AND CONFIG_USE_driver_common)
1457
1458target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1459  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/pdm/fsl_pdm.c
1460)
1461
1462target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1463  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/pdm/.
1464)
1465
1466else()
1467
1468message(SEND_ERROR "driver_pdm.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1469
1470endif()
1471
1472endif()
1473
1474
1475if (CONFIG_USE_driver_pdm_sdma)
1476# Add set(CONFIG_USE_driver_pdm_sdma true) in config.cmake to use this component
1477
1478message("driver_pdm_sdma component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1479
1480if(CONFIG_USE_driver_pdm AND (CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxLZ OR CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxKZ))
1481
1482target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1483  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/pdm/fsl_pdm_sdma.c
1484)
1485
1486target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1487  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/pdm/.
1488)
1489
1490else()
1491
1492message(SEND_ERROR "driver_pdm_sdma.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1493
1494endif()
1495
1496endif()
1497
1498
1499if (CONFIG_USE_driver_rdc)
1500# Add set(CONFIG_USE_driver_rdc true) in config.cmake to use this component
1501
1502message("driver_rdc component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1503
1504if((CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxLZ OR CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxKZ) AND CONFIG_USE_driver_common)
1505
1506target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1507  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/rdc/fsl_rdc.c
1508)
1509
1510target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1511  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/rdc/.
1512)
1513
1514else()
1515
1516message(SEND_ERROR "driver_rdc.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1517
1518endif()
1519
1520endif()
1521
1522
1523if (CONFIG_USE_driver_rdc_sema42)
1524# Add set(CONFIG_USE_driver_rdc_sema42 true) in config.cmake to use this component
1525
1526message("driver_rdc_sema42 component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1527
1528if((CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxLZ OR CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxKZ) AND CONFIG_USE_driver_common)
1529
1530target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1531  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/rdc_sema42/fsl_rdc_sema42.c
1532)
1533
1534target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1535  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/rdc_sema42/.
1536)
1537
1538else()
1539
1540message(SEND_ERROR "driver_rdc_sema42.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1541
1542endif()
1543
1544endif()
1545
1546
1547if (CONFIG_USE_driver_sai)
1548# Add set(CONFIG_USE_driver_sai true) in config.cmake to use this component
1549
1550message("driver_sai component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1551
1552if((CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxLZ OR CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxKZ) AND CONFIG_USE_driver_common)
1553
1554target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1555  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/sai/fsl_sai.c
1556)
1557
1558target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1559  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/sai/.
1560)
1561
1562else()
1563
1564message(SEND_ERROR "driver_sai.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1565
1566endif()
1567
1568endif()
1569
1570
1571if (CONFIG_USE_driver_sema4)
1572# Add set(CONFIG_USE_driver_sema4 true) in config.cmake to use this component
1573
1574message("driver_sema4 component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1575
1576if((CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxLZ OR CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxKZ) AND CONFIG_USE_driver_common)
1577
1578target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1579  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/sema4/fsl_sema4.c
1580)
1581
1582target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1583  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/sema4/.
1584)
1585
1586else()
1587
1588message(SEND_ERROR "driver_sema4.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1589
1590endif()
1591
1592endif()
1593
1594
1595if (CONFIG_USE_driver_tmu_1)
1596# Add set(CONFIG_USE_driver_tmu_1 true) in config.cmake to use this component
1597
1598message("driver_tmu_1 component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1599
1600if((CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxLZ OR CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxKZ) AND CONFIG_USE_driver_common)
1601
1602target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1603  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/tmu_1/fsl_tmu.c
1604)
1605
1606target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1607  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/tmu_1/.
1608)
1609
1610else()
1611
1612message(SEND_ERROR "driver_tmu_1.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1613
1614endif()
1615
1616endif()
1617
1618
1619if (CONFIG_USE_driver_wdog01)
1620# Add set(CONFIG_USE_driver_wdog01 true) in config.cmake to use this component
1621
1622message("driver_wdog01 component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1623
1624if((CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxLZ OR CONFIG_DEVICE_ID STREQUAL MIMX8MM6xxxKZ) AND CONFIG_USE_driver_common)
1625
1626target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1627  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/wdog01/fsl_wdog.c
1628)
1629
1630target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1631  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/wdog01/.
1632)
1633
1634else()
1635
1636message(SEND_ERROR "driver_wdog01.MIMX8MM6 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1637
1638endif()
1639
1640endif()
1641
1642