File tree Expand file tree Collapse file tree 1 file changed +18
-13
lines changed Expand file tree Collapse file tree 1 file changed +18
-13
lines changed Original file line number Diff line number Diff line change @@ -192,19 +192,24 @@ generate_flags () {
192192 if [ x" $HAS_OPENAMP_SECTION " == x ]; then
193193 echo " Adding OpenAMP section to $ARDUINOVARIANT /linker_script.ld"
194194 OPENAMP_SECTION=" .openamp_section (NOLOAD) : {\n \
195- . = ABSOLUTE(0x38000000);\n \
196- *(.resource_table)\n \
197- } >RAM_D3 AT > FLASH\n \
198- .pdm_section (NOLOAD) : {\n \
199- . = ABSOLUTE(0x3800FC00);\n \
200- *(.pdm_buffer)\n \
201- } > RAM_D3\n \
202- _dtcm_lma = __etext + SIZEOF(.data);\n \
203- .dtcm : AT(_dtcm_lma) {\n \
204- _sdtcm = .;\n \
205- *(.dtcm*)\n \
206- _edtcm = .;\n \
207- } > DTCMRAM"
195+ . = ABSOLUTE(0x38000000);\n \
196+ *(.resource_table)\n \
197+ } >RAM_D3 AT > FLASH\n \
198+ .pdm_section (NOLOAD) : {\n \
199+ . = ABSOLUTE(0x3800FC00);\n \
200+ *(.pdm_buffer)\n \
201+ } > RAM_D3\n"
202+
203+ if [[ $ARDUINOVARIANT == * PORTENTA* M7* ]]; then
204+ OPENAMP_SECTION=$OPENAMP_SECTION " \
205+ _dtcm_lma = __etext + SIZEOF(.data);\n \
206+ .dtcm : AT(_dtcm_lma) {\n \
207+ _sdtcm = .;\n \
208+ *(.dtcm*)\n \
209+ _edtcm = .;\n \
210+ } > DTCMRAM"
211+ fi
212+
208213 sed -i " s?.heap (COPY):?${OPENAMP_SECTION} \n .heap (COPY):?g" $ARDUINOVARIANT /linker_script.ld
209214 OPENAMP_REGIONS=" __OPENAMP_region_start__ = 0x38000400;\n__OPENAMP_region_end__ = 0x38000400 + LENGTH(RAM_D3) - 1K;"
210215 sed -i " s?ENTRY(Reset_Handler)?${OPENAMP_REGIONS} \nENTRY(Reset_Handler)?g" $ARDUINOVARIANT /linker_script.ld
You can’t perform that action at this time.
0 commit comments