diff options
author | Kshitij Sisodia <kshitij.sisodia@arm.com> | 2022-03-03 16:30:07 +0000 |
---|---|---|
committer | Isabella Gottardi <isabella.gottardi@arm.com> | 2022-03-04 11:09:15 +0000 |
commit | d5679cc8db0a6ab43369eb91089ea5fe015f552f (patch) | |
tree | 4477b3f1e5b5a70066d958d98e61ba6e5a183bb5 /source/hal/profiles | |
parent | b4123fd715e41070be5bb39600625c740185f562 (diff) | |
download | ml-embedded-evaluation-kit-d5679cc8db0a6ab43369eb91089ea5fe015f552f.tar.gz |
MLECO-2984: Refactor components
* Use UART component from Ethos-U core-platform
* Components as cmake project
Change-Id: I053f3a59800abc20216e6a4df8555db357e3f21d
Signed-off-by: Isabella Gottardi <isabella.gottardi@arm.com>
Diffstat (limited to 'source/hal/profiles')
-rw-r--r-- | source/hal/profiles/bare-metal/bsp/retarget.c | 9 | ||||
-rw-r--r-- | source/hal/profiles/bare-metal/data_acquisition/data_acq.c | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/source/hal/profiles/bare-metal/bsp/retarget.c b/source/hal/profiles/bare-metal/bsp/retarget.c index 9ed3004..ac9b282 100644 --- a/source/hal/profiles/bare-metal/bsp/retarget.c +++ b/source/hal/profiles/bare-metal/bsp/retarget.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Arm Limited. All rights reserved. + * Copyright (c) 2022 Arm Limited. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -64,6 +64,13 @@ const char __stdin_name[] __attribute__((aligned(4))) = "STDIN"; const char __stdout_name[] __attribute__((aligned(4))) = "STDOUT"; const char __stderr_name[] __attribute__((aligned(4))) = "STDERR"; +__attribute__((noreturn)) static void UartEndSimulation(int code) +{ + UartPutc((char) 0x4); // End of simulation + UartPutc((char) code); // Exit code + while(1); +} + void _ttywrch(int ch) { (void)fputc(ch, stdout); } diff --git a/source/hal/profiles/bare-metal/data_acquisition/data_acq.c b/source/hal/profiles/bare-metal/data_acquisition/data_acq.c index b7eba2d..84d80a6 100644 --- a/source/hal/profiles/bare-metal/data_acquisition/data_acq.c +++ b/source/hal/profiles/bare-metal/data_acquisition/data_acq.c @@ -32,7 +32,7 @@ **/ static int get_uart_user_input(char* user_input, int size) { - if (true != GetLine(user_input, size - 1)) { + if (1 != GetLine(user_input, size - 1)) { return 1; } return 0; |