Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1a44f9c

Browse files
authored
Merge pull request#2490 from fpistm/ldscript
chore: mark some segments as READONLY
2 parents2aa4e44 +b296d7d commit1a44f9c

File tree

262 files changed

+1345
-1329
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

262 files changed

+1345
-1329
lines changed

‎CI/build/arduino-cli.py

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,11 @@
7474
sketch_options= {}# key: sketch pattern, value: options
7575
na_sketch_pattern= {}# key: board name, value: sketch pattern list
7676

77-
all_warnings=False
78-
7977
# Counter
8078
nb_build_passed=0
8179
nb_build_failed=0
8280
nb_build_skipped=0
81+
nb_warnings=0
8382

8483
# Timing
8584
full_buildTime=time.time()
@@ -95,7 +94,7 @@
9594
overflow_pattern=re.compile(
9695
r"(will not fit in |section .+ is not within )?region( .+ overflowed by [\d]+ bytes)?"
9796
)
98-
97+
warning_pattern=re.compile(r"warning: .+LOAD segment with RWX permissions")
9998
# format
10099
build_format_header="| {:^8} | {:42} | {:^10} | {:^7} |"
101100
build_format_result="| {:^8} | {:42} | {:^19} | {:^6.2f}s |"
@@ -590,11 +589,18 @@ def find_board():
590589
defcheck_status(status,build_conf,boardKo,nb_build_conf):
591590
globalnb_build_passed
592591
globalnb_build_failed
592+
globalnb_warnings
593593
sketch_name=build_conf[idx_cmd][-1].name
594594

595595
ifstatus[1]==0:
596596
result=fsucc
597597
nb_build_passed+=1
598+
# Check warnings
599+
logFile=build_conf[idx_log]/f"{sketch_name}.log"
600+
fori,lineinenumerate(open(logFile)):
601+
ifwarning_pattern.search(line):
602+
nb_warnings+=1
603+
print(f"Warning:{line}")
598604
elifstatus[1]==1:
599605
# Check if failed due to a region overflowed
600606
logFile=build_conf[idx_log]/f"{sketch_name}.log"
@@ -608,7 +614,11 @@ def check_status(status, build_conf, boardKo, nb_build_conf):
608614
elifld_pattern.search(line):
609615
# If one ld line is not for region overflowed --> failed
610616
ifoverflow_pattern.search(line)isNone:
611-
error_found=True
617+
ifwarning_pattern.search(line):
618+
nb_warnings+=1
619+
print(f"Warning:{line}")
620+
else:
621+
error_found=True
612622
else:
613623
overflow_found=True
614624
iferror_found:
@@ -692,6 +702,8 @@ def log_final_result():
692702
sfail=f"{nb_build_failed} failed ({stat_failed}%)"
693703
sskip=f"{nb_build_skipped} skipped)"
694704
f.write(f"{ssucc},{sfail} of{nb_build_total} builds ({sskip})\n")
705+
ifnb_warnings:
706+
f.write(f"Total warning to remove:{nb_warnings}\n")
695707
f.write(f"Ends{time.strftime('%A %d %B %Y %H:%M:%S')}\n")
696708
f.write(f"Duration:{duration}\n")
697709
f.write(f"Logs are available here:\n{output_dir}\n")
@@ -702,6 +714,8 @@ def log_final_result():
702714
sfail=f"{nb_build_failed}{ffail} ({stat_failed}%)"
703715
sskip=f"{nb_build_skipped}{fskip}"
704716
print(f"Builds Summary:{ssucc},{sfail} of{nb_build_total} builds ({sskip})")
717+
ifnb_warnings:
718+
print(f"Total warning to remove:{nb_warnings}")
705719
print(f"Duration:{duration}")
706720
print("Logs are available here:")
707721
print(output_dir)

‎variants/STM32C0xx/C011D6Y_C011F(4-6)(P-U)_C031F(4-6)P/ldscript.ld

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,21 +85,21 @@ SECTIONS
8585
. =ALIGN(4);
8686
} >FLASH
8787

88-
.ARM.extab : {
88+
.ARM.extab(READONLY) : {
8989
. =ALIGN(4);
9090
*(.ARM.extab* .gnu.linkonce.armextab.*)
9191
. =ALIGN(4);
9292
} >FLASH
9393

94-
.ARM : {
94+
.ARM(READONLY): {
9595
. =ALIGN(4);
9696
__exidx_start = .;
9797
*(.ARM.exidx*)
9898
__exidx_end = .;
9999
. =ALIGN(4);
100100
} >FLASH
101101

102-
.preinit_array :
102+
.preinit_array(READONLY) :
103103
{
104104
. =ALIGN(4);
105105
PROVIDE_HIDDEN (__preinit_array_start = .);
@@ -108,7 +108,7 @@ SECTIONS
108108
. =ALIGN(4);
109109
} >FLASH
110110

111-
.init_array :
111+
.init_array(READONLY):
112112
{
113113
. =ALIGN(4);
114114
PROVIDE_HIDDEN (__init_array_start = .);
@@ -118,7 +118,7 @@ SECTIONS
118118
. =ALIGN(4);
119119
} >FLASH
120120

121-
.fini_array :
121+
.fini_array(READONLY):
122122
{
123123
. =ALIGN(4);
124124
PROVIDE_HIDDEN (__fini_array_start = .);

‎variants/STM32C0xx/C031C(4-6)(T-U)/ldscript.ld

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,21 +77,21 @@ SECTIONS
7777
. =ALIGN(4);
7878
} >FLASH
7979

80-
.ARM.extab : {
80+
.ARM.extab(READONLY) : {
8181
. =ALIGN(4);
8282
*(.ARM.extab* .gnu.linkonce.armextab.*)
8383
. =ALIGN(4);
8484
} >FLASH
8585

86-
.ARM : {
86+
.ARM(READONLY): {
8787
. =ALIGN(4);
8888
__exidx_start = .;
8989
*(.ARM.exidx*)
9090
__exidx_end = .;
9191
. =ALIGN(4);
9292
} >FLASH
9393

94-
.preinit_array :
94+
.preinit_array(READONLY) :
9595
{
9696
. =ALIGN(4);
9797
PROVIDE_HIDDEN (__preinit_array_start = .);
@@ -100,7 +100,7 @@ SECTIONS
100100
. =ALIGN(4);
101101
} >FLASH
102102

103-
.init_array :
103+
.init_array(READONLY):
104104
{
105105
. =ALIGN(4);
106106
PROVIDE_HIDDEN (__init_array_start = .);
@@ -110,7 +110,7 @@ SECTIONS
110110
. =ALIGN(4);
111111
} >FLASH
112112

113-
.fini_array :
113+
.fini_array(READONLY):
114114
{
115115
. =ALIGN(4);
116116
PROVIDE_HIDDEN (__fini_array_start = .);

‎variants/STM32F0xx/F030C6T/ldscript.ld

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,21 +85,21 @@ SECTIONS
8585
. =ALIGN(4);
8686
} >FLASH
8787

88-
.ARM.extab : {
88+
.ARM.extab(READONLY) : {
8989
. =ALIGN(4);
9090
*(.ARM.extab* .gnu.linkonce.armextab.*)
9191
. =ALIGN(4);
9292
} >FLASH
9393

94-
.ARM : {
94+
.ARM(READONLY): {
9595
. =ALIGN(4);
9696
__exidx_start = .;
9797
*(.ARM.exidx*)
9898
__exidx_end = .;
9999
. =ALIGN(4);
100100
} >FLASH
101101

102-
.preinit_array :
102+
.preinit_array(READONLY) :
103103
{
104104
. =ALIGN(4);
105105
PROVIDE_HIDDEN (__preinit_array_start = .);
@@ -108,7 +108,7 @@ SECTIONS
108108
. =ALIGN(4);
109109
} >FLASH
110110

111-
.init_array :
111+
.init_array(READONLY):
112112
{
113113
. =ALIGN(4);
114114
PROVIDE_HIDDEN (__init_array_start = .);
@@ -118,7 +118,7 @@ SECTIONS
118118
. =ALIGN(4);
119119
} >FLASH
120120

121-
.fini_array :
121+
.fini_array(READONLY):
122122
{
123123
. =ALIGN(4);
124124
PROVIDE_HIDDEN (__fini_array_start = .);

‎variants/STM32F0xx/F030C8T/ldscript.ld

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,21 +77,21 @@ SECTIONS
7777
. =ALIGN(4);
7878
} >FLASH
7979

80-
.ARM.extab : {
80+
.ARM.extab(READONLY) : {
8181
. =ALIGN(4);
8282
*(.ARM.extab* .gnu.linkonce.armextab.*)
8383
. =ALIGN(4);
8484
} >FLASH
8585

86-
.ARM : {
86+
.ARM(READONLY): {
8787
. =ALIGN(4);
8888
__exidx_start = .;
8989
*(.ARM.exidx*)
9090
__exidx_end = .;
9191
. =ALIGN(4);
9292
} >FLASH
9393

94-
.preinit_array :
94+
.preinit_array(READONLY) :
9595
{
9696
. =ALIGN(4);
9797
PROVIDE_HIDDEN (__preinit_array_start = .);
@@ -100,7 +100,7 @@ SECTIONS
100100
. =ALIGN(4);
101101
} >FLASH
102102

103-
.init_array :
103+
.init_array(READONLY):
104104
{
105105
. =ALIGN(4);
106106
PROVIDE_HIDDEN (__init_array_start = .);
@@ -110,7 +110,7 @@ SECTIONS
110110
. =ALIGN(4);
111111
} >FLASH
112112

113-
.fini_array :
113+
.fini_array(READONLY):
114114
{
115115
. =ALIGN(4);
116116
PROVIDE_HIDDEN (__fini_array_start = .);

‎variants/STM32F0xx/F030F4P/ldscript.ld

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,21 +77,21 @@ SECTIONS
7777
. =ALIGN(4);
7878
} >FLASH
7979

80-
.ARM.extab : {
80+
.ARM.extab(READONLY) : {
8181
. =ALIGN(4);
8282
*(.ARM.extab* .gnu.linkonce.armextab.*)
8383
. =ALIGN(4);
8484
} >FLASH
8585

86-
.ARM : {
86+
.ARM(READONLY): {
8787
. =ALIGN(4);
8888
__exidx_start = .;
8989
*(.ARM.exidx*)
9090
__exidx_end = .;
9191
. =ALIGN(4);
9292
} >FLASH
9393

94-
.preinit_array :
94+
.preinit_array(READONLY) :
9595
{
9696
. =ALIGN(4);
9797
PROVIDE_HIDDEN (__preinit_array_start = .);
@@ -100,7 +100,7 @@ SECTIONS
100100
. =ALIGN(4);
101101
} >FLASH
102102

103-
.init_array :
103+
.init_array(READONLY):
104104
{
105105
. =ALIGN(4);
106106
PROVIDE_HIDDEN (__init_array_start = .);
@@ -110,7 +110,7 @@ SECTIONS
110110
. =ALIGN(4);
111111
} >FLASH
112112

113-
.fini_array :
113+
.fini_array(READONLY):
114114
{
115115
. =ALIGN(4);
116116
PROVIDE_HIDDEN (__fini_array_start = .);

‎variants/STM32F0xx/F030K6T/ldscript.ld

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,21 +85,21 @@ SECTIONS
8585
. =ALIGN(4);
8686
} >FLASH
8787

88-
.ARM.extab : {
88+
.ARM.extab(READONLY) : {
8989
. =ALIGN(4);
9090
*(.ARM.extab* .gnu.linkonce.armextab.*)
9191
. =ALIGN(4);
9292
} >FLASH
9393

94-
.ARM : {
94+
.ARM(READONLY): {
9595
. =ALIGN(4);
9696
__exidx_start = .;
9797
*(.ARM.exidx*)
9898
__exidx_end = .;
9999
. =ALIGN(4);
100100
} >FLASH
101101

102-
.preinit_array :
102+
.preinit_array(READONLY) :
103103
{
104104
. =ALIGN(4);
105105
PROVIDE_HIDDEN (__preinit_array_start = .);
@@ -108,7 +108,7 @@ SECTIONS
108108
. =ALIGN(4);
109109
} >FLASH
110110

111-
.init_array :
111+
.init_array(READONLY):
112112
{
113113
. =ALIGN(4);
114114
PROVIDE_HIDDEN (__init_array_start = .);
@@ -118,7 +118,7 @@ SECTIONS
118118
. =ALIGN(4);
119119
} >FLASH
120120

121-
.fini_array :
121+
.fini_array(READONLY):
122122
{
123123
. =ALIGN(4);
124124
PROVIDE_HIDDEN (__fini_array_start = .);

‎variants/STM32F0xx/F030R8T/ldscript.ld

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,21 +77,21 @@ SECTIONS
7777
. =ALIGN(4);
7878
} >FLASH
7979

80-
.ARM.extab : {
80+
.ARM.extab(READONLY) : {
8181
. =ALIGN(4);
8282
*(.ARM.extab* .gnu.linkonce.armextab.*)
8383
. =ALIGN(4);
8484
} >FLASH
8585

86-
.ARM : {
86+
.ARM(READONLY): {
8787
. =ALIGN(4);
8888
__exidx_start = .;
8989
*(.ARM.exidx*)
9090
__exidx_end = .;
9191
. =ALIGN(4);
9292
} >FLASH
9393

94-
.preinit_array :
94+
.preinit_array(READONLY) :
9595
{
9696
. =ALIGN(4);
9797
PROVIDE_HIDDEN (__preinit_array_start = .);
@@ -100,7 +100,7 @@ SECTIONS
100100
. =ALIGN(4);
101101
} >FLASH
102102

103-
.init_array :
103+
.init_array(READONLY):
104104
{
105105
. =ALIGN(4);
106106
PROVIDE_HIDDEN (__init_array_start = .);
@@ -110,7 +110,7 @@ SECTIONS
110110
. =ALIGN(4);
111111
} >FLASH
112112

113-
.fini_array :
113+
.fini_array(READONLY):
114114
{
115115
. =ALIGN(4);
116116
PROVIDE_HIDDEN (__fini_array_start = .);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp