I have just copied over an S08 assembly language project to CW10.2. Several *.asm files and a couple *.inc files. After the initial build, if I change a .asm file and rebuild, only that file is reassembled before linking, as I would expect. However, if I change a .inc file, none of the .asm files dependant on it (using the include directive) are reassembled. How can I get CW10.2 to recognize this dependancy?
Mike
I think this is not easily possible with managed make. For managed make, the compiler is producing a dependency file which is used by the make file. The assembler does not provide this. It could, but seems this is not implemented. As such, the make file has no idea about the .inc dependency.
The only solution I see is that you would use a normal make project instead of managed make. See
Make my Make with Eclipse and MCU10 | MCU on Eclipse
how to do this.
Hope this helps,
Erich
Erich,
I am having trouble with the makefile.
If I use the rule:
Objects/CMDS.obj: Sources/CMDS.asm
(tab)@echo 'Building file: $
Links:
It looks like HTML scrambled my previous message. (And replying in with HTML off seems to hang the system)
I am having a little trouble with the makefile.
If I use the recipe:
Objects/CMDS.obj: Sources/CMDS.asm
@echo 'Building file: $<'
@echo 'Invoking: HCS08 Assembler'
"$(HC08ToolsEnv)/ahc08" $(AFLAGS) "$<"
@echo 'Finished building: $<'
@echo ' '
the file CMDS.obj is generated correctly. But if I clean the project and change the top line to:
Objects/%.obj: Sources/%.asm
then I get the error message:
mingw32-make: *** No rule to make target `Objects/CMDS.obj'
I can't figure out what I am doing wrong. (Of course, I could always write a recipe for each object file, but this is supposed to work.)
Thanks Erich,
I knew the Kinetis compiler handled *.h files automatically; I just
assumed the assemblers would handle *.inc files automatically too and
that I was just missing something. I will go with the makefile
project.
Mike