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_LPC802) 39# Add set(CONFIG_USE_DEVICES_Project_Template_LPC802 true) in config.cmake to use this component 40 41message("DEVICES_Project_Template_LPC802 component is included from ${CMAKE_CURRENT_LIST_FILE}.") 42 43if(CONFIG_USE_component_miniusart_adapter AND (CONFIG_DEVICE_ID STREQUAL LPC802) AND CONFIG_USE_device_LPC802_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_LPC802.LPC802) 46add_config_file(${CMAKE_CURRENT_LIST_DIR}/project_template/clock_config.c "" DEVICES_Project_Template_LPC802.LPC802) 47add_config_file(${CMAKE_CURRENT_LIST_DIR}/project_template/pin_mux.h "" DEVICES_Project_Template_LPC802.LPC802) 48add_config_file(${CMAKE_CURRENT_LIST_DIR}/project_template/pin_mux.c "" DEVICES_Project_Template_LPC802.LPC802) 49add_config_file(${CMAKE_CURRENT_LIST_DIR}/project_template/peripherals.h "" DEVICES_Project_Template_LPC802.LPC802) 50add_config_file(${CMAKE_CURRENT_LIST_DIR}/project_template/peripherals.c "" DEVICES_Project_Template_LPC802.LPC802) 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_LPC802.LPC802 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") 59 60endif() 61 62endif() 63 64 65if (CONFIG_USE_device_LPC802_startup) 66# Add set(CONFIG_USE_device_LPC802_startup true) in config.cmake to use this component 67 68message("device_LPC802_startup component is included from ${CMAKE_CURRENT_LIST_FILE}.") 69 70if(CONFIG_USE_device_LPC802_system) 71 72if(CONFIG_TOOLCHAIN STREQUAL armgcc) 73 add_config_file(${CMAKE_CURRENT_LIST_DIR}/./gcc/startup_LPC802.S "" device_LPC802_startup.LPC802) 74endif() 75 76if(CONFIG_TOOLCHAIN STREQUAL mcux) 77 add_config_file(${CMAKE_CURRENT_LIST_DIR}/./mcuxpresso/startup_lpc802.c "" device_LPC802_startup.LPC802) 78 add_config_file(${CMAKE_CURRENT_LIST_DIR}/./mcuxpresso/startup_lpc802.cpp "" device_LPC802_startup.LPC802) 79endif() 80 81else() 82 83message(SEND_ERROR "device_LPC802_startup.LPC802 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") 84 85endif() 86 87endif() 88 89 90if (CONFIG_USE_device_LPC802_CMSIS) 91# Add set(CONFIG_USE_device_LPC802_CMSIS true) in config.cmake to use this component 92 93message("device_LPC802_CMSIS component is included from ${CMAKE_CURRENT_LIST_FILE}.") 94 95if(CONFIG_USE_CMSIS_Include_core_cm AND (CONFIG_DEVICE_ID STREQUAL LPC802)) 96 97target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC 98 ${CMAKE_CURRENT_LIST_DIR}/./. 99) 100 101else() 102 103message(SEND_ERROR "device_LPC802_CMSIS.LPC802 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.LPC802 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 LPC802) 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.LPC802 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 LPC802)) 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.LPC802 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 LPC802)) 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.LPC802 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 LPC802)) 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.LPC802 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 LPC802)) 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.LPC802 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_LPC802_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.LPC802 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") 266 267endif() 268 269endif() 270 271 272if (CONFIG_USE_device_LPC802_system) 273# Add set(CONFIG_USE_device_LPC802_system true) in config.cmake to use this component 274 275message("device_LPC802_system component is included from ${CMAKE_CURRENT_LIST_FILE}.") 276 277if(CONFIG_USE_device_LPC802_CMSIS) 278 279target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE 280 ${CMAKE_CURRENT_LIST_DIR}/./system_LPC802.c 281) 282 283target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC 284 ${CMAKE_CURRENT_LIST_DIR}/./. 285) 286 287else() 288 289message(SEND_ERROR "device_LPC802_system.LPC802 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.LPC802 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.LPC802 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.LPC802 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.LPC802 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.LPC802 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.LPC802 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") 434 435endif() 436 437endif() 438 439 440if (CONFIG_USE_component_log) 441# Add set(CONFIG_USE_component_log true) in config.cmake to use this component 442 443message("component_log component is included from ${CMAKE_CURRENT_LIST_FILE}.") 444 445if(CONFIG_USE_driver_common AND CONFIG_USE_utility_str) 446 447target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE 448 ${CMAKE_CURRENT_LIST_DIR}/../../components/log/fsl_component_log.c 449) 450 451target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC 452 ${CMAKE_CURRENT_LIST_DIR}/../../components/log/. 453) 454 455else() 456 457message(SEND_ERROR "component_log.LPC802 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") 458 459endif() 460 461endif() 462 463 464if (CONFIG_USE_component_log_backend_debugconsole_lite) 465# Add set(CONFIG_USE_component_log_backend_debugconsole_lite true) in config.cmake to use this component 466 467message("component_log_backend_debugconsole_lite component is included from ${CMAKE_CURRENT_LIST_FILE}.") 468 469if(CONFIG_USE_driver_common AND CONFIG_USE_component_log AND CONFIG_USE_utility_debug_console_lite) 470 471target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE 472 ${CMAKE_CURRENT_LIST_DIR}/../../components/log/fsl_component_log_backend_debugconsole.c 473) 474 475target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC 476 ${CMAKE_CURRENT_LIST_DIR}/../../components/log/. 477) 478 479else() 480 481message(SEND_ERROR "component_log_backend_debugconsole_lite.LPC802 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") 482 483endif() 484 485endif() 486 487 488if (CONFIG_USE_component_log_backend_ringbuffer) 489# Add set(CONFIG_USE_component_log_backend_ringbuffer true) in config.cmake to use this component 490 491message("component_log_backend_ringbuffer component is included from ${CMAKE_CURRENT_LIST_FILE}.") 492 493if(CONFIG_USE_driver_common AND CONFIG_USE_component_log) 494 495target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE 496 ${CMAKE_CURRENT_LIST_DIR}/../../components/log/fsl_component_log_backend_ringbuffer.c 497) 498 499target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC 500 ${CMAKE_CURRENT_LIST_DIR}/../../components/log/. 501) 502 503else() 504 505message(SEND_ERROR "component_log_backend_ringbuffer.LPC802 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") 506 507endif() 508 509endif() 510 511 512if (CONFIG_USE_component_mem_manager) 513# Add set(CONFIG_USE_component_mem_manager true) in config.cmake to use this component 514 515message("component_mem_manager component is included from ${CMAKE_CURRENT_LIST_FILE}.") 516 517if(CONFIG_USE_driver_common AND CONFIG_USE_component_lists) 518 519target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE 520 ${CMAKE_CURRENT_LIST_DIR}/../../components/mem_manager/fsl_component_mem_manager.c 521) 522 523target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC 524 ${CMAKE_CURRENT_LIST_DIR}/../../components/mem_manager/. 525) 526 527else() 528 529message(SEND_ERROR "component_mem_manager.LPC802 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") 530 531endif() 532 533endif() 534 535 536if (CONFIG_USE_component_mem_manager_light) 537# Add set(CONFIG_USE_component_mem_manager_light true) in config.cmake to use this component 538 539message("component_mem_manager_light component is included from ${CMAKE_CURRENT_LIST_FILE}.") 540 541if(CONFIG_USE_driver_common AND CONFIG_USE_component_lists) 542 543target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE 544 ${CMAKE_CURRENT_LIST_DIR}/../../components/mem_manager/fsl_component_mem_manager_light.c 545) 546 547target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC 548 ${CMAKE_CURRENT_LIST_DIR}/../../components/mem_manager/. 549) 550 551else() 552 553message(SEND_ERROR "component_mem_manager_light.LPC802 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") 554 555endif() 556 557endif() 558 559 560if (CONFIG_USE_component_panic) 561# Add set(CONFIG_USE_component_panic true) in config.cmake to use this component 562 563message("component_panic 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/panic/fsl_component_panic.c 569) 570 571target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC 572 ${CMAKE_CURRENT_LIST_DIR}/../../components/panic/. 573) 574 575else() 576 577message(SEND_ERROR "component_panic.LPC802 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") 578 579endif() 580 581endif() 582 583 584if (CONFIG_USE_component_pwm_ctimer_adapter) 585# Add set(CONFIG_USE_component_pwm_ctimer_adapter true) in config.cmake to use this component 586 587message("component_pwm_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/pwm/fsl_adapter_pwm_ctimer.c 593) 594 595target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC 596 ${CMAKE_CURRENT_LIST_DIR}/../../components/pwm/. 597) 598 599else() 600 601message(SEND_ERROR "component_pwm_ctimer_adapter.LPC802 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") 602 603endif() 604 605endif() 606 607 608if (CONFIG_USE_component_reset_adapter) 609# Add set(CONFIG_USE_component_reset_adapter true) in config.cmake to use this component 610 611message("component_reset_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.") 612 613if(CONFIG_USE_driver_common) 614 615target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE 616 ${CMAKE_CURRENT_LIST_DIR}/../../components/reset/fsl_adapter_reset.c 617) 618 619target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC 620 ${CMAKE_CURRENT_LIST_DIR}/../../components/reset/. 621) 622 623else() 624 625message(SEND_ERROR "component_reset_adapter.LPC802 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") 626 627endif() 628 629endif() 630 631 632if (CONFIG_USE_component_software_rng_adapter) 633# Add set(CONFIG_USE_component_software_rng_adapter true) in config.cmake to use this component 634 635message("component_software_rng_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.") 636 637if(CONFIG_USE_driver_common) 638 639target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE 640 ${CMAKE_CURRENT_LIST_DIR}/../../components/rng/fsl_adapter_software_rng.c 641) 642 643target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC 644 ${CMAKE_CURRENT_LIST_DIR}/../../components/rng/. 645) 646 647else() 648 649message(SEND_ERROR "component_software_rng_adapter.LPC802 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") 650 651endif() 652 653endif() 654 655 656if (CONFIG_USE_utility_shell) 657# Add set(CONFIG_USE_utility_shell true) in config.cmake to use this component 658 659message("utility_shell component is included from ${CMAKE_CURRENT_LIST_FILE}.") 660 661if(CONFIG_USE_utility_str AND CONFIG_USE_component_lists AND CONFIG_USE_driver_common) 662 663target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE 664 ${CMAKE_CURRENT_LIST_DIR}/../../utilities/shell/fsl_shell.c 665) 666 667target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC 668 ${CMAKE_CURRENT_LIST_DIR}/../../utilities/shell/. 669) 670 671if(CONFIG_USE_COMPONENT_CONFIGURATION) 672 message("===>Import configuration from ${CMAKE_CURRENT_LIST_FILE}") 673 674 target_compile_definitions(${MCUX_SDK_PROJECT_NAME} PUBLIC 675 -DDEBUG_CONSOLE_RX_ENABLE=0 676 ) 677 678endif() 679 680else() 681 682message(SEND_ERROR "utility_shell.LPC802 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") 683 684endif() 685 686endif() 687 688 689if (CONFIG_USE_component_ctimer_adapter) 690# Add set(CONFIG_USE_component_ctimer_adapter true) in config.cmake to use this component 691 692message("component_ctimer_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.") 693 694if(CONFIG_USE_driver_common AND CONFIG_USE_driver_ctimer) 695 696target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE 697 ${CMAKE_CURRENT_LIST_DIR}/../../components/timer/fsl_adapter_ctimer.c 698) 699 700target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC 701 ${CMAKE_CURRENT_LIST_DIR}/../../components/timer/. 702) 703 704if(CONFIG_USE_COMPONENT_CONFIGURATION) 705 message("===>Import configuration from ${CMAKE_CURRENT_LIST_FILE}") 706 707 target_compile_definitions(${MCUX_SDK_PROJECT_NAME} PUBLIC 708 -DTIMER_PORT_TYPE_CTIMER=1 709 ) 710 711endif() 712 713else() 714 715message(SEND_ERROR "component_ctimer_adapter.LPC802 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") 716 717endif() 718 719endif() 720 721 722if (CONFIG_USE_component_mrt_adapter) 723# Add set(CONFIG_USE_component_mrt_adapter true) in config.cmake to use this component 724 725message("component_mrt_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.") 726 727if(CONFIG_USE_driver_common AND CONFIG_USE_driver_mrt) 728 729target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE 730 ${CMAKE_CURRENT_LIST_DIR}/../../components/timer/fsl_adapter_mrt.c 731) 732 733target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC 734 ${CMAKE_CURRENT_LIST_DIR}/../../components/timer/. 735) 736 737if(CONFIG_USE_COMPONENT_CONFIGURATION) 738 message("===>Import configuration from ${CMAKE_CURRENT_LIST_FILE}") 739 740 target_compile_definitions(${MCUX_SDK_PROJECT_NAME} PUBLIC 741 -DTIMER_PORT_TYPE_MRT=1 742 ) 743 744endif() 745 746else() 747 748message(SEND_ERROR "component_mrt_adapter.LPC802 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") 749 750endif() 751 752endif() 753 754 755if (CONFIG_USE_component_timer_manager) 756# Add set(CONFIG_USE_component_timer_manager true) in config.cmake to use this component 757 758message("component_timer_manager component is included from ${CMAKE_CURRENT_LIST_FILE}.") 759 760if(CONFIG_USE_driver_common AND CONFIG_USE_component_lists AND (CONFIG_USE_component_ctimer_adapter OR CONFIG_USE_component_mrt_adapter)) 761 762target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE 763 ${CMAKE_CURRENT_LIST_DIR}/../../components/timer_manager/fsl_component_timer_manager.c 764) 765 766target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC 767 ${CMAKE_CURRENT_LIST_DIR}/../../components/timer_manager/. 768) 769 770else() 771 772message(SEND_ERROR "component_timer_manager.LPC802 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") 773 774endif() 775 776endif() 777 778 779if (CONFIG_USE_component_miniusart_adapter) 780# Add set(CONFIG_USE_component_miniusart_adapter true) in config.cmake to use this component 781 782message("component_miniusart_adapter component is included from ${CMAKE_CURRENT_LIST_FILE}.") 783 784if(CONFIG_USE_driver_common AND CONFIG_USE_driver_lpc_miniusart) 785 786target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE 787 ${CMAKE_CURRENT_LIST_DIR}/../../components/uart/fsl_adapter_miniusart.c 788) 789 790target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC 791 ${CMAKE_CURRENT_LIST_DIR}/../../components/uart/. 792) 793 794else() 795 796message(SEND_ERROR "component_miniusart_adapter.LPC802 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") 797 798endif() 799 800endif() 801 802 803if (CONFIG_USE_driver_lpc_crc) 804# Add set(CONFIG_USE_driver_lpc_crc true) in config.cmake to use this component 805 806message("driver_lpc_crc component is included from ${CMAKE_CURRENT_LIST_FILE}.") 807 808if((CONFIG_DEVICE_ID STREQUAL LPC802) AND CONFIG_USE_driver_common) 809 810target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE 811 ${CMAKE_CURRENT_LIST_DIR}/../../drivers/lpc_crc/fsl_crc.c 812) 813 814target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC 815 ${CMAKE_CURRENT_LIST_DIR}/../../drivers/lpc_crc/. 816) 817 818else() 819 820message(SEND_ERROR "driver_lpc_crc.LPC802 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") 821 822endif() 823 824endif() 825 826 827if (CONFIG_USE_driver_ctimer) 828# Add set(CONFIG_USE_driver_ctimer true) in config.cmake to use this component 829 830message("driver_ctimer component is included from ${CMAKE_CURRENT_LIST_FILE}.") 831 832if((CONFIG_DEVICE_ID STREQUAL LPC802) AND CONFIG_USE_driver_common) 833 834target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE 835 ${CMAKE_CURRENT_LIST_DIR}/../../drivers/ctimer/fsl_ctimer.c 836) 837 838target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC 839 ${CMAKE_CURRENT_LIST_DIR}/../../drivers/ctimer/. 840) 841 842else() 843 844message(SEND_ERROR "driver_ctimer.LPC802 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") 845 846endif() 847 848endif() 849 850 851if (CONFIG_USE_driver_iap) 852# Add set(CONFIG_USE_driver_iap true) in config.cmake to use this component 853 854message("driver_iap component is included from ${CMAKE_CURRENT_LIST_FILE}.") 855 856if((CONFIG_DEVICE_ID STREQUAL LPC802) AND CONFIG_USE_driver_common) 857 858target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE 859 ${CMAKE_CURRENT_LIST_DIR}/../../drivers/iap/fsl_iap.c 860) 861 862target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC 863 ${CMAKE_CURRENT_LIST_DIR}/../../drivers/iap/. 864) 865 866else() 867 868message(SEND_ERROR "driver_iap.LPC802 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") 869 870endif() 871 872endif() 873 874 875if (CONFIG_USE_driver_lpc_acomp) 876# Add set(CONFIG_USE_driver_lpc_acomp true) in config.cmake to use this component 877 878message("driver_lpc_acomp component is included from ${CMAKE_CURRENT_LIST_FILE}.") 879 880if((CONFIG_DEVICE_ID STREQUAL LPC802) AND CONFIG_USE_driver_common) 881 882target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE 883 ${CMAKE_CURRENT_LIST_DIR}/../../drivers/lpc_acomp/fsl_acomp.c 884) 885 886target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC 887 ${CMAKE_CURRENT_LIST_DIR}/../../drivers/lpc_acomp/. 888) 889 890else() 891 892message(SEND_ERROR "driver_lpc_acomp.LPC802 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") 893 894endif() 895 896endif() 897 898 899if (CONFIG_USE_driver_lpc_adc) 900# Add set(CONFIG_USE_driver_lpc_adc true) in config.cmake to use this component 901 902message("driver_lpc_adc component is included from ${CMAKE_CURRENT_LIST_FILE}.") 903 904if((CONFIG_DEVICE_ID STREQUAL LPC802) AND CONFIG_USE_driver_common) 905 906target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE 907 ${CMAKE_CURRENT_LIST_DIR}/../../drivers/lpc_adc/fsl_adc.c 908) 909 910target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC 911 ${CMAKE_CURRENT_LIST_DIR}/../../drivers/lpc_adc/. 912) 913 914else() 915 916message(SEND_ERROR "driver_lpc_adc.LPC802 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") 917 918endif() 919 920endif() 921 922 923if (CONFIG_USE_driver_lpc_gpio) 924# Add set(CONFIG_USE_driver_lpc_gpio true) in config.cmake to use this component 925 926message("driver_lpc_gpio component is included from ${CMAKE_CURRENT_LIST_FILE}.") 927 928if((CONFIG_DEVICE_ID STREQUAL LPC802) AND CONFIG_USE_driver_common) 929 930target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE 931 ${CMAKE_CURRENT_LIST_DIR}/../../drivers/lpc_gpio/fsl_gpio.c 932) 933 934target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC 935 ${CMAKE_CURRENT_LIST_DIR}/../../drivers/lpc_gpio/. 936) 937 938else() 939 940message(SEND_ERROR "driver_lpc_gpio.LPC802 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") 941 942endif() 943 944endif() 945 946 947if (CONFIG_USE_driver_lpc_i2c) 948# Add set(CONFIG_USE_driver_lpc_i2c true) in config.cmake to use this component 949 950message("driver_lpc_i2c component is included from ${CMAKE_CURRENT_LIST_FILE}.") 951 952if(CONFIG_USE_driver_common AND (CONFIG_DEVICE_ID STREQUAL LPC802)) 953 954target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE 955 ${CMAKE_CURRENT_LIST_DIR}/../../drivers/lpc_i2c/fsl_i2c.c 956) 957 958target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC 959 ${CMAKE_CURRENT_LIST_DIR}/../../drivers/lpc_i2c/. 960) 961 962else() 963 964message(SEND_ERROR "driver_lpc_i2c.LPC802 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") 965 966endif() 967 968endif() 969 970 971if (CONFIG_USE_driver_lpc_iocon_lite) 972# Add set(CONFIG_USE_driver_lpc_iocon_lite true) in config.cmake to use this component 973 974message("driver_lpc_iocon_lite component is included from ${CMAKE_CURRENT_LIST_FILE}.") 975 976if((CONFIG_DEVICE_ID STREQUAL LPC802) AND CONFIG_USE_driver_common) 977 978target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC 979 ${CMAKE_CURRENT_LIST_DIR}/../../drivers/lpc_iocon_lite/. 980) 981 982else() 983 984message(SEND_ERROR "driver_lpc_iocon_lite.LPC802 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") 985 986endif() 987 988endif() 989 990 991if (CONFIG_USE_driver_lpc_minispi) 992# Add set(CONFIG_USE_driver_lpc_minispi true) in config.cmake to use this component 993 994message("driver_lpc_minispi component is included from ${CMAKE_CURRENT_LIST_FILE}.") 995 996if((CONFIG_DEVICE_ID STREQUAL LPC802) AND CONFIG_USE_driver_common) 997 998target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE 999 ${CMAKE_CURRENT_LIST_DIR}/../../drivers/lpc_minispi/fsl_spi.c 1000) 1001 1002target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC 1003 ${CMAKE_CURRENT_LIST_DIR}/../../drivers/lpc_minispi/. 1004) 1005 1006else() 1007 1008message(SEND_ERROR "driver_lpc_minispi.LPC802 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") 1009 1010endif() 1011 1012endif() 1013 1014 1015if (CONFIG_USE_driver_lpc_miniusart) 1016# Add set(CONFIG_USE_driver_lpc_miniusart true) in config.cmake to use this component 1017 1018message("driver_lpc_miniusart component is included from ${CMAKE_CURRENT_LIST_FILE}.") 1019 1020if((CONFIG_DEVICE_ID STREQUAL LPC802) AND CONFIG_USE_driver_common) 1021 1022target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE 1023 ${CMAKE_CURRENT_LIST_DIR}/../../drivers/lpc_miniusart/fsl_usart.c 1024) 1025 1026target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC 1027 ${CMAKE_CURRENT_LIST_DIR}/../../drivers/lpc_miniusart/. 1028) 1029 1030else() 1031 1032message(SEND_ERROR "driver_lpc_miniusart.LPC802 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") 1033 1034endif() 1035 1036endif() 1037 1038 1039if (CONFIG_USE_driver_mrt) 1040# Add set(CONFIG_USE_driver_mrt true) in config.cmake to use this component 1041 1042message("driver_mrt component is included from ${CMAKE_CURRENT_LIST_FILE}.") 1043 1044if((CONFIG_DEVICE_ID STREQUAL LPC802) AND CONFIG_USE_driver_common) 1045 1046target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE 1047 ${CMAKE_CURRENT_LIST_DIR}/../../drivers/mrt/fsl_mrt.c 1048) 1049 1050target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC 1051 ${CMAKE_CURRENT_LIST_DIR}/../../drivers/mrt/. 1052) 1053 1054else() 1055 1056message(SEND_ERROR "driver_mrt.LPC802 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") 1057 1058endif() 1059 1060endif() 1061 1062 1063if (CONFIG_USE_driver_pint) 1064# Add set(CONFIG_USE_driver_pint true) in config.cmake to use this component 1065 1066message("driver_pint component is included from ${CMAKE_CURRENT_LIST_FILE}.") 1067 1068if((CONFIG_DEVICE_ID STREQUAL LPC802) AND CONFIG_USE_driver_common) 1069 1070target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE 1071 ${CMAKE_CURRENT_LIST_DIR}/../../drivers/pint/fsl_pint.c 1072) 1073 1074target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC 1075 ${CMAKE_CURRENT_LIST_DIR}/../../drivers/pint/. 1076) 1077 1078else() 1079 1080message(SEND_ERROR "driver_pint.LPC802 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") 1081 1082endif() 1083 1084endif() 1085 1086 1087if (CONFIG_USE_driver_reset) 1088# Add set(CONFIG_USE_driver_reset true) in config.cmake to use this component 1089 1090message("driver_reset component is included from ${CMAKE_CURRENT_LIST_FILE}.") 1091 1092if(CONFIG_USE_driver_common AND (CONFIG_DEVICE_ID STREQUAL LPC802)) 1093 1094target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE 1095 ${CMAKE_CURRENT_LIST_DIR}/drivers/fsl_reset.c 1096) 1097 1098target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC 1099 ${CMAKE_CURRENT_LIST_DIR}/drivers/. 1100) 1101 1102else() 1103 1104message(SEND_ERROR "driver_reset.LPC802 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") 1105 1106endif() 1107 1108endif() 1109 1110 1111if (CONFIG_USE_driver_swm) 1112# Add set(CONFIG_USE_driver_swm true) in config.cmake to use this component 1113 1114message("driver_swm component is included from ${CMAKE_CURRENT_LIST_FILE}.") 1115 1116if((CONFIG_DEVICE_ID STREQUAL LPC802) AND CONFIG_USE_driver_common AND CONFIG_USE_driver_swm_connections) 1117 1118target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE 1119 ${CMAKE_CURRENT_LIST_DIR}/../../drivers/swm/fsl_swm.c 1120) 1121 1122target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC 1123 ${CMAKE_CURRENT_LIST_DIR}/../../drivers/swm/. 1124) 1125 1126else() 1127 1128message(SEND_ERROR "driver_swm.LPC802 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") 1129 1130endif() 1131 1132endif() 1133 1134 1135if (CONFIG_USE_driver_syscon) 1136# Add set(CONFIG_USE_driver_syscon true) in config.cmake to use this component 1137 1138message("driver_syscon component is included from ${CMAKE_CURRENT_LIST_FILE}.") 1139 1140if((CONFIG_DEVICE_ID STREQUAL LPC802) AND CONFIG_USE_driver_common AND CONFIG_USE_driver_syscon_connections) 1141 1142target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE 1143 ${CMAKE_CURRENT_LIST_DIR}/../../drivers/syscon/fsl_syscon.c 1144) 1145 1146target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC 1147 ${CMAKE_CURRENT_LIST_DIR}/../../drivers/syscon/. 1148) 1149 1150else() 1151 1152message(SEND_ERROR "driver_syscon.LPC802 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") 1153 1154endif() 1155 1156endif() 1157 1158 1159if (CONFIG_USE_driver_wkt) 1160# Add set(CONFIG_USE_driver_wkt true) in config.cmake to use this component 1161 1162message("driver_wkt component is included from ${CMAKE_CURRENT_LIST_FILE}.") 1163 1164if((CONFIG_DEVICE_ID STREQUAL LPC802) AND CONFIG_USE_driver_common) 1165 1166target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE 1167 ${CMAKE_CURRENT_LIST_DIR}/../../drivers/wkt/fsl_wkt.c 1168) 1169 1170target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC 1171 ${CMAKE_CURRENT_LIST_DIR}/../../drivers/wkt/. 1172) 1173 1174else() 1175 1176message(SEND_ERROR "driver_wkt.LPC802 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") 1177 1178endif() 1179 1180endif() 1181 1182 1183if (CONFIG_USE_driver_wwdt) 1184# Add set(CONFIG_USE_driver_wwdt true) in config.cmake to use this component 1185 1186message("driver_wwdt component is included from ${CMAKE_CURRENT_LIST_FILE}.") 1187 1188if((CONFIG_DEVICE_ID STREQUAL LPC802) AND CONFIG_USE_driver_common) 1189 1190target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE 1191 ${CMAKE_CURRENT_LIST_DIR}/../../drivers/wwdt/fsl_wwdt.c 1192) 1193 1194target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC 1195 ${CMAKE_CURRENT_LIST_DIR}/../../drivers/wwdt/. 1196) 1197 1198else() 1199 1200message(SEND_ERROR "driver_wwdt.LPC802 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") 1201 1202endif() 1203 1204endif() 1205 1206