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
34
35endif()
36
37
38if (CONFIG_USE_DEVICES_Project_Template_LPC804)
39# Add set(CONFIG_USE_DEVICES_Project_Template_LPC804 true) in config.cmake to use this component
40
41message("DEVICES_Project_Template_LPC804 component is included from ${CMAKE_CURRENT_LIST_FILE}.")
42
43if(CONFIG_USE_component_miniusart_adapter AND (CONFIG_DEVICE_ID STREQUAL LPC804) AND CONFIG_USE_device_LPC804_startup AND CONFIG_USE_driver_clock AND CONFIG_USE_driver_common AND CONFIG_USE_driver_lpc_gpio AND CONFIG_USE_driver_lpc_iocon_lite AND CONFIG_USE_driver_lpc_miniusart AND CONFIG_USE_driver_power_no_lib AND CONFIG_USE_driver_rom_api AND CONFIG_USE_driver_swm AND CONFIG_USE_utility_assert_lite AND CONFIG_USE_utility_debug_console_lite)
44
45add_config_file(${CMAKE_CURRENT_LIST_DIR}/project_template/clock_config.h "" DEVICES_Project_Template_LPC804.LPC804)
46add_config_file(${CMAKE_CURRENT_LIST_DIR}/project_template/clock_config.c "" DEVICES_Project_Template_LPC804.LPC804)
47add_config_file(${CMAKE_CURRENT_LIST_DIR}/project_template/pin_mux.h "" DEVICES_Project_Template_LPC804.LPC804)
48add_config_file(${CMAKE_CURRENT_LIST_DIR}/project_template/pin_mux.c "" DEVICES_Project_Template_LPC804.LPC804)
49add_config_file(${CMAKE_CURRENT_LIST_DIR}/project_template/peripherals.h "" DEVICES_Project_Template_LPC804.LPC804)
50add_config_file(${CMAKE_CURRENT_LIST_DIR}/project_template/peripherals.c "" DEVICES_Project_Template_LPC804.LPC804)
51
52target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
53  ${CMAKE_CURRENT_LIST_DIR}/project_template/.
54)
55
56else()
57
58message(SEND_ERROR "DEVICES_Project_Template_LPC804.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
59
60endif()
61
62endif()
63
64
65if (CONFIG_USE_device_LPC804_startup)
66# Add set(CONFIG_USE_device_LPC804_startup true) in config.cmake to use this component
67
68message("device_LPC804_startup component is included from ${CMAKE_CURRENT_LIST_FILE}.")
69
70if(CONFIG_USE_device_LPC804_system)
71
72if(CONFIG_TOOLCHAIN STREQUAL armgcc)
73  add_config_file(${CMAKE_CURRENT_LIST_DIR}/./gcc/startup_LPC804.S "" device_LPC804_startup.LPC804)
74endif()
75
76if(CONFIG_TOOLCHAIN STREQUAL mcux)
77  add_config_file(${CMAKE_CURRENT_LIST_DIR}/./mcuxpresso/startup_lpc804.c "" device_LPC804_startup.LPC804)
78  add_config_file(${CMAKE_CURRENT_LIST_DIR}/./mcuxpresso/startup_lpc804.cpp "" device_LPC804_startup.LPC804)
79endif()
80
81else()
82
83message(SEND_ERROR "device_LPC804_startup.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
84
85endif()
86
87endif()
88
89
90if (CONFIG_USE_device_LPC804_CMSIS)
91# Add set(CONFIG_USE_device_LPC804_CMSIS true) in config.cmake to use this component
92
93message("device_LPC804_CMSIS component is included from ${CMAKE_CURRENT_LIST_FILE}.")
94
95if(CONFIG_USE_CMSIS_Include_core_cm AND (CONFIG_DEVICE_ID STREQUAL LPC804))
96
97target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
98  ${CMAKE_CURRENT_LIST_DIR}/./.
99)
100
101else()
102
103message(SEND_ERROR "device_LPC804_CMSIS.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
104
105endif()
106
107endif()
108
109
110if (CONFIG_USE_driver_clock)
111# Add set(CONFIG_USE_driver_clock true) in config.cmake to use this component
112
113message("driver_clock component is included from ${CMAKE_CURRENT_LIST_FILE}.")
114
115if(CONFIG_USE_driver_rom_api AND CONFIG_USE_driver_power_no_lib AND CONFIG_USE_driver_common)
116
117target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
118  ${CMAKE_CURRENT_LIST_DIR}/drivers/fsl_clock.c
119)
120
121target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
122  ${CMAKE_CURRENT_LIST_DIR}/drivers/.
123)
124
125else()
126
127message(SEND_ERROR "driver_clock.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
128
129endif()
130
131endif()
132
133
134if (CONFIG_USE_utility_debug_console_lite)
135# Add set(CONFIG_USE_utility_debug_console_lite true) in config.cmake to use this component
136
137message("utility_debug_console_lite component is included from ${CMAKE_CURRENT_LIST_FILE}.")
138
139if(CONFIG_USE_component_miniusart_adapter AND (CONFIG_DEVICE_ID STREQUAL LPC804) AND CONFIG_USE_driver_common AND CONFIG_USE_utility_str)
140
141target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
142  ${CMAKE_CURRENT_LIST_DIR}/../../utilities/debug_console_lite/fsl_debug_console.c
143)
144
145target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
146  ${CMAKE_CURRENT_LIST_DIR}/../../utilities/debug_console_lite
147)
148
149else()
150
151message(SEND_ERROR "utility_debug_console_lite.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
152
153endif()
154
155endif()
156
157
158if (CONFIG_USE_driver_rom_api)
159# Add set(CONFIG_USE_driver_rom_api true) in config.cmake to use this component
160
161message("driver_rom_api component is included from ${CMAKE_CURRENT_LIST_FILE}.")
162
163if(CONFIG_USE_driver_common AND (CONFIG_DEVICE_ID STREQUAL LPC804))
164
165target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
166  ${CMAKE_CURRENT_LIST_DIR}/drivers/.
167)
168
169else()
170
171message(SEND_ERROR "driver_rom_api.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
172
173endif()
174
175endif()
176
177
178if (CONFIG_USE_driver_swm_connections)
179# Add set(CONFIG_USE_driver_swm_connections true) in config.cmake to use this component
180
181message("driver_swm_connections component is included from ${CMAKE_CURRENT_LIST_FILE}.")
182
183if(CONFIG_USE_driver_common AND (CONFIG_DEVICE_ID STREQUAL LPC804))
184
185target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
186  ${CMAKE_CURRENT_LIST_DIR}/drivers/.
187)
188
189else()
190
191message(SEND_ERROR "driver_swm_connections.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
192
193endif()
194
195endif()
196
197
198if (CONFIG_USE_driver_syscon_connections)
199# Add set(CONFIG_USE_driver_syscon_connections true) in config.cmake to use this component
200
201message("driver_syscon_connections component is included from ${CMAKE_CURRENT_LIST_FILE}.")
202
203if(CONFIG_USE_driver_common AND (CONFIG_DEVICE_ID STREQUAL LPC804))
204
205target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
206  ${CMAKE_CURRENT_LIST_DIR}/drivers/.
207)
208
209else()
210
211message(SEND_ERROR "driver_syscon_connections.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
212
213endif()
214
215endif()
216
217
218if (CONFIG_USE_driver_power_no_lib)
219# Add set(CONFIG_USE_driver_power_no_lib true) in config.cmake to use this component
220
221message("driver_power_no_lib component is included from ${CMAKE_CURRENT_LIST_FILE}.")
222
223if(CONFIG_USE_driver_common AND (CONFIG_DEVICE_ID STREQUAL LPC804))
224
225target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
226  ${CMAKE_CURRENT_LIST_DIR}/drivers/fsl_power.c
227)
228
229target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
230  ${CMAKE_CURRENT_LIST_DIR}/drivers/.
231)
232
233else()
234
235message(SEND_ERROR "driver_power_no_lib.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
236
237endif()
238
239endif()
240
241
242if (CONFIG_USE_driver_common)
243# Add set(CONFIG_USE_driver_common true) in config.cmake to use this component
244
245message("driver_common component is included from ${CMAKE_CURRENT_LIST_FILE}.")
246
247if(CONFIG_USE_driver_reset AND CONFIG_USE_driver_clock AND CONFIG_USE_device_LPC804_CMSIS)
248
249target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
250  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/common/fsl_common.c
251)
252
253if(CONFIG_CORE STREQUAL cm0p)
254  target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
255      ${CMAKE_CURRENT_LIST_DIR}/../../drivers/common/fsl_common_arm.c
256  )
257endif()
258
259target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
260  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/common/.
261)
262
263else()
264
265message(SEND_ERROR "driver_common.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
266
267endif()
268
269endif()
270
271
272if (CONFIG_USE_device_LPC804_system)
273# Add set(CONFIG_USE_device_LPC804_system true) in config.cmake to use this component
274
275message("device_LPC804_system component is included from ${CMAKE_CURRENT_LIST_FILE}.")
276
277if(CONFIG_USE_device_LPC804_CMSIS)
278
279target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
280  ${CMAKE_CURRENT_LIST_DIR}/./system_LPC804.c
281)
282
283target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
284  ${CMAKE_CURRENT_LIST_DIR}/./.
285)
286
287else()
288
289message(SEND_ERROR "device_LPC804_system.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
290
291endif()
292
293endif()
294
295
296if (CONFIG_USE_utility_assert_lite)
297# Add set(CONFIG_USE_utility_assert_lite true) in config.cmake to use this component
298
299message("utility_assert_lite component is included from ${CMAKE_CURRENT_LIST_FILE}.")
300
301if(CONFIG_USE_utility_debug_console_lite AND CONFIG_USE_driver_common)
302
303target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
304  ${CMAKE_CURRENT_LIST_DIR}/../../utilities/assert/fsl_assert.c
305)
306
307target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
308  ${CMAKE_CURRENT_LIST_DIR}/../../utilities/assert/.
309)
310
311else()
312
313message(SEND_ERROR "utility_assert_lite.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
314
315endif()
316
317endif()
318
319
320if (CONFIG_USE_utility_str)
321# Add set(CONFIG_USE_utility_str true) in config.cmake to use this component
322
323message("utility_str component is included from ${CMAKE_CURRENT_LIST_FILE}.")
324
325if(CONFIG_USE_driver_common)
326
327target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
328  ${CMAKE_CURRENT_LIST_DIR}/../../utilities/str/fsl_str.c
329)
330
331target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
332  ${CMAKE_CURRENT_LIST_DIR}/../../utilities/str
333)
334
335else()
336
337message(SEND_ERROR "utility_str.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
338
339endif()
340
341endif()
342
343
344if (CONFIG_USE_component_lpc_crc_adapter)
345# Add set(CONFIG_USE_component_lpc_crc_adapter true) in config.cmake to use this component
346
347message("component_lpc_crc_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.")
348
349if(CONFIG_USE_driver_common AND CONFIG_USE_driver_lpc_crc)
350
351target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
352  ${CMAKE_CURRENT_LIST_DIR}/../../components/crc/fsl_adapter_lpc_crc.c
353)
354
355target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
356  ${CMAKE_CURRENT_LIST_DIR}/../../components/crc/.
357)
358
359else()
360
361message(SEND_ERROR "component_lpc_crc_adapter.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
362
363endif()
364
365endif()
366
367
368if (CONFIG_USE_component_software_crc_adapter)
369# Add set(CONFIG_USE_component_software_crc_adapter true) in config.cmake to use this component
370
371message("component_software_crc_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.")
372
373if(CONFIG_USE_driver_common)
374
375target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
376  ${CMAKE_CURRENT_LIST_DIR}/../../components/crc/fsl_adapter_software_crc.c
377)
378
379target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
380  ${CMAKE_CURRENT_LIST_DIR}/../../components/crc/.
381)
382
383else()
384
385message(SEND_ERROR "component_software_crc_adapter.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
386
387endif()
388
389endif()
390
391
392if (CONFIG_USE_component_lpc_i2c_adapter)
393# Add set(CONFIG_USE_component_lpc_i2c_adapter true) in config.cmake to use this component
394
395message("component_lpc_i2c_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.")
396
397if(CONFIG_USE_driver_common AND CONFIG_USE_driver_lpc_i2c)
398
399target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
400  ${CMAKE_CURRENT_LIST_DIR}/../../components/i2c/fsl_adapter_lpc_i2c.c
401)
402
403target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
404  ${CMAKE_CURRENT_LIST_DIR}/../../components/i2c/.
405)
406
407else()
408
409message(SEND_ERROR "component_lpc_i2c_adapter.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
410
411endif()
412
413endif()
414
415
416if (CONFIG_USE_component_lists)
417# Add set(CONFIG_USE_component_lists true) in config.cmake to use this component
418
419message("component_lists component is included from ${CMAKE_CURRENT_LIST_FILE}.")
420
421if(CONFIG_USE_driver_common)
422
423target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
424  ${CMAKE_CURRENT_LIST_DIR}/../../components/lists/fsl_component_generic_list.c
425)
426
427target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
428  ${CMAKE_CURRENT_LIST_DIR}/../../components/lists/.
429)
430
431else()
432
433message(SEND_ERROR "component_lists.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
434
435endif()
436
437endif()
438
439
440if (CONFIG_USE_component_mem_manager)
441# Add set(CONFIG_USE_component_mem_manager true) in config.cmake to use this component
442
443message("component_mem_manager component is included from ${CMAKE_CURRENT_LIST_FILE}.")
444
445if(CONFIG_USE_driver_common AND CONFIG_USE_component_lists)
446
447target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
448  ${CMAKE_CURRENT_LIST_DIR}/../../components/mem_manager/fsl_component_mem_manager.c
449)
450
451target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
452  ${CMAKE_CURRENT_LIST_DIR}/../../components/mem_manager/.
453)
454
455else()
456
457message(SEND_ERROR "component_mem_manager.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
458
459endif()
460
461endif()
462
463
464if (CONFIG_USE_component_mem_manager_light)
465# Add set(CONFIG_USE_component_mem_manager_light true) in config.cmake to use this component
466
467message("component_mem_manager_light component is included from ${CMAKE_CURRENT_LIST_FILE}.")
468
469if(CONFIG_USE_driver_common AND CONFIG_USE_component_lists)
470
471target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
472  ${CMAKE_CURRENT_LIST_DIR}/../../components/mem_manager/fsl_component_mem_manager_light.c
473)
474
475target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
476  ${CMAKE_CURRENT_LIST_DIR}/../../components/mem_manager/.
477)
478
479else()
480
481message(SEND_ERROR "component_mem_manager_light.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
482
483endif()
484
485endif()
486
487
488if (CONFIG_USE_component_panic)
489# Add set(CONFIG_USE_component_panic true) in config.cmake to use this component
490
491message("component_panic 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}/../../components/panic/fsl_component_panic.c
497)
498
499target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
500  ${CMAKE_CURRENT_LIST_DIR}/../../components/panic/.
501)
502
503else()
504
505message(SEND_ERROR "component_panic.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
506
507endif()
508
509endif()
510
511
512if (CONFIG_USE_component_pwm_ctimer_adapter)
513# Add set(CONFIG_USE_component_pwm_ctimer_adapter true) in config.cmake to use this component
514
515message("component_pwm_ctimer_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.")
516
517if(CONFIG_USE_driver_common AND CONFIG_USE_driver_ctimer)
518
519target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
520  ${CMAKE_CURRENT_LIST_DIR}/../../components/pwm/fsl_adapter_pwm_ctimer.c
521)
522
523target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
524  ${CMAKE_CURRENT_LIST_DIR}/../../components/pwm/.
525)
526
527else()
528
529message(SEND_ERROR "component_pwm_ctimer_adapter.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
530
531endif()
532
533endif()
534
535
536if (CONFIG_USE_component_reset_adapter)
537# Add set(CONFIG_USE_component_reset_adapter true) in config.cmake to use this component
538
539message("component_reset_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.")
540
541if(CONFIG_USE_driver_common)
542
543target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
544  ${CMAKE_CURRENT_LIST_DIR}/../../components/reset/fsl_adapter_reset.c
545)
546
547target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
548  ${CMAKE_CURRENT_LIST_DIR}/../../components/reset/.
549)
550
551else()
552
553message(SEND_ERROR "component_reset_adapter.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
554
555endif()
556
557endif()
558
559
560if (CONFIG_USE_component_software_rng_adapter)
561# Add set(CONFIG_USE_component_software_rng_adapter true) in config.cmake to use this component
562
563message("component_software_rng_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.")
564
565if(CONFIG_USE_driver_common)
566
567target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
568  ${CMAKE_CURRENT_LIST_DIR}/../../components/rng/fsl_adapter_software_rng.c
569)
570
571target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
572  ${CMAKE_CURRENT_LIST_DIR}/../../components/rng/.
573)
574
575else()
576
577message(SEND_ERROR "component_software_rng_adapter.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
578
579endif()
580
581endif()
582
583
584if (CONFIG_USE_component_ctimer_adapter)
585# Add set(CONFIG_USE_component_ctimer_adapter true) in config.cmake to use this component
586
587message("component_ctimer_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.")
588
589if(CONFIG_USE_driver_common AND CONFIG_USE_driver_ctimer)
590
591target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
592  ${CMAKE_CURRENT_LIST_DIR}/../../components/timer/fsl_adapter_ctimer.c
593)
594
595target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
596  ${CMAKE_CURRENT_LIST_DIR}/../../components/timer/.
597)
598
599if(CONFIG_USE_COMPONENT_CONFIGURATION)
600  message("===>Import configuration from ${CMAKE_CURRENT_LIST_FILE}")
601
602  target_compile_definitions(${MCUX_SDK_PROJECT_NAME} PUBLIC
603    -DTIMER_PORT_TYPE_CTIMER=1
604  )
605
606endif()
607
608else()
609
610message(SEND_ERROR "component_ctimer_adapter.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
611
612endif()
613
614endif()
615
616
617if (CONFIG_USE_component_mrt_adapter)
618# Add set(CONFIG_USE_component_mrt_adapter true) in config.cmake to use this component
619
620message("component_mrt_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.")
621
622if(CONFIG_USE_driver_common AND CONFIG_USE_driver_mrt)
623
624target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
625  ${CMAKE_CURRENT_LIST_DIR}/../../components/timer/fsl_adapter_mrt.c
626)
627
628target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
629  ${CMAKE_CURRENT_LIST_DIR}/../../components/timer/.
630)
631
632if(CONFIG_USE_COMPONENT_CONFIGURATION)
633  message("===>Import configuration from ${CMAKE_CURRENT_LIST_FILE}")
634
635  target_compile_definitions(${MCUX_SDK_PROJECT_NAME} PUBLIC
636    -DTIMER_PORT_TYPE_MRT=1
637  )
638
639endif()
640
641else()
642
643message(SEND_ERROR "component_mrt_adapter.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
644
645endif()
646
647endif()
648
649
650if (CONFIG_USE_component_timer_manager)
651# Add set(CONFIG_USE_component_timer_manager true) in config.cmake to use this component
652
653message("component_timer_manager component is included from ${CMAKE_CURRENT_LIST_FILE}.")
654
655if(CONFIG_USE_driver_common AND CONFIG_USE_component_lists AND (CONFIG_USE_component_ctimer_adapter OR CONFIG_USE_component_mrt_adapter))
656
657target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
658  ${CMAKE_CURRENT_LIST_DIR}/../../components/timer_manager/fsl_component_timer_manager.c
659)
660
661target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
662  ${CMAKE_CURRENT_LIST_DIR}/../../components/timer_manager/.
663)
664
665else()
666
667message(SEND_ERROR "component_timer_manager.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
668
669endif()
670
671endif()
672
673
674if (CONFIG_USE_component_miniusart_adapter)
675# Add set(CONFIG_USE_component_miniusart_adapter true) in config.cmake to use this component
676
677message("component_miniusart_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.")
678
679if(CONFIG_USE_driver_common AND CONFIG_USE_driver_lpc_miniusart)
680
681target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
682  ${CMAKE_CURRENT_LIST_DIR}/../../components/uart/fsl_adapter_miniusart.c
683)
684
685target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
686  ${CMAKE_CURRENT_LIST_DIR}/../../components/uart/.
687)
688
689else()
690
691message(SEND_ERROR "component_miniusart_adapter.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
692
693endif()
694
695endif()
696
697
698if (CONFIG_USE_driver_capt)
699# Add set(CONFIG_USE_driver_capt true) in config.cmake to use this component
700
701message("driver_capt component is included from ${CMAKE_CURRENT_LIST_FILE}.")
702
703if((CONFIG_DEVICE_ID STREQUAL LPC804) AND CONFIG_USE_driver_common)
704
705target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
706  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/capt/fsl_capt.c
707)
708
709target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
710  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/capt/.
711)
712
713else()
714
715message(SEND_ERROR "driver_capt.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
716
717endif()
718
719endif()
720
721
722if (CONFIG_USE_driver_lpc_crc)
723# Add set(CONFIG_USE_driver_lpc_crc true) in config.cmake to use this component
724
725message("driver_lpc_crc component is included from ${CMAKE_CURRENT_LIST_FILE}.")
726
727if((CONFIG_DEVICE_ID STREQUAL LPC804) AND CONFIG_USE_driver_common)
728
729target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
730  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/lpc_crc/fsl_crc.c
731)
732
733target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
734  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/lpc_crc/.
735)
736
737else()
738
739message(SEND_ERROR "driver_lpc_crc.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
740
741endif()
742
743endif()
744
745
746if (CONFIG_USE_driver_ctimer)
747# Add set(CONFIG_USE_driver_ctimer true) in config.cmake to use this component
748
749message("driver_ctimer component is included from ${CMAKE_CURRENT_LIST_FILE}.")
750
751if((CONFIG_DEVICE_ID STREQUAL LPC804) AND CONFIG_USE_driver_common)
752
753target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
754  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/ctimer/fsl_ctimer.c
755)
756
757target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
758  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/ctimer/.
759)
760
761else()
762
763message(SEND_ERROR "driver_ctimer.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
764
765endif()
766
767endif()
768
769
770if (CONFIG_USE_driver_iap)
771# Add set(CONFIG_USE_driver_iap true) in config.cmake to use this component
772
773message("driver_iap component is included from ${CMAKE_CURRENT_LIST_FILE}.")
774
775if((CONFIG_DEVICE_ID STREQUAL LPC804) AND CONFIG_USE_driver_common)
776
777target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
778  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/iap/fsl_iap.c
779)
780
781target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
782  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/iap/.
783)
784
785else()
786
787message(SEND_ERROR "driver_iap.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
788
789endif()
790
791endif()
792
793
794if (CONFIG_USE_driver_lpc_acomp)
795# Add set(CONFIG_USE_driver_lpc_acomp true) in config.cmake to use this component
796
797message("driver_lpc_acomp component is included from ${CMAKE_CURRENT_LIST_FILE}.")
798
799if((CONFIG_DEVICE_ID STREQUAL LPC804) AND CONFIG_USE_driver_common)
800
801target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
802  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/lpc_acomp/fsl_acomp.c
803)
804
805target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
806  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/lpc_acomp/.
807)
808
809else()
810
811message(SEND_ERROR "driver_lpc_acomp.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
812
813endif()
814
815endif()
816
817
818if (CONFIG_USE_driver_lpc_adc)
819# Add set(CONFIG_USE_driver_lpc_adc true) in config.cmake to use this component
820
821message("driver_lpc_adc component is included from ${CMAKE_CURRENT_LIST_FILE}.")
822
823if((CONFIG_DEVICE_ID STREQUAL LPC804) AND CONFIG_USE_driver_common)
824
825target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
826  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/lpc_adc/fsl_adc.c
827)
828
829target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
830  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/lpc_adc/.
831)
832
833else()
834
835message(SEND_ERROR "driver_lpc_adc.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
836
837endif()
838
839endif()
840
841
842if (CONFIG_USE_driver_lpc_dac)
843# Add set(CONFIG_USE_driver_lpc_dac true) in config.cmake to use this component
844
845message("driver_lpc_dac component is included from ${CMAKE_CURRENT_LIST_FILE}.")
846
847if((CONFIG_DEVICE_ID STREQUAL LPC804) AND CONFIG_USE_driver_common)
848
849target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
850  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/lpc_dac/fsl_dac.c
851)
852
853target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
854  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/lpc_dac/.
855)
856
857else()
858
859message(SEND_ERROR "driver_lpc_dac.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
860
861endif()
862
863endif()
864
865
866if (CONFIG_USE_driver_lpc_gpio)
867# Add set(CONFIG_USE_driver_lpc_gpio true) in config.cmake to use this component
868
869message("driver_lpc_gpio component is included from ${CMAKE_CURRENT_LIST_FILE}.")
870
871if((CONFIG_DEVICE_ID STREQUAL LPC804) AND CONFIG_USE_driver_common)
872
873target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
874  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/lpc_gpio/fsl_gpio.c
875)
876
877target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
878  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/lpc_gpio/.
879)
880
881else()
882
883message(SEND_ERROR "driver_lpc_gpio.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
884
885endif()
886
887endif()
888
889
890if (CONFIG_USE_driver_lpc_i2c)
891# Add set(CONFIG_USE_driver_lpc_i2c true) in config.cmake to use this component
892
893message("driver_lpc_i2c component is included from ${CMAKE_CURRENT_LIST_FILE}.")
894
895if(CONFIG_USE_driver_common AND (CONFIG_DEVICE_ID STREQUAL LPC804))
896
897target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
898  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/lpc_i2c/fsl_i2c.c
899)
900
901target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
902  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/lpc_i2c/.
903)
904
905else()
906
907message(SEND_ERROR "driver_lpc_i2c.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
908
909endif()
910
911endif()
912
913
914if (CONFIG_USE_driver_lpc_iocon_lite)
915# Add set(CONFIG_USE_driver_lpc_iocon_lite true) in config.cmake to use this component
916
917message("driver_lpc_iocon_lite component is included from ${CMAKE_CURRENT_LIST_FILE}.")
918
919if((CONFIG_DEVICE_ID STREQUAL LPC804) AND CONFIG_USE_driver_common)
920
921target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
922  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/lpc_iocon_lite/.
923)
924
925else()
926
927message(SEND_ERROR "driver_lpc_iocon_lite.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
928
929endif()
930
931endif()
932
933
934if (CONFIG_USE_driver_lpc_minispi)
935# Add set(CONFIG_USE_driver_lpc_minispi true) in config.cmake to use this component
936
937message("driver_lpc_minispi component is included from ${CMAKE_CURRENT_LIST_FILE}.")
938
939if((CONFIG_DEVICE_ID STREQUAL LPC804) AND CONFIG_USE_driver_common)
940
941target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
942  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/lpc_minispi/fsl_spi.c
943)
944
945target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
946  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/lpc_minispi/.
947)
948
949else()
950
951message(SEND_ERROR "driver_lpc_minispi.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
952
953endif()
954
955endif()
956
957
958if (CONFIG_USE_driver_lpc_miniusart)
959# Add set(CONFIG_USE_driver_lpc_miniusart true) in config.cmake to use this component
960
961message("driver_lpc_miniusart component is included from ${CMAKE_CURRENT_LIST_FILE}.")
962
963if((CONFIG_DEVICE_ID STREQUAL LPC804) AND CONFIG_USE_driver_common)
964
965target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
966  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/lpc_miniusart/fsl_usart.c
967)
968
969target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
970  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/lpc_miniusart/.
971)
972
973else()
974
975message(SEND_ERROR "driver_lpc_miniusart.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
976
977endif()
978
979endif()
980
981
982if (CONFIG_USE_driver_mrt)
983# Add set(CONFIG_USE_driver_mrt true) in config.cmake to use this component
984
985message("driver_mrt component is included from ${CMAKE_CURRENT_LIST_FILE}.")
986
987if((CONFIG_DEVICE_ID STREQUAL LPC804) AND CONFIG_USE_driver_common)
988
989target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
990  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/mrt/fsl_mrt.c
991)
992
993target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
994  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/mrt/.
995)
996
997else()
998
999message(SEND_ERROR "driver_mrt.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1000
1001endif()
1002
1003endif()
1004
1005
1006if (CONFIG_USE_driver_pint)
1007# Add set(CONFIG_USE_driver_pint true) in config.cmake to use this component
1008
1009message("driver_pint component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1010
1011if((CONFIG_DEVICE_ID STREQUAL LPC804) AND CONFIG_USE_driver_common)
1012
1013target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1014  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/pint/fsl_pint.c
1015)
1016
1017target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1018  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/pint/.
1019)
1020
1021else()
1022
1023message(SEND_ERROR "driver_pint.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1024
1025endif()
1026
1027endif()
1028
1029
1030if (CONFIG_USE_driver_plu)
1031# Add set(CONFIG_USE_driver_plu true) in config.cmake to use this component
1032
1033message("driver_plu component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1034
1035if((CONFIG_DEVICE_ID STREQUAL LPC804) AND CONFIG_USE_driver_common)
1036
1037target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1038  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/plu/fsl_plu.c
1039)
1040
1041target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1042  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/plu/.
1043)
1044
1045else()
1046
1047message(SEND_ERROR "driver_plu.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1048
1049endif()
1050
1051endif()
1052
1053
1054if (CONFIG_USE_driver_reset)
1055# Add set(CONFIG_USE_driver_reset true) in config.cmake to use this component
1056
1057message("driver_reset component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1058
1059if(CONFIG_USE_driver_common AND (CONFIG_DEVICE_ID STREQUAL LPC804))
1060
1061target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1062  ${CMAKE_CURRENT_LIST_DIR}/drivers/fsl_reset.c
1063)
1064
1065target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1066  ${CMAKE_CURRENT_LIST_DIR}/drivers/.
1067)
1068
1069else()
1070
1071message(SEND_ERROR "driver_reset.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1072
1073endif()
1074
1075endif()
1076
1077
1078if (CONFIG_USE_driver_swm)
1079# Add set(CONFIG_USE_driver_swm true) in config.cmake to use this component
1080
1081message("driver_swm component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1082
1083if((CONFIG_DEVICE_ID STREQUAL LPC804) AND CONFIG_USE_driver_common AND CONFIG_USE_driver_swm_connections)
1084
1085target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1086  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/swm/fsl_swm.c
1087)
1088
1089target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1090  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/swm/.
1091)
1092
1093else()
1094
1095message(SEND_ERROR "driver_swm.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1096
1097endif()
1098
1099endif()
1100
1101
1102if (CONFIG_USE_driver_syscon)
1103# Add set(CONFIG_USE_driver_syscon true) in config.cmake to use this component
1104
1105message("driver_syscon component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1106
1107if((CONFIG_DEVICE_ID STREQUAL LPC804) AND CONFIG_USE_driver_common AND CONFIG_USE_driver_syscon_connections)
1108
1109target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1110  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/syscon/fsl_syscon.c
1111)
1112
1113target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1114  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/syscon/.
1115)
1116
1117else()
1118
1119message(SEND_ERROR "driver_syscon.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1120
1121endif()
1122
1123endif()
1124
1125
1126if (CONFIG_USE_driver_wkt)
1127# Add set(CONFIG_USE_driver_wkt true) in config.cmake to use this component
1128
1129message("driver_wkt component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1130
1131if((CONFIG_DEVICE_ID STREQUAL LPC804) AND CONFIG_USE_driver_common)
1132
1133target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1134  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/wkt/fsl_wkt.c
1135)
1136
1137target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1138  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/wkt/.
1139)
1140
1141else()
1142
1143message(SEND_ERROR "driver_wkt.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1144
1145endif()
1146
1147endif()
1148
1149
1150if (CONFIG_USE_driver_wwdt)
1151# Add set(CONFIG_USE_driver_wwdt true) in config.cmake to use this component
1152
1153message("driver_wwdt component is included from ${CMAKE_CURRENT_LIST_FILE}.")
1154
1155if((CONFIG_DEVICE_ID STREQUAL LPC804) AND CONFIG_USE_driver_common)
1156
1157target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
1158  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/wwdt/fsl_wwdt.c
1159)
1160
1161target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
1162  ${CMAKE_CURRENT_LIST_DIR}/../../drivers/wwdt/.
1163)
1164
1165else()
1166
1167message(SEND_ERROR "driver_wwdt.LPC804 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
1168
1169endif()
1170
1171endif()
1172
1173