repositories
/
mTask.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c23eb53
)
make workable for linux again
author
Mart Lubbers
<mart@martlubbers.net>
Wed, 11 Jan 2017 20:04:44 +0000
(21:04 +0100)
committer
Mart Lubbers
<mart@martlubbers.net>
Wed, 11 Jan 2017 20:04:44 +0000
(21:04 +0100)
int/nucleo-f767-blinky/.gitignore
patch
|
blob
|
history
int/nucleo-f767-blinky/src/Makefile
[new file with mode: 0644]
patch
|
blob
int/nucleo-f767-blinky/src/main.c
patch
|
blob
|
history
int/nucleo-f767-blinky/src/misc.h
patch
|
blob
|
history
int/nucleo-f767-blinky/src/sds.c
patch
|
blob
|
history
int/nucleo-f767-blinky/src/task.c
patch
|
blob
|
history
diff --git
a/int/nucleo-f767-blinky/.gitignore
b/int/nucleo-f767-blinky/.gitignore
index
cde5e0f
..
f60a380
100644
(file)
--- a/
int/nucleo-f767-blinky/.gitignore
+++ b/
int/nucleo-f767-blinky/.gitignore
@@
-2,5
+2,6
@@
*.list
*.map
*.out
*.list
*.map
*.out
+*.hex
o/*
a/*
o/*
a/*
diff --git a/int/nucleo-f767-blinky/src/Makefile
b/int/nucleo-f767-blinky/src/Makefile
new file mode 100644
(file)
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
(file)
--- 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 _exit(int i){
while(1);
+ (void)i;
}
//Globals
}
//Globals
@@
-66,7
+67,7
@@
long millis() {
bool input_available(){
#ifdef STM32F767xx
bool input_available(){
#ifdef STM32F767xx
- return
tru
e;
+ return
fals
e;
#else
struct timeval tv;
fd_set fds;
#else
struct timeval tv;
fd_set fds;
@@
-239,9
+240,6
@@
void loop()
#endif
run_task(curtask);
}
#endif
run_task(curtask);
}
- debug("Waiting for 500ms\n");
- delay(500);
- debug("done waiting\n");
write_byte('\n');
}
write_byte('\n');
}
@@
-262,6
+260,10
@@
int main(int ac, char *av[])
while(true){
//Check for new tasks
loop();
while(true){
//Check for new tasks
loop();
+ debug("Waiting for 500ms\n");
+ delay(500);
+ debug("done waiting\n");
+ delay(500);
}
return 0;
}
}
return 0;
}
diff --git
a/int/nucleo-f767-blinky/src/misc.h
b/int/nucleo-f767-blinky/src/misc.h
index
3d5236e
..
5f188f4
100644
(file)
--- 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()
#include "main.h"
#define read16() 256*read_byte() + read_byte()
-#ifdef
ARDUINO
+#ifdef
STM32F767xx
#define debug(s, ...) ;
#define pdie(s) ;
#define die(s, ...) ;
#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
(file)
--- a/
int/nucleo-f767-blinky/src/sds.c
+++ b/
int/nucleo-f767-blinky/src/sds.c
@@
-1,7
+1,7
@@
#include <stdlib.h>
#include <string.h>
#include <stdlib.h>
#include <string.h>
-#ifndef
ARDUINO
+#ifndef
STM32F767xx
#include <unistd.h>
#include <stdio.h>
#endif
#include <unistd.h>
#include <stdio.h>
#endif
diff --git
a/int/nucleo-f767-blinky/src/task.c
b/int/nucleo-f767-blinky/src/task.c
index
bd6c36d
..
07b7de8
100644
(file)
--- a/
int/nucleo-f767-blinky/src/task.c
+++ b/
int/nucleo-f767-blinky/src/task.c
@@
-1,10
+1,7
@@
#include <stdlib.h>
#include <string.h>
#include <stdlib.h>
#include <string.h>
-#ifdef ARDUINO
-#include <Arduino.h>
-#include <HardwareSerial.h>
-#else
+#ifndef STM32F767xx
#include <unistd.h>
#include <stdio.h>
#endif
#include <unistd.h>
#include <stdio.h>
#endif