I'm using Arm Development Studio 2019.1 on Windows 10.
From within ARM Development Studio I select "Build Project" for my project. It starts executing but I get a Windows pop-up error for armcc.exe that says:
Application was unable to start correctly. (0xc0000142)
The make is invoking Arm C Compiler 5.
I have tried running Arm Development Studio both as a user and as an administrator but I get the same error in either case.
This error occurs on the first file to be compiled for the project.
I've done some searching and found that this error is raised when a DLL is not able to be initialized.
Has anyone else seen this error?
I tried adding the SHELL variable to my windows environment but I still get the same error.
I removed C:\MinGW\bin from my PATH and I get the following when I attempt to build the fireworks example:
make all Building file: ../src/Fireworks.cInvoking: Arm C Compiler 5armcc.exe --cpu=Cortex-A9 --apcs=/hardfp --thumb -DSTANDALONE -O0 -Otime -g --md --depend_format=unix_escaped --no_depend_system_headers --depend_dir="src" -c -o "src/Fireworks.o" "../src/Fireworks.c"/usr/bin/sh: /c/Program Files/Arm/Development Studio 2019.1/sw/ARMCompiler5.06u6/bin/armcc.exe: Invalid argument
I then set my PATH value back to its original value. I still have the SHELL variable set the suggested value. From the Arm DS command prompt I tried to compile the fireworks.c file and that compiled successfully.
Hi again DougThanks for testing further. It does seem that the compilation tools themselves are installed and working correctly, but that the mechanism that launches them from the IDE has been broken somehow. The error message:/usr/bin/sh: /c/Program Files/Arm/Development Studio 2019.1/sw/ARMCompiler5.06u6/bin/armcc.exe: Invalid argumentis suspicious because this is an error from 'sh', not from 'armcc'.Do you have the AVR tools installed? We've seen "The application was unable to start correctly” errors where sh.exe (provided by AVR tools that were present) was being picked up by make. If so, can you try temporarily modifying the PATH to remove the AVR tools? If that doesn't help, try using 'make --trace' to investigate in more detail exactly what is being picked up and from where.
Stephen
Stephen,
Yes I have AVR tools installed on the computer. I exited DS, modified the PATH variable to remove the AVR tools, then started DS. I did a project->build in DS and I no longer get the windows error.
I now get the following:
make all Building file: C:/src/platform/utilities/src/debug_console_imx.cInvoking: Arm C Compiler 5armcc.exe --cpu=Cortex-M4 --fpu=FPv4-SP --apcs=/hardfp -D__DEBUG -DCPU_MCIMX7D_M4 -IC:/src/../platform/CMSIS/Include -IC:/src/../platform/devices -IC:/src/../platform/devices/MCIMX7D/include -IC:/src/../platform/devices/MCIMX7D/startup -IC:/src/../platform/drivers/inc -IC:/src/../platform/utilities/inc -IC:/src/../Machine/inc -IC:/src/.. --c99 --gnu -O0 -g --diag_suppress=1296,66,9931 --c99 --split_sections --md --depend_format=unix_escaped --no_depend_system_headers --depend_dir="utilities" -c -o "utilities/debug_console_imx.o" "C:/src/platform/utilities/src/debug_console_imx.c"/usr/bin/sh: /c/Program Files/Arm/Development Studio 2019.1/sw/ARMCompiler5.06u6/bin/armcc.exe: Invalid argumentmake: *** [utilities/subdir.mk:23: utilities/debug_console_imx.o] Error 126
Thanks,
Doug
Hi again Doug, and thanks Stephen for following up in my absence.I agree with Stephen that the issue seems to be pathing to your shell... could you try the following, at least as a workaround to build your project for now...Right click on the project, and select Show in local terminal -> Terminal, and enter "make" there. Does that build?If you get errors of the form "'armcc' is not recognized as an internal or external command, then close the IDE, open the "Arm DS Command Prompt", run the "select_toolchain.bat" script to select Arm Compiler 5, and therein launch the IDE (armds_ide.exe), and
Hi again DougI've done some further investigation. I believe that a rogue sh.exe is being picked-up from somewhere on your PC.On a 'vanilla' Arm DS system on Windows, 'make' should be picking up Windows's own cmd.exe, not some other sh.exe.To demonstrate this, I launched 'make' with '-d' to include debugging information:C:\Users\YourName\Development Studio Workspace\fireworks_A9-FVP_AC5>make -d -f makefile | moreGNU Make 4.2Built for Windows32Copyright (C) 1988-2016 Free Software Foundation, Inc.License GPLv3+: GNU GPL version 3 or later <gnu.org/.../gpl.html>This is free software: you are free to change and redistribute it.There is NO WARRANTY, to the extent permitted by law.Reading makefiles...Reading makefile 'makefile'...find_and_set_shell() setting default_shell = $(windir)/system32/cmd.exeReading makefile 'obj/timer_interrupts.o.d' (search path) (don't care) (no ~ expansion)...Reading makefile 'obj/banner_data.o.d' (search path) (don't care) (no ~ expansion)...:Notice the line:find_and_set_shell() setting default_shell = $(windir)/system32/cmd.exeYou should see something similar. If you see sh.exe here then you'll have to modify your PATH to prevent it from being picked-up.
Hope this fixes your problem.
Ronan & Stephen,
Thank you for your suggestions and "debugging" tips! Once I removed all references to the AVR toolset I am no longer getting the windows error when I attempt to build the project. Turns out I had set the PATH values in both the user and all users area of windows environment variable settings.
I will have to come up with batch files to use so that when I switch projects and toolsets I get the correct environment variables for the appropriate toolset.
Again thank you for your help and patience.