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
3bfe4b69
Commit
3bfe4b69
authored
7 years ago
by
Kaspar Schleiser
Browse files
Options
Downloads
Patches
Plain Diff
make: mcuboot: add MCUBOOT_ namespacing
parent
c61c44a1
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cpu/nrf52/Makefile.include
+4
-4
4 additions, 4 deletions
cpu/nrf52/Makefile.include
makefiles/mcuboot.mk
+7
-7
7 additions, 7 deletions
makefiles/mcuboot.mk
with
11 additions
and
11 deletions
cpu/nrf52/Makefile.include
+
4
−
4
View file @
3bfe4b69
...
@@ -2,10 +2,10 @@ export CPU_ARCH = cortex-m4f
...
@@ -2,10 +2,10 @@ export CPU_ARCH = cortex-m4f
export
CPU_FAM
=
nrf52
export
CPU_FAM
=
nrf52
# Export internal ROM alignment and slot sizes for bootloader support
# Export internal ROM alignment and slot sizes for bootloader support
export
IMAGE_ALIGN
=
8
export
MCUBOOT_
IMAGE_ALIGN
=
8
export
SLOT0_SIZE
=
0x8000
export
MCUBOOT_
SLOT0_SIZE
=
0x8000
export
SLOT1_SIZE
=
0x3C000
export
MCUBOOT_
SLOT1_SIZE
=
0x3C000
export
SLOT2_SIZE
=
0x3C000
export
MCUBOOT_
SLOT2_SIZE
=
0x3C000
include
$(RIOTCPU)/nrf5x_common/Makefile.include
include
$(RIOTCPU)/nrf5x_common/Makefile.include
include
$(RIOTMAKE)/arch/cortexm.inc.mk
include
$(RIOTMAKE)/arch/cortexm.inc.mk
This diff is collapsed.
Click to expand it.
makefiles/mcuboot.mk
+
7
−
7
View file @
3bfe4b69
ifdef
SLOT0_SIZE
ifdef
MCUBOOT_
SLOT0_SIZE
IMGTOOL
?=
$(
RIOTBASE
)
/dist/tools/mcuboot/imgtool.py
IMGTOOL
?=
$(
RIOTBASE
)
/dist/tools/mcuboot/imgtool.py
override
IMGTOOL
:=
$(
abspath
$(
IMGTOOL
))
override
IMGTOOL
:=
$(
abspath
$(
IMGTOOL
))
...
@@ -23,14 +23,14 @@ endif
...
@@ -23,14 +23,14 @@ endif
mcuboot
:
mcuboot-create-key link
mcuboot
:
mcuboot-create-key link
@$(
COLOR_ECHO
)
@$(
COLOR_ECHO
)
@$(
COLOR_ECHO
)
'
${
COLOR_PURPLE
}
Re-linking for MCUBoot at
$(
SLOT0_SIZE
)
...
${
COLOR_RESET
}
'
@$(
COLOR_ECHO
)
'
${
COLOR_PURPLE
}
Re-linking for MCUBoot at
$(
MCUBOOT_
SLOT0_SIZE
)
...
${
COLOR_RESET
}
'
@$(
COLOR_ECHO
)
@$(
COLOR_ECHO
)
$(
Q
)$(
_LINK
)
$(
LINKFLAGPREFIX
)
--defsym
=
offset
=
"
$$(
(
$(
SLOT0_SIZE
)
+
$(
IMAGE_HDR_SIZE
))
)"
\
$(
Q
)$(
_LINK
)
$(
LINKFLAGPREFIX
)
--defsym
=
offset
=
"
$$(
(
$(
MCUBOOT_
SLOT0_SIZE
)
+
$(
IMAGE_HDR_SIZE
))
)"
\
$(
LINKFLAGPREFIX
)
--defsym
=
length
=
"
$$(
(
$(
SLOT1_SIZE
)
-
$(
IMAGE_HDR_SIZE
))
)"
\
$(
LINKFLAGPREFIX
)
--defsym
=
length
=
"
$$(
(
$(
MCUBOOT_
SLOT1_SIZE
)
-
$(
IMAGE_HDR_SIZE
))
)"
\
$(
LINKFLAGPREFIX
)
--defsym
=
image_header
=
"
$(
IMAGE_HDR_SIZE
)
"
-o
$(
ELFFILE
)
&&
\
$(
LINKFLAGPREFIX
)
--defsym
=
image_header
=
"
$(
IMAGE_HDR_SIZE
)
"
-o
$(
ELFFILE
)
&&
\
$(
OBJCOPY
)
$(
OFLAGS
)
$(
ELFFILE
)
$(
BINFILE
)
&&
\
$(
OBJCOPY
)
$(
OFLAGS
)
$(
ELFFILE
)
$(
BINFILE
)
&&
\
$(
IMGTOOL
)
sign
--key
$(
MCUBOOT_KEYFILE
)
--version
$(
IMAGE_VERSION
)
--align
\
$(
IMGTOOL
)
sign
--key
$(
MCUBOOT_KEYFILE
)
--version
$(
IMAGE_VERSION
)
--align
\
$(
IMAGE_ALIGN
)
-H
$(
IMAGE_HDR_SIZE
)
$(
BINFILE
)
$(
SIGN_BINFILE
)
$(
MCUBOOT_
IMAGE_ALIGN
)
-H
$(
IMAGE_HDR_SIZE
)
$(
BINFILE
)
$(
SIGN_BINFILE
)
@$(
COLOR_ECHO
)
@$(
COLOR_ECHO
)
@$(
COLOR_ECHO
)
'
${
COLOR_PURPLE
}
Signed with
$(
MCUBOOT_KEYFILE
)
for version
$(
IMAGE_VERSION
)
\
@$(
COLOR_ECHO
)
'
${
COLOR_PURPLE
}
Signed with
$(
MCUBOOT_KEYFILE
)
for version
$(
IMAGE_VERSION
)
\
${
COLOR_RESET
}
'
${
COLOR_RESET
}
'
...
@@ -47,10 +47,10 @@ mcuboot-flash-bootloader: $(MCUBOOT_BIN) $(FLASHDEPS)
...
@@ -47,10 +47,10 @@ mcuboot-flash-bootloader: $(MCUBOOT_BIN) $(FLASHDEPS)
mcuboot-flash
:
HEXFILE = $(SIGN_BINFILE)
mcuboot-flash
:
HEXFILE = $(SIGN_BINFILE)
mcuboot-flash
:
mcuboot $(FLASHDEPS) mcuboot-flash-bootloader
mcuboot-flash
:
mcuboot $(FLASHDEPS) mcuboot-flash-bootloader
FLASH_ADDR
=
$(
SLOT0_SIZE
)
$(
FLASHER
)
$(
FFLAGS
)
FLASH_ADDR
=
$(
MCUBOOT_
SLOT0_SIZE
)
$(
FLASHER
)
$(
FFLAGS
)
else
else
mcuboot
:
mcuboot
:
$(
Q
)
echo
"error: mcuboot not supported on board
$(
BOARD
)
!"
$(
Q
)
echo
"error: mcuboot not supported on board
$(
BOARD
)
!"
$(
Q
)
false
$(
Q
)
false
endif
# SLOT0_SIZE
endif
#
MCUBOOT_
SLOT0_SIZE
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