git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@469
4a8a32a2-be11-0410-ad9d-
d568d2c75423
-all: as cpp gc ports sdcc
+all: as cpp gc ports sdcc packihx
- cd as\mcs51
- make -f Makefile.bcc
- cd ..\..
+ cd as\mcs51
+ make -f Makefile.bcc
+ cd ..\..
- cd support\cpp
- make -f Makefile.bcc
- cd ..\..
+ cd support\cpp
+ make -f Makefile.bcc
+ cd ..\..
- cd support\gc
- make -f BCC_MAKEFILE gc.lib
- cd ..\..
+ cd support\gc
+ make -f BCC_MAKEFILE gc.lib
+ cd ..\..
ports: z80 mcs51 avr ds390
z80:
ports: z80 mcs51 avr ds390
z80:
- cd src\z80
- make -f Makefile.bcc
- cd ..\..
+ cd src\z80
+ make -f Makefile.bcc
+ cd ..\..
- cd src\mcs51
- make -f Makefile.bcc
- cd ..\..
+ cd src\mcs51
+ make -f Makefile.bcc
+ cd ..\..
- cd src\avr
- make -f Makefile.bcc
- cd ..\..
+ cd src\avr
+ make -f Makefile.bcc
+ cd ..\..
- cd src\ds390
- make -f Makefile.bcc
- cd ..\..
+ cd src\ds390
+ make -f Makefile.bcc
+ cd ..\..
- cd src
- make -f Makefile.bcc
- cd ..
-
+ cd src
+ make -f Makefile.bcc
+ cd ..
+
+packihx:
+ cd packihx
+ make -f Makefile.bcc
+ cd ..
--- /dev/null
+PRJDIR = ..
+
+OBJECTS = packihx.obj
+
+TARGET = $(PRJDIR)/bin/packihx.exe
+
+# Compiling entire program or any subproject
+# ------------------------------------------
+all: $(TARGET)
+
+
+# My rules
+# --------
+$(TARGET): $(OBJECTS)
+ bcc32 -e$(TARGET) $(OBJECTS)
+
+!include ..\Bcc.inc
+
typedef struct _Line
{
Uint8 len; /* length of data portion of record. */
typedef struct _Line
{
Uint8 len; /* length of data portion of record. */
Uint8 type;
Uint8 *data;
Uint8 checksum;
Uint8 type;
Uint8 *data;
Uint8 checksum;
if (!buffer[0] || buffer[0] == '\r' || buffer[0] == '\n')
{
if (!buffer[0] || buffer[0] == '\r' || buffer[0] == '\n')
{
- for (i = 0; i < line->len; i++)
+ for (i = 0; i < (unsigned)line->len; i++)
{
if (getHexByte(bp, &(line->data[i])))
{
{
if (getHexByte(bp, &(line->data[i])))
{
free(line);
return NULL;
}
free(line);
return NULL;
}
- bp += 2; /* Two digits consumed. */
+ /* bp += 2; */ /* Two digits consumed. */
Uint16 lineChecksum(unsigned len, unsigned offset, unsigned type,
const Uint8 *data)
{
Uint16 lineChecksum(unsigned len, unsigned offset, unsigned type,
const Uint8 *data)
{
unsigned i;
checksum = len + type + (offset >> 8) +
unsigned i;
checksum = len + type + (offset >> 8) +
int writeLine(Line *line)
{
static Uint16 lastExtendedOffset = 0;
int writeLine(Line *line)
{
static Uint16 lastExtendedOffset = 0;
- if (pendingOffset + pendingLen != line->offset)
+ if (pendingOffset + pendingLen != (unsigned)line->offset)
{
/* This line is not contigous with the last one. Dump pending. */
if (flushPendingData())
{
/* This line is not contigous with the last one. Dump pending. */
if (flushPendingData())