Skip to content

Instantly share code, notes, and snippets.

@mbolivar
Created January 24, 2018 16:29
Show Gist options
  • Select an option

  • Save mbolivar/5cf8cc33885f29e4a0d43eae226cd791 to your computer and use it in GitHub Desktop.

Select an option

Save mbolivar/5cf8cc33885f29e4a0d43eae226cd791 to your computer and use it in GitHub Desktop.
Conditional behaviors:
1) vector_relay_table: created or not
2) vt_pointer: 4B reserved or not (and pointer set in relocate_vector_table or not)
Desired outcomes:
Application type vt_pointer vector_relay_table
-------------------- ---------- ------------------
mcuboot Y Y
mcuboot child Y N
no bootloader N N
Let's say we have CONFIG_RUNS_AT_RESET, which defaults to y, and that
in Zephyr's Kconfig, vt_pointer reservation is something like:
config RESERVE_VT_POINTER
bool
default y if !RUNS_AT_RESET
default n
Let's say that vector_relay_table is not created (N) by default via
some Kconfig.
- mcuboot sets CONFIG_RESERVE_VT_POINTER=y in a new
prj_cortex_m0.conf, and ensures vector_relay_table=y as needed on M0
targets, either in prj_cortex_m0.conf or via selects in its main
Kconfig as in
https://gist.github.com/mbolivar/dfabe2de1c4f773c52dabc5b359344b2.
- mcuboot child can bring in .conf mix-ins at cmake time as discussed
above. these set CONFIG_RUNS_AT_RESET=n, so
CONFIG_RESERVE_VT_POINTER=y by default. they leave
vector_relay_table at its default, not created.
- "no bootloader" app leaves CONFIG_RUNS_AT_RESET at default y, so
CONFIG_RESERVE_VT_POINTER=N. it also leaves vector_relay_table at
its default, not created.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment