Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/rp2_common/pico_bootrom/include/pico/bootrom.h
Original file line number Diff line number Diff line change
Expand Up @@ -1101,6 +1101,9 @@ int rom_add_flash_runtime_partition(uint32_t start_offset, uint32_t size, uint32
* a main image TBYB boot. It requires the same minimum workarea size as `rom_pick_ab_partition`.
* \see rom_pick_ab_partition()
*
* This should be used instead of `rom_pick_ab_partition` when performing a Flash Update Boot before calling `explicit_buy`, and can still be used without
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commenting on a wider scope:

  • any in progress update or TBYB boot" perhaps "any in progress Flash Update boot or TBYB boot" (note boot repeated), though a TBYB is a flash update boot, so maybe TBYB operation IDK
  • I'd put this function right after rom_pick_ab_partition in the header
  • we should use \ref to refer to other functions not func (cc @lurch)
  • arguably "normally" is "always" so really you could lose the word
  • bit of a weird '-' in the middle of the For example sentence
  • erase 2 partitions -> erase two partitions
  • It also checks" It is a big dangly here (perhaps this function)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I've resolved these issues, although there were no \func invocations in the current docs, so have just added more \refs

* issue when a Flash Update Boot is not in progress.
*
* For example, if an `explicit_buy` is pending then calling `pick_ab_partition` would normally clear the saved flash erase address for the version downgrade,
* so the required erase of the other partition would not occur when `explicit_buy` is called - this function saves and restores that address to prevent this
* issue, and returns `BOOTROM_ERROR_NOT_PERMITTED` if the partition chosen by `pick_ab_partition` also requires a flash erase version downgrade (as you can't
Expand Down
Loading