diff options
-rw-r--r-- | my-common-code/api-asm.S | 19 | ||||
-rw-r--r-- | my-common-code/api-asm.h | 7 | ||||
-rw-r--r-- | my-common-code/api.c | 7 | ||||
-rw-r--r-- | my-common-code/api.h | 1 | ||||
-rw-r--r-- | my-project/Makefile | 20 | ||||
-rw-r--r-- | my-project/my-project.c | 9 |
6 files changed, 0 insertions, 63 deletions
diff --git a/my-common-code/api-asm.S b/my-common-code/api-asm.S deleted file mode 100644 index 93419fd..0000000 --- a/my-common-code/api-asm.S +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Example of a pure assembly file - * For most people, this is normally unnecessary, you can use inline - * ASM in a C file, if you even need to use ASM at all. - * However, if you reallllly like doing this sort of thing, here's how :) - */ - -.syntax unified -.thumb -.section .text - -#include <libopencm3/stm32/gpio.h> - -.global rev_bytes -.func rev_bytes /* only used for debugger */ -.type rev_bytes, STT_FUNC -rev_bytes: - rev r0, r0 - bx lr diff --git a/my-common-code/api-asm.h b/my-common-code/api-asm.h deleted file mode 100644 index b153620..0000000 --- a/my-common-code/api-asm.h +++ /dev/null @@ -1,7 +0,0 @@ -#include <stdint.h> -/** - * Reverse bytes in words - * @param in word in form abcd - * @returns word in form dcba - */ -uint32_t rev_bytes(uint32_t in); diff --git a/my-common-code/api.c b/my-common-code/api.c deleted file mode 100644 index ec24e0c..0000000 --- a/my-common-code/api.c +++ /dev/null @@ -1,7 +0,0 @@ - -#include "api.h" - -int my_func(int a) -{ - return a * 3; -} diff --git a/my-common-code/api.h b/my-common-code/api.h deleted file mode 100644 index b5a9c98..0000000 --- a/my-common-code/api.h +++ /dev/null @@ -1 +0,0 @@ -int my_func(int a); diff --git a/my-project/Makefile b/my-project/Makefile deleted file mode 100644 index 5b6afde..0000000 --- a/my-project/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -PROJECT = awesomesauce -BUILD_DIR = bin - -SHARED_DIR = ../my-common-code -CFILES = my-project.c -CFILES += api.c -AFILES += api-asm.S - -# TODO - you will need to edit these two lines! -DEVICE=stm32f407vgt6 -OOCD_FILE = board/stm32f4discovery.cfg - -# You shouldn't have to edit anything below here. -VPATH += $(SHARED_DIR) -INCLUDES += $(patsubst %,-I%, . $(SHARED_DIR)) -OPENCM3_DIR=../libopencm3 - -include $(OPENCM3_DIR)/mk/genlink-config.mk -include ../rules.mk -include $(OPENCM3_DIR)/mk/genlink-rules.mk diff --git a/my-project/my-project.c b/my-project/my-project.c deleted file mode 100644 index 7f5bc79..0000000 --- a/my-project/my-project.c +++ /dev/null @@ -1,9 +0,0 @@ -#include "api.h" -#include "api-asm.h" - -int main(void) { - /* add your own code */ - uint32_t rev = 0xaabbccdd; - rev = rev_bytes(rev); - return my_func(rev); -} |