Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RIOT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cm-projects
RIOT
Commits
0d9ba806
Commit
0d9ba806
authored
7 years ago
by
Hauke Petersen
Browse files
Options
Downloads
Patches
Plain Diff
make/tools: added shared script+mk for using BOSSA
parent
fb82e246
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Makefile.include
+7
-0
7 additions, 0 deletions
Makefile.include
makefiles/tools/bossa.inc.mk
+26
-0
26 additions, 0 deletions
makefiles/tools/bossa.inc.mk
makefiles/tools/targets.inc.mk
+11
-0
11 additions, 0 deletions
makefiles/tools/targets.inc.mk
with
44 additions
and
0 deletions
Makefile.include
+
7
−
0
View file @
0d9ba806
...
...
@@ -367,6 +367,9 @@ flash: all $(FLASHDEPS)
exit
1
;
}
$(
FLASHER
)
$(
FFLAGS
)
preflash
:
all
$(
PREFLASHER
)
$(
PREFFLAGS
)
term
:
$(filter flash
,
$(MAKECMDGOALS))
@
command
-v
$(
TERMPROG
)
>
/dev/null 2>&1
||
\
{
$(
COLOR_ECHO
)
\
...
...
@@ -430,6 +433,10 @@ include $(RIOTMAKE)/features.inc.mk
# Export variables used throughout the whole make system:
include
$(RIOTMAKE)/vars.inc.mk
# Include build targets for selected tools after the default RIOT targets have
# been defined (-> so the `all` will be always the first target)
include
$(RIOTMAKE)/tools/targets.inc.mk
# Warn if the selected board and drivers don't provide all needed features:
ifneq
(, $(filter all, $(if $(MAKECMDGOALS), $(MAKECMDGOALS), all)))
EXPECT_ERRORS
:=
...
...
This diff is collapsed.
Click to expand it.
makefiles/tools/bossa.inc.mk
0 → 100644
+
26
−
0
View file @
0d9ba806
export
FLASHER
?=
$(
RIOTBASE
)
/dist/tools/bossa/bossac
export
FFLAGS
?=
-p
$(
PORT
)
-i
-i
-w
-v
-b
-R
$(
HEXFILE
)
export
OFLAGS
=
-O
binary
export
HEXFILE
=
$(
ELFFILE:.elf
=
.bin
)
# some arduino boards need to toggle the serial interface a little bit to get
# them ready for flashing...
ifneq
(,$(BOSSA_ARDUINO_PREFLASH))
OS
:=
$(
shell
uname
)
ifeq
($(OS),Linux)
STTY_FLAG
=
-F
else
ifeq
($(OS),Darwin)
STTY_FLAG
=
-f
endif
PREFLASHER
?=
stty
PREFFLAGS
?=
$(
STTY_FLAG
)
$(
PORT
)
raw ispeed 1200 ospeed 1200 cs8
-cstopb
ignpar eol 255 eof 255
FLASHDEPS
+=
preflash
endif
# if we go with the default (BOSSA shipped with RIOT), we download and build
# the tool if not already done
ifeq
($(RIOTBASE)/dist/tools/bossa/bossac,$(FLASHER))
FLASHDEPS
+=
$(
RIOTBASE
)
/dist/tools/bossa/bossac
endif
This diff is collapsed.
Click to expand it.
makefiles/tools/targets.inc.mk
0 → 100644
+
11
−
0
View file @
0d9ba806
# This file contains a collection of targets defined by tools shipped with RIOT.
# The reason for keeping those targets separated from their tool Makfiles is
# that these targets have to be defined after the default build targets
# (as `all`), so `all` will always be the first target defined and thereby the
# default target when `make` is called without any further argument.
# target for building the bossac binary
$(RIOTBASE)/dist/tools/bossa/bossac
:
@
echo
"[INFO] bossac binary not found - building it from source"
@
make
-C
$(
RIOTBASE
)
/dist/tools/bossa
@
echo
"[INFO] bossac binary successfully build!"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment