Using the NXP arm-none-eabi-gcc on linux

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Using the NXP arm-none-eabi-gcc on linux

ソリューションへジャンプ
3,736件の閲覧回数
gberthiaume
Contributor III

Hi,

I'm looking for guidance about how to use the S32K toolchain on a Linux environment.

Context

I'm trying to use the S32K Linux (Ubuntu 16) arm-none-eabi build tools to compile my project.
I'm using CMake and Make to do so.

Currently, the build system fails at the "check for working C compiler" step. The exact error message is:

cc1: fatal error: lib_c99.prefix: No such file or directory

Of course, this file exists in my build_tools directory:

 

 

$  find /usr/local/build_tools/arm32_ewl2 | grep lib_c99
/usr/local/build_tools/arm32_ewl2/EWL_C/include/lib_c99.prefix

 

 

While the CMake toolchain file could be the cause of this problem, my compiler flags seem identical to the one used when compiling the project with the S32 DS IDE:

usr/local/build_tools/gcc-6.3-arm32-eabi/bin/arm-none-eabi-gcc -c -fmessage-length=0 -ffunction-sections -fdata-sections -mcpu=cortex-m4 -mthumb -specs=ewl_c9x_noio.specs --sysroot="/usr/local/build_tools/arm32_ewl2" -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fdata-sections -ffunction-sections -o CMakeFiles/cmTC_ee422.dir/testCCompiler.c.obj -c /root/nBMSMv2_Tools/myproject/build/CMakeFiles/CMakeTmp/testCCompiler.c

I think the problem might reside in my environment setup.
Here's my build_tools tree:

 

 

/usr/local/build_tools/
|-- arm32_ewl2  # <-------- SYSROOT
|   |-- Build_Tag.txt
|   |-- Doxyfile
|   |-- EWL_C
|   |-- EWL_C++
|   |-- EWL_ReleaseNotes
|   |-- EWL_Runtime
|   |-- lib
|   `-- makefile
`-- gcc-6.3-arm32-eabi
    |-- arm-none-eabi
    |-- bin
    |-- include
    |-- lib
    |-- libexec
    |-- linux_support
    |-- patches_applied
    `-- share

 


Question

Why can't arm-none-eabi-gcc find the lib_c99.prefix file? 
If all the compilation flags are identical to the one used by the IDE, what did I miss? Is this a question of environment variables?

Thanks.

ATCH. The full CMake log

ラベル(1)
0 件の賞賛
返信
1 解決策
3,699件の閲覧回数
gberthiaume
Contributor III

Finally got it.
In the toolchain file, you need to include those directories:

include_directories(
    "EWL_C/include"
    "EWL_C/include/arm"
    "EWL_Runtime/include"
    "EWL_Runtime/include/arm"
)

元の投稿で解決策を見る

1 返信
3,700件の閲覧回数
gberthiaume
Contributor III

Finally got it.
In the toolchain file, you need to include those directories:

include_directories(
    "EWL_C/include"
    "EWL_C/include/arm"
    "EWL_Runtime/include"
    "EWL_Runtime/include/arm"
)