Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
micropython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
micropython
Commits
e64947dc
Commit
e64947dc
authored
Jun 01, 2022
by
Damien George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stm32/mboot: Make 0x70ad0000 values named constants with macros.
Signed-off-by:
Damien George
<
damien@micropython.org
>
parent
92460999
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
ports/stm32/mboot/main.c
ports/stm32/mboot/main.c
+2
-2
ports/stm32/mboot/mboot.h
ports/stm32/mboot/mboot.h
+4
-0
No files found.
ports/stm32/mboot/main.c
View file @
e64947dc
...
...
@@ -1357,7 +1357,7 @@ void stm32_main(uint32_t initial_r0) {
}
#endif
if
((
initial_r0
&
0xffffff00
)
==
0x70ad0000
)
{
if
((
initial_r0
&
0xffffff00
)
==
MBOOT_INITIAL_R0_KEY
)
{
goto
enter_bootloader
;
}
...
...
@@ -1401,7 +1401,7 @@ enter_bootloader:
mboot_pack_init
();
#endif
if
((
initial_r0
&
0xffffff80
)
==
0x70ad0080
)
{
if
((
initial_r0
&
0xffffff80
)
==
MBOOT_INITIAL_R0_KEY_FSLOAD
)
{
mboot_state_change
(
MBOOT_STATE_FSLOAD_START
,
0
);
int
ret
=
-
1
;
#if MBOOT_FSLOAD
...
...
ports/stm32/mboot/mboot.h
View file @
e64947dc
...
...
@@ -46,6 +46,10 @@
#define MBOOT_ADDRESS_SPACE_64BIT (0)
#endif
// These values are used in initial_r0 to enter mboot programatically.
#define MBOOT_INITIAL_R0_KEY (0x70ad0000)
#define MBOOT_INITIAL_R0_KEY_FSLOAD (MBOOT_INITIAL_R0_KEY | 0x80)
// These are for led_state_all() and can be or'd together.
#define MBOOT_LED_STATE_LED0 (0x01)
#define MBOOT_LED_STATE_LED1 (0x02)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment