Find out cause for maker/builder adding files to the 'needed to recompile' list

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

Find out cause for maker/builder adding files to the 'needed to recompile' list

1,056 Views
_ThomasLorenz_
Contributor II

Hi

Recently (? - maybe it depends on the touched fie) it happens that if I change only a single .c file the IDE decides it has to trigger the recompile 20 or 30 or more files and not just the one (+ maybe the very few affected by vesion.h).

This is very annoing during debugging/development as it slows me down.

Is there there way to find out which file/code change(s) make the builder think he needs to create this bunch of files to rebuild list ? Is there some kind of log file or output that could be monitored?

Could a define with the same name as in a.h be the the issue? Normally I would think only .h files touching triggers several .c file to be rebuild...

Regards

Thomas

 

Note: Build console list

make -r -j12 all
make --no-print-directory pre-build

...

Ist there some vebose log file of the make available or can be demanded via the command line?

0 Kudos
Reply
6 Replies

939 Views
_ThomasLorenz_
Contributor II

Hi.

 

What does the clean checkbox do here?

(I had it checked)

 

Thomas

0 Kudos
Reply

910 Views
AdrianOltean
NXP Employee
NXP Employee

In the screenshot you attached, there's also the Refresh Policy tab. What I've seen in the past is that an incorrect folder specified in the "Refresh Policy" ends-up triggering a rebuild. So make sure your project name appears under Refresh Policy. You'll have to delete and add the real name of your project to fix this. Hopefully, once you do this, you should see incremental builder fully functional.

Regards,

Adrian

0 Kudos
Reply

925 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @_ThomasLorenz_ 

"Clean" means clean all the compiles object, re-build all the files again.

 

BR

Alice

0 Kudos
Reply

918 Views
_ThomasLorenz_
Contributor II

Hi

 

It seems if checked the project appears in the clean project selection dialog - if not a clean project is not possible. So not my issue...

0 Kudos
Reply

940 Views
_ThomasLorenz_
Contributor II

Hi.

If I check the makefile I only see which subdirectories to handle. Each Subdir then has its own makefile subdir.mk with the call for each seperate file.

The question still is WHY the system decides to compile the files despite nothing has changed (I do a compare by content and date and see no differences).

 

What does the .PHONY line mean - is the all clean maybe an issue??

.PHONY: all clean dependents main-build pre-build post-build

 

If a file is in subdir.mk - is the check for changes done in that line while calling the compiler or was a need to recompile detected while generating the file?

 

e.g. this entry

# Each subdirectory must supply rules for building sources it contributes
source/sys_param_db/anybus_table.o: D:/UKDrives3/DNR/code/devWorkspace/rootDev/source/sys_param_db/anybus_table.c
@echo 'Building file: $<'
@echo 'Invoking: MCU C Compiler'
arm-none-eabi-gcc -std=gnu11 -D__MCUXPRESSO -D__USE_CMSIS -DCPU_ARM_CORTEX -DCPU_MIMXRT1061DVL6A -DCR_INTEGER_PRINTF -DFSL_FEATURE_PHYKSZ8081_USE_RMII50M_MODE -DFSL_RTOS_FREE_RTOS -DFSL_SDK_ENABLE_DRIVER_CACHE_CONTROL=1 -DHTTPSRV_CFG_WEBSOCKET_ENABLED=1 -DPRINTF_ADVANCED_ENABLE=1 -DPRINTF_FLOAT_ENABLE=0 -DSCANF_ADVANCED_ENABLE=0 -DSCANF_FLOAT_ENABLE=0 -DUSE_RTOS=1 -DXIP_BOOT_HEADER_DCD_ENABLE=1 -DXIP_BOOT_HEADER_ENABLE=1 -DXIP_EXTERNAL_FLASH=1 -DSDK_DEBUGCONSOLE=0 -D__NEWLIB__ -D_t_F2_PCB=1 -DSTACK_AC10=1 -DBOARD_SD_SUPPORT_180V=0 -DNDEBUG -D_DEVELOPMENT=2 -I"D:\UKDrives3\DNR\code\devWorkspace\amazon-freertos" -I"D:\UKDrives3\DNR\code\devWorkspace\rootDevF2" -I"D:\UKDrives3\DNR\code\devWorkspace\rootDev" -I"D:\UKDrives3\DNR\code\devWorkspace\rootDevF2\board" -I"D:\UKDrives3\DNR\code\devWorkspace\rootDev\CMSIS" -I"D:\UKDrives3\DNR\code\devWorkspace\rootDevF2\device" -I"D:\UKDrives3\DNR\code\devWorkspace\rootDevF2\drivers" -I"D:\UKDrives3\DNR\code\devWorkspace\rootDev\fatfs\fatfs_include" -I"D:\UKDrives3\DNR\code\devWorkspace\rootDev\fatfs" -I"D:\UKDrives3\DNR\code\devWorkspace\rootDev\rtcesl\gflib" -I"D:\UKDrives3\DNR\code\devWorkspace\rootDev\rtcesl\mlib" -I"D:\UKDrives3\DNR\code\devWorkspace\rootDev\sdmmc\inc" -I"D:\UKDrives3\DNR\code\devWorkspace\rootDev\sdmmc\port" -I"D:\UKDrives3\DNR\code\devWorkspace\rootDev\source\services" -I"D:\UKDrives3\DNR\code\devWorkspace\rootDev\source" -I"D:\UKDrives3\DNR\code\devWorkspace\rootDevF2\startup" -I"D:\UKDrives3\DNR\code\devWorkspace\rootDev\utilities" -I"D:\UKDrives3\DNR\code\devWorkspace\rootDevF2\xip" -I"D:\UKDrives3\DNR\code\devWorkspace" -I"D:\UKDrives3\DNR\code\devWorkspace\amazon-freertos\freertos_kernel\include" -I"D:\UKDrives3\DNR\code\devWorkspace\amazon-freertos\freertos_kernel\portable\GCC\ARM_CM4F" -I"D:\UKDrives3\DNR\code\devWorkspace\lwip" -I"D:\UKDrives3\DNR\code\devWorkspace\lwip\port" -I"D:\UKDrives3\DNR\code\devWorkspace\lwip\src\include" -I"D:\UKDrives3\DNR\code\devWorkspace\anybus" -I"D:\UKDrives3\DNR\code\devWorkspace\anybus\abcc_abp" -I"D:\UKDrives3\DNR\code\devWorkspace\anybus\abcc_adapt" -I"D:\UKDrives3\DNR\code\devWorkspace\anybus\abcc_drv\inc" -I"D:\UKDrives3\DNR\code\devWorkspace\anybus\abcc_obj" -I"D:\UKDrives3\DNR\code\devWorkspace\anybus\abcc_obj\nw_obj" -I"D:\UKDrives3\DNR\code\devWorkspace\profinet" -I"D:\UKDrives3\DNR\code\devWorkspace\ethernet-ip" -Os -fno-common -g3 -Wall -c -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -fsingle-precision-constant -fmacro-prefix-map="../$(@D)/"=. -mcpu=cortex-m7 -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mthumb -D__NEWLIB__ -fstack-usage -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
@echo 'Finished building: $<'
@echo

 

0 Kudos
Reply

1,001 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @_ThomasLorenz_ 

Maybe the change impact other files. You can find all the files compiled in Console view. I have a  tested with SDK demo, only add a variable on hello_world.c file. From the log it only compiles this file:

Alice_Yang_0-1710398805853.png

And you can find the makefile under Debug folder:

Alice_Yang_1-1710398879925.png

 

BR

Alice

 

 

0 Kudos
Reply