jlab-sensing / Rocketlogger-Firmware

MIT License
0 stars 0 forks source link

Fix compilation on RocketLoggers #11

Closed jmadden173 closed 2 years ago

jmadden173 commented 2 years ago

Had to fix various things ad-hoc on the RocketLogger, need to implement them on the repo

diff --git a/libipc/Makefile b/libipc/Makefile
index 2cc854a..02905f8 100644
--- a/libipc/Makefile
+++ b/libipc/Makefile
@@ -1,4 +1,4 @@
-CFLAGS = -Wall -Wextra -g
+CFLAGS = -Wall -Wextra -g -fPIC
 CPPFLAGS = -I./include -I./external/ctest
 LDFLAGS = -L./build
 LDLIBS = -lipc
@@ -24,7 +24,7 @@ examples: build/libipc.a $(EXAMPLES)
 .SECONDARY: $(addsuffix .out,$(TESTS))

 build/libipc.so: $(OBJS)
-       $(CC) -shared -Wl,-soname,libipc.so -o $@ $^
+       $(CC) -shared -Wl,-soname,libipc.so -fPIC -o $@ $^

 # main library
 build/libipc.a: $(OBJS)
diff --git a/lora/Makefile b/lora/Makefile
index 0f727b6..2ccf8bf 100644
--- a/lora/Makefile
+++ b/lora/Makefile
@@ -20,7 +20,7 @@ $(BIN_DIR)/%.o: $(SRC_DIR)/%.c
 .PHONY: install clean

 install: all
-       install -m 777 bulid/lora /usr/bin
+       install -m 777 build/lora /usr/bin

 clean:
        $(RM) -rv $(BIN_DIR)/*
diff --git a/scripts/logger.sh b/scripts/logger.sh
index 548c42a..6f3756d 100644
--- a/scripts/logger.sh
+++ b/scripts/logger.sh
@@ -1,7 +1,7 @@
 #!/bin/bash

-RL_SOCKET=/tmp/rl.socket
-TEROS_SOCKET=/tmp/teros.socket
+RL_SOCKET=/tmp/rlstream.socket
+TEROS_SOCKET=/tmp/terosstream.socket
 DEV=/dev/ttyACM0

 rocketlogger meter -r 1 -ch 0,1,2,3,4,5 -d 0 -w 0 > pipesocket $RL_SOCKET &
jmadden173 commented 2 years ago

Committed to master