From: Mart Lubbers Date: Wed, 11 Jan 2017 20:04:44 +0000 (+0100) Subject: make workable for linux again X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=d843329eece9c8607411abb56491a00e152554ce;p=mTask.git make workable for linux again --- diff --git a/int/nucleo-f767-blinky/.gitignore b/int/nucleo-f767-blinky/.gitignore index cde5e0f..f60a380 100644 --- a/int/nucleo-f767-blinky/.gitignore +++ b/int/nucleo-f767-blinky/.gitignore @@ -2,5 +2,6 @@ *.list *.map *.out +*.hex o/* a/* diff --git a/int/nucleo-f767-blinky/src/Makefile b/int/nucleo-f767-blinky/src/Makefile new file mode 100644 index 0000000..6ebad9d --- /dev/null +++ b/int/nucleo-f767-blinky/src/Makefile @@ -0,0 +1,18 @@ +CFLAGS:=-g -Wall -Wextra -Werror -DDEBUG +PROG:=main +OBJS:=interpret.o sds.o task.o main.o + +all: mTaskSymbols.h $(PROG) + +%.o: %.cpp + gcc $(CFLAGS) -c $< -o $@ + +$(PROG): $(OBJS) misc.h + gcc $(LDFLAGS) -o $@ $(OBJS) + +mTaskSymbols.h: + CLMFLAGS=-nr make -BC ../.. mTaskInterpret + ../../mTaskInterpret > $@ + +clean: + $(RM) $(OBJS) $(PROG) diff --git a/int/nucleo-f767-blinky/src/main.c b/int/nucleo-f767-blinky/src/main.c index 25a0728..5ebac62 100644 --- a/int/nucleo-f767-blinky/src/main.c +++ b/int/nucleo-f767-blinky/src/main.c @@ -31,6 +31,7 @@ void _exit(int i){ while(1); + (void)i; } //Globals @@ -66,7 +67,7 @@ long millis() { bool input_available(){ #ifdef STM32F767xx - return true; + return false; #else struct timeval tv; fd_set fds; @@ -239,9 +240,6 @@ void loop() #endif run_task(curtask); } - debug("Waiting for 500ms\n"); - delay(500); - debug("done waiting\n"); write_byte('\n'); } @@ -262,6 +260,10 @@ int main(int ac, char *av[]) while(true){ //Check for new tasks loop(); + debug("Waiting for 500ms\n"); + delay(500); + debug("done waiting\n"); + delay(500); } return 0; } diff --git a/int/nucleo-f767-blinky/src/misc.h b/int/nucleo-f767-blinky/src/misc.h index 3d5236e..5f188f4 100644 --- a/int/nucleo-f767-blinky/src/misc.h +++ b/int/nucleo-f767-blinky/src/misc.h @@ -3,7 +3,7 @@ #include "main.h" #define read16() 256*read_byte() + read_byte() -#ifdef ARDUINO +#ifdef STM32F767xx #define debug(s, ...) ; #define pdie(s) ; #define die(s, ...) ; diff --git a/int/nucleo-f767-blinky/src/sds.c b/int/nucleo-f767-blinky/src/sds.c index 6ac2d19..4751284 100644 --- a/int/nucleo-f767-blinky/src/sds.c +++ b/int/nucleo-f767-blinky/src/sds.c @@ -1,7 +1,7 @@ #include #include -#ifndef ARDUINO +#ifndef STM32F767xx #include #include #endif diff --git a/int/nucleo-f767-blinky/src/task.c b/int/nucleo-f767-blinky/src/task.c index bd6c36d..07b7de8 100644 --- a/int/nucleo-f767-blinky/src/task.c +++ b/int/nucleo-f767-blinky/src/task.c @@ -1,10 +1,7 @@ #include #include -#ifdef ARDUINO -#include -#include -#else +#ifndef STM32F767xx #include #include #endif