Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STM32H7 FLASH API issue with M4 core #11811

Merged
merged 1 commit into from
Nov 6, 2019

Conversation

jeromecoutant
Copy link
Collaborator

Description (required)

Compilation is failing for DISCO_H747I_CM4

Summary of change (What the change is for and why)

SCB cache functions are only available for M7 core, not M4

Documentation (Details of any document updates required)

Pull request type (required)

[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results (required)

[] No Tests required for this change (E.g docs only update)
[x] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers (optional)

@0xc0170 why CI didn't catch the issue before ?


Release Notes (required for feature/major PRs)

Summary of changes
Impact of changes
Migration actions required

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 5, 2019

@0xc0170 why CI didn't catch the issue before ?

Checking

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 5, 2019

@jeromecoutant How to reproduce? I don't see build problem in nightly (latest run here http://mbed-os-ci.s3-website-eu-west-1.amazonaws.com/?prefix=jenkins-ci/ARMmbed/mbed-os/mbed-os-ci-nightly/artifacts/master/393/ ). What are we missing?

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 5, 2019

One additional question: @jeromecoutant why the target does not have release_version defined ?

@jeromecoutant
Copy link
Collaborator Author

One additional question: @jeromecoutant why the target does not have release_version defined ?

It could be changed.
It was because the M4 target of this dual core CPU is not accessible via drag and drop feature.

@mbed-ci
Copy link

mbed-ci commented Nov 5, 2019

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 1
Build artifacts

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 5, 2019

It was because the M4 target of this dual core CPU is not accessible via drag and drop feature.

So should stay that way rather. Just can't have it tested, need to be checked manually (enable, test). 🙄

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 6, 2019

@jeromecoutant I merged this to fix the build but still we shall review how to build this

@jeromecoutant jeromecoutant deleted the PR_H7_CM4_FLASH branch November 8, 2019 16:17
@adbridge
Copy link
Contributor

This is sitting on top of #11789 which is currently targeting 6.0

@adbridge adbridge added release-version: 6.0.0-alpha-1 First pre-release version of 6.0.0 and removed release-version: 5.14.2 labels Nov 18, 2019
@jeromecoutant
Copy link
Collaborator Author

This is sitting on top of #11789 which is currently targeting 6.0

This PR solves some compilation issue from #11619
(only M4 core side, not the main core)

@JanneKiiskila

@@ -133,8 +142,15 @@ int32_t flash_program_page(flash_t *obj, uint32_t address, const uint8_t *data,
}
}

#if defined(DUAL_CORE)
#if defined(CORE_CM7)
SCB_CleanInvalidateDCache_by_Addr((uint32_t *)StartAddress, FullSize);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part does not look right? We're anyway always doing the same thing?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either there should be "something else" in the #else part or these should not be any #ifdef magic here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SCB_CleanInvalidateDCache_by_Addr only exist for M7 core.

  • for H743: DUAL_CORE is not defined
  • for H747: DUAL_CORE is defined, then core side is checked

@0xc0170 0xc0170 added release-version: 5.15.0-rc1 and removed release-version: 6.0.0-alpha-1 First pre-release version of 6.0.0 labels Nov 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants