Ok here is the issue:
This example is using 0x20022000 as the slave address.
If we look at the section headers for the slave axf we get:
arm-none-eabi-readelf -S TestStaticC_M33SLAVE.axf
There are 23 section headers, starting at offset 0xee538:
Section Headers:
[Nr] Name Type Addr Off Size ES Flg Lk Inf Al
[ 0] NULL 00000000 000000 000000 00 0 0 0
[ 1] .text PROGBITS 20022000 002000 0044f4 00 AX 0 0 4
[ 2] .data PROGBITS 20026500 006500 0009b4 00 WA 0 0 8
[ 3] .bss NOBITS 20026eb4 006eb4 000130 00 WA 0 0 4
[ 4] .ARM.exidx ARM_EXIDX 200264f4 0064f4 000008 00 AL 1 0 4
[ 5] .uninit_RESERVED PROGBITS 200264fc 006eb4 000000 00 W 0 0 4
[ 6] .noinit PROGBITS 20026fe4 006eb4 000000 00 W 0 0 4
[ 7] .heap NOBITS 20026fe4 006eb4 001000 00 WA 0 0 4
[ 8] .heap2stackfill NOBITS 20027fe4 006eb4 001000 00 WA 0 0 1
[ 9] .stack PROGBITS 20043000 006eb4 000000 00 W 0 0 4
[10] .debug_info PROGBITS 00000000 006eb4 00d06a 00 0 0 1
[11] .debug_abbrev PROGBITS 00000000 013f1e 001420 00 0 0 1
[12] .debug_aranges PROGBITS 00000000 01533e 000560 00 0 0 1
[13] .debug_ranges PROGBITS 00000000 01589e 0004d0 00 0 0 1
[14] .debug_macro PROGBITS 00000000 015d6e 001194 00 0 0 1
[15] .debug_line PROGBITS 00000000 016f02 002b6d 00 0 0 1
[16] .debug_str PROGBITS 00000000 019a6f 0ce368 01 MS 0 0 1
[17] .comment PROGBITS 00000000 0e7dd7 00007f 01 MS 0 0 1
[18] .ARM.attributes ARM_ATTRIBUTES 00000000 0e7e56 000032 00 0 0 1
[19] .debug_frame PROGBITS 00000000 0e7e88 001f34 00 0 0 4
[20] .symtab SYMTAB 00000000 0e9dbc 002d40 10 21 440 4
[21] .strtab STRTAB 00000000 0ecafc 00194c 00 0 0 1
[22] .shstrtab STRTAB 00000000 0ee448 0000ee 00 0 0 1
Key to Flags:
W (write), A (alloc), X (execute), M (merge), S (strings), I (info),
L (link order), O (extra OS processing required), G (group), T (TLS),
C (compressed), x (unknown), o (OS specific), E (exclude),
y (purecode), p (processor specific)
We can see our .Text at 0x20022000 and our .data at 0x20026500
Now if we look at the master:
arm-none-eabi-readelf -S TestStaticC_MASTER.axf
There are 33 section headers, starting at offset 0x14d6a0:
Section Headers:
[Nr] Name Type Addr Off Size ES Flg Lk Inf Al
[ 0] NULL 00000000 000000 000000 00 0 0 0
[ 1] .text PROGBITS 00000000 010000 0093ec 00 AX 0 0 8
[ 2] .data PROGBITS 20000000 030000 0009ac 00 WA 0 0 8
[ 3] .data_RAM2_core_m PROGBITS 20022000 022000 0044f4 00 AX 0 0 4
[ 4] .data_RAM2_core_m ARM_EXIDX 200264f4 0264f4 000008 00 AL 3 0 4
[ 5] .data_RAM2_core_m PROGBITS 200264fc 0264fc 0009b4 00 WA 0 0 8
[ 6] .data_RAM2 PROGBITS 20026eb0 0309ac 000000 00 W 0 0 4
[ 7] .data_RAM3 PROGBITS 04000000 0309ac 000000 00 W 0 0 4
[ 8] .data_RAM4 PROGBITS 40100000 0309ac 000000 00 W 0 0 4
[ 9] .bss NOBITS 200009ac 0309ac 000150 00 WA 0 0 4
[10] .ARM.exidx ARM_EXIDX 000093ec 0193ec 000008 00 AL 1 0 4
[11] .uninit_RESERVED PROGBITS 20000000 0309ac 000000 00 W 0 0 4
[12] .noinit_RAM2 PROGBITS 20026eb0 0309ac 000000 00 W 0 0 4
[13] .noinit_RAM3 PROGBITS 04000000 0309ac 000000 00 W 0 0 4
[14] .noinit_RAM4 PROGBITS 40100000 0309ac 000000 00 W 0 0 4
[15] .noinit PROGBITS 20000afc 0309ac 000000 00 W 0 0 4
[16] .heap NOBITS 20000afc 0309ac 001000 00 WA 0 0 4
[17] .heap2stackfill NOBITS 20001afc 0309ac 001000 00 WA 0 0 1
[18] .stack PROGBITS 20021000 0309ac 000000 00 W 0 0 4
[19] .debug_info PROGBITS 00000000 0309ac 019b5f 00 0 0 1
[20] .debug_abbrev PROGBITS 00000000 04a50b 002b34 00 0 0 1
[21] .debug_aranges PROGBITS 00000000 04d03f 000a38 00 0 0 1
[22] .debug_ranges PROGBITS 00000000 04da77 0009c8 00 0 0 1
[23] .debug_macro PROGBITS 00000000 04e43f 01934e 00 0 0 1
[24] .debug_line PROGBITS 00000000 06778d 006980 00 0 0 1
[25] .debug_str PROGBITS 00000000 06e10d 0d50bc 01 MS 0 0 1
[26] .comment PROGBITS 00000000 1431c9 00007f 01 MS 0 0 1
[27] .ARM.attributes ARM_ATTRIBUTES 00000000 143248 00003a 00 0 0 1
[28] .debug_frame PROGBITS 00000000 143284 003838 00 0 0 4
[29] .debug_loc PROGBITS 00000000 146abc 000a55 00 0 0 1
[30] .symtab SYMTAB 00000000 147514 003ee0 10 31 621 4
[31] .strtab STRTAB 00000000 14b3f4 00210c 00 0 0 1
[32] .shstrtab STRTAB 00000000 14d500 0001a0 00 0 0 1
Key to Flags:
W (write), A (alloc), X (execute), M (merge), S (strings), I (info),
L (link order), O (extra OS processing required), G (group), T (TLS),
C (compressed), x (unknown), o (OS specific), E (exclude),
y (purecode), p (processor specific)
MP12:ide andrewcapon$ ./plugins/com.nxp.mcuxpresso.tools.macosx_10.3.0.201811011841/tools/bin/arm-none-eabi-readelf -S /Users/andrewcapon/Documents/MCUXpressoIDE_10.3.1/workspace/TestStaticC_M33SLAVE/Debug/TestStaticC_M33SLAVE.axf
There are 23 section headers, starting at offset 0xee538:
We can see that the .data_RAM2_core_m PROGBITS is correctly set to 0x20022000 for the slave .text.
The second .data_RAM2_core_m PROGBITS is incorrectly set to 0x200264fc instead of 0x20026500, 4 bytes out.