
A file must contain an array that exports flashdata as:

char flashdata[] = {
	byte, byte
};


long flashsize = 2;


The file should contain an os image that was compiled for the cybiko at 0x10000.
A utility should be run that will convert the os image into a file that has the above.

Here is a makefile:





# Rules for making cyborn stuff
# For my system, V is mapped to where cyborn is, so:
# Do this in the environment: export CYBORNPATH=cygdrive/v/projects/cyborn
#

include $(CYBORNPATH)/build/cyborn.mk


########################### change the PROGNAME to the name of the working.c
############################ the file with 'main' in it
PROGNAME = os


#when making a .boot, always put $(BOOTPROGRAM) first! see cyborn.mk
OBJFILES = $(BOOTPROGRAM) $(PROGNAME).o cyConsole.o

# Note that the layout for the OS should be in flash at 0x100000


#default target - the one that will be uploaded to the cybiko
#First make the object files (implicit rules), link and convert
$(PROGNAME).boot: $(OBJFILES) $(LIBPATH)/libload.a Makefile ($PROGNAME).data
	$(TOOLPATH)ld.exe -T $(FLASHLAYOUT) $(OBJFILES) $(LIBS) $(LDFLAGS) -o $@
	$(TOOLPATH)objcopy.exe $@ -O binary -I coff-h8300


# we need the data file to put into the .boot file
$(PROGNAME).data: $(PROGNAME).boot $(LIBPATH)/libload.a Makefile
	$(TOOLPATH)data2flash.exe $(PROGNAME).boot $@






clean:
	rm *.o *.boot









