Unnecessary (?) recompilation

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

Unnecessary (?) recompilation

424 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by JohnR on Sun Nov 07 07:44:51 MST 2010
My current LPCExpresso LPC1343 project uses the CMSISv1p30_LPC13xx,
LPC13xx_Lib and FreeRTOS libraries together with the project files, RTOS_1.

It all compiles and runs but, if I make even a one line change in a C file in RTOS_1, all the libraries get recompiled as well as the project. Then if I press the debug button, everything then again gets recompiled before calling the debugger.

If I run build a second time after an initial build with no change of code, again the project is recompiled.

It almost seems that for some reason, the make all option is always invoked but I don't understand why.

Any help would be appreciated.

JohnR.

Original Attachment has been moved to: 1100814_test.zip

0 Kudos
Reply
5 Replies

377 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by SeleneSW on Thu Nov 21 02:00:53 MST 2013
I have the same problem but no project is present in "Project References" configuration.

I created the project in RED SUITE 5 IDE and for a long time everything worked fine.
From a moment on, I don't know the cause, with a simple correction in a .c source all the sources get recompiled.
Now the project has been ported to LPXpresso 6 but I have the same behaviour.

QUOTE JohnR: "It almost seems that for some reason, the make all option is always invoked but I don't understand why."

Any help would be appreciated.

Mario
0 Kudos
Reply

377 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by JohnR on Sun Nov 07 12:54:39 MST 2010
That did the trick.


Quote:
However this is not recommended, as any changes in that project will not be picked up when building your project.



In this case, the removed projects are CMSISv1p30_LPC13xx,
LPC13xx_Lib and FreeRTOS which normally I would never want to change .

Thanks for your help,

JohnR
0 Kudos
Reply

377 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Sun Nov 07 11:58:13 MST 2010
The definition of a Referenced Project (dependent project) is one that gets a (speculative) rebuild before the project is built. If you don't want this remove the dependencies. To do this, edit the project properties and remove Referenced Projects. However this is not recommended, as any changes in that project will not be picked up when building your project.

The clean section is only executed when you do a Clean Build.

DO NOT edit the makefile- it is generated on each build and so any changes are overwritten.
0 Kudos
Reply

377 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by JohnR on Sun Nov 07 10:33:39 MST 2010
Thanks for the reply.

I looked at the make file just now and think I kow why it is doing all the extra work

[SIZE=2][SIZE=2][COLOR=black]################################################################################[/COLOR]
[COLOR=black]# Automatically-generated file. Do not edit![/COLOR]
[COLOR=black]################################################################################[/COLOR]
[COLOR=black]-include ../makefile.init[/COLOR]
[COLOR=black]RM := rm -rf[/COLOR]
[COLOR=black]# All of the sources participating in the build are defined here[/COLOR]
[COLOR=black]-include sources.mk[/COLOR]
[COLOR=black]-include subdir.mk[/COLOR]
[COLOR=black]-include src/subdir.mk[/COLOR]
[COLOR=black]-include objects.mk[/COLOR]
[COLOR=black]ifneq ($(MAKECMDGOALS),clean)[/COLOR]
[COLOR=black]ifneq ($(strip $(C_DEPS)),)[/COLOR]
[COLOR=black]-include $(C_DEPS)[/COLOR]
[COLOR=black]endif[/COLOR]
[COLOR=black]endif[/COLOR]
[COLOR=black]-include ../makefile.defs[/COLOR]
[COLOR=black]# Add inputs and outputs from these tool invocations to the build variables [/COLOR]
[COLOR=black]# All Target[/COLOR]
[COLOR=black]all: RTOS_1.axf[/COLOR]
[COLOR=black]dependents:[/COLOR]
[COLOR=black]-cd C:/Documents\ and\ Settings/John/My\ Documents/lpcxpresso_3.5/workspace/FreeRTOS_Library/Debug && $(MAKE) all[/COLOR]
[COLOR=black]-cd C:/Documents\ and\ Settings/John/My\ Documents/lpcxpresso_3.5/workspace/LPC13xx_Lib/Debug && $(MAKE) all[/COLOR]
[COLOR=black]-cd C:/Documents\ and\ Settings/John/My\ Documents/lpcxpresso_3.5/workspace/CMSISv1p30_LPC13xx/Debug && $(MAKE) all[/COLOR]
[COLOR=black]# Tool invocations[/COLOR]
[COLOR=black]RTOS_1.axf: $(OBJS) $(USER_OBJS) C:/Documents\ and\ Settings/John/My\ Documents/lpcxpresso_3.5/workspace/FreeRTOS_Library/Debug/libFreeRTOS_Library.a C:/Documents\ and\ Settings/John/My\ Documents/lpcxpresso_3.5/workspace/LPC13xx_Lib/Debug/libLPC13xx_Lib.a C:/Documents\ and\ Settings/John/My\ Documents/lpcxpresso_3.5/workspace/CMSISv1p30_LPC13xx/Debug/libCMSISv1p30_LPC13xx.a[/COLOR]
[COLOR=black]@echo 'Building target: $@'[/COLOR]
[COLOR=black]@echo 'Invoking: MCU Linker'[/COLOR]
[COLOR=black]arm-none-eabi-gcc -nostdlib -L"C:\Documents and Settings\John\My Documents\lpcxpresso_3.5\workspace\CMSISv1p30_LPC13xx\Debug" -L"C:\Documents and Settings\John\My Documents\lpcxpresso_3.5\workspace\LPC13xx_Lib\Debug" -L"C:\Documents and Settings\John\My Documents\lpcxpresso_3.5\workspace\FreeRTOS_Library\Debug" -Xlinker -Map=RTOS_1.map -Xlinker --gc-sections -mcpu=cortex-m3 -mthumb -T "RTOS_1_Debug.ld" -o"RTOS_1.axf" $(OBJS) $(USER_OBJS) $(LIBS)[/COLOR]
[COLOR=black]@echo 'Finished building target: $@'[/COLOR]
[COLOR=black]@echo ' '[/COLOR]
[COLOR=black]$(MAKE) --no-print-directory post-build[/COLOR]
[COLOR=black]# Other Targets[/COLOR]
[COLOR=black]clean:[/COLOR]
[COLOR=black]-$(RM) $(OBJS)$(C_DEPS)$(EXECUTABLES) RTOS_1.axf[/COLOR]
[COLOR=black]-@echo ' '[/COLOR]
[COLOR=black]post-build:[/COLOR]
[COLOR=black]-@echo 'Performing post-build steps'[/COLOR]
[COLOR=black]-arm-none-eabi-size RTOS_1.axf; # arm-none-eabi-objcopy -O binary RTOS_1.axf RTOS_1.bin ; checksum -p LPC1343 -d RTOS_1.bin;[/COLOR]
[COLOR=black]-@echo ' '[/COLOR]
[COLOR=black].PHONY: all clean dependents[/COLOR]
[COLOR=black].SECONDARY: post-build[/COLOR]
[COLOR=black]C:/Documents\ and\ Settings/John/My\ Documents/lpcxpresso_3.5/workspace/FreeRTOS_Library/Debug/libFreeRTOS_Library.a:[/COLOR]
[COLOR=black]C:/Documents\ and\ Settings/John/My\ Documents/lpcxpresso_3.5/workspace/LPC13xx_Lib/Debug/libLPC13xx_Lib.a:[/COLOR]
[COLOR=black]C:/Documents\ and\ Settings/John/My\ Documents/lpcxpresso_3.5/workspace/CMSISv1p30_LPC13xx/Debug/libCMSISv1p30_LPC13xx.a:[/COLOR]
[COLOR=black]-include ../makefile.targets[/COLOR]

It looks as if the section that starts Dependents is the cause at it seems to mean that the dependents should be remade each time? Also the clean section at the end?

How would these extra lines have got in  - I don't think I had asked for them?
Can I just edit these lines out of the makefile?

JohnR


[/SIZE][/SIZE]
0 Kudos
Reply

377 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Sun Nov 07 09:47:18 MST 2010
I think you'll find that make gets run, but no recompilation is actually happening. We have to do this to make sure everything is up to date. This will happen for all dependent project (strictly, "project references").

Again, when you debug, we need to make sure the project is up to date. However, this can be controller by a preference in:
Windows->preferences
Run/Debug, Launching, "Build before launching"
0 Kudos
Reply