Brendan McDonnell

update compiler in MCUXpresso

Discussion created by Brendan McDonnell on Jun 29, 2018
Latest reply on Jun 29, 2018 by LPCX presso support

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
---

Outcomes