Skip to content

samples/application_development/code_relocation fails to build with coverage on mps2_an385 #15107

@dcpleung

Description

@dcpleung

Describe the bug
When building samples/application_development/code_relocation on mps2_an385 with coverage enabled, it complains that

ERROR: section .sram2_data is 6828 bytes in the virtual/runtime address space, but only 6824 in the loaded/XIP section!

Note that the size of section .sram2_data in zephyr.map is 6824 (0x1AA8) bytes:

.sram2_text     0x0000000020200000      0x2d0 load address 0x00000000000000c0
_SRAM2_RODATA_SECTION_NAME
                0x00000000202002d0        0x4 load address 0x0000000000000390
.sram2_data     0x00000000202002d4     0x1aa8 load address 0x0000000000000394
.sram2_bss      0x0000000020201d80       0x98 load address 0x0000000000001e3c

To Reproduce
Steps to reproduce the behavior:

  1. mkdir build; cd build
  2. cmake -DBOARD=mps2_an385 -DCONFIG_COVERAGE=y ../
  3. make
  4. See error

Expected behavior
Should build and run without errors.

Impact
Impacting code coverage.

Metadata

Metadata

Labels

bugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions