diff --git a/src/cmd/basic/basic.c b/src/cmd/basic/basic.c index 4131760..9394f06 100644 --- a/src/cmd/basic/basic.c +++ b/src/cmd/basic/basic.c @@ -15,7 +15,6 @@ * only. IE: A is equivalent to A0 ... Z$ is equivalent to Z0$ * * Statements: - * BEEP freq,ms - Generate a BEEP on the PC speaker * CLEAR - Erase variables only * CLOSE#n - Close file (0-9) opened with OPEN * DATA - Enter "inline" data statements @@ -155,7 +154,7 @@ #define SAVE 25 #define LOAD 26 #define DELAY 27 -#define BEEP 28 +//#define BEEP 28 #define DOS 29 #define OUT 30 @@ -279,11 +278,6 @@ int eval_sub(void); WINDOW *win; -void beep (int i, int t) -{ - printf("BEEP not implemented yet, at line %u\n", line); -} - void delay (int msec) { usleep (msec * 1000); @@ -1371,11 +1365,6 @@ input: if (ii == -1) case SRND: srandom(eval_num()); break; - case BEEP: - i = eval_num(); - expect(','); - beep(i, eval_num()); - break; case DOS: eval_char(); fflush(stdout); diff --git a/sys/pic32/gcc-config.mk b/sys/pic32/gcc-config.mk index f52eff6..27abf48 100644 --- a/sys/pic32/gcc-config.mk +++ b/sys/pic32/gcc-config.mk @@ -3,7 +3,7 @@ # Use UECIDE package from http://uecide.org/download ifndef MIPS_GCC_PREFIX ifdef UECIDE - MIPS_GCC_PREFIX = $(UECIDE)/compilers/pic32-tools/bin/pic32- + MIPS_GCC_PREFIX = $(UECIDE)/compilers/pic32-tools-452/bin/pic32- MIPS_GCC_FORMAT = elf32-tradlittlemips endif endif diff --git a/target.mk b/target.mk index 0ce66d8..50ef6c5 100644 --- a/target.mk +++ b/target.mk @@ -7,9 +7,9 @@ VERSION = $(RELEASE)-$(BUILD) # chipKIT PIC32 compiler from UECIDE ifdef UECIDE ifndef GCCPREFIX - GCCPREFIX = ${UECIDE}/compilers/pic32-tools/bin/pic32- + GCCPREFIX = ${UECIDE}/compilers/pic32-tools-452/bin/pic32- LDFLAGS = -Wl,--oformat=elf32-tradlittlemips - INCLUDES = -I${UECIDE}/compilers/pic32-tools/lib/gcc/pic32mx/4.5.1/include + INCLUDES = -I${UECIDE}/compilers/pic32-tools-452/lib/gcc/pic32mx/4.5.2/include endif endif diff --git a/tools/elf2aout/Makefile b/tools/elf2aout/Makefile index 8224766..7f60474 100644 --- a/tools/elf2aout/Makefile +++ b/tools/elf2aout/Makefile @@ -1,4 +1,4 @@ -CC = gcc -g +CC = ${HOSTCC}gcc -g CFLAGS = -O -Wall DESTDIR = /usr/local OBJS = elf2aout.o @@ -16,3 +16,6 @@ clean: $(PROG): $(OBJS) $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) + +$(PROG).exe: $(OBJS) + $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) diff --git a/tools/elf2aout/elf2aout.c b/tools/elf2aout/elf2aout.c index 0860eb1..98fe60d 100644 --- a/tools/elf2aout/elf2aout.c +++ b/tools/elf2aout/elf2aout.c @@ -31,7 +31,9 @@ */ #include +#ifndef _WIN32 #include +#endif #include #include #include @@ -42,6 +44,86 @@ #include #include +#ifdef _WIN32 +#include + +typedef unsigned char u_char; +typedef unsigned int u_int; + + +void verr(int eval, const char *fmt, va_list ap) { + char* __progname = "elf2aout"; + int sverrno; + + sverrno = errno; + (void)fprintf(stderr, "%s: ", __progname); + if (fmt != NULL) { + (void)vfprintf(stderr, fmt, ap); + (void)fprintf(stderr, ": "); + } + (void)fprintf(stderr, "%s\n", strerror(sverrno)); + exit(eval); +} + +void err(int eval, const char *fmt, ...) { + va_list ap; + va_start(ap, fmt); + verr(eval, fmt, ap); + va_end(ap); +} + +void verrx(int eval, const char *fmt, va_list ap) { + char* __progname = "elf2aout"; + (void)fprintf(stderr, "%s: ", __progname); + if (fmt != NULL) + (void)vfprintf(stderr, fmt, ap); + (void)fprintf(stderr, "\n"); + exit(eval); +} + +void errx(int eval, const char *fmt, ...) { + va_list ap; + va_start(ap, fmt); + verrx(eval, fmt, ap); + va_end(ap); +} + +void vwarn(const char *fmt, va_list ap) { + int sverrno = errno; + char* __progname = "elf2aout"; + (void)fprintf(stderr, "%s: ", __progname); + if (fmt != NULL) { + (void)vfprintf(stderr, fmt, ap); + (void)fprintf(stderr, ": "); + } + (void)fprintf(stderr, "%s\n", strerror(sverrno)); +} + +void warn(const char *fmt, ...) { + va_list ap; + va_start(ap, fmt); + vwarn(fmt, ap); + va_end(ap); +} + +void vwarnx(const char *fmt, va_list ap) { + char* __progname = "elf2aout"; + (void)fprintf(stderr, "%s: ", __progname); + if (fmt != NULL) + (void)vfprintf(stderr, fmt, ap); + (void)fprintf(stderr, "\n"); +} + +void warnx(const char *fmt, ...) { + va_list ap; + va_start(ap, fmt); + vwarnx(fmt, ap); + va_end(ap); +} + + +#endif + /* * Header prepended to each a.out file. */