Skip to content

Commit fa94f64

Browse files
authored
Look for PICO_CONFIG: entries in .S files too (#2368)
(and fix the errors that this found)
1 parent e43b753 commit fa94f64

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

src/rp2_common/pico_divider/divider_hardware.S

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,27 @@
1212
#warning "Building divider_hardware.S on a platform with no SIO divider hardware"
1313
#endif
1414

15-
// PICO_CONFIG: PICO_DIVIDER_DISABLE_INTERRUPTS, Disable interrupts around division such that divider state need not be saved/restored in exception handlers, default=0, group=pico_divider
15+
// PICO_CONFIG: PICO_DIVIDER_DISABLE_INTERRUPTS, Disable interrupts around division such that divider state need not be saved/restored in exception handlers, default=0, type=bool, group=pico_divider
16+
#if 0 // make tooling checks happy
17+
#define PICO_DIVIDER_DISABLE_INTERRUPTS 0
18+
#endif
1619

17-
// PICO_CONFIG: PICO_DIVIDER_CALL_IDIV0, Whether 32 bit division by zero should call __aeabi_idiv0, default=1, group=pico_divider
20+
// PICO_CONFIG: PICO_DIVIDER_CALL_IDIV0, Whether 32 bit division by zero should call __aeabi_idiv0, default=1, type=bool, group=pico_divider
1821
#ifndef PICO_DIVIDER_CALL_IDIV0
1922
#define PICO_DIVIDER_CALL_IDIV0 1
2023
#endif
2124

22-
// PICO_CONFIG: PICO_DIVIDER_CALL_IDIV0, Whether 64 bit division by zero should call __aeabi_ldiv0, default=1, group=pico_divider
25+
// PICO_CONFIG: PICO_DIVIDER_CALL_LDIV0, Whether 64 bit division by zero should call __aeabi_ldiv0, default=1, type=bool, group=pico_divider
2326
#ifndef PICO_DIVIDER_CALL_LDIV0
2427
#define PICO_DIVIDER_CALL_LDIV0 1
2528
#endif
2629

2730
pico_default_asm_setup
2831

29-
// PICO_CONFIG: PICO_DIVIDER_IN_RAM, Whether divider functions should be placed in RAM, default=0, group=pico_divider
32+
// PICO_CONFIG: PICO_DIVIDER_IN_RAM, Whether divider functions should be placed in RAM, default=0, type=bool, group=pico_divider
33+
#if 0 // make tooling checks happy
34+
#define PICO_DIVIDER_IN_RAM 0
35+
#endif
3036
.macro div_section name
3137
#if PICO_DIVIDER_IN_RAM
3238
.section RAM_SECTION_NAME(\name), "ax"

tools/extract_configs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,12 @@ def ValidateAttrs(config_name, config_attrs, file_path, linenum):
133133

134134

135135

136-
# Scan all .c and .h files in the specific path, recursively.
136+
# Scan all .c and .h and .S files in the specific path, recursively.
137137

138138
for dirpath, dirnames, filenames in os.walk(scandir):
139139
for filename in filenames:
140140
file_ext = os.path.splitext(filename)[1]
141-
if file_ext in ('.c', '.h'):
141+
if file_ext in ('.c', '.h', '.S'):
142142
file_path = os.path.join(dirpath, filename)
143143
applicable = "all"
144144
for chip in (*CHIP_NAMES, "host"):

0 commit comments

Comments
 (0)