From 2e196d4e484c3945f7e6bd1c680a2021613bece7 Mon Sep 17 00:00:00 2001 From: Mart Lubbers Date: Mon, 3 Apr 2017 13:57:25 +0200 Subject: [PATCH] separate in directories --- .gitmodules | 2 +- client/Makefile | 239 +----------------- client/Makefile.NodeMCU | 21 -- client/Makefile.linux | 14 - client/{main.c => client.c} | 15 +- client/interface.h | 6 +- client/interface_nodemcu.c | 47 ---- client/linux/Makefile | 11 + client/linux/client | Bin 0 -> 37704 bytes client/linux/client.c | 1 + .../{interface_linux.c => linux/interface.c} | 5 +- client/linux/interface.h | 1 + client/linux/interpret.c | 1 + client/linux/interpret.h | 1 + client/linux/mTaskSymbols.h | 1 + client/linux/sds.c | 1 + client/linux/sds.h | 1 + client/linux/spec.c | 1 + client/linux/spec.h | 1 + client/linux/task.c | 1 + client/linux/task.h | 1 + client/nodemcu/Makefile | 2 + client/nodemcu/interface.c | 1 + client/nodemcu/interface.h | 1 + client/nodemcu/interpret.c | 1 + client/nodemcu/interpret.h | 1 + client/nodemcu/mTaskSymbols.h | 1 + client/nodemcu/nodemcu.ino | 1 + client/nodemcu/sds.c | 1 + client/nodemcu/sds.h | 1 + client/nodemcu/spec.c | 1 + client/nodemcu/spec.h | 1 + client/nodemcu/task.c | 1 + client/nodemcu/task.h | 1 + client/spec.c | 1 - client/spec.h | 3 - client/{ => stm32}/ChibiOS | 0 client/stm32/Makefile | 235 +++++++++++++++++ client/{ => stm32}/chconf.h | 0 client/stm32/client.c | 1 + client/{ => stm32}/halconf.h | 0 client/{ => stm32}/interface.c | 6 +- client/stm32/interface.h | 1 + client/stm32/interpret.c | 1 + client/stm32/interpret.h | 1 + client/stm32/mTaskSymbols.h | 1 + client/{ => stm32}/mcuconf.h | 0 client/stm32/sds.c | 1 + client/stm32/sds.h | 1 + client/stm32/spec.c | 1 + client/stm32/spec.h | 1 + client/stm32/task.c | 1 + client/stm32/task.h | 1 + client/user_config.h | 0 54 files changed, 301 insertions(+), 340 deletions(-) delete mode 100644 client/Makefile.NodeMCU delete mode 100644 client/Makefile.linux rename client/{main.c => client.c} (91%) delete mode 100644 client/interface_nodemcu.c create mode 100644 client/linux/Makefile create mode 100755 client/linux/client create mode 120000 client/linux/client.c rename client/{interface_linux.c => linux/interface.c} (98%) create mode 120000 client/linux/interface.h create mode 120000 client/linux/interpret.c create mode 120000 client/linux/interpret.h create mode 120000 client/linux/mTaskSymbols.h create mode 120000 client/linux/sds.c create mode 120000 client/linux/sds.h create mode 120000 client/linux/spec.c create mode 120000 client/linux/spec.h create mode 120000 client/linux/task.c create mode 120000 client/linux/task.h create mode 100644 client/nodemcu/Makefile create mode 100644 client/nodemcu/interface.c create mode 120000 client/nodemcu/interface.h create mode 120000 client/nodemcu/interpret.c create mode 120000 client/nodemcu/interpret.h create mode 120000 client/nodemcu/mTaskSymbols.h create mode 120000 client/nodemcu/nodemcu.ino create mode 120000 client/nodemcu/sds.c create mode 120000 client/nodemcu/sds.h create mode 120000 client/nodemcu/spec.c create mode 120000 client/nodemcu/spec.h create mode 120000 client/nodemcu/task.c create mode 120000 client/nodemcu/task.h rename client/{ => stm32}/ChibiOS (100%) create mode 100644 client/stm32/Makefile rename client/{ => stm32}/chconf.h (100%) create mode 120000 client/stm32/client.c rename client/{ => stm32}/halconf.h (100%) rename client/{ => stm32}/interface.c (97%) create mode 120000 client/stm32/interface.h create mode 120000 client/stm32/interpret.c create mode 120000 client/stm32/interpret.h create mode 120000 client/stm32/mTaskSymbols.h rename client/{ => stm32}/mcuconf.h (100%) create mode 120000 client/stm32/sds.c create mode 120000 client/stm32/sds.h create mode 120000 client/stm32/spec.c create mode 120000 client/stm32/spec.h create mode 120000 client/stm32/task.c create mode 120000 client/stm32/task.h delete mode 100644 client/user_config.h diff --git a/.gitmodules b/.gitmodules index 5195bdd..2ee1383 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,5 +2,5 @@ path = CleanSerial url = https://gitlab.science.ru.nl/mlubbers/CleanSerial [submodule "int/ChibiOS"] - path = client/ChibiOS + path = client/stm32/ChibiOS url = https://github.com/ChibiOS/ChibiOS.git diff --git a/client/Makefile b/client/Makefile index 3e2db2e..652910b 100644 --- a/client/Makefile +++ b/client/Makefile @@ -1,235 +1,4 @@ -############################################################################## -# Build global options -# NOTE: Can be overridden externally. -# - -# Compiler options here. -ifeq ($(USE_OPT),) - USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16 -endif - -# C specific options here (added to USE_OPT). -ifeq ($(USE_COPT),) - USE_COPT = -endif - -# C++ specific options here (added to USE_OPT). -ifeq ($(USE_CPPOPT),) - USE_CPPOPT = -fno-rtti -endif - -# Enable this if you want the linker to remove unused code and data -ifeq ($(USE_LINK_GC),) - USE_LINK_GC = yes -endif - -# Linker extra options here. -ifeq ($(USE_LDOPT),) - USE_LDOPT = -endif - -# Enable this if you want link time optimizations (LTO) -ifeq ($(USE_LTO),) - USE_LTO = yes -endif - -# If enabled, this option allows to compile the application in THUMB mode. -ifeq ($(USE_THUMB),) - USE_THUMB = yes -endif - -# Enable this if you want to see the full log while compiling. -ifeq ($(USE_VERBOSE_COMPILE),) - USE_VERBOSE_COMPILE = no -endif - -# If enabled, this option makes the build process faster by not compiling -# modules not used in the current configuration. -ifeq ($(USE_SMART_BUILD),) - USE_SMART_BUILD = yes -endif - -# -# Build global options -############################################################################## - -############################################################################## -# Architecture or project specific options -# - -# Stack size to be allocated to the Cortex-M process stack. This stack is -# the stack used by the main() thread. -ifeq ($(USE_PROCESS_STACKSIZE),) - USE_PROCESS_STACKSIZE = 0x400 -endif - -# Stack size to the allocated to the Cortex-M main/exceptions stack. This -# stack is used for processing interrupts and exceptions. -ifeq ($(USE_EXCEPTIONS_STACKSIZE),) - USE_EXCEPTIONS_STACKSIZE = 0x400 -endif - -# Enables the use of FPU (no, softfp, hard). -ifeq ($(USE_FPU),) - USE_FPU = no -endif - -# FPU-related options. -ifeq ($(USE_FPU_OPT),) - USE_FPU_OPT = -mfloat-abi=$(USE_FPU) -mfpu=fpv5-d16 -endif - -# -# Architecture or project specific options -############################################################################## - -############################################################################## -# Project, sources and paths -# - -# Define project name here -PROJECT = mTask - -# Imported source files and paths -CHIBIOS = ./ChibiOS -# Startup files. -include $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f7xx.mk -# HAL-OSAL files (optional). -include $(CHIBIOS)/os/hal/hal.mk -include $(CHIBIOS)/os/hal/ports/STM32/STM32F7xx/platform.mk -include $(CHIBIOS)/os/hal/boards/ST_NUCLEO144_F767ZI/board.mk -include $(CHIBIOS)/os/hal/osal/rt/osal.mk -# RTOS files (optional). -include $(CHIBIOS)/os/rt/rt.mk -include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk -# Other files (optional). -include $(CHIBIOS)/test/rt/test.mk - -# Define linker script file here -LDSCRIPT= $(STARTUPLD)/STM32F76xxI.ld - -# C sources that can be compiled in ARM or THUMB mode depending on the global -# setting. -CSRC = $(STARTUPSRC) \ - $(KERNSRC) \ - $(PORTSRC) \ - $(OSALSRC) \ - $(HALSRC) \ - $(PLATFORMSRC) \ - $(BOARDSRC) \ - $(TESTSRC) \ - $(CHIBIOS)/os/hal/lib/streams/memstreams.c \ - $(CHIBIOS)/os/hal/lib/streams/chprintf.c \ - $(filter-out interface_linux.c,$(wildcard *.c)) - -# C++ sources that can be compiled in ARM or THUMB mode depending on the global -# setting. -CPPSRC = - -# C sources to be compiled in ARM mode regardless of the global setting. -# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler -# option that results in lower performance and larger code size. -ACSRC = - -# C++ sources to be compiled in ARM mode regardless of the global setting. -# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler -# option that results in lower performance and larger code size. -ACPPSRC = - -# C sources to be compiled in THUMB mode regardless of the global setting. -# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler -# option that results in lower performance and larger code size. -TCSRC = - -# C sources to be compiled in THUMB mode regardless of the global setting. -# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler -# option that results in lower performance and larger code size. -TCPPSRC = - -# List ASM source files here -ASMSRC = -ASMXSRC = $(STARTUPASM) $(PORTASM) $(OSALASM) - -INCDIR = $(CHIBIOS)/os/license \ - $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \ - $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \ - $(CHIBIOS)/os/various - -# -# Project, sources and paths -############################################################################## - -############################################################################## -# Compiler settings -# - -MCU = cortex-m7 - -#TRGT = arm-elf- -TRGT = arm-none-eabi- -CC = $(TRGT)gcc -CPPC = $(TRGT)g++ -# Enable loading with g++ only if you need C++ runtime support. -# NOTE: You can use C++ even without C++ support if you are careful. C++ -# runtime support makes code size explode. -LD = $(TRGT)gcc -#LD = $(TRGT)g++ -CP = $(TRGT)objcopy -AS = $(TRGT)gcc -x assembler-with-cpp -AR = $(TRGT)ar -OD = $(TRGT)objdump -SZ = $(TRGT)size -HEX = $(CP) -O ihex -BIN = $(CP) -O binary - -# ARM-specific options here -AOPT = - -# THUMB-specific options here -TOPT = -mthumb -DTHUMB - -# Define C warning options here -CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes -Werror - -# Define C++ warning options here -CPPWARN = -Wall -Wextra -Wundef - -# -# Compiler settings -############################################################################## - -############################################################################## -# Start of user section -# - -# List all user C define here, like -D_DEBUG=1 -UDEFS = -DSTM #-DDEBUG - -# Define ASM defines here -UADEFS = - -# List all user directories here -UINCDIR = - -# List the user directory to look for the libraries here -ULIBDIR = - -# List all user libraries here -ULIBS = - -# End of user defines -############################################################################## - -RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC -include $(RULESPATH)/rules.mk - -flash: build/$(PROJECT).bin - sudo `which openocd` \ - -f interface/stlink-v2-1.cfg\ - -c "transport select hla_swd"\ - -f target/stm32f7x.cfg \ - -c init\ - -c "reset halt"\ - -c "flash write_image erase "$<" 0x08000000"\ - -c "reset run"\ - -c shutdown +all: + make -C nodemcu + make -C stm32 + make -C linux diff --git a/client/Makefile.NodeMCU b/client/Makefile.NodeMCU deleted file mode 100644 index 09c18bf..0000000 --- a/client/Makefile.NodeMCU +++ /dev/null @@ -1,21 +0,0 @@ -CC = xtensa-lx106-elf-gcc -CFLAGS = -DNODEMCU -I. -mlongcalls -Wall -Wextra -Werror -DDEBUG -LDLIBS = -nostdlib -Wl,--start-group -lmain -lnet80211 -lwpa -llwip -lpp -lphy -lc -Wl,--end-group -lgcc -I/home/mrl/projects/esp-open-sdk/sdk/include -L/home/mrl/projects/esp-open-sdk/sdk/lib -LDFLAGS = -Teagle.app.v6.ld - -OBJS:=interpret.o sds.o task.o main.o interface.o spec.o - -main-0x00000.bin: main - esptool.py elf2image $^ - -main: $(OBJS) - $(CC) $(LDFLAGS) $(OBJS) $(LDLIBS) $(OUTPUT_OPTION) - -interface.o: interface_nodemcu.c - $(CC) $(CFLAGS) -c $< -o $@ - -#FLASh: %-0x00000.bin -# esptool.py write_flash 0 blinky-0x00000.bin 0x40000 blinky-0x40000.bin - -clean: - $(RM) main $(OBJS) diff --git a/client/Makefile.linux b/client/Makefile.linux deleted file mode 100644 index 8e1bfed..0000000 --- a/client/Makefile.linux +++ /dev/null @@ -1,14 +0,0 @@ -CFLAGS:=-DLINUX -g -Wall -Wextra -DDEBUG -PROG:=main -OBJS:=interpret.o sds.o task.o main.o interface.o spec.o - -all: $(PROG) - -interface.o: interface_linux.c - $(CC) $(CFLAGS) -c $< -o $@ - -$(PROG): $(OBJS) - $(CC) $(LDFLAGS) -o $@ $(OBJS) - -clean: - $(RM) $(OBJS) $(PROG) diff --git a/client/main.c b/client/client.c similarity index 91% rename from client/main.c rename to client/client.c index 4919d9d..8fa596f 100644 --- a/client/main.c +++ b/client/client.c @@ -5,11 +5,6 @@ #ifdef LINUX #include -#elif defined NODEMCU -#include "ets_sys.h" -#include "osapi.h" -#include "gpio.h" -#include "os_type.h" #endif #include "interpret.h" @@ -78,7 +73,7 @@ void loop(void) read_message(); //Run tasks - cyclestart = millis(); + cyclestart = getmillis(); for(ct = 0; ct -#include - -bool input_available(void) -{ - return false; -} - -uint8_t read_byte(void) -{ - return 0; -} - -void write_byte(uint8_t b) -{ - (void)b; -} - -long millis(void) -{ - return 0; -} - -void delay(long ms) -{ - (void) ms; -} - -void setup(void) -{ - -} - -void debug(char *fmt, ...) -{ - (void)fmt; -} - -void pdie(char *s) -{ - (void)s; -} - -void die(char *fmt, ...) -{ - (void)fmt; -} diff --git a/client/linux/Makefile b/client/linux/Makefile new file mode 100644 index 0000000..ad6deff --- /dev/null +++ b/client/linux/Makefile @@ -0,0 +1,11 @@ +CFLAGS:=-DLINUX -g -Wall -Wextra -DDEBUG +PROG:=client +OBJS:=interpret.o sds.o task.o client.o interface.o spec.o + +all: $(PROG) + +$(PROG): $(OBJS) + $(CC) $(LDFLAGS) -o $@ $(OBJS) + +clean: + $(RM) $(OBJS) $(PROG) diff --git a/client/linux/client b/client/linux/client new file mode 100755 index 0000000000000000000000000000000000000000..4b9b9842554078ae1dbfd09c7c55b74c6d6586fe GIT binary patch literal 37704 zcmeHw3w%`7wf8>r%E@y=5+H!p;Y|<%;U%aD0iy$gPz4Jrjv<*mG_Pi65Ug5kz%q?# zp|zH_sMK1oZ@qm`--1|Bd#{&1Z0W7-rM7w}f`w{ZqoVo#|NWRbGh|Tjy}$c?zwg%r zbN1S6ueJ8tYp=cbBj?O~zGlgJF3S?;a*J~WbBFR3X1*@4zoY>q^TlkDi~CqHM);8T zN}MX6uM(81t51tIsjcyDq#k@`yA&cbJw?-*)M&_*^<}%BoUKYsDnvjc$VXid&XrlD z0STDYrb4(5nhG@^)g#|A&38=mne-3^<1(pfAKS*y3f;cU^jtFGGAU_!Eq^UqFX3q_ zFEY|4x;~Q{zE6XXdVbuiSQB2P>&s@B30i-X>gvUmmgcpyW=v_RpWM>i7F$1g{p?wj zXU(XLv{z1(?WTOvo`2y=S(CA206FShh7V27^2&Se8s6Hld*+6fpZ@!_)^F`CxaYRd zkp5HnP=;(50jt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{s*@xexCn3uZ*ntKj|; #include "interface.h" + struct timeval tv1; int sock_fd = -1; int fd = -1; @@ -32,7 +33,7 @@ void usage(FILE *o, char *arg0){ "-p PORT Custom port number, default: 8123\n" , arg0); } -long millis(void) { +long getmillis(void) { if (gettimeofday(&tv1, NULL) == -1) pdie("gettimeofday"); return tv1.tv_sec*1000 + tv1.tv_usec/1000; @@ -91,7 +92,7 @@ uint8_t read_apin(uint8_t i) (void) i; } -void delay(long ms) +void msdelay(long ms) { usleep(ms*1000); } diff --git a/client/linux/interface.h b/client/linux/interface.h new file mode 120000 index 0000000..b854400 --- /dev/null +++ b/client/linux/interface.h @@ -0,0 +1 @@ +../interface.h \ No newline at end of file diff --git a/client/linux/interpret.c b/client/linux/interpret.c new file mode 120000 index 0000000..213f9b8 --- /dev/null +++ b/client/linux/interpret.c @@ -0,0 +1 @@ +../interpret.c \ No newline at end of file diff --git a/client/linux/interpret.h b/client/linux/interpret.h new file mode 120000 index 0000000..a3858d4 --- /dev/null +++ b/client/linux/interpret.h @@ -0,0 +1 @@ +../interpret.h \ No newline at end of file diff --git a/client/linux/mTaskSymbols.h b/client/linux/mTaskSymbols.h new file mode 120000 index 0000000..482ac01 --- /dev/null +++ b/client/linux/mTaskSymbols.h @@ -0,0 +1 @@ +../mTaskSymbols.h \ No newline at end of file diff --git a/client/linux/sds.c b/client/linux/sds.c new file mode 120000 index 0000000..9d106bb --- /dev/null +++ b/client/linux/sds.c @@ -0,0 +1 @@ +../sds.c \ No newline at end of file diff --git a/client/linux/sds.h b/client/linux/sds.h new file mode 120000 index 0000000..f6b82b5 --- /dev/null +++ b/client/linux/sds.h @@ -0,0 +1 @@ +../sds.h \ No newline at end of file diff --git a/client/linux/spec.c b/client/linux/spec.c new file mode 120000 index 0000000..3a0ed1c --- /dev/null +++ b/client/linux/spec.c @@ -0,0 +1 @@ +../spec.c \ No newline at end of file diff --git a/client/linux/spec.h b/client/linux/spec.h new file mode 120000 index 0000000..bbf3789 --- /dev/null +++ b/client/linux/spec.h @@ -0,0 +1 @@ +../spec.h \ No newline at end of file diff --git a/client/linux/task.c b/client/linux/task.c new file mode 120000 index 0000000..e4f6627 --- /dev/null +++ b/client/linux/task.c @@ -0,0 +1 @@ +../task.c \ No newline at end of file diff --git a/client/linux/task.h b/client/linux/task.h new file mode 120000 index 0000000..d8ffa8e --- /dev/null +++ b/client/linux/task.h @@ -0,0 +1 @@ +../task.h \ No newline at end of file diff --git a/client/nodemcu/Makefile b/client/nodemcu/Makefile new file mode 100644 index 0000000..ffd72dd --- /dev/null +++ b/client/nodemcu/Makefile @@ -0,0 +1,2 @@ +all: + diff --git a/client/nodemcu/interface.c b/client/nodemcu/interface.c new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/client/nodemcu/interface.c @@ -0,0 +1 @@ + diff --git a/client/nodemcu/interface.h b/client/nodemcu/interface.h new file mode 120000 index 0000000..b854400 --- /dev/null +++ b/client/nodemcu/interface.h @@ -0,0 +1 @@ +../interface.h \ No newline at end of file diff --git a/client/nodemcu/interpret.c b/client/nodemcu/interpret.c new file mode 120000 index 0000000..213f9b8 --- /dev/null +++ b/client/nodemcu/interpret.c @@ -0,0 +1 @@ +../interpret.c \ No newline at end of file diff --git a/client/nodemcu/interpret.h b/client/nodemcu/interpret.h new file mode 120000 index 0000000..a3858d4 --- /dev/null +++ b/client/nodemcu/interpret.h @@ -0,0 +1 @@ +../interpret.h \ No newline at end of file diff --git a/client/nodemcu/mTaskSymbols.h b/client/nodemcu/mTaskSymbols.h new file mode 120000 index 0000000..482ac01 --- /dev/null +++ b/client/nodemcu/mTaskSymbols.h @@ -0,0 +1 @@ +../mTaskSymbols.h \ No newline at end of file diff --git a/client/nodemcu/nodemcu.ino b/client/nodemcu/nodemcu.ino new file mode 120000 index 0000000..e47e797 --- /dev/null +++ b/client/nodemcu/nodemcu.ino @@ -0,0 +1 @@ +../client.c \ No newline at end of file diff --git a/client/nodemcu/sds.c b/client/nodemcu/sds.c new file mode 120000 index 0000000..9d106bb --- /dev/null +++ b/client/nodemcu/sds.c @@ -0,0 +1 @@ +../sds.c \ No newline at end of file diff --git a/client/nodemcu/sds.h b/client/nodemcu/sds.h new file mode 120000 index 0000000..f6b82b5 --- /dev/null +++ b/client/nodemcu/sds.h @@ -0,0 +1 @@ +../sds.h \ No newline at end of file diff --git a/client/nodemcu/spec.c b/client/nodemcu/spec.c new file mode 120000 index 0000000..3a0ed1c --- /dev/null +++ b/client/nodemcu/spec.c @@ -0,0 +1 @@ +../spec.c \ No newline at end of file diff --git a/client/nodemcu/spec.h b/client/nodemcu/spec.h new file mode 120000 index 0000000..bbf3789 --- /dev/null +++ b/client/nodemcu/spec.h @@ -0,0 +1 @@ +../spec.h \ No newline at end of file diff --git a/client/nodemcu/task.c b/client/nodemcu/task.c new file mode 120000 index 0000000..e4f6627 --- /dev/null +++ b/client/nodemcu/task.c @@ -0,0 +1 @@ +../task.c \ No newline at end of file diff --git a/client/nodemcu/task.h b/client/nodemcu/task.h new file mode 120000 index 0000000..d8ffa8e --- /dev/null +++ b/client/nodemcu/task.h @@ -0,0 +1 @@ +../task.h \ No newline at end of file diff --git a/client/spec.c b/client/spec.c index 75def00..fdc626b 100644 --- a/client/spec.c +++ b/client/spec.c @@ -1,4 +1,3 @@ -//TODO #include "spec.h" #include "interface.h" diff --git a/client/spec.h b/client/spec.h index a8e0d7d..a7adebc 100644 --- a/client/spec.h +++ b/client/spec.h @@ -1,9 +1,6 @@ #ifndef SPEC_H #define SPEC_H -#include -#include - void spec_send(void); #endif diff --git a/client/ChibiOS b/client/stm32/ChibiOS similarity index 100% rename from client/ChibiOS rename to client/stm32/ChibiOS diff --git a/client/stm32/Makefile b/client/stm32/Makefile new file mode 100644 index 0000000..99a26a5 --- /dev/null +++ b/client/stm32/Makefile @@ -0,0 +1,235 @@ +############################################################################## +# Build global options +# NOTE: Can be overridden externally. +# + +# Compiler options here. +ifeq ($(USE_OPT),) + USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16 +endif + +# C specific options here (added to USE_OPT). +ifeq ($(USE_COPT),) + USE_COPT = +endif + +# C++ specific options here (added to USE_OPT). +ifeq ($(USE_CPPOPT),) + USE_CPPOPT = -fno-rtti +endif + +# Enable this if you want the linker to remove unused code and data +ifeq ($(USE_LINK_GC),) + USE_LINK_GC = yes +endif + +# Linker extra options here. +ifeq ($(USE_LDOPT),) + USE_LDOPT = +endif + +# Enable this if you want link time optimizations (LTO) +ifeq ($(USE_LTO),) + USE_LTO = yes +endif + +# If enabled, this option allows to compile the application in THUMB mode. +ifeq ($(USE_THUMB),) + USE_THUMB = yes +endif + +# Enable this if you want to see the full log while compiling. +ifeq ($(USE_VERBOSE_COMPILE),) + USE_VERBOSE_COMPILE = no +endif + +# If enabled, this option makes the build process faster by not compiling +# modules not used in the current configuration. +ifeq ($(USE_SMART_BUILD),) + USE_SMART_BUILD = yes +endif + +# +# Build global options +############################################################################## + +############################################################################## +# Architecture or project specific options +# + +# Stack size to be allocated to the Cortex-M process stack. This stack is +# the stack used by the main() thread. +ifeq ($(USE_PROCESS_STACKSIZE),) + USE_PROCESS_STACKSIZE = 0x400 +endif + +# Stack size to the allocated to the Cortex-M main/exceptions stack. This +# stack is used for processing interrupts and exceptions. +ifeq ($(USE_EXCEPTIONS_STACKSIZE),) + USE_EXCEPTIONS_STACKSIZE = 0x400 +endif + +# Enables the use of FPU (no, softfp, hard). +ifeq ($(USE_FPU),) + USE_FPU = no +endif + +# FPU-related options. +ifeq ($(USE_FPU_OPT),) + USE_FPU_OPT = -mfloat-abi=$(USE_FPU) -mfpu=fpv5-d16 +endif + +# +# Architecture or project specific options +############################################################################## + +############################################################################## +# Project, sources and paths +# + +# Define project name here +PROJECT = mTask + +# Imported source files and paths +CHIBIOS = ./ChibiOS +# Startup files. +include $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f7xx.mk +# HAL-OSAL files (optional). +include $(CHIBIOS)/os/hal/hal.mk +include $(CHIBIOS)/os/hal/ports/STM32/STM32F7xx/platform.mk +include $(CHIBIOS)/os/hal/boards/ST_NUCLEO144_F767ZI/board.mk +include $(CHIBIOS)/os/hal/osal/rt/osal.mk +# RTOS files (optional). +include $(CHIBIOS)/os/rt/rt.mk +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk +# Other files (optional). +include $(CHIBIOS)/test/rt/test.mk + +# Define linker script file here +LDSCRIPT= $(STARTUPLD)/STM32F76xxI.ld + +# C sources that can be compiled in ARM or THUMB mode depending on the global +# setting. +CSRC = $(STARTUPSRC) \ + $(KERNSRC) \ + $(PORTSRC) \ + $(OSALSRC) \ + $(HALSRC) \ + $(PLATFORMSRC) \ + $(BOARDSRC) \ + $(TESTSRC) \ + $(CHIBIOS)/os/hal/lib/streams/memstreams.c \ + $(CHIBIOS)/os/hal/lib/streams/chprintf.c \ + $(filter-out interface_nodemcu.c,$(filter-out interface_linux.c,$(wildcard *.c))) + +# C++ sources that can be compiled in ARM or THUMB mode depending on the global +# setting. +CPPSRC = + +# C sources to be compiled in ARM mode regardless of the global setting. +# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler +# option that results in lower performance and larger code size. +ACSRC = + +# C++ sources to be compiled in ARM mode regardless of the global setting. +# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler +# option that results in lower performance and larger code size. +ACPPSRC = + +# C sources to be compiled in THUMB mode regardless of the global setting. +# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler +# option that results in lower performance and larger code size. +TCSRC = + +# C sources to be compiled in THUMB mode regardless of the global setting. +# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler +# option that results in lower performance and larger code size. +TCPPSRC = + +# List ASM source files here +ASMSRC = +ASMXSRC = $(STARTUPASM) $(PORTASM) $(OSALASM) + +INCDIR = $(CHIBIOS)/os/license \ + $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \ + $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \ + $(CHIBIOS)/os/various + +# +# Project, sources and paths +############################################################################## + +############################################################################## +# Compiler settings +# + +MCU = cortex-m7 + +#TRGT = arm-elf- +TRGT = arm-none-eabi- +CC = $(TRGT)gcc +CPPC = $(TRGT)g++ +# Enable loading with g++ only if you need C++ runtime support. +# NOTE: You can use C++ even without C++ support if you are careful. C++ +# runtime support makes code size explode. +LD = $(TRGT)gcc +#LD = $(TRGT)g++ +CP = $(TRGT)objcopy +AS = $(TRGT)gcc -x assembler-with-cpp +AR = $(TRGT)ar +OD = $(TRGT)objdump +SZ = $(TRGT)size +HEX = $(CP) -O ihex +BIN = $(CP) -O binary + +# ARM-specific options here +AOPT = + +# THUMB-specific options here +TOPT = -mthumb -DTHUMB + +# Define C warning options here +CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes -Werror + +# Define C++ warning options here +CPPWARN = -Wall -Wextra -Wundef + +# +# Compiler settings +############################################################################## + +############################################################################## +# Start of user section +# + +# List all user C define here, like -D_DEBUG=1 +UDEFS = -DSTM #-DDEBUG + +# Define ASM defines here +UADEFS = + +# List all user directories here +UINCDIR = + +# List the user directory to look for the libraries here +ULIBDIR = + +# List all user libraries here +ULIBS = + +# End of user defines +############################################################################## + +RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC +include $(RULESPATH)/rules.mk + +flash: build/$(PROJECT).bin + sudo `which openocd` \ + -f interface/stlink-v2-1.cfg\ + -c "transport select hla_swd"\ + -f target/stm32f7x.cfg \ + -c init\ + -c "reset halt"\ + -c "flash write_image erase "$<" 0x08000000"\ + -c "reset run"\ + -c shutdown diff --git a/client/chconf.h b/client/stm32/chconf.h similarity index 100% rename from client/chconf.h rename to client/stm32/chconf.h diff --git a/client/stm32/client.c b/client/stm32/client.c new file mode 120000 index 0000000..e47e797 --- /dev/null +++ b/client/stm32/client.c @@ -0,0 +1 @@ +../client.c \ No newline at end of file diff --git a/client/halconf.h b/client/stm32/halconf.h similarity index 100% rename from client/halconf.h rename to client/stm32/halconf.h diff --git a/client/interface.c b/client/stm32/interface.c similarity index 97% rename from client/interface.c rename to client/stm32/interface.c index 432671c..4caf47e 100644 --- a/client/interface.c +++ b/client/stm32/interface.c @@ -77,11 +77,11 @@ void led_off(uint8_t i) } } -long millis(void){ +long getmillis(void){ return ST2MS(chVTGetSystemTime()); } -void delay(long ms) +void msdelay(long ms) { chThdSleepMilliseconds(ms); } @@ -117,7 +117,7 @@ void die(char *fmt, ...) palWriteLine(LINE_LED2, PAL_HIGH); palWriteLine(LINE_LED3, PAL_HIGH); while(1){ - delay(100); + msdelay(100); } (void)fmt; } diff --git a/client/stm32/interface.h b/client/stm32/interface.h new file mode 120000 index 0000000..b854400 --- /dev/null +++ b/client/stm32/interface.h @@ -0,0 +1 @@ +../interface.h \ No newline at end of file diff --git a/client/stm32/interpret.c b/client/stm32/interpret.c new file mode 120000 index 0000000..213f9b8 --- /dev/null +++ b/client/stm32/interpret.c @@ -0,0 +1 @@ +../interpret.c \ No newline at end of file diff --git a/client/stm32/interpret.h b/client/stm32/interpret.h new file mode 120000 index 0000000..a3858d4 --- /dev/null +++ b/client/stm32/interpret.h @@ -0,0 +1 @@ +../interpret.h \ No newline at end of file diff --git a/client/stm32/mTaskSymbols.h b/client/stm32/mTaskSymbols.h new file mode 120000 index 0000000..482ac01 --- /dev/null +++ b/client/stm32/mTaskSymbols.h @@ -0,0 +1 @@ +../mTaskSymbols.h \ No newline at end of file diff --git a/client/mcuconf.h b/client/stm32/mcuconf.h similarity index 100% rename from client/mcuconf.h rename to client/stm32/mcuconf.h diff --git a/client/stm32/sds.c b/client/stm32/sds.c new file mode 120000 index 0000000..9d106bb --- /dev/null +++ b/client/stm32/sds.c @@ -0,0 +1 @@ +../sds.c \ No newline at end of file diff --git a/client/stm32/sds.h b/client/stm32/sds.h new file mode 120000 index 0000000..f6b82b5 --- /dev/null +++ b/client/stm32/sds.h @@ -0,0 +1 @@ +../sds.h \ No newline at end of file diff --git a/client/stm32/spec.c b/client/stm32/spec.c new file mode 120000 index 0000000..3a0ed1c --- /dev/null +++ b/client/stm32/spec.c @@ -0,0 +1 @@ +../spec.c \ No newline at end of file diff --git a/client/stm32/spec.h b/client/stm32/spec.h new file mode 120000 index 0000000..bbf3789 --- /dev/null +++ b/client/stm32/spec.h @@ -0,0 +1 @@ +../spec.h \ No newline at end of file diff --git a/client/stm32/task.c b/client/stm32/task.c new file mode 120000 index 0000000..e4f6627 --- /dev/null +++ b/client/stm32/task.c @@ -0,0 +1 @@ +../task.c \ No newline at end of file diff --git a/client/stm32/task.h b/client/stm32/task.h new file mode 120000 index 0000000..d8ffa8e --- /dev/null +++ b/client/stm32/task.h @@ -0,0 +1 @@ +../task.h \ No newline at end of file diff --git a/client/user_config.h b/client/user_config.h deleted file mode 100644 index e69de29..0000000 -- 2.20.1