diff --git a/ch32v003/clang.mk b/ch32v003/clang.mk index bd6ae78..abdd887 100644 --- a/ch32v003/clang.mk +++ b/ch32v003/clang.mk @@ -1,5 +1,8 @@ # Use clang / llvm toolchain -# zatim blbost +# Zatím není podporováno - problém : +# E: RV32I subset, only 16 general-purpose registers supported +# v clang není korektně implementováno. +# CC = clang CXX = clang++ LD = ld.lld diff --git a/pwm/oneway.h b/common/oneway.h similarity index 100% rename from pwm/oneway.h rename to common/oneway.h diff --git a/pwm/Makefile b/pwm/Makefile index 49f9dd8..823cc5e 100644 --- a/pwm/Makefile +++ b/pwm/Makefile @@ -1,8 +1,6 @@ # ch32v003 TARGET?= ch32v003 TOOL ?= gcc -#TOOL ?= clang - PRJ = example @@ -14,7 +12,7 @@ LDLIBS = BFLAGS = --strip-unneeded CFLAGS = -MMD -Wall -ggdb -fno-exceptions -ffunction-sections -fdata-sections -CFLAGS+= -I. -I./$(TARGET) -I/usr/include/newlib +CFLAGS+= -I. -I./common -I./$(TARGET) -I/usr/include/newlib DEL = rm -f # zdrojaky diff --git a/pwm/common b/pwm/common new file mode 120000 index 0000000..8332399 --- /dev/null +++ b/pwm/common @@ -0,0 +1 @@ +../common/ \ No newline at end of file diff --git a/pwm/main.cpp b/pwm/main.cpp index 759463e..66025da 100644 --- a/pwm/main.cpp +++ b/pwm/main.cpp @@ -1,3 +1,4 @@ +#include "gpio.h" #include "pwmclass.h" #include "generator.h" //////////////////////////////////////