Skip to content

Makefile updates #101

@nsaulnier-ti

Description

@nsaulnier-ti

make all projects use ram-mode by default (double-check)

Do we want to make these AI suggested changes?

Refactor the makefile compile rule to explicitly specify the output object file
using --output_file=$@ and the source file using $<, improving build robustness
and preventing parallel build issues.

source/rpmsg/makefile [51-57]

 $(GEN_DIR)/%.obj: %.c
 	$(MKDIR) $(GEN_DIR)
-	@echo 'Building file: $^'
+	@echo 'Building file: $<'
 	@echo 'Invoking: PRU Compiler'
-	"$(CGT_TI_PRU_PATH)/bin/clpru" $(INCLUDE) $(CFLAGS) $(DFLAGS) $^
-	@echo 'Finished building: "$^"'
+	"$(CGT_TI_PRU_PATH)/bin/clpru" $(INCLUDE) $(CFLAGS) $(DFLAGS) --output_file=$@ $<
+	@echo 'Finished building: "$<"'
 	@echo ' '

[To ensure code accuracy, apply this suggestion manually]

Suggestion importance[1-10]: 6
__

Why: The suggestion correctly identifies a potential race condition with parallel builds and makes the makefile rule more robust by explicitly specifying the input ($&lt;) and output ($@) files for the compiler.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions