From bd59c79d70d9cb2e8bd5fd4b13204cf6df6fcd62 Mon Sep 17 00:00:00 2001 From: Kristofer Jonsson Date: Tue, 9 Mar 2021 09:18:46 +0100 Subject: Hello world application Adding hello world application that is useful when porting the stack to a new target platform. Change-Id: I28ba96d9fac1489d73b84cb7940d05cf9860e4ed --- applications/CMakeLists.txt | 2 ++ applications/hello_world/CMakeLists.txt | 20 ++++++++++++++++++++ applications/hello_world/main.cpp | 24 ++++++++++++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 applications/hello_world/CMakeLists.txt create mode 100644 applications/hello_world/main.cpp diff --git a/applications/CMakeLists.txt b/applications/CMakeLists.txt index 178fc53..4950c51 100644 --- a/applications/CMakeLists.txt +++ b/applications/CMakeLists.txt @@ -18,6 +18,8 @@ add_subdirectory(freertos) +add_subdirectory(hello_world) + if (CMAKE_CXX_COMPILER_ID STREQUAL "ARMClang") # Only armclang supported for now add_subdirectory(trustzone_inference) diff --git a/applications/hello_world/CMakeLists.txt b/applications/hello_world/CMakeLists.txt new file mode 100644 index 0000000..1b500dc --- /dev/null +++ b/applications/hello_world/CMakeLists.txt @@ -0,0 +1,20 @@ +# +# Copyright (c) 2021 Arm Limited. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the License); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an AS IS BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +ethosu_add_executable_test(hello_world PRIVATE + SOURCES main.cpp) diff --git a/applications/hello_world/main.cpp b/applications/hello_world/main.cpp new file mode 100644 index 0000000..6dd745a --- /dev/null +++ b/applications/hello_world/main.cpp @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2021 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +int main() { + printf("Hello world\n"); + return 0; +} -- cgit v1.2.1