diff options
author | Kshitij Sisodia <kshitij.sisodia@arm.com> | 2021-05-07 16:08:14 +0100 |
---|---|---|
committer | Kshitij Sisodia <kshitij.sisodia@arm.com> | 2021-05-07 17:28:51 +0100 |
commit | f9c19eaa9ab11e4409679fc6d2862c89410493a7 (patch) | |
tree | b791a4c03f1fe986a2ac32593a3dc817ae3f247a /source/application/hal/platforms/native | |
parent | 2181d0ac35f30202985a877950c88325ff665f6b (diff) | |
download | ml-embedded-evaluation-kit-f9c19eaa9ab11e4409679fc6d2862c89410493a7.tar.gz |
MLECO-1860: Support for Arm GNU Embedded Toolchain
This patch enables compilation of ML use cases bare-metal applications
using Arm GNU Embedded Toolchain. The GNU toolchain can be used instead
of the Arm Compiler that was already supported.
The GNU toolchain is also set as the default toolchain when building
applications for the MPS3 target.
Note: The version of GNU toolchain must be 10.2.1 or higher.
Change-Id: I5fff242f0f52d2db6c75d292f9fa990df1aec978
Signed-off-by: Kshitij Sisodia <kshitij.sisodia@arm.com>
Diffstat (limited to 'source/application/hal/platforms/native')
-rw-r--r-- | source/application/hal/platforms/native/data_acquisition/data_acq.c | 4 | ||||
-rw-r--r-- | source/application/hal/platforms/native/data_presentation/log/log.c | 18 |
2 files changed, 19 insertions, 3 deletions
diff --git a/source/application/hal/platforms/native/data_acquisition/data_acq.c b/source/application/hal/platforms/native/data_acquisition/data_acq.c index 01f47fa..9b6815b 100644 --- a/source/application/hal/platforms/native/data_acquisition/data_acq.c +++ b/source/application/hal/platforms/native/data_acquisition/data_acq.c @@ -37,7 +37,9 @@ static int acquisition_init(void) **/ static int get_user_input(char* user_input, int size) { - fgets(user_input, size, stdin); + if (NULL == fgets(user_input, size, stdin)) { + return 1; + } return 0; } diff --git a/source/application/hal/platforms/native/data_presentation/log/log.c b/source/application/hal/platforms/native/data_presentation/log/log.c index 6ce6684..8dffba9 100644 --- a/source/application/hal/platforms/native/data_presentation/log/log.c +++ b/source/application/hal/platforms/native/data_presentation/log/log.c @@ -20,6 +20,14 @@ #include <stdint.h> +#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wunused-parameter" +#elif defined(__GNUC__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wunused-parameter" +#endif + int log_psn_init(void) { return 0; @@ -50,10 +58,10 @@ int log_display_text(const char* str, const size_t str_sz, int log_display_box_icon(const uint32_t pos_x, const uint32_t pos_y, - const uint32_t width, const uint32_t height, + const uint32_t width, const uint32_t height, const uint16_t color) { - debug("Showing rectangular, width: %d, height: %d, color: %d, x: %d, y: %d\n", + debug("Showing rectangular, width: %d, height: %d, color: %d, x: %d, y: %d\n", width, height, color, pos_x, pos_y); return 0; } @@ -69,3 +77,9 @@ int log_set_text_color (const uint16_t color) debug("Setting text color: %d\n", color); return 0; } + +#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) + #pragma clang diagnostic pop +#elif defined(__GNUC__) + #pragma GCC diagnostic pop +#endif |