ImageCraft Assembly Language Guide, Document # 001-44475 Rev. *B
35
ImageCraft Assembler
PSoC Designer automatically generates a certain amount of code for each new project. In this
example, use the generated
_main
source file to hold regression tests, but do not add this file to the
custom library. Also, do not add the generated
boot.asm
source file to the library. Essentially, all the
files under the "Source Files" branch of the project view source tree go into a custom library, except
main.asm
(or
main.c
) and
boot.asm
.
Create a file called
local.dep
in the root folder of the project. The
local.dep
file is included by the
master
Makefile
(found in the …
\PSoC Designer\tools
folder). The following shows how the
Makefile
includes
local.dep
(found at the bottom of
Makefile
).
#this include is the dependencies
-include project.dep
#if you like project.dep that is good!
-include local.dep
The nice thing about having
local.dep
included at the end of the master
Makefile
is that the rules
used in the
Makefile
can be redefined (see the Help > Documentation \
Supporting Docu-
ments\make.pdf
for detailed information). In this example, it is used as an advantage.
The following shows information from example
local.dep
.
# ----- Cut/Paste to your local.dep File -----
define Add_To_MyCustomLib
$(CRLF)
$(LIBCMD) -a PSoCToolsLib.a $(library_file)
endif
obj/%.o : %.asm project.mk
ifeq ($(ECHO_COMMANDS),novice)
echo $(call correct_path,$<)
endif
$(ASMCMD) $(INCLUDEFLAGS) $(DEFAULTASMFLAGS) $(ASMFLAGS) -
$@ $(call
correct_path,$<)
$(foreach library_file, $(filter-out obj/main.o, $@),
$(Add_To_MyCustomLib))
obj/%.o : %.c project.mk
ifeq ($(ECHO_COMMANDS),novice)
echo $(call correct_path,$<)
endif
$(CCMD) $(CFLAGS) $(CDEFINES) $(INCLUDEFLAGS)
$(DEFAULTCFLAGS) -o $@ $(call correct_path,$<)
$(foreach library_file, $(filter-out obj/main.o, $@),
$(Add_To_MyCustomLib))
# ------ End Cut -----
Summary of Contents for PSoC DESIGNER ImageCraft M8C
Page 6: ...6 ImageCraft Assembly Language Guide Document 001 44475 Rev B Contents Feedback ...
Page 10: ...10 ImageCraft Assembly Language Guide Document 001 44475 Rev B Introduction Feedback ...
Page 24: ...24 ImageCraft Assembly Language Guide Document 001 44475 Rev B M8C Microprocessor Feedback ...
Page 95: ...ImageCraft Assembly Language Guide Document 001 44475 Rev B 95 Assembler Directives Feedback ...
Page 96: ...96 ImageCraft Assembly Language Guide Document 001 44475 Rev B Assembler Directives Feedback ...
Page 104: ...104 ImageCraft Assembly Language Guide Document 001 44475 Rev B Feedback ...
Page 108: ...108 ImageCraft Assembly Language Guide Document 001 44475 Rev B Index Feedback ...