Adafruit Feather RP2040 fixes #279
No reviewers
Labels
No labels
bazel
bluetooth
board settings
boot_stage2
bug
build
c++
can't reproduce
clang
clib-interface
cmsis
code cleanliness
code size
compiler version issues
cyw43_driver
debug
discussion
documentation
duplicate
dynamic_clock
elf2uf2
enhancement
errata
filesystem
flash layout
floating point
FreeRTOS
hardware_adc
hardware_claim
hardware_clocks
hardware_dma
hardware_exception
hardware_flash
hardware_gpio
hardware_i2c
hardware_irq
hardware_pio
hardware_pwm
hardware_rcp
hardware_rtc
hardware_spi
hardware_sync
hardware_uart
hardware_vreg
hardware_watchdog
hardware_xosc
help wanted
host
IAR
installation
invalid
linker scripts
lto
lwip
mbedtls
missing API
needs reporter detail
networking
newlib
newlib-multicore
non-c
non-cmake
non-gcc
openocd
orphan PR
OS integration
pico_async_context
pico_base
pico_binary_info
pico_flash
picolibc
pico_lwip
pico_malloc
pico_multicore
pico_printf
pico_runtime
pico_stdio
pico_stdio_usb
pico_sync
pico_time
pico_util
pioasm
port
question
review
review2
rtos interop
runtime init
static library
svd
test
tinyusb
vscode
wifi integration
wontfix
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-raspberrypi/pico-sdk!279
Loading…
Reference in a new issue
No description provided.
Delete branch "adafruit_feather_rp2040-fixes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The following changes are based on information from the Adafruit forum: https://forums.adafruit.com/viewtopic.php?f=57&t=176745&p=860819&hilit=rp2040#p860819
The pre-built CircuitPython .uf2 was working on my board, but none of the
pico-exampleswere without the following SDK changes.The board has 8 MB of flash according to the product page: https://www.adafruit.com/product/4884
CircultPython sets
PICO_FLASH_SPI_CLKDIVto4: https://github.com/adafruit/circuitpython/blob/main/ports/raspberrypi/Makefile#L237CircultPython uses
boot2_generic_03h.Sfor boot2: https://github.com/adafruit/circuitpython/blob/main/ports/raspberrypi/Makefile#L236There's probably a better have a board specific
PICO_DEFAULT_BOOT_STAGE2_FILEvalue instead of editingsrc/rp2_common/boot_stage2/CMakeLists.txt- but I wanted to get the discussion going :)I encounter the issue with
PICO_DEFAULT_BOOT_STAGE2_FILEas well, but not sure how to fix it. sdk probably need to have a way for board to specify its bootstage2. Currently it is done at application CMakeLists.txtSee #275 😉
Also, it's (apparently) possible to have a board-specific cmake file in addition to / instead of a board-specific header file.
Yup, for
PICO_BOARD=fooyou can create a foo.cmake in boards/ or in another path set viaPICO_BOARD_CMAKE_DIRSan that will be used to configure the build (including adding the board header toPICO_CONFIG_HEADER_FILES)... not too bad really, but the issue @lurch linked above will mean that you can just do it via your board header which is much easier@lurch @kilograham thanks for the link to #275 (and apologies for not taking a look at the issue list prior to opening this PR).
Would you prefer I drop commit https://github.com/raspberrypi/pico-sdk/pull/279/commits/57e51b46762a2c9a44705a17d392938c992c1eb5 from this pull request? Alternatively, as an interim solution, would it make sense for the default in
src/rp2_common/boot_stage2/CMakeLists.txtto beboot2_generic_03h.Sas this seems to be the plan in #275.@sandeepmistry Thanks for the PR, I was able to get blink/ from the examples working properly.
Thanks for opening this PR! I was just about to look at this myself.
I just changed this. We now use our own templated C stage2 code that pulls flash info from our nvm.toml repo. This separates out the init code from specific flash skus. (It also uses 0xe7 quad word read which is 2 dummy cycles instead of 0xeb's four cycles.)
One reason the
boot2_w25q080.Sstage2 doesn't work because GigaDevice flash on the feather doesn't support two byte status register writes with the 0x01 command. Instead it supports 0x31 which writes the second status register byte directly. The Winbond chips support this too and it seems to be the trend. (0x01 on the winbond says it's backwards compatible to support two byte writes.)I'd expect the 2 divisor to work with the quad setup after QE has been set. (The datasheet says commands work up to 80mhz.) However, it seems to be unreliable and the 4 divisor is a much safer bet.
I've move #275 into our next bug fix release, so nothing going to happen b4 then - yes please remove 57e4 tho (and rebase to develop-1.1.1)
@kilograham done, please let me know if anything needs to be changed in this PR.
Thanks @lurch That is great to know that we can add board-specific cmake file. while waiting for #275 should I add cmake for Feather rp2040 to dictate the boot stage2, or just wait for it since header only is nicer I guess.
subsumed by #293
note 1.1.1 has been released which should fix feather issues
Pull request closed