Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into standalone-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
edjubuh committed Jun 22, 2017
2 parents 76c1d49 + 1f46578 commit 966ec8e
Show file tree
Hide file tree
Showing 6 changed files with 136 additions and 18 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ include/*.h.gch
.gcc-flags.json
.project
.cproject
template/template.pros
template/src/*
!template/src/Makefile
template/include
template/firmware
46 changes: 46 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ library: clean $(BINDIR) $(SUBDIRS) $(ASMOBJ) $(COBJ) $(CPPOBJ)
TEMPLATEFILES:=src/auto.c src/init.c src/opcontrol.c include/API.h include/main.h firmware
template: library
-rm -rf $(addprefix $(ROOT)/template/,$(TEMPLATEFILES))
mkdir -p $(ROOT)/template/src $(ROOT)/template/inlcude $(ROOT)/template/firmware
mkdir -p $(ROOT)/template/src $(ROOT)/template/include $(ROOT)/template/firmware
$(foreach f,$(TEMPLATEFILES),cp -r $(ROOT)/$(f) $(ROOT)/template/$(f); )
cp $(BINDIR)/$(LIBNAME).a $(ROOT)/template/firmware/$(LIBNAME).a
pros conduct create-template kernel $(VERSION) pros-mainline --location $(ROOT)/template -u "firmware/$(LIBNAME).a" -u "include/API.h" -u "common.mk" -i "template.pros"
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ We have a number of resources available on our website, including
Drop us a line
- at [email protected]
- on the [VEX Forum](https://www.vexforum.com/index.php/)
- on VEX Teams of the World Discord

### I think I found a bug!
We maintain GitHub repositories for the three major components of the PROS ecosystem:
- The Command Line Interface (cli) at purduesigbots/pros-cli
- The Atom plugin at purduesigbots/pros-atom
- The kernel (purduesigbots/pros)
- The Command Line Interface (cli) at [purduesigbots/pros-cli](github.com/purduesigbots/pros-cli)
- The Atom plugin at [purduesigbots/pros-atom](github.com/purduesigbots/pros-atom)
- The kernel [here](github.com/purduesigbots/pros)

If you find a problem with our documentation or tutorials, we have a repository for that, too, at [purduesigbots/pros-docs](github.com/purduesigbots/pros-docs).
If you find a problem with our documentation or tutorials, we have a repository for that, too, at purduesigbots/pros-docs.
42 changes: 29 additions & 13 deletions template/Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Universal C Makefile for MCU targets

# Path to project root (NO trailing slash!)
ROOT=..
# Path to project root (for top-level, so the project is in ./; first-level, ../; etc.)
ROOT=.
# Binary output directory
BINDIR=$(ROOT)/bin
# Subdirectories to include in the build
SUBDIRS=
SUBDIRS=src

# Nothing below here needs to be modified by typical users

Expand All @@ -21,32 +21,48 @@ CPPSRC:=$(wildcard *.$(CPPEXT))
CPPOBJ:=$(patsubst %.o,$(BINDIR)/%.o,$(CPPSRC:.$(CPPEXT)=.o))
OUT:=$(BINDIR)/$(OUTNAME)

.PHONY: all do_subdirs _force_look
.PHONY: all clean upload _force_look

# By default, compile program
all: do_subdirs .
all: $(BINDIR) $(OUT)

# Remove all intermediate object files (remove the binary directory)
clean:
-rm -f $(OUT)
-rm -rf $(BINDIR)

# Uploads program to device
upload: all
$(UPLOAD)

# Phony force-look target
_force_look:
@true

# Compiles the program if anything is changed
.: $(SUBDIRS) $(ASMOBJ) $(COBJ) $(CPPOBJ)
@touch .
# Looks in subdirectories for things to make
$(SUBDIRS): %: _force_look
@$(MAKE) --no-print-directory -C $@

# Ensure binary directory exists
$(BINDIR):
-@mkdir -p $(BINDIR)

# Builds the subdirectories
do_subdirs: _force_look
@for dir in $(SUBDIRS); do $(MAKE) --no-print-directory -C $$dir || exit 1; done
# Compile program
$(OUT): $(SUBDIRS) $(ASMOBJ) $(COBJ) $(CPPOBJ)
@echo LN $(BINDIR)/*.o $(LIBRARIES) to $@
@$(CC) $(LDFLAGS) $(BINDIR)/*.o $(LIBRARIES) -o $@
@$(MCUPREFIX)size $(SIZEFLAGS) $(OUT)
$(MCUPREPARE)

# Assembly source file management
$(ASMOBJ): $(BINDIR)/%.o: %.$(ASMEXT)
$(ASMOBJ): $(BINDIR)/%.o: %.$(ASMEXT) $(HEADERS)
@echo AS $<
@$(AS) $(AFLAGS) -o $@ $<

# Object management
$(COBJ): $(BINDIR)/%.o: %.$(CEXT) $(HEADERS)
@echo CC $(INCLUDE) $<
@$(CC) $(INCLUDE) $(CFLAGS) -o $@ $<
$(CC) $(INCLUDE) $(CFLAGS) -o $@ $<

$(CPPOBJ): $(BINDIR)/%.o: %.$(CPPEXT) $(HEADERS)
@echo CPC $(INCLUDE) $<
Expand Down
50 changes: 50 additions & 0 deletions template/src/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Makefile for compiling PROS projects

# Path to project root (NO trailing slash!)
ROOT=..
# Binary output directory
BINDIR=$(ROOT)/bin

# Nothing below here needs to be modified by typical users

# Include common aspects of this project
-include $(ROOT)/common.mk

ASMSRC:=$(wildcard *.$(ASMEXT))
ASMOBJ:=$(patsubst %.o,$(BINDIR)/%.o,$(ASMSRC:.$(ASMEXT)=.o))
HEADERS:=$(wildcard *.$(HEXT))
### Special section for Cortex projects ###
HEADERS_2:=$(wildcard ../include/*.$(HEXT))
### End special section ###
CSRC=$(wildcard *.$(CEXT))
COBJ:=$(patsubst %.o,$(BINDIR)/%.o,$(CSRC:.$(CEXT)=.o))
CPPSRC:=$(wildcard *.$(CPPEXT))
CPPOBJ:=$(patsubst %.o,$(BINDIR)/%.o,$(CPPSRC:.$(CPPEXT)=.o))
OUT:=$(BINDIR)/$(OUTNAME)

.PHONY: all

# By default, compile program
all: .

# Compiles the program if anything is changed
.: $(ASMOBJ) $(COBJ) $(CPPOBJ)
@touch .

# Assembly source file management
$(ASMOBJ): $(BINDIR)/%.o: %.$(ASMEXT)
@echo AS $<
@$(AS) $(AFLAGS) -o $@ $<

### Special section for Cortex projects ###

# Object management
$(COBJ): $(BINDIR)/%.o: %.$(CEXT) $(HEADERS) $(HEADERS_2)
@echo CC $(INCLUDE) $<
@$(CC) $(INCLUDE) $(CFLAGS) -o $@ $<

$(CPPOBJ): $(BINDIR)/%.o: %.$(CPPEXT) $(HEADERS) $(HEADERS_2)
@echo CPC $(INCLUDE) $<
@$(CPPCC) $(INCLUDE) $(CPPFLAGS) -o $@ $<

### End special section ###

0 comments on commit 966ec8e

Please sign in to comment.