Error 126 and Error 1 when building a project

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

Error 126 and Error 1 when building a project

1,915 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by akhilpo on Fri May 13 06:52:54 MST 2011
I am using IDE v3.6.3 on Windows 7. After reinstalling the IDE I imported the blinky example along with CMSIS. When I click 'build all' it gives error126 for CMSIS and error 1 for Blinky. Whats wrong here? I have tried reinstalling and repeating this several times, but no success.

This is what problems view shows:


Quote:
Description    Resource    Path    Location    Type
make: *** [blinky.axf] Error 1    blinky        line 0    C/C++ Problem
make: *** [libCMSISv1p30_LPC11xx.a] Error 126    CMSISv1p30_LPC11xx        line 0    C/C++ Problem



Here is the console output:

Quote:
Building target: blinky.axf
Invoking: MCU Linker
arm-none-eabi-gcc -nostdlib -Xlinker -Map=blinky.map -Xlinker --gc-sections -mcpu=cortex-m0 -mthumb -T "../linker/lpc1114_flash_crp.ld" -o"blinky.axf"  ./startup/cr_startup_lpc11.o  ./src/blinky_main.o  ./driver/adc.o ./driver/can.o ./driver/clkconfig.o ./driver/crp.o ./driver/debug_printf.o ./driver/gpio.o ./driver/i2c.o ./driver/i2cslave.o ./driver/lpc_swu.o ./driver/rs485.o ./driver/small_gpio.o ./driver/ssp.o ./driver/timer16.o ./driver/timer32.o ./driver/uart.o ./driver/wdt.o  ./cmsis/core_cm0.o ./cmsis/system_LPC11xx.o  
arm-none-eabi-gcc.exe: CreateProcess: No such file or directory
make: *** [blinky.axf] Error 1

0 Kudos
15 Replies

1,639 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by igorsk on Mon May 16 06:28:30 MST 2011
Add -v to the GCC command line options, this will show exactly which programs it's trying to run.
0 Kudos

1,639 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Sat May 14 01:20:36 MST 2011
High time, I'm running out of ideas...
0 Kudos

1,639 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by akhilpo on Fri May 13 22:33:56 MST 2011
Hey good news.. I got it working perfectly now. I uninstalled my firewall and disabled the antivirus. And removed the whole thing including the previous workspaces. Then I reinstalled and it is working perfectly now. Thanks to all especially Zero for helping me out.
0 Kudos

1,639 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by akhilpo on Fri May 13 21:58:43 MST 2011
It has worked correctly first time I installed, that was day before yesterday. But I could not create a new project. I adjusted by editing an example and compiling. Whenever I try to create a new project, It would show an error saying it cant find file from ~nxp\lpcxpresso_3.6.3_317\Wizards\System\NXP\lpc11\Common exception. So I then reinstalled, but this time to the default C:/ location. Then I followed every step in the Getting Started pdf and I imported CMSIS and blinky and successfully compiled both a couple of times. After that it started showing me this error(216 and 1). I have atleast reinstalled the IDE around 5 times, but no success yet.

I have disabled the antivirus and the firewall. How can I do the complete removal of the IDE including the registry keys?
0 Kudos

1,639 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Fri May 13 13:51:49 MST 2011
After installing LPCXpresso a couple of dozen times without problems I've never seen an error like this.

So I think 2 problems could cause this behaviour:

1. Firewall/Antivirus Software

2. Older/other GCC installations are interfering compiler calls with 'wrong' path or environment settings. Please check them.
0 Kudos

1,639 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by akhilpo on Fri May 13 13:31:01 MST 2011
I have Visual Studio, AVR Studio, WinAVR etc installed on my PC. I think those AVR Dev tools have installed GCC before.
0 Kudos

1,639 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Fri May 13 13:12:26 MST 2011
Are you using or did you use another GCC version for something else?
0 Kudos

1,639 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by akhilpo on Fri May 13 12:14:24 MST 2011
Oooh.. I dont know what happened but now there are those entries exactly like from your screenshot. But still same errors. I think those entries thing got fixed when I switched the workspace and re-done the whole thing again. Again I am  posting a new console response which was generated just now.

**** Build of configuration Debug for project LPCXpresso1114_blinky ****

make all 
Building file: ../src/blinky.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -D__USE_CMSIS=CMSISv1p30_LPC11xx -DDEBUG -D__CODE_RED -D__REDLIB__ -I"C:\Users\Akhil\Documents\lpcxpresso_3.6.3_317\workspace\CMSISv1p30_LPC11xx\inc" -I"C:\Users\Akhil\Documents\lpcxpresso_3.6.3_317\workspace\LPC11xx_Lib\inc" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -mcpu=cortex-m0 -mthumb -MMD -MP -MF"src/blinky.d" -MT"src/blinky.d" -o"src/blinky.o" "../src/blinky.c"
Finished building: ../src/blinky.c
 
Building file: ../src/cr_startup_lpc11.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -D__USE_CMSIS=CMSISv1p30_LPC11xx -DDEBUG -D__CODE_RED -D__REDLIB__ -I"C:\Users\Akhil\Documents\lpcxpresso_3.6.3_317\workspace\CMSISv1p30_LPC11xx\inc" -I"C:\Users\Akhil\Documents\lpcxpresso_3.6.3_317\workspace\LPC11xx_Lib\inc" -O0 -Os -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -mcpu=cortex-m0 -mthumb -MMD -MP -MF"src/cr_startup_lpc11.d" -MT"src/cr_startup_lpc11.d" -o"src/cr_startup_lpc11.o" "../src/cr_startup_lpc11.c"
Finished building: ../src/cr_startup_lpc11.c
 
Building file: ../src/timer16_int.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -D__USE_CMSIS=CMSISv1p30_LPC11xx -DDEBUG -D__CODE_RED -D__REDLIB__ -I"C:\Users\Akhil\Documents\lpcxpresso_3.6.3_317\workspace\CMSISv1p30_LPC11xx\inc" -I"C:\Users\Akhil\Documents\lpcxpresso_3.6.3_317\workspace\LPC11xx_Lib\inc" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -mcpu=cortex-m0 -mthumb -MMD -MP -MF"src/timer16_int.d" -MT"src/timer16_int.d" -o"src/timer16_int.o" "../src/timer16_int.c"
Finished building: ../src/timer16_int.c
 
Building target: LPCXpresso1114_blinky.axf
Invoking: MCU Linker
arm-none-eabi-gcc -nostdlib -L"C:\Users\Akhil\Documents\lpcxpresso_3.6.3_317\workspace\CMSISv1p30_LPC11xx\Debug" -L"C:\Users\Akhil\Documents\lpcxpresso_3.6.3_317\workspace\LPC11xx_Lib\Debug" -Xlinker -Map=LPCXpresso1114_blinky.map -Xlinker --gc-sections -mcpu=cortex-m0 -mthumb -T "LPCXpresso1114_blinky_Debug.ld" -o"LPCXpresso1114_blinky.axf"  ./src/blinky.o ./src/cr_startup_lpc11.o ./src/timer16_int.o   -lCMSISv1p30_LPC11xx -lLPC11xx_Lib
arm-none-eabi-gcc.exe: CreateProcess: No such file or directory
make: *** [LPCXpresso1114_blinky.axf] Error 1
0 Kudos

1,639 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Fri May 13 11:08:31 MST 2011
You should see your included Libs like this:

[ATTACH]431[/ATTACH]
0 Kudos

1,639 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by akhilpo on Fri May 13 10:56:08 MST 2011
Here is the latest console o/p after switching to the new workspace. Dont forget that I have two errors: one with Error code 126 for the CMSIS and another for blinky with error code 1.

**** Build of configuration Debug for project LPCXpresso1114_blinky ****

make all 
Building file: ../src/blinky.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -D__USE_CMSIS=CMSISv1p30_LPC11xx -DDEBUG -D__CODE_RED -D__REDLIB__ -I"C:\Users\Akhil\Documents\lpcxpresso_3.6.3_317\workspace\CMSISv1p30_LPC11xx\inc" -I"C:\Users\Akhil\Documents\lpcxpresso_3.6.3_317\workspace\LPC11xx_Lib\inc" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -mcpu=cortex-m0 -mthumb -MMD -MP -MF"src/blinky.d" -MT"src/blinky.d" -o"src/blinky.o" "../src/blinky.c"
Finished building: ../src/blinky.c
 
Building file: ../src/cr_startup_lpc11.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -D__USE_CMSIS=CMSISv1p30_LPC11xx -DDEBUG -D__CODE_RED -D__REDLIB__ -I"C:\Users\Akhil\Documents\lpcxpresso_3.6.3_317\workspace\CMSISv1p30_LPC11xx\inc" -I"C:\Users\Akhil\Documents\lpcxpresso_3.6.3_317\workspace\LPC11xx_Lib\inc" -O0 -Os -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -mcpu=cortex-m0 -mthumb -MMD -MP -MF"src/cr_startup_lpc11.d" -MT"src/cr_startup_lpc11.d" -o"src/cr_startup_lpc11.o" "../src/cr_startup_lpc11.c"
Finished building: ../src/cr_startup_lpc11.c
 
Building file: ../src/timer16_int.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -D__USE_CMSIS=CMSISv1p30_LPC11xx -DDEBUG -D__CODE_RED -D__REDLIB__ -I"C:\Users\Akhil\Documents\lpcxpresso_3.6.3_317\workspace\CMSISv1p30_LPC11xx\inc" -I"C:\Users\Akhil\Documents\lpcxpresso_3.6.3_317\workspace\LPC11xx_Lib\inc" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -mcpu=cortex-m0 -mthumb -MMD -MP -MF"src/timer16_int.d" -MT"src/timer16_int.d" -o"src/timer16_int.o" "../src/timer16_int.c"
Finished building: ../src/timer16_int.c
 
Building target: LPCXpresso1114_blinky.axf
Invoking: MCU Linker
arm-none-eabi-gcc -nostdlib -L"C:\Users\Akhil\Documents\lpcxpresso_3.6.3_317\workspace\CMSISv1p30_LPC11xx\Debug" -L"C:\Users\Akhil\Documents\lpcxpresso_3.6.3_317\workspace\LPC11xx_Lib\Debug" -Xlinker -Map=LPCXpresso1114_blinky.map -Xlinker --gc-sections -mcpu=cortex-m0 -mthumb -T "LPCXpresso1114_blinky_Debug.ld" -o"LPCXpresso1114_blinky.axf"  ./src/blinky.o ./src/cr_startup_lpc11.o ./src/timer16_int.o   -lCMSISv1p30_LPC11xx -lLPC11xx_Lib
arm-none-eabi-gcc.exe: CreateProcess: No such file or directory
make: *** [LPCXpresso1114_blinky.axf] Error 1


This is what problem view shows:


Quote:
Description    Resource    Path    Location    Type
make: *** [libCMSISv1p30_LPC11xx.a] Error 126    CMSISv1p30_LPC11xx        line 0    C/C++ Problem
make: *** [libLPC11xx_Lib.a] Error 126    LPC11xx_Lib        line 0    C/C++ Problem
make: *** [LPCXpresso1114_blinky.axf] Error 1    LPCXpresso1114_blinky        line 0    C/C++ Problem

0 Kudos

1,639 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Fri May 13 10:53:18 MST 2011
Please build and post the entire contents of the build Console, so we can see the whole output from the build process. We do not want a screenshot, we want the text.
0 Kudos

1,639 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by akhilpo on Fri May 13 10:50:39 MST 2011
Code red support:
       I checked the location that you suggested and there is arm-none-eabi-gcc.exe. I have avast antivirus and comodo firewall. I have disabled both and tried again to build. But still gives the same error.

Zero:
      I have switched to the default workspace like you suggested. It has no spaces in its path. And about the libraries in Project Properties, I dont find any entries in 'Properties(right click on project)->C/C++ Build->Settings->Tool settings->MCU Linker->Libraries'. Is that the cause of all the trouble? What should I do now?
0 Kudos

1,639 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Fri May 13 09:43:36 MST 2011
The error being reported is that it cannot find the compiler. We have never seen this error reported before, so I am not sure what is going on.

It is possibly something on your computer stopping the  compiler from being installed. Can you see if the compiler  (arm-none-eabi-gcc.exe) is being installed into  <install_directory>/Tools/bin

If the compiler is there, it may be your firewall/antivirus software preventing the compiler from running. If the compiler is not there, your firewall may have prevented it from being installed.
0 Kudos

1,639 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by akhilpo on Fri May 13 09:34:44 MST 2011
I did exactly what is mentioned in that pdf. I reinstalled the IDE, then selected Import Example Project's wizard, chose the 1114 examples zip package, then selected both Blinky and CMSIS. After that I clicked 'Build All'. Is there anything that I missed?

Please check the attached screenshot.
0 Kudos

1,639 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Fri May 13 07:35:38 MST 2011
Your compiler is complaining:

Quote:

/core_cm0.o ./cmsis/system_LPC11xx.o  
arm-none-eabi-gcc.exe: CreateProcess: No such file or directory

Did you import  CMSISv1p30_LPC11xx?

Please read LPCXpressoGettingStarted.pdf  (in your LPCXpresso_3.6 Folder).

There should be explained that you need an open CMSISv1p30_LPC11xx in your workspace.
You also need to build it for your configuration (Debug or Release).
0 Kudos