Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Fadecandy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
scanlime
Fadecandy
Commits
fbed88e6
Commit
fbed88e6
authored
11 years ago
by
Micah Elizabeth Scott
Browse files
Options
Downloads
Patches
Plain Diff
More notes on flash protection
parent
eb83964b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bootloader/mk20dx128.c
+15
-4
15 additions, 4 deletions
bootloader/mk20dx128.c
with
15 additions
and
4 deletions
bootloader/mk20dx128.c
+
15
−
4
View file @
fbed88e6
/* Teensyduino Core Library
/* Fadecandy Bootloader
* Copyright (c) 2013 Micah Elizabeth Scott
*
* Teensyduino Core Library
* http://www.pjrc.com/teensy/
* Copyright (c) 2013 PJRC.COM, LLC.
*
...
...
@@ -185,14 +188,22 @@ const uint8_t flashconfigbytes[16] =
// Backdoor comparison key (disabled)
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
// Program flash protection (FPROT)
// First 4K region is protected from erasure by any means other than mass-erase over JTAG.
/*
* Program flash protection (FPROT)
*
* First 4K region is protected from erasure by any means other than mass-erase over JTAG.
* This protects our bootloader from being modified except via hardware that could also replace it.
*
* OpenOCD doesn't give you an easy way to execute mass-erase currently. I'm lazy, I do this by patching
* dap_syssec_kinetis_mdmap() in arm_adi_v5.c to always mass-erase, and I run that version of openocd
* when necessary :(
*/
0xfe
,
0xff
,
0xff
,
0xff
,
0xfe
,
// Data flash protection (FDPROT)
0xff
,
// EEPROM protection (FEPROT)
0xff
,
// Flash nonvolatile option byte (FOPT)
0x
ff
// Flash security byte (FSEC)
0x
40
// Flash security byte (FSEC)
};
__attribute__
((
section
(
".startup"
)))
...
...
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