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

CMSIS-pack update for STM32WB-family #12162

Merged
merged 4 commits into from
Jan 9, 2020

Conversation

JanneKiiskila
Copy link
Contributor

@JanneKiiskila JanneKiiskila commented Dec 20, 2019

Update of the tools/arm_pack_manager/index.json -file for the
STM32WB-chipset family.

[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)


[] 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

@ARMmbed/team-st-mcd @jeromecoutant @adustm @adbridge @0xc0170

@ciarmcom
Copy link
Member

@JanneKiiskila, thank you for your changes.
@0xc0170 @adbridge @jeromecoutant @ARMmbed/mbed-os-tools @ARMmbed/mbed-os-maintainers please review.

@JanneKiiskila
Copy link
Contributor Author

JanneKiiskila commented Dec 22, 2019

I think this is now having the same root-cause as #11798
We have to either fix this issue or fix the automatically produced index.json manually.

tools/arm_pack_manager/index.json Show resolved Hide resolved
tools/arm_pack_manager/index.json Show resolved Hide resolved
@0xc0170
Copy link
Contributor

0xc0170 commented Jan 3, 2020

@jeromecoutant Once we fix the requested above, this looks like it can go in (we are not hitting the tools issue as other bigger updates) ?

@felipeLeast
Copy link

I still think it's missing sectors tag on the stm32wb family. When I compile without it I get an error.

@JanneKiiskila
Copy link
Contributor Author

Yes, we seem to have an issue with the sectors information - it's not getting generated at all.

Janne Kiiskila added 2 commits January 8, 2020 15:38
Update of the tools/arm_pack_manager/index.json -file for the
STM32WB-chipset family.
Per feedback from STM the correct ROM size is 1 MB, instead of
16 MB. The KEIL source information is (in the pack itself) wrong, since
the KEIL webpage lists it as a 16 MB part, too - but if you look into
other sources - it is indeed 1 MB.
@JanneKiiskila
Copy link
Contributor Author

JanneKiiskila commented Jan 8, 2020

According to reference manual, it has 1 MB of flash and it's divided evenly into 4 kilobyte blocks. A total of 255 of them. Doing the full sector layout for that, is some 512 lines of that sector info, which quite frankly does not make sense. Any proposal for "doing it in a better way"? @0xc0170 @kjbracey-arm @madchutney

@0xc0170
Copy link
Contributor

0xc0170 commented Jan 8, 2020

If we treat it as one block, are there limitations (cross boundary access or similar) ?

@JanneKiiskila
Copy link
Contributor Author

JanneKiiskila commented Jan 8, 2020

If it's one block, likely passes this test but bootloader alignment/erase sector overlap checking (if it truly does something like that) will fail.

Janne Kiiskila added 2 commits January 8, 2020 21:54
Adding manually the sector sizes now. The reference manual states
these chips have a fairly nice memory map as sectors are evenly sized
and fairly small. Quote from reference manual;

"The Flash memory is organized as follows:
• A main memory block containing 256 pages of 4 KB, each page with eight rows of
512 bytes."

https://www.st.com/content/ccc/resource/technical/document/reference_manual/group0/83/cf/94/7a/35/a9/43/58/DM00318631/files/DM00318631.pdf/jcr:content/translations/en.DM00318631.pdf
- chapter 3.3.1 Flash memory organization
- internal flash starts at address 0x0800 0000
The size was still 16 megabytes, while in reality it is one megabyte.
Added the sectors, too (see previous commit msg for details).
@JanneKiiskila
Copy link
Contributor Author

JanneKiiskila commented Jan 8, 2020

Going with the senseless approach for now, I doubt we have any other quick solutions at hand now.
As this was manual work (in copy pasting the sector info, I did a Python script to generate them, but) - errors are likely to happen - so review carefully @ARMmbed/team-st-mcd .

@0xc0170
Copy link
Contributor

0xc0170 commented Jan 9, 2020

Started CI meanwhile

@JanneKiiskila
Copy link
Contributor Author

JanneKiiskila commented Jan 9, 2020

Looking at the index.json and some of the sector infos there, it seems quite a few have opted on doing a "we'll do just one erase sector" -approach. I.e. it would simplify these quite a lot, if we had a rule / semantics that if flash size is X bytes and the sectors only has one element and it's size is <X bytes then it's a repeat thing, i.e.. all remaining erase sectors are the same size as the 1st one.

For the more peculiar cases (like with STM32F4) we should map out the whole sector set, as the sizes change. In those the total combined sector sizes should equal the total flash size.

@mbed-ci
Copy link

mbed-ci commented Jan 9, 2020

Test run: SUCCESS

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

@0xc0170
Copy link
Contributor

0xc0170 commented Jan 9, 2020

@ARMmbed/team-st-mcd Please review, if approved, this will be ready for merge

@0xc0170 0xc0170 added the release-version: 6.0.0-alpha-1 First pre-release version of 6.0.0 label Jan 9, 2020
Copy link
Collaborator

@jeromecoutant jeromecoutant left a comment

Choose a reason for hiding this comment

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

Quick parsing script:

  • STM32WB55CCUx : core Cortex-M4F rom 262144 (256 KB) ( 0x40000) at 0x8000000 ram1 131072 (128 KB) ( 0x20000) at 0x20000000 sectors: (4 KB 0x8000000)
  • STM32WB55CEUx : core Cortex-M4F rom 524288 (512 KB) ( 0x80000) at 0x8000000 ram1 262144 (256 KB) ( 0x40000) at 0x20000000 sectors: (4 KB 0x8000000)
  • STM32WB55CGUx : core Cortex-M4F rom 1048576 (1.0 MB) ( 0x100000) at 0x8000000 ram1 262144 (256 KB) ( 0x40000) at 0x20000000 sectors: (4 KB 0x8000000)
  • STM32WB55RCVx : core Cortex-M4F rom 262144 (256 KB) ( 0x40000) at 0x8000000 ram1 131072 (128 KB) ( 0x20000) at 0x20000000 sectors: (4 KB 0x8000000)
  • STM32WB55REVx : core Cortex-M4F rom 524288 (512 KB) ( 0x80000) at 0x8000000 ram1 262144 (256 KB) ( 0x40000) at 0x20000000 sectors: (4 KB 0x8000000)
  • STM32WB55RGVx : core Cortex-M4F rom 1048576 (1.0 MB) ( 0x100000) at 0x8000000 ram1 262144 (256 KB) ( 0x40000) at 0x20000000 sectors: (4 KB 0x8000000)
  • STM32WB55VCYx : core Cortex-M4F rom 262144 (256 KB) ( 0x40000) at 0x8000000 ram1 131072 (128 KB) ( 0x20000) at 0x20000000 sectors: (4 KB 0x8000000)
  • STM32WB55VEYx : core Cortex-M4F rom 524288 (512 KB) ( 0x80000) at 0x8000000 ram1 262144 (256 KB) ( 0x40000) at 0x20000000 sectors: (4 KB 0x8000000)
  • STM32WB55VGYx : core Cortex-M4F rom 1048576 (1.0 MB) ( 0x100000) at 0x8000000 ram1 262144 (256 KB) ( 0x40000) at 0x20000000 sectors: (4 KB 0x8000000)

@0xc0170 0xc0170 merged commit dc63202 into ARMmbed:master Jan 9, 2020
@JanneKiiskila JanneKiiskila deleted the CMSIS-pack-STM32WB branch January 10, 2020 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-version: 6.0.0-alpha-1 First pre-release version of 6.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants