Skip to content

Commit 65aa13b

Browse files
committed
mbed-os-to-arduino: add dedicated plc section to linker script
1 parent 524fb94 commit 65aa13b

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

mbed-os-to-arduino

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,10 +224,13 @@ generate_flags () {
224224

225225
if [[ $ARDUINOVARIANT == *OPTA* ]]; then
226226
echo "Adding PLC section to $ARDUINOVARIANT/linker_script.ld"
227-
PLC_SECTION=".plc_section 0x3800F000 (NOLOAD): {\n \
228-
*(.plc_buffer)\n \
229-
} > RAM_D3\n"
230-
sed -i "s?.heap (COPY):?${PLC_SECTION}\n .heap (COPY):?g" $ARDUINOVARIANT/linker_script.ld
227+
PLC_SECTION=".plc_d3_section 0x3800F000 (NOLOAD): {\n \
228+
*(.plc_buffer)\n \
229+
} > RAM_D3\n \
230+
.plc_d2_section 0x30000000 (NOLOAD): {\n \
231+
*(.plc_code)\n \
232+
} > RAM_D2\n"
233+
sed -i "s?.heap (COPY):?${PLC_SECTION} .heap (COPY):?g" $ARDUINOVARIANT/linker_script.ld
231234
fi
232235
fi
233236
echo "Patching linker scripts"

0 commit comments

Comments
 (0)