cancel
Showing results for 
Search instead for 
Did you mean: 

makefile generated by CubeIDE/MX is not usable outside of IDE, still containes full paths

trzeci
Associate II

You may set in eclipse settings to have makefile generated with not expanded variables.

It is very helpful when you had a project as part of bigger one and need to build it using makefile outside od IDE.

There is a bug which leads to full paths in makefile, which leads to problems with placing makefile in repository.

Other people in project would have to manually correct the makefile after every change.

Example:

# Tool invocations
FK743M2.elf FK743M2.map: $(OBJS) $(USER_OBJS) /mnt/home/trzeci/STM32CubeIDE/FK743M2/STM32H743IITX_FLASH.ld makefile objects.list $(OPTIONAL_TOOL_DEPS)
arm-none-eabi-g++ -o "FK743M2.elf" @"objects.list" $(USER_OBJS) $(LIBS) -mcpu=cortex-m7 -T"/mnt/home/trzeci/STM32CubeIDE/FK743M2/STM32H743IITX_FLASH.ld" --specs=nosys.specs -Wl,-Map="FK743M2.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -lstdc++ -lsupc++ -Wl,--end-group
@Echo 'Finished building target: $@'
@Echo ' '

 

As you can see - there is full path to linker script instead of relative path.
It renders the makefile unusable.

 

0 REPLIES 0