From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb1-xb35.google.com (mail-yb1-xb35.google.com [IPv6:2607:f8b0:4864:20::b35]) by sourceware.org (Postfix) with ESMTPS id 565DF384AB58 for ; Fri, 3 May 2024 17:05:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 565DF384AB58 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 565DF384AB58 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::b35 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714755908; cv=none; b=G0iEZW1y1RWmEc++pfE53C/OuqlvrdX174LbDsLH9P38kzwlMSqw5y28vZXQBNvvAdtEjfSFFplP6KUIU+ZLtLPjZPoPkRP2/BoIQhy9s1lG5HzeO+dL5VCXFRKB/x4aWLGu5fqzKLN+G/uceQcLnYYHvF938axKFa6r26M9+7c= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714755908; c=relaxed/simple; bh=Wu4y5yMI2t7h2DEVa/SWEpC0PBQoi1dqwf/Ibk/huPc=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=rKFKBFnpPCQlfrAr78ykpc/gr6oaFa3OXOMkZfwxxlZcCra0qVTA3cTAV+tD0CfXagm/bnpm/PZ/wZeQpJdl/4qwOfr9BRdqAiI1gIw3FuOkzLBpObTfRA/AdJ7CKjmHXMLpBUIo0C5yIDmzzG1diS/AohwF7ex3KM42H+s6woo= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-yb1-xb35.google.com with SMTP id 3f1490d57ef6-de6074a464aso5369606276.0 for ; Fri, 03 May 2024 10:05:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714755905; x=1715360705; darn=sourceware.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Wu4y5yMI2t7h2DEVa/SWEpC0PBQoi1dqwf/Ibk/huPc=; b=A3Em9/SE0OtYnE/NkRPHvg/7/LqFYbE9ZyDNKhF/oWo/DLyK8mm6bpoy//vEPnzwX6 FfoPkPPbvv0e5wC0u0OaVyZIyKZy9VBHeWwXtuTm6X/J/zgI5tljqKep72Hhjs2VcpJn suayQE7KgJnrlFgbZd/TAXDtiM9DKklGA1pxU4Ud47Jv+Tk30wTKEj2W/2Cl9uLzamT8 6BNNWbPgE1atv62lqMZeEZn4ssoJl9sxE7OTJGm4HX+jEu44TppZOzznhLCkb43IunhI 6erY1x/UJKSi93jy1vWdq12BEfKyaksz84WrwDAUr8Utcyi3YTUMlfrrCUbiUVI1b5R9 XdDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714755905; x=1715360705; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Wu4y5yMI2t7h2DEVa/SWEpC0PBQoi1dqwf/Ibk/huPc=; b=ui6nnfDM1esqO5ysqOHuG/e1T/7fczkCUZW9Y4aKnZRY3TXqDp+dzHMwBcs62gsyQE t9DbApVL+xj5PayrIWAbhkbrj1d4ZRasZqksVaXdGgStWz3nvziIzL9A/ItYDDvKRiuk w/3x6ES4p7pFYoyB6koW7HEJI6sFJcVBGNntyfqVN5UA84eSZwAbh1ADqOIht0s3ODtz 86azNWyKMK6sQuFUkUbpUmoz5vQsyWPYKEhksNJXCZ68Gx/8+p7s36AhLWJNFvtIIY/q VD3LoDUfvzeTPi07DpUnK1bOu3fhuewlHcTjVqpzx6XMQz23TX41HnzuQSaDOlgL2Zw1 3RlQ== X-Gm-Message-State: AOJu0YwLzkuD8Nl3X2xdmrSX8dqfVQxbgLlAOB4///3jrzz6ndAFRbsk s+C1adwdtsIq4VaMebFrVCcVUw88UbtUIXZbvRO/wGxiRbpgB4fNqT4zsxlMsgBforCXvXaLnFW c2yBT6YrU/OQwUet457K7UQi1nFJfFA== X-Google-Smtp-Source: AGHT+IGErOeE9K53hzkLInyF7TiBFPIE05JFzqt4UFiewCM2PBIFZUPjIvKJcs6YjT9+EGIjW3OfUITUcczWHCQPp98= X-Received: by 2002:a25:b0e:0:b0:dc7:4ad4:c977 with SMTP id 14-20020a250b0e000000b00dc74ad4c977mr3250134ybl.25.1714755905607; Fri, 03 May 2024 10:05:05 -0700 (PDT) MIME-Version: 1.0 References: <7d34047b-428f-42df-ba0c-9436597ee79d@arm.com> In-Reply-To: <7d34047b-428f-42df-ba0c-9436597ee79d@arm.com> From: "Ernesto Vigano'" Date: Fri, 3 May 2024 19:04:54 +0200 Message-ID: Subject: Re: ARM GNU Toolchain 13.2Rel1 newlib issue with sprintf and floating point To: Christophe Lyon Cc: newlib@sourceware.org Content-Type: multipart/alternative; boundary="000000000000a1623206178fb8ce" X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --000000000000a1623206178fb8ce Content-Type: text/plain; charset="UTF-8" It's a copy-paste error. The syntax is the right one Il ven 3 mag 2024, 09:22 Christophe Lyon ha scritto: > Hi, > > > > On 5/3/24 08:11, Ernesto Vigano' wrote: > > I need to use sprintf with floating point numbers (%f format specifier) > > in a project based on rpmsg_lite_str_echo_rtos on the cortex-M (NXP > > Processor). > > I use the recommended > > arm-gnu-toolchain-12.3.rel1-mingw-w64-i686-arm-none-eabi > > I see that when I call > > > > sprintf(str, "%d" 3); > > > > the number 3 is printed to the string str. > > > > But if I have a floating point number and I use "%f" format specifier > > > > sprintf(str, "%f" 3.5); > > Is this a copy/paste error, or did you forget the ',' before the number > you want to print? > > Thanks, > > Christophe > > > > > I get > > ASSERT ERROR " Balloc succeeded ": file > > > "/data/jenkins/workspace/GNU-toolchain/arm-12/src/newlib-cygwin/newlib/libc/stdlib/mprec.c" > Line "783" function name "" > > > > It seems similar to this error > > forum.pjrc.com/index.php > > < > https://forum.pjrc.com/index.php?threads/strange-compiling-problem-assertion-balloc-succeeded-failed-file-data-jenkins-w.72798/ > > > > that points to this fix > > github.com/.../f88aece242178ff0c187d56e34a79645fbc44a23 > > < > https://github.com/zephyrproject-rtos/newlib-cygwin/commit/f88aece242178ff0c187d56e34a79645fbc44a23 > > > > > > Is there a way to have sprintf working with floating point numbers? > > > > Thanks > --000000000000a1623206178fb8ce--