Error compiling with makefile, threadX and NextDuo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-23 09:44 AM
Hello,
I have an issue when compiling a makefile from a project using an STM32H5 and ThreadX with NetXduo library.
this is the error i have:
make[1]: arm-none-eabi-gcc: Argument list too long
make[1]: *** [Makefile:1119: build/TheBlueBox-v2_AZURE_NS.elf] Error 127
make[1]: Leaving directory '/cygdrive/c/TheBlueBox/FW/TheBlueBox_AZURE/TheBlueBox-v2_AZURE/Makefile/NonSecure'
make: *** [Makefile:88: all] Error 2
Argument list is too long... What should i do?
i am compiling with windows 10.
I've attached the makefile (All has been generated with cubemx 6.12.0).
Solved! Go to Solution.
- Labels:
-
STM32CubeMX
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-24 12:59 PM - edited ‎2024-07-24 01:05 PM
The list of objects created by the makefile is very long.
I found a solution here on StackOverflow https://stackoverflow.com/questions/54975220/arm-non-eabi-ld-argument-list-too-long
but simple answer is replace the following in the makefile:
$(BUILD_DIR)/$(TARGET).elf: $(OBJECTS) Makefile
$(CC) $(OBJECTS) $(LDFLAGS) -o $@
$(SZ) $@
with this:
$(BUILD_DIR)/$(TARGET).elf: $(OBJECTS) Makefile
@echo "INPUT($(OBJECTS))" > $(BUILD_DIR)/objects.txt
$(CC) $(BUILD_DIR)/objects.txt $(LDFLAGS) -o $@
-rm -f $(BUILD_DIR)/objects.txt
$(SZ) $@
(creates a text file to store the list of objects too, passes that to the compiler, and deletes the file.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-24 12:59 PM - edited ‎2024-07-24 01:05 PM
The list of objects created by the makefile is very long.
I found a solution here on StackOverflow https://stackoverflow.com/questions/54975220/arm-non-eabi-ld-argument-list-too-long
but simple answer is replace the following in the makefile:
$(BUILD_DIR)/$(TARGET).elf: $(OBJECTS) Makefile
$(CC) $(OBJECTS) $(LDFLAGS) -o $@
$(SZ) $@
with this:
$(BUILD_DIR)/$(TARGET).elf: $(OBJECTS) Makefile
@echo "INPUT($(OBJECTS))" > $(BUILD_DIR)/objects.txt
$(CC) $(BUILD_DIR)/objects.txt $(LDFLAGS) -o $@
-rm -f $(BUILD_DIR)/objects.txt
$(SZ) $@
(creates a text file to store the list of objects too, passes that to the compiler, and deletes the file.)