简体   繁体   中英

Compilation error from setup arm mbed environment

I set up mbed-CLI in my Windows environment following step by step:

https://os.mbed.com/docs/mbed-os/v5.11/tools/windows.html

I installed Mercurial and the Arm Compiler 5. I set up the environment variables see below. I then try to compile a default blinky project I exported from the online compiler to a zip file. I initialise the repository. I compile with:

    mbed compile -t ARM -m LPC1768 -v

But obtain:

    [mbed] Working path "C:\Users\xx\OneDrive\Documents\Mbed\mbed-os-example-blinky_zip_lpc1768" (program)

    [mbed] Exec "C:\Python27\python.exe -u C:\Users\xx\OneDrive\Documents Mbed\mbed-os-example-blinky_zip_lpc1768\mbed-os\tools\make.py -t ARM -m LPC1768 --source . --build .\BUILD\LPC1768\ARM -v" in "C:\Users\xx\OneDrive Documents\Mbed\mbed-os-example-blinky_zip_lpc1768"

    WARNING: 
    MBED_ARM_PATH set as environment variable but doesn't exist usage: 

    make.py [-h] [-m MCU] [-t TOOLCHAIN] [--color] [--cflags CFLAGS]

           [--asmflags ASMFLAGS] [--ldflags LDFLAGS] [-c]

           [--profile PROFILE] [--app-config APP_CONFIG]

           [-p PROGRAM | -n PROGRAM | -L | -S [{matrix,toolchains,targets}]]

           [-j JOBS] [-v] [--silent] [-D MACROS] [-f GENERAL_FILTER_REGEX]

           [--stats-depth STATS_DEPTH] [--automated] [--host HOST_TEST]

           [--extra EXTRA] [--peripherals PERIPHERALS]

           [--dep DEPENDENCIES] [--source SOURCE_DIR]

           [--duration DURATION] [--build BUILD_DIR] [-N ARTIFACT_NAME]

           [--ignore IGNORE] [-b BAUD] [--rpc] [--usb] [--dsp] [--testlib]
           [--build-data BUILD_DATA] [-l LINKER_SCRIPT]

    make.py: error: Could not find executable for ARM.

    Currently set search path: No path set

    [mbed] ERROR: "C:\Python27\python.exe" returned error.
   Code: 2

I set up the path with the command:

    mbed config -G ARM_PATH <path to ARM bin\>"

I tried different paths :

  • in local / global(-G)

  • with and without the ""

  • use slash and anti-slash,

  • bin/bin64,

  • add armcc at the end of the path / armcc.exe,

  • add Windows System Environment variables: MBED_ARM_PATH, as C:\\Program Files (x86)\\ARM_Compiler_5.06u6\\bin64

Using :

    mbed config --list 

Provides me the result:

    [mbed] Working path "C:\Users\xx\OneDrive\Documents\Mbed\mbed-os-example-blinky_zip_lpc1768" (program)

    [mbed] Global config:
    ARM_PATH=C:\Program Files (x86)\ARM_Compiler_5.06u6\bin64\armcc
    GCC_ARM_PATH=C:\Program Files (x86)\GNU Tools ARM Embedded\6 2017-q2-update\bin

    MBED_ARM_PATH=C:\Program Files (x86)\ARM_Compiler_5.06u6"


    [mbed] Local config (C:\Users\xx\OneDrive\Documents\Mbed\mbed-os-example-blinky_zip_lpc1768):

    ARM_PATH=C:\Program Files (x86)\ARM_Compiler_5.06u6\bin64\armcc

I know mbed priority will be local, then global then system path. I'm not sure what is wrong here. Any ideas would be welcome. Please let me know if you need any screenshot. Thank you in advance.

Add the ARM Compiler path to your PATH variable in system environment variables and then try again. After changing the environment variables, just re-run the cmd terminal - worth trying restarting the PC if nothing works.

Also try where armcc in cmd and check if the correct path appears as the output of this command.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM