diff --git a/Makefile.rules b/Makefile.rules index 0ab879a..d4679f5 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -29,7 +29,7 @@ $(error RASPPI must be one of: 0, 1, 2, 3) endif AFLAGS += $(ARCH) -CFLAGS += $(ARCH) -Wall -Wno-psabi -fsigned-char -fno-builtin -Ofast -DNDEBUG +CFLAGS += $(ARCH) -Wall -Wno-unused-variable -Wno-unused-but-set-variable -Wno-psabi -fsigned-char -fno-builtin -Ofast -DNDEBUG CPPFLAGS := $(CFLAGS) $(CPPFLAGS) -fno-exceptions -fno-rtti -std=c++0x -Wno-write-strings CFLAGS += -fno-delete-null-pointer-checks -fdata-sections -ffunction-sections -u _printf_float -std=gnu99 @@ -45,4 +45,4 @@ CFLAGS += -fno-delete-null-pointer-checks -fdata-sections -ffunction-sections - %.o: %.cpp @echo " CPP $@" - $(Q)$(CPP) $(CPPFLAGS) $(INCLUDE) -c -o $@ $< \ No newline at end of file + $(Q)$(CPP) $(CPPFLAGS) $(INCLUDE) -c -o $@ $< diff --git a/src/armc-cstartup.c b/src/armc-cstartup.c index 742c5c8..5495d2f 100644 --- a/src/armc-cstartup.c +++ b/src/armc-cstartup.c @@ -56,7 +56,7 @@ void _cstartup( unsigned int r0, unsigned int r1, unsigned int r2 ) while( bss < bss_end ) *bss++ = 0; - __libc_init_array(); + __libc_init_array(); /* We should never return from main ... */ kernel_main( r0, r1, r2 ); diff --git a/src/armc-cstubs.c b/src/armc-cstubs.c index 46b6891..8fb4e29 100644 --- a/src/armc-cstubs.c +++ b/src/armc-cstubs.c @@ -87,6 +87,17 @@ void _exit(int status) } } +void _fini(int status) +{ + /* Stop the compiler complaining about unused variables by "using" it */ + (void) status; + + while (1) + { + /* TRAP HERE */ + } +} + /* There's currently no implementation of a file system because there's no file system! */ int _close(int file) diff --git a/src/iec_bus.h b/src/iec_bus.h index 3e6d645..0ca9705 100644 --- a/src/iec_bus.h +++ b/src/iec_bus.h @@ -531,10 +531,10 @@ public: invertIECInputs = value; if (value) { - PI_Atn = ~PI_Atn; - PI_Data = ~PI_Data; - PI_Clock = ~PI_Clock; - PI_Reset = ~PI_Reset; + PI_Atn = !PI_Atn; + PI_Data = !PI_Data; + PI_Clock = !PI_Clock; + PI_Reset = !PI_Reset; } } @@ -626,4 +626,4 @@ private: static u32 inputRepeat[5]; static u32 inputRepeatPrev[5]; }; -#endif \ No newline at end of file +#endif