Initial commit.
Signed-off-by: Yilin Sun <imi415@imi.moe>
This commit is contained in:
commit
ebce09f00c
|
@ -0,0 +1,4 @@
|
|||
.mbedbuild
|
||||
cmake_build/
|
||||
cmake-build-*
|
||||
mbed-os
|
|
@ -0,0 +1,27 @@
|
|||
# Copyright (c) 2022 ARM Limited. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
cmake_minimum_required(VERSION 3.19.0)
|
||||
|
||||
set(MBED_PATH ${CMAKE_CURRENT_SOURCE_DIR}/mbed-os CACHE INTERNAL "")
|
||||
set(MBED_CONFIG_PATH ${CMAKE_CURRENT_BINARY_DIR} CACHE INTERNAL "")
|
||||
set(APP_TARGET hello_world)
|
||||
|
||||
include(${MBED_PATH}/tools/cmake/app.cmake)
|
||||
|
||||
project(${APP_TARGET})
|
||||
|
||||
add_subdirectory(${MBED_PATH})
|
||||
|
||||
add_executable(${APP_TARGET}
|
||||
main.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(${APP_TARGET} mbed-os)
|
||||
|
||||
mbed_set_post_build(${APP_TARGET})
|
||||
|
||||
option(VERBOSE_BUILD "Have a verbose build process")
|
||||
if(VERBOSE_BUILD)
|
||||
set(CMAKE_VERBOSE_MAKEFILE ON)
|
||||
endif()
|
|
@ -0,0 +1,20 @@
|
|||
/* mbed Microcontroller Library
|
||||
* Copyright (c) 2022 ARM Limited
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "mbed.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
printf("Hello, Mbed!\n");
|
||||
|
||||
DigitalOut led(GPIO_AD_B0_00);
|
||||
|
||||
for(;;) {
|
||||
led = !led;
|
||||
ThisThread::sleep_for(500ms);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
https://github.com/imi415/mbed-os#imxrt_ldscript_syntax
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"target_overrides": {
|
||||
"K64F": {
|
||||
"platform.stdio-baud-rate": 9600
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue