update compiler in MCUXpresso

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

update compiler in MCUXpresso

3,809 Views
bmcdonnell_ionx
Contributor III

Questions

MCUXpresso uses GNU Arm Embeeded Toolchain (gcc-arm-none-eabi), right? Where does it get that from? Did it come bundled with the installation? Or does the user install it separately? (I don't remember.)

How can I make MCUXpresso use the latest GCC? If I install the latest GNU Arm Embedded Toolchain, is there a way to point MCUXpresso to it? Or do I have to wait until the next version integrates it?

Background / Motivation

I have a project which I build both with Mbed CLI using the GNU_ARM compiler, and with MCUXpresso. In this project, if I #included files in the "wrong" order, I would get cryptic error messages as shown below from Mbed CLI. That's using GNU Tools ARM Embedded 6 2017-q2-update.

When I made mbed compile use the latest GNU Tools (7 2018 q2 update, by updating the project's mbed_settings.py), it works fine, regardless of the #include order.

I think I got similar errors from MCUXpresso, though I can't seem to reproduce it at the moment. Regardless, I want to be using the same toolchain on both, thus my questions above.

$ mbed compile
Building project mbed-os-emb-cli-cryptic-build-err (LPC4088, GCC_ARM)
Scan: .
Scan: mbed
Scan: env
Scan: FEATURE_LWIP
Compile [100.0%]: main.cpp
[Error] LineEditor.h@6,15: '_impure_ptr' is not a type
[Error] LineEditor.h@6,15: expected identifier before '(' token
[Error] LineEditor.h@6,15: expected ')' before '->' token
[Error] LineEditor.h@6,15: expected ')' before '->' token
[Error] LineEditor.h@6,15: '_stdout' does not name a type
[Error] LineEditor.h@6,15: trailing return type only available with -std=c++11 or -std=gnu++11
[Error] LineEditor.h@6,15: expected ';' at end of member declaration
[Error] LineEditor.h@6,15: expected unqualified-id before ')' token
[ERROR] In file included from c:\program files (x86)\gnu tools arm embedded\6 2017-q2-update\arm-none-eabi\include\string.h:11:0,
from ./mbed-os/rtos/TARGET_CORTEX/rtx5/RTX/Source/rtx_lib.h:29,
from ./mbed-os/rtos/TARGET_CORTEX/mbed_rtos_storage.h:43,
from ./mbed-os/rtos/Thread.h:28,
from .\main.cpp:1:
./embedded-commandline/src/LineEditor.h:6:15: error: '_impure_ptr' is not a type
virtual void putchar(char c) = 0;
^
In file included from ./mbed-os/platform/mbed_debug.h:27:0,
from ./mbed-os/platform/NonCopyable.h:21,
from ./mbed-os/rtos/Thread.h:31,
from .\main.cpp:1:
./embedded-commandline/src/LineEditor.h:6:15: error: expected identifier before '(' token
virtual void putchar(char c) = 0;
^
./embedded-commandline/src/LineEditor.h:6:15: error: expected ')' before '->' token
virtual void putchar(char c) = 0;
^
./embedded-commandline/src/LineEditor.h:6:15: error: expected ')' before '->' token
./embedded-commandline/src/LineEditor.h:6:15: error: '_stdout' does not name a type
virtual void putchar(char c) = 0;
^
./embedded-commandline/src/LineEditor.h:6:15: error: trailing return type only available with -std=c++11 or -std=gnu++11
./embedded-commandline/src/LineEditor.h:6:15: error: expected ';' at end of member declaration
./embedded-commandline/src/LineEditor.h:6:15: error: expected unqualified-id before ')' token
virtual void putchar(char c) = 0;
^

[mbed] ERROR: "C:\Python27\python.exe" returned error.
Code: 1
Path: "C:\dev_temp\mbed-os-emb-cli-cryptic-build-err"
Command: "C:\Python27\python.exe -u C:\dev_temp\mbed-os-emb-cli-cryptic-build-err\mbed-os\tools\make.py -t GCC_ARM -m LPC4088 --source . --build .\BUILD\LPC4088\GCC_ARM"
Tip: You could retry the last command with "-v" flag for verbose output
---

0 Kudos
2 Replies

2,543 Views
lpcxpresso_supp
NXP Employee
NXP Employee

MCUXpresso IDE is developed and tested as an integrated IDE package, and it is not designed with the intention of the user being able to replace the supplied GCC tools with a different version. Although we do ship the ARM Embedded GCC package, it isn't just a matter of a straight drop in to change your IDE install to use a different version. Thus although this is theoretically possible to change the version, it isn't something we would generally recommend attempting nor is it something we could provide any assistance on you doing.

However I would highlight that during the lifetime of MCUXpresso IDE since its first release back in April 2017 - and before that with LPCXpresso IDE - we have for many years being updating the version of the GCC package that we ship on a regular basis. Our general aim is to ship the latest ARM release that was available for the majority of the period that a particular IDE release was developed during - to allow for any changes required within the IDE as well as for testing purposes (both of the IDE, as well as the associated MCUXpresso SDK packages).

Thus we moved to the GCC7 package (released by ARM in December 2017) in our IDE v10.2 (released May 2018). And we intend to ship the GCC7 Q2 update that ARM released a few days ago in our next major release (currently expected around mid-Q4).

Regards,

MCUXpresso IDE Support

2,543 Views
bmcdonnell_ionx
Contributor III

Looks like it's bundled with MCUXpresso IDE. I found C:\nxp\MCUXpressoIDE_10.2.0_759\ide\tools\release.txt, which says

*************************************************
GNU Tools for Arm Embedded Processors 7
                               - Q4 2017
*************************************************

I guess this is late enough to resolve the issue I was having.

Still, is there a way to use a later version of the toolchain?

0 Kudos