Skip to content

Commit f200e6a

Browse files
committed
Fix doc build and address feedback
1 parent 4aea7f8 commit f200e6a

File tree

6 files changed

+10
-7
lines changed

6 files changed

+10
-7
lines changed

conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@
154154
".env",
155155
".venv",
156156
".direnv",
157+
"data",
157158
"docs/autoapi",
158159
"docs/README.md",
159160
"drivers",

ports/raspberrypi/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,6 @@ SRC_SHARED_MODULE_EXPANDED = $(addprefix shared-bindings/, $(SRC_SHARED_MODULE))
233233
SRC_COMMON_HAL_SHARED_MODULE_EXPANDED = $(sort $(SRC_COMMON_HAL_EXPANDED) $(SRC_SHARED_MODULE_EXPANDED))
234234

235235
SRC_S = supervisor/$(CHIP_FAMILY)_cpu.s
236-
BOOT2_S_UPPER ?= sdk/src/rp2_common/boot_stage2/boot2_generic_03h.S
237236
BOOT2_S_CFLAGS ?= -DPICO_FLASH_SPI_CLKDIV=4
238237
SRC_S_UPPER = sdk/src/rp2_common/hardware_divider/divider.S \
239238
sdk/src/rp2_common/hardware_irq/irq_handler_chain.S \

ports/raspberrypi/gen_stage2.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66

77

88
def main(input_template: pathlib.Path, output_path: pathlib.Path, skus: str = typer.Argument("")):
9-
if ", " in skus:
10-
skus = skus.split(", ")
9+
if "," in skus:
10+
skus = skus.split(",")
1111
else:
1212
skus = [skus]
13-
skus = ['sku="{}"'.format(f) for f in skus]
13+
skus = ['sku="{}"'.format(f.strip()) for f in skus]
1414
flashes = cascadetoml.filter_toml(pathlib.Path("../../data/nvm.toml"), skus)
1515

1616
if len(skus) == 0:

ports/raspberrypi/stage2.c.jinja

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#include "sdk/src/rp2040/hardware_structs/include/hardware/structs/ssi.h"
22
#include "sdk/src/rp2040/hardware_structs/include/hardware/structs/pads_qspi.h"
3-
#include "sdk/src/rp2040/hardware_structs/include/hardware/structs/watchdog.h"
43
#include "sdk/src/rp2040/hardware_regs/include/hardware/regs/addressmap.h"
54
#include "sdk/src/rp2040/hardware_regs/include/hardware/regs/m0plus.h"
65

ports/raspberrypi/supervisor/internal_flash.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,11 @@ void supervisor_flash_init(void) {
6969
uint8_t data[4];
7070
flash_do_cmd(cmd, data, 4);
7171
uint8_t power_of_two = 21;
72-
if (data[3] >= 20 && data[3] < 30) {
72+
// Flash must be at least 2MB (1 << 21) because we use the first 1MB for the
73+
// CircuitPython core. We validate the range because Adesto Tech flash chips
74+
// don't return the correct value. So, we default to 2MB which will work for
75+
// larger chips, it just won't use all of the space.
76+
if (data[3] >= 21 && data[3] < 30) {
7377
power_of_two = data[3];
7478
}
7579
_flash_size = 1 << power_of_two;

ports/raspberrypi/supervisor/port.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ safe_mode_t port_init(void) {
8888
// Set brown out.
8989

9090
// Copy all of the "tightly coupled memory" code and data to run from RAM.
91-
// This let's us use the 16k cache for dynamically used data and code.
91+
// This lets us use the 16k cache for dynamically used data and code.
9292
// We must do this before we try and call any of its code or load the data.
9393
for (uint32_t i = 0; i < ((size_t)&_ld_itcm_size) / 4; i++) {
9494
(&_ld_itcm_destination)[i] = (&_ld_itcm_flash_copy)[i];

0 commit comments

Comments
 (0)