Programming the 6502 SBC using cc65
A bit raw but what matters is stated. I haven't had time to write a proper description on how cc65 really works so the necessary steps to get it working with the SBC are stated.
- Edit the Makefile in cc65/libsrc add hkh65 to the list of all targets.
- In the same file, append the following after f.x. the Vic20 part
#-----------------------------------------------------------------------------
# hkh65
hkh65lib:
for i in hkh65 common runtime conio zlib; do \
$(MAKE) SYS=none -C $$i || exit 1; \
$(AR) a hkh65.lib $$i/*.o;\
done
mv hkh65/crt0.o hkh65.o
#----------------------------------------------------------------------------- - Create a directory cc65/libsrc/hkh65 and add this Makefile to it.
- To the same directory, add crt0.s and delay_functions.s.
- In cc65/libsrc/hkh65 do make
- In cc65/libsrc do make
- cc65 test.c
- ca65 test.s
- ld65 -C hkh65.cfg -m test.map -o test test.o ./cc65/libsrc/hkh65.o ./cc65/libsrc/hkh65.lib