From 3c2a023cfc002d89c3617988f626b1d4d541032a Mon Sep 17 00:00:00 2001 From: Jack Rubacha Date: Sat, 28 Mar 2026 23:04:50 -0400 Subject: [PATCH 1/2] try deploy --- dev/Dockerfile | 4 ++-- middleware/src/c_utils.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dev/Dockerfile b/dev/Dockerfile index c379f815..25686d0c 100644 --- a/dev/Dockerfile +++ b/dev/Dockerfile @@ -54,9 +54,9 @@ RUN ln -sf /usr/lib/linux-tools-*/* /usr/bin/ # Install cross compiler RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then \ - wget -qO- https://developer.arm.com/-/media/Files/downloads/gnu/11.3.rel1/binrel/arm-gnu-toolchain-11.3.rel1-aarch64-arm-none-eabi.tar.xz | tar -xJv; \ + wget -qO- https://developer.arm.com/-/media/Files/downloads/gnu/14.2.rel1/binrel/arm-gnu-toolchain-14.2.rel1-aarch64-arm-none-eabi.tar.xz | tar -xJv; \ else \ - wget -qO- https://developer.arm.com/-/media/Files/downloads/gnu/11.3.rel1/binrel/arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-eabi.tar.xz | tar -xJv; \ + wget -qO- https://developer.arm.com/-/media/Files/downloads/gnu/14.2.rel1/binrel/arm-gnu-toolchain-14.2.rel1-x86_64-arm-none-eabi.tar.xz | tar -xJv; \ fi ENV PATH $PATH:/home/dev/arm-gnu-toolchain-11.3.rel1-aarch64-arm-none-eabi/bin diff --git a/middleware/src/c_utils.c b/middleware/src/c_utils.c index c64df63a..00006b33 100644 --- a/middleware/src/c_utils.c +++ b/middleware/src/c_utils.c @@ -26,7 +26,7 @@ unsigned char reverse_bits(unsigned char b) float linear_interpolate(float x, float x1, float x2, float y1, float y2) { - assert(fabs(x2 - x1) > FLOAT_EPSILON); + assert(fabsf(x2 - x1) > FLOAT_EPSILON); return y1 + ((x - x1) * (y2 - y1) / (x2 - x1)); } @@ -40,4 +40,4 @@ void uint16_to_uint8(uint16_t value, uint8_t arr[2]) { arr[1] = (uint8_t)value; arr[0] = (uint8_t)(value >> 8); -} \ No newline at end of file +} From 0c3f8f6de176ecb7a3b82819cfb46273bc173186 Mon Sep 17 00:00:00 2001 From: Jack Rubacha Date: Sat, 28 Mar 2026 23:46:33 -0400 Subject: [PATCH 2/2] oops --- NetX/src/u_nx_ethernet.c | 2 +- dev/Dockerfile | 4 ++-- threadX/inc/u_tx_debug.h | 26 +++++++++++++++++++------- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/NetX/src/u_nx_ethernet.c b/NetX/src/u_nx_ethernet.c index d1a6ee38..fa282fe9 100644 --- a/NetX/src/u_nx_ethernet.c +++ b/NetX/src/u_nx_ethernet.c @@ -122,7 +122,7 @@ static void _receive_message(NX_UDP_SOCKET *socket) { /* Process received message */ if(status == NX_SUCCESS) { - PRINTLN_INFO("Received ethernet message! (Sender ID: %d, Message ID: %d, bytes_copied: %d).", message.sender_id, message.message_id, bytes_copied); + PRINTLN_INFO("Received ethernet message! (Sender ID: %d, Message ID: %d, bytes_copied: %ld).", message.sender_id, message.message_id, bytes_copied); device.on_recieve(message); } } diff --git a/dev/Dockerfile b/dev/Dockerfile index 25686d0c..a9b8f633 100644 --- a/dev/Dockerfile +++ b/dev/Dockerfile @@ -59,8 +59,8 @@ else \ wget -qO- https://developer.arm.com/-/media/Files/downloads/gnu/14.2.rel1/binrel/arm-gnu-toolchain-14.2.rel1-x86_64-arm-none-eabi.tar.xz | tar -xJv; \ fi -ENV PATH $PATH:/home/dev/arm-gnu-toolchain-11.3.rel1-aarch64-arm-none-eabi/bin -ENV PATH $PATH:/home/dev/arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-eabi/bin +ENV PATH $PATH:/home/dev/arm-gnu-toolchain-14.2.rel1-aarch64-arm-none-eabi/bin +ENV PATH $PATH:/home/dev/arm-gnu-toolchain-14.2.rel1-x86_64-arm-none-eabi/bin # build and install customized openocd RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \ diff --git a/threadX/inc/u_tx_debug.h b/threadX/inc/u_tx_debug.h index 2f7e6ff7..9eb96e18 100644 --- a/threadX/inc/u_tx_debug.h +++ b/threadX/inc/u_tx_debug.h @@ -17,7 +17,7 @@ /* Gets the name of the file. */ #define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__) -/* DEBUG MESSAGE LEVELS */ +/* DEBUG MESSAGE LEVELS */ /* These can be commented out to enable/disable printing of the associated debug messages. */ #define LOG_ERROR /* Messages indicating that something has definitely gone wrong. */ #define LOG_WARNING /* Messages indicating that something 'might' have gone wrong, but either isn't immidietely critical or is only a problem in certain contexts. */ @@ -35,21 +35,33 @@ /* PRINTLN_ERROR() */ #if defined(LOG_ERROR) && !defined(NO_LOG) - #define PRINTLN_ERROR(message, ...) printf("[%s/%s()] ERROR: " message "\n", __FILENAME__, __func__, ##__VA_ARGS__) /* Prints an ERROR message in the format: "[file_name.c/function()] ERROR: {message}"*/ + #define PRINTLN_ERROR(message, ...) \ + _Pragma("GCC diagnostic push") \ + _Pragma("GCC diagnostic ignored \"-Wdouble-promotion\"") \ + printf("[%s/%s()] ERROR: " message "\n", __FILENAME__, __func__, ##__VA_ARGS__) /* Prints an ERROR message in the format: "[file_name.c/function()] ERROR: {message}"*/ + _Pragma("GCC diagnostic pop") #else #define PRINTLN_ERROR(message, ...) /* If debugging is turned off, macro doesn't need to expand to anything. */ #endif /* PRINTLN_WARNING() */ #if defined(LOG_WARNING) && !defined(NO_LOG) - #define PRINTLN_WARNING(message, ...) printf("[%s/%s()] WARNING: " message "\n", __FILENAME__, __func__, ##__VA_ARGS__) /* Prints a WARNING message in the format: "[file_name.c/function()] WARNING: {message}"*/ + #define PRINTLN_WARNING(message, ...) \ + _Pragma("GCC diagnostic push") \ + _Pragma("GCC diagnostic ignored \"-Wdouble-promotion\"") \ + printf("[%s/%s()] WARNING: " message "\n", __FILENAME__, __func__, ##__VA_ARGS__) /* Prints a WARNING message in the format: "[file_name.c/function()] WARNING: {message}"*/ + _Pragma("GCC diagnostic pop") #else #define PRINTLN_WARNING(message, ...) /* If debugging is turned off, macro doesn't need to expand to anything. */ #endif /* PRINTLN_INFO() */ #if defined(LOG_INFO) && !defined(NO_LOG) - #define PRINTLN_INFO(message, ...) printf("[%s/%s()] INFO: " message "\n", __FILENAME__, __func__, ##__VA_ARGS__) /* Prints an INFO message in the format: "[file_name.c/function()] INFO: {message}"*/ + #define PRINTLN_INFO(message, ...) \ + _Pragma("GCC diagnostic push") \ + _Pragma("GCC diagnostic ignored \"-Wdouble-promotion\"") \ + printf("[%s/%s()] INFO: " message "\n", __FILENAME__, __func__, ##__VA_ARGS__) /* Prints an INFO message in the format: "[file_name.c/function()] INFO: {message}"*/ + _Pragma("GCC diagnostic pop") #else #define PRINTLN_INFO(message, ...) /* If debugging is turned off, macro doesn't need to expand to anything. */ #endif @@ -58,8 +70,8 @@ * @brief Checks if a function is successful when called. Prints an error message if it fails. * @param function_call The function to call. * @param success The function's success code/macro (e.g., U_SUCCESS, TX_SUCCESS, etc.). - * - * @note This macro intentionally doesn't support custom error messages, for the sake of readability. If an error is complex enough to + * + * @note This macro intentionally doesn't support custom error messages, for the sake of readability. If an error is complex enough to * require a custom message, the error should probably be checked manually and PRINTLN_ERROR() called directly. */ #define CATCH_ERROR(function_call, success) do { \ @@ -82,4 +94,4 @@ const char *hal_status_toString(HAL_StatusTypeDef status); // clang-format on -#endif \ No newline at end of file +#endif