Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MicroCART
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Distributed Autonomous Networked Control Lab
MicroCART
Commits
79174f2d
Commit
79174f2d
authored
3 years ago
by
C-Glick
Browse files
Options
Downloads
Patches
Plain Diff
Changed bootloader state address, now works
parent
ab4b1da7
No related branches found
No related tags found
1 merge request
!69
Streamlined USB flashing
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
crazyflie_software/crazyflie-firmware-2021.06/src/modules/src/bootloader.c
+3
-5
3 additions, 5 deletions
...e/crazyflie-firmware-2021.06/src/modules/src/bootloader.c
with
3 additions
and
5 deletions
crazyflie_software/crazyflie-firmware-2021.06/src/modules/src/bootloader.c
+
3
−
5
View file @
79174f2d
...
...
@@ -2,11 +2,10 @@
//bootloader code used from micropython machine_bootloader
// Location in RAM of bootloader state (just after the top of the stack).
// STM32H7 has ECC and writes to RAM must be 64-bit so they are fully committed
// to actual SRAM before a system reset occurs.
#define BL_STATE_PTR ((uint64_t *)
&_estack)
#define BL_STATE_KEY (0x5a5) //arbitrary bit pattern used as marker
#define BL_STATE_PTR ((uint64_t *)
SRAM2_BASE) //start of 16kb SRAM bank in stm32f405
#define BL_STATE_KEY (0x5a5) //arbitrary bit pattern used as
a
marker
#define BL_STATE_KEY_MASK (0xfff)
#define BL_STATE_KEY_SHIFT (32)
#define BL_STATE_INVALID (0)
...
...
@@ -14,7 +13,6 @@
#define BL_STATE_GET_REG(s) ((s) & 0xffffffff)
#define BL_STATE_GET_KEY(s) (((s) >> BL_STATE_KEY_SHIFT) & BL_STATE_KEY_MASK)
#define BL_STATE_GET_ADDR(s) (((s) >> BL_STATE_KEY_SHIFT) & ~BL_STATE_KEY_MASK)
extern
uint64_t
_estack
[];
void
branch_to_bootloader
(
uint32_t
r0
,
uint32_t
bl_addr
){
...
...
@@ -47,6 +45,6 @@ void check_enter_bootloader(){
void
enter_bootloader
(
uint32_t
r0
,
uint32_t
bl_addr
){
//set bootloader state values
*
BL_STATE_PTR
=
BL_STATE_VALID
(
r0
,
bl_addr
);
NVIC_SystemReset
();
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Colton Glick
@crglick
mentioned in issue
#81 (closed)
·
3 years ago
mentioned in issue
#81 (closed)
mentioned in issue #81
Toggle commit list
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