Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: mark some segments as READONLY#2490

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fpistm merged 2 commits intostm32duino:mainfromfpistm:ldscript
Sep 4, 2024

Conversation

fpistm
Copy link
Member

This PR reverts794945c then update all linker scripts to mark some segments asREADONLY.

Prevent LOAD segment with RWX permissions warning.
TheREADONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier.

Fixes#2475.

@fpistmfpistm added the enhancementNew feature or request labelAug 20, 2024
@fpistmfpistm added this to the2.9.0 milestoneAug 20, 2024
@fpistmfpistm removed this from the2.9.0 milestoneAug 21, 2024
@fpistm
Copy link
MemberAuthor

fpistm commentedAug 21, 2024
edited
Loading

This PR fixed all warnings for standard application.
Anyway, if a Flash operation (write) is performedclosed to the code segment warning can be raised.
Main example is when the EEPROM emulation is used as it uses last flash page, mainly for mcu with small flash size.

I've reproduced easily with a Blink example on a STM32L4 target by adding:

  FLASH_EraseInitTypeDef EraseInitStruct;  uint32_t pageError = 0;  HAL_FLASHEx_Erase(&EraseInitStruct, &pageError);  HAL_FLASH_Program(FLASH_TYPEPROGRAM_DOUBLEWORD, 0x0800F000, 10);

Prevent LOAD segment with RWX permissions warning.The "READONLY" keyword is only supported in GCC11 and later,remove it if using GCC10 or earlier.Fixesstm32duino#2475.Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Ignore it also when only overflow detected.Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
@fpistm
Copy link
MemberAuthor

To go further, warning is reached due to the usage of at least one RAM function:
#define __RAM_FUNC __attribute__((section(".RamFunc")))

Example with HAL FLASH API:

static__RAM_FUNCvoidFLASH_Program_Fast(uint32_tAddress,uint32_tDataAddress)

So, I kept the warning disabled, but new linker script should use theREADONLY attribute to prevent warning.

@fpistmfpistm marked this pull request as ready for reviewSeptember 4, 2024 12:39
@fpistmfpistm merged commit1a44f9c intostm32duino:mainSep 4, 2024
23 checks passed
@fpistmfpistm deleted the ldscript branchSeptember 4, 2024 13:11
@fpistmfpistm added this to the2.9.0 milestoneSep 4, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
enhancementNew feature or request
Projects
Milestone
2.9.0
Development

Successfully merging this pull request may close these issues.

LOAD segment with RWX permissions during stm32f411ceu6 flashing on arduinoststm32 @ 4.20801.240802 (2.8.1)
1 participant
@fpistm

[8]ページ先頭

©2009-2025 Movatter.jp