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
2ff280d5
Commit
2ff280d5
authored
7 years ago
by
kYc0o
Browse files
Options
Downloads
Patches
Plain Diff
tests: add mcuboot test application
parent
1a52c80b
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tests/mcuboot/Makefile
+14
-0
14 additions, 0 deletions
tests/mcuboot/Makefile
tests/mcuboot/README.md
+20
-0
20 additions, 0 deletions
tests/mcuboot/README.md
tests/mcuboot/main.c
+33
-0
33 additions, 0 deletions
tests/mcuboot/main.c
with
67 additions
and
0 deletions
tests/mcuboot/Makefile
0 → 100644
+
14
−
0
View file @
2ff280d5
APPLICATION
=
hello_mcuboot
BOARD
?=
nrf52dk
include
../Makefile.tests_common
BOARD_WHITELIST
:=
nrf52dk
export
IMAGE_VERSION
=
1.1.1+1
# this test is supposed to always build the mcuboot image
all
:
mcuboot
include
$(RIOTBASE)/Makefile.include
This diff is collapsed.
Click to expand it.
tests/mcuboot/README.md
0 → 100644
+
20
−
0
View file @
2ff280d5
# MCUBoot test application
This test is intended to compile a hello-world program taking into account
the existence of the MCUBoot bootloader at the first 32K in the ROM.
For this first support, a pre-compiled mynewt MCUBoot binary is downloaded at
compile time.
The goal is to produce an ELF file which is linked to be flashed at a
`BOOTLOADER_OFFSET`
offset rather than the beginning of ROM. MCUBoot also
expects an image padded with some specific headers containing the version
information, and TLVs with hash and signing information. This is done through
the imgtool.py application, which is executed automatically by the build
system.
This test can be called using
`make mcuboot`
to produce such ELF file,
which can also be flashed using
`make flash-mcuboot`
.This command also flashes
the pre-compiled bootloader.
It's also possible to build and flash MCUBoot by following the instructions on
the MCUBoot repository either using mynewt or zephyr operating systems.
This diff is collapsed.
Click to expand it.
tests/mcuboot/main.c
0 → 100644
+
33
−
0
View file @
2ff280d5
/*
* Copyright (C) 2017 Inria
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup tests
* @{
*
* @file
* @brief MCUBoot compile test application
*
* @author Francisco Acosta <francisco.acosta@inria.fr>
*
* @}
*/
#include
<stdio.h>
#include
"cpu.h"
int
main
(
void
)
{
puts
(
"Hello MCUBoot!"
);
printf
(
"You are running RIOT on a(n) %s board.
\n
"
,
RIOT_BOARD
);
printf
(
"This board features a(n) %s MCU.
\n
"
,
RIOT_MCU
);
printf
(
"The startup address is: %p
\n
"
,
(
void
*
)
SCB
->
VTOR
);
return
0
;
}
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