release does not work

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

release does not work

478 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by dragilla on Wed Nov 16 11:41:20 MST 2011
I tried to run my project without debug for once but it won't link.
**** Build of configuration Release for project TCL ****

make all 
Building target: TCL.axf
Invoking: MCU Linker
arm-none-eabi-gcc -nostdlib -Xlinker -Map="TCL.map" -Xlinker --gc-sections -mcpu=cortex-m3 -mthumb -T "TCL_Release.ld" -o"TCL.axf"  ./src/RITtimer.o ./src/cr_startup_lpc176x.o ./src/extint.o ./src/lpc17xx_clkpwr.o ./src/lpc17xx_gpio.o ./src/lpc17xx_i2c.o ./src/lpc17xx_libcfg_default.o ./src/lpc17xx_pinsel.o ./src/main.o   -lCMSISv1p30_LPC17xx
c:/nxp/lpcxpresso_4.1.0_190/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/bin/ld.exe: cannot find -lCMSISv1p30_LPC17xx
collect2: ld returned 1 exit status
make: *** [TCL.axf] Error 1
I compared all the options in debug and release settings and except for actual optimisation and debug there are no significat differences, I think.
What should I look for?

ps: This is how it looks when I build with debug:
Building target: TCL.axf
Invoking: MCU Linker
arm-none-eabi-gcc -nostdlib -L"C:\Users\marta\Documents\LPCXpresso_4.1.0_190\workspace\CMSISv1p30_LPC17xx\Debug" -Xlinker -Map="TCL.map" -Xlinker --gc-sections -mcpu=cortex-m3 -mthumb -T "TCL_Debug.ld" -o"TCL.axf"  ./src/RITtimer.o ./src/cr_startup_lpc176x.o ./src/extint.o ./src/lpc17xx_clkpwr.o ./src/lpc17xx_gpio.o ./src/lpc17xx_i2c.o ./src/lpc17xx_libcfg_default.o ./src/lpc17xx_pinsel.o ./src/main.o   -lCMSISv1p30_LPC17xx
Finished building target: TCL.axf

cheers,
--
Luke
0 Kudos
Reply
8 Replies

464 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by dragilla on Thu Nov 17 02:27:00 MST 2011
Yes, That solves it. Thanks.
0 Kudos
Reply

464 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Thu Nov 17 00:49:44 MST 2011
One of the most common causes for this is that you haven't used [B]volatile[/B] on your variables. This is explained in the article posted by Zero.
0 Kudos
Reply

464 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Wed Nov 16 18:15:31 MST 2011

Quote:

...I have the same problem...

Yes, E.T. is calling home :eek:

Come on, release mode means more optimization. Therefore your code must be written more carefully :)

See: http://support.code-red-tech.com/CodeRedWiki/CompilerOptimization
0 Kudos
Reply

464 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tungsys on Wed Nov 16 17:59:16 MST 2011
I think maybe this is the problem with LPCXpresso IDE, I am using lpcxpresso version 4 and I have the same problem when build the USB CDC in release mode, this is example code from NXP website.

I had another thread regarding this problem
http://knowledgebase.nxp.com/showthread.php?t=2600

Rgds,
Tung
0 Kudos
Reply

464 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by fjrg76 on Wed Nov 16 16:05:10 MST 2011

Quote: dragilla

c:/nxp/lpcxpresso_4.1.0_190/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/bin/ld.exe: cannot find -lCMSISv1p30_LPC17xx



Hello

Are you inside the LPCXpresso IDE? Few days ago I faced that same problem, and this is the way I fixed it:

(Inside LPCXpresso IDE)

Project->Properties, and in the left panel, click in "Project References"; then make shure the option "CMSISv1p30_LPC17xx" is checked.

Good luck !!
0 Kudos
Reply

464 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by dragilla on Wed Nov 16 12:34:51 MST 2011
Ok. It compiles now, but the timer doesn't work - and it's hard to debug it, since I have no debug

I used the RITtimer example code:
    /* SystemClockUpdate() updates the SystemFrequency variable */
    SystemCoreClockUpdate();

    // enable and initialize the timer - interrupt
    init_rit_timer( TIME_INTERVAL );
    enable_rit_timer();

    while (1) {

        if(rit_timer_counter || 0) { // when I change to 1 I can see the square wave on oscilloscope
             
            // some code here

            // debug toggle GPIO to scope the loop duration
            if(i++ % 2) FIO_ByteSetValue(1, 3, INT3_LED);
            else FIO_ByteClearValue(1, 3, INT3_LED);

            // reset timer
            rit_timer_counter = 0;
        }
    }
The above code generates a square wave in debug mode and is silent in release mode. Only if I change the || 0 to || 1 (when I skip the 'if' that is) the square wave appears. So my conclusion is - the times is not working...
0 Kudos
Reply

464 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by dragilla on Wed Nov 16 12:18:32 MST 2011
Yay, thanks :)
0 Kudos
Reply

464 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Wed Nov 16 12:00:56 MST 2011

Quote:

...cannot find -lCMSISv1p30_LPC17xx...

Build your CMSIS in release mode :eek:
0 Kudos
Reply