To configure the PMU, five source files and a linker script are imported
into the pmufw src
directory:
- xpfw_config.h
- xpfw_mod_sched.c
- xpfw_mod_em.c
- xpfw_pl_xmpu.c
- xpfw_pl_xmpu.h
- lscript.ld
In the xpfw_config.h
, you can enable
the options for the scheduler, error manager, XMPU/XPPU (PS) interrupts, and detailed
print statements. The following figure shows a code snippet.
Figure 1. xpfw_config.h Snippets
This configuration greatly increases the memory footprint of the PMU, mostly due to the detailed debug messaging enabled for this demonstration. The linker script, lscript.ld, reduces the size of the stack from 0x1000 to 0x800 so that pmufw can fit into the allotted 128 KB:
_STACK_SIZE = DEFINED(_STACK_SIZE) ? _STACK_SIZE: 0x800;