From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by sourceware.org (Postfix) with ESMTPS id 154BD3858C53 for ; Wed, 13 Apr 2022 20:49:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 154BD3858C53 Received: by mail-ej1-x632.google.com with SMTP id u15so6310725ejf.11 for ; Wed, 13 Apr 2022 13:49:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=tFhUj4XD+JYtROiQwf4bLJYFHGvFezCQYpHBoPWh8aw=; b=zSXBrq+xxq73EY15zPJLwJ6clpl1AippRBVSFeh5RuZyySBoFp7DZmX3d620juCbS4 2kQ/n8mrDjMi48H+5DGfrgJP+3cdGZhBVZ3D6E+VGQtpMc+ru3vl0gbwlGkxfsU1pl16 ghPvMjs0Ht1W1SaCUxWbYp+pQVfR8Si6eSC4/vIZxFvfHBP/y4i93e8QXsSacfDu8rDp PjFWl3A9Rm8VDciWtGT1TouQ92Ch4pzLtN/EMXhx6kiDto/ttFlucVmwnIs2l79+Z8dx nSlHyr8GmEfjZMaXHip2iV2UT0qWiQzE071WieRdZLHinPt9K61SGiCICiOrI7K+lMFx jBCQ== X-Gm-Message-State: AOAM532s9FSSWDR5aXQ+zrHsLQiTA51jOoVDGa8WOxdzWk8mSKakI9Ew hMDn3Blsx+jXhZADg6mdhZM= X-Google-Smtp-Source: ABdhPJynK0qoMo9T04x0K8zyJU2bgzxUIi08Nf31PLcptEJyUkC6T4xvheHgdoMrB0WLkRd1j6bZJg== X-Received: by 2002:a17:907:a42c:b0:6e8:c87e:449d with SMTP id sg44-20020a170907a42c00b006e8c87e449dmr4280203ejc.261.1649882964994; Wed, 13 Apr 2022 13:49:24 -0700 (PDT) Received: from [192.168.58.42] (sheaf.site. [172.104.132.207]) by smtp.gmail.com with ESMTPSA id r3-20020aa7cb83000000b0041b573e2654sm1604971edt.94.2022.04.13.13.49.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Apr 2022 13:49:24 -0700 (PDT) Message-ID: Subject: Re: Nucleo F767ZI, STM32CubeIDE problem, CC1 error From: Alexander Shpilkin To: Seyed Abolfazl Mortazavizadeh , gcc-help@gcc.gnu.org Date: Wed, 13 Apr 2022 23:49:21 +0300 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Apr 2022 20:49:30 -0000 On Wed, 2022-04-13 at 16:34 +0200, Seyed Abolfazl Mortazavizadeh wrote: > I have a problem in compiling code using STM32CubeIDE. The log is > as follows: > > [snip] > > cc1: error: bad value ('armv7e-m+fp.dp') for '-march=' switch > cc1: note: valid arguments to '-march=' switch are: nocona core2 nehalem [...] native > cc1: error: bad value ('cortex-m7') for '-mtune=' switch > cc1: note: valid arguments to '-mtune=' switch are: nocona core2 nehalem [...] native > > [snip] > > The code is working properly on another PC but I received these errors > using my laptop. How can I fix it? Any kind of information is appreciated. As you can see in the lines I quoted above, your compiler does not recognize the minimum-CPU-to-run-on (-march=) and best-CPU-to-run-on (-mtune=) values it's being passed, and the ones it says it will recognize are all x86 microarchitecture names. This means that you (or your IDE) is trying to compile your ARM code with an x86 compiler. You should see if your IDE came with a prebuilt ARM compiler (otherwise you'll need to download or build it), and once you're sure you have a compiler you should figure out why the IDE is not finding it and trying to use the x86 one instead. (Here by "an X compiler" I mean "a GCC compiler binary that runs on your development machine and generates binaries for X".) Because your problem is not with configuring GCC itself but with configuring your IDE to use GCC, you're unlikely to find help on this list; if you're unable to figure out the configuration yourself, try posting your question somewhere people actually talk about STM32CubeIDE---probably the ST forums? (Aside: Usually, when you're experiencing some sort of general build misconfiguration, *all* compilation will fail, so the length of the build log will be multiplied by the number of parallel build jobs you've allowed. If you're seeing that nothing compiles, like here, it's usually helpful to first retry with parallel building disabled, not because it will fix anything, but because you won't have to dig your way through a monster log like the one you posted.) -- Good luck, Alex