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
61f91de3
Commit
61f91de3
authored
Jun 10, 2021
by
Damien George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stm32/sdram: Prevent array-bounds warnings with GCC 11.
Signed-off-by:
Damien George
<
damien@micropython.org
>
parent
cf849d84
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
ports/stm32/sdram.c
ports/stm32/sdram.c
+11
-0
No files found.
ports/stm32/sdram.c
View file @
61f91de3
...
...
@@ -276,6 +276,13 @@ void sdram_leave_low_power(void) {
(
0
<<
9U
));
// Mode Register Definition
}
#if __GNUC__ >= 11
// Prevent array bounds warnings when accessing SDRAM_START_ADDRESS as a memory pointer.
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warray-bounds"
#pragma GCC diagnostic ignored "-Wstringop-overflow"
#endif
bool
sdram_test
(
bool
fast
)
{
uint8_t
const
pattern
=
0xaa
;
uint8_t
const
antipattern
=
0x55
;
...
...
@@ -325,4 +332,8 @@ bool sdram_test(bool fast) {
return
true
;
}
#if __GNUC__ >= 11
#pragma GCC diagnostic pop
#endif
#endif // FMC_SDRAM_BANK
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