Problems getting started with MCUXpresso SDK: can't compile hello world

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

Problems getting started with MCUXpresso SDK: can't compile hello world

Jump to solution
1,267 Views
morix
Contributor III

Hello everybody. I am moving my first steps in developing firmware for Cortex-M7 in i.MX8MP processor...

Following the guides, I built, downloaded and installed a MCUXpresso SDK for my EVKIT:

Screenshot_20240510_111738.png

 

Now I am trying to build the hello_world example coming with the SDK but I am receiving errors that I cannot understand.

Basically this is what I did:

1) downloaded and installed MCUXpresso SDK to folder /home/morix/MCUXpresso;

2) downloaded and installed GNU ARM toolchain to folder /home/morix/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi (toolchain was taken from https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x...)

3) export ARMGCC_DIR=/home/morix/arm-gnu-toolchain-13.2.Rel1-x86_64-aarch64-none-elf


4) export PATH=$PATH:/home/morix/arm-gnu-toolchain-13.2.Rel1-x86_64-aarch64-none-elf/bin

5) cd /home/morix/MCUXpresso/boards/evkmimx8mp/demo_apps/hello_world/armgcc

6) ./build_debug.sh

This is what I obtain:

-- TOOLCHAIN_DIR: /home/morix/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi
CMake Error at /home/morix/MCUXpresso/tools/cmake_toolchain_files/armgcc.cmake:58 (add_link_options):
 Unknown CMake command "add_link_options".
Call Stack (most recent call first):
 /usr/share/cmake-3.10/Modules/CMakeDetermineSystem.cmake:91 (include)
 CMakeLists.txt:18 (ENABLE_LANGUAGE)


CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to sel
ect a different build tool.
-- Configuring incomplete, errors occurred!
make: *** No targets specified and no makefile found.  Stop.

 

I am sorry for the (maybe) dumb question, but I am stuck at this point and cannot go further (probably I am missing something "big"... but consider that everything is new to me since I am the very first attempt to work on M7).

Thanks.

 

0 Kudos
Reply
1 Solution
1,259 Views
morix
Contributor III

Ok, found the solution. The problem simply was an outdated version of cmake on my PC... add_link_options was added to cmake starting from 3.13...

View solution in original post

0 Kudos
Reply
1 Reply
1,260 Views
morix
Contributor III

Ok, found the solution. The problem simply was an outdated version of cmake on my PC... add_link_options was added to cmake starting from 3.13...

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-1863336%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EProblems%20getting%20started%20with%20MCUXpresso%20SDK%3A%20can't%20compile%20hello%20world%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1863336%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20everybody.%20I%20am%20moving%20my%20first%20steps%20in%20developing%20firmware%20for%20Cortex-M7%20in%20i.MX8MP%20processor...%3C%2FP%3E%3CP%3EFollowing%20the%20guides%2C%20I%20built%2C%20downloaded%20and%20installed%20a%20MCUXpresso%20SDK%20for%20my%20EVKIT%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot_20240510_111738.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Screenshot_20240510_111738.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F278183iA2C47F6337F4C369%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screenshot_20240510_111738.png%22%20alt%3D%22Screenshot_20240510_111738.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3ENow%20I%20am%20trying%20to%20build%20the%20hello_world%20example%20coming%20with%20the%20SDK%20but%20I%20am%20receiving%20errors%20that%20I%20cannot%20understand.%3C%2FP%3E%3CP%3EBasically%20this%20is%20what%20I%20did%3A%3C%2FP%3E%3CP%3E1)%20downloaded%20and%20installed%20MCUXpresso%20SDK%20to%20folder%20%3CSPAN%3E%3CFONT%20face%3D%22andale%20mono%2Ctimes%22%3E%2Fhome%2Fmorix%2FMCUXpresso%3C%2FFONT%3E%3B%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E2)%20downloaded%20and%20installed%20GNU%20ARM%20toolchain%20to%20folder%20%3CFONT%20face%3D%22andale%20mono%2Ctimes%22%3E%2Fhome%2Fmorix%2Farm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi%3C%2FFONT%3E%20(toolchain%20was%20taken%20from%20%3CA%20href%3D%22https%3A%2F%2Fdeveloper.arm.com%2F-%2Fmedia%2FFiles%2Fdownloads%2Fgnu%2F13.2.rel1%2Fbinrel%2Farm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz%3Frev%3De434b9ea4afc4ed7998329566b764309%26amp%3Bhash%3DCA590209F5774EE1C96E6450E14A3E26%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdeveloper.arm.com%2F-%2Fmedia%2FFiles%2Fdownloads%2Fgnu%2F13.2.rel1%2Fbinrel%2Farm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz%3Frev%3De434b9ea4afc4ed7998329566b764309%26amp%3Bhash%3DCA590209F5774EE1C96E6450E14A3E26%3C%2FA%3E)%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E3)%20%3CFONT%20face%3D%22andale%20mono%2Ctimes%22%3Eexport%20ARMGCC_DIR%3D%2Fhome%2Fmorix%2Farm-gnu-toolchain-13.2.Rel1-x86_64-aarch64-none-elf%3C%2FFONT%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CBR%20%2F%3E4)%20%3CFONT%20face%3D%22andale%20mono%2Ctimes%22%3Eexport%20PATH%3D%24PATH%3A%2Fhome%2Fmorix%2Farm-gnu-toolchain-13.2.Rel1-x86_64-aarch64-none-elf%2Fbin%3C%2FFONT%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E5)%20%3CFONT%20face%3D%22andale%20mono%2Ctimes%22%3Ecd%20%2Fhome%2Fmorix%2F%3C%2FFONT%3E%3CSPAN%3E%3CFONT%20face%3D%22andale%20mono%2Ctimes%22%3EMCUXpresso%2Fboards%2Fevkmimx8mp%2Fdemo_apps%2Fhello_world%2Farmgcc%3C%2FFONT%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E6)%20%3CSPAN%3E%3CFONT%20face%3D%22andale%20mono%2Ctimes%22%3E.%2Fbuild_debug.sh%3C%2FFONT%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EThis%20is%20what%20I%20obtain%3A%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CFONT%20face%3D%22andale%20mono%2Ctimes%22%3E--%20TOOLCHAIN_DIR%3A%20%2Fhome%2Fmorix%2Farm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi%20%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22andale%20mono%2Ctimes%22%3ECMake%20Error%20at%20%2Fhome%2Fmorix%2FMCUXpresso%2Ftools%2Fcmake_toolchain_files%2Farmgcc.cmake%3A58%20(add_link_options)%3A%20%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22andale%20mono%2Ctimes%22%3E%26nbsp%3BUnknown%20CMake%20command%20%22add_link_options%22.%20%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22andale%20mono%2Ctimes%22%3ECall%20Stack%20(most%20recent%20call%20first)%3A%20%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22andale%20mono%2Ctimes%22%3E%26nbsp%3B%2Fusr%2Fshare%2Fcmake-3.10%2FModules%2FCMakeDetermineSystem.cmake%3A91%20(include)%20%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22andale%20mono%2Ctimes%22%3E%26nbsp%3BCMakeLists.txt%3A18%20(ENABLE_LANGUAGE)%20%3C%2FFONT%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22andale%20mono%2Ctimes%22%3ECMake%20Error%3A%20CMake%20was%20unable%20to%20find%20a%20build%20program%20corresponding%20to%20%22Unix%20Makefiles%22.%20%26nbsp%3BCMAKE_MAKE_PROGRAM%20is%20not%20set.%20%26nbsp%3BYou%20probably%20need%20to%20sel%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22andale%20mono%2Ctimes%22%3Eect%20a%20different%20build%20tool.%20%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22andale%20mono%2Ctimes%22%3E--%20Configuring%20incomplete%2C%20errors%20occurred!%20%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22andale%20mono%2Ctimes%22%3Emake%3A%20***%20No%20targets%20specified%20and%20no%20makefile%20found.%20%26nbsp%3BStop.%3C%2FFONT%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CSPAN%3EI%20am%20sorry%20for%20the%20(maybe)%20dumb%20question%2C%20but%20I%20am%20stuck%20at%20this%20point%20and%20cannot%20go%20further%20(probably%20I%20am%20missing%20something%20%22big%22...%20but%20consider%20that%20everything%20is%20new%20to%20me%20since%20I%20am%20the%20very%20first%20attempt%20to%20work%20on%20M7).%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EThanks.%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1863351%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Problems%20getting%20started%20with%20MCUXpresso%20SDK%3A%20can't%20compile%20hello%20world%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1863351%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EOk%2C%20found%20the%20solution.%20The%20problem%20simply%20was%20an%20outdated%20version%20of%20cmake%20on%20my%20PC...%20%3CSPAN%3E%3CFONT%20face%3D%22andale%20mono%2Ctimes%22%3Eadd_link_options%3C%2FFONT%3E%3C%2FSPAN%3E%20was%20added%20to%20cmake%20starting%20from%203.13...%3C%2FP%3E%3C%2FLINGO-BODY%3E