[PATCH 1/2] bsps/arm: Add support for MPU region alignment

Sebastian Huber sebastian.huber at embedded-brains.de
Wed Oct 21 05:37:41 UTC 2020


On 21/10/2020 02:23, Chris Johns wrote:

> On 21/10/20 3:04 am, Sebastian Huber wrote:
>> ---
>>   bsps/arm/shared/start/linkcmds.base | 21 +++++++++++++++++++++
>>   1 file changed, 21 insertions(+)
>>
>> diff --git a/bsps/arm/shared/start/linkcmds.base b/bsps/arm/shared/start/linkcmds.base
>> index 1f5f1ef959..d0663cf97e 100644
>> --- a/bsps/arm/shared/start/linkcmds.base
>> +++ b/bsps/arm/shared/start/linkcmds.base
>> @@ -81,6 +81,17 @@ SECTIONS {
>>   	} > REGION_TEXT AT > REGION_TEXT_LOAD
>>   	.fini : ALIGN_WITH_INPUT {
>>   		KEEP (*(.fini))
>> +
>> +		/*
>> +		 * If requested, align the size of the combined start and text
>> +		 * section to the next power of two to meet MPU region
>> +		 * alignment requirements.
>> +		 */
>> +		. = DEFINED (bsp_section_do_mpu_align) ?
> bsp_section_mpu_align_to_next_power2 ?

What about

bsp_align_text_and_rodata_end_to_power_of_2

?



More information about the devel mailing list