Skip to content

Commit 1219f41

Browse files
committed
AVR UART driver GIT submodule inside example
1 parent f82c0b3 commit 1219f41

File tree

8 files changed

+21
-8
lines changed

8 files changed

+21
-8
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "examples/avr/basic_usage/lib/avr-uart-driver"]
2+
path = examples/avr/basic_usage/lib/avr-uart-driver
3+
url = https://github.com/J-Rios/avr-uart-driver

examples/avr/basic_usage/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ Basic usage example of MinBaseCLI library for AVR devices.
44

55
## Requirements
66

7+
- Get external UART driver GIT submodule:
8+
9+
```bash
10+
git submodule update --init --recursive
11+
```
12+
713
- Install required toolchain components:
814

915
```bash

examples/avr/basic_usage/build/Makefile

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Specify project name and default compilers
33
PROJECTNAME = minbasecli_basicusage
44

5-
# UART Driver path
5+
# CLI library path
66
MINBASECLIPATH = $(WORKSPACE)/../../../src
77

88
# Project root WorkSpace
@@ -48,26 +48,28 @@ RELEASEDIR = $(WORKSPACE)/bin/$(DATE)
4848
# Specify Sources files (Automatic search in specific directories)
4949
SRCS = $(shell find $(WORKSPACE)/src -type f -name *.c)
5050
SRCS += $(shell find $(WORKSPACE)/src -type f -name *.cpp)
51-
SRCS += $(shell find $(WORKSPACE)/lib -type f -name *.c)
52-
SRCS += $(shell find $(WORKSPACE)/lib -type f -name *.cpp)
51+
52+
# Libraries Sources
53+
SRCS += $(shell find $(WORKSPACE)/lib/avr-uart-driver/src -type f -name *.c)
54+
SRCS += $(shell find $(WORKSPACE)/lib/avr-uart-driver/src -type f -name *.cpp)
5355

5456
# MinBaseCLI Sources
5557
SRCS += $(MINBASECLIPATH)/minbasecli.cpp
5658
SRCS += $(MINBASECLIPATH)/hal/avr/minbasecli_avr.cpp
57-
SRCS += $(shell find $(MINBASECLIPATH)/hal/avr/avr-uart-driver/src -type f -name *.cpp)
5859

5960
# Specify Headers files (Automatic search in specific directories)
6061
HEADS = $(shell find $(WORKSPACE)/inc -type f -name *.h)
6162
HEADS += $(shell find $(WORKSPACE)/inc -type f -name *.hpp)
6263
HEADS += $(shell find $(WORKSPACE)/src -type f -name *.h)
6364
HEADS += $(shell find $(WORKSPACE)/src -type f -name *.hpp)
64-
HEADS += $(shell find $(WORKSPACE)/lib -type f -name *.h)
65-
HEADS += $(shell find $(WORKSPACE)/lib -type f -name *.hpp)
65+
66+
# Libraries Headers
67+
HEADS += $(shell find $(WORKSPACE)/lib/avr-uart-driver/src -type f -name *.h)
68+
HEADS += $(shell find $(WORKSPACE)/lib/avr-uart-driver/src -type f -name *.hpp)
6669

6770
# MinBaseCLI Headers
6871
HEADS += $(MINBASECLIPATH)/minbasecli.h
6972
HEADS += $(MINBASECLIPATH)/hal/avr/minbasecli_avr.h
70-
HEADS += $(shell find $(MINBASECLIPATH)/hal/avr/avr-uart-driver/src -type f -name *.h)
7173

7274
# Get Headers directories from headers paths
7375
HEADERSDIR = $(shell echo $(HEADS) | xargs -n1 dirname | sort -u | xargs -n1 -i echo "-I{}")
@@ -137,6 +139,7 @@ build: $(PRJ).bin
137139
cp -a $(PRJ).bin $(RELEASEDIR)
138140
@echo "ADDRESS SIZE FUNCTION FILE:LINE\n" > memory_program.txt
139141
@$(NM) $(PRJ).elf >> memory_program.txt
142+
@chmod +x ../tools/*
140143
@../tools/memusageram $(BUILDDIR)/memory_ram.txt >/dev/null 2>&1
141144
@rm -f $(BUILDDIR)/*.su
142145
@mkdir -p $(BUILDDIR)/obj
Submodule avr-uart-driver added at 72b64e8

examples/avr/basic_usage/tools/binary_size

100644100755
File mode changed.

examples/avr/basic_usage/tools/cflow_stack_memory

100644100755
File mode changed.

examples/avr/basic_usage/tools/memusageram

100644100755
File mode changed.

src/hal/avr/minbasecli_avr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
#endif
5050

5151
// (UART Driver)
52-
#include "avr-uart-driver/src/avr_uart.h"
52+
#include "avr_uart.h"
5353

5454
// Standard Libraries
5555
#include <string.h>

0 commit comments

Comments
 (0)