Skip to content

STM32L4xx: IAR memory maps updated #10303

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

Merged
merged 1 commit into from
Apr 29, 2019
Merged

STM32L4xx: IAR memory maps updated #10303

merged 1 commit into from
Apr 29, 2019

Conversation

juhoeskeli
Copy link
Contributor

@juhoeskeli juhoeskeli commented Apr 3, 2019

Description

Fully utilize target RAM when using IAR. Tested with mbed-os-example-cellular (MTB_ADV_WISE_1570 - L486, MTB_STM_L475).

CSTACK is placed in 32kB RAM. Then the symbols start filling from there and continue to 96kB RAM. Heap placement is left to linker (placed last in my tests) and will grow to take up the rest of the space available.

The change can be even simpler if we don't care where CSTACK ends up. Without specifically allocating it in my tests it goes before the heap.

Pull request type

[ ] Fix
[ ] Refactor
[X] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

Release Notes

@ciarmcom ciarmcom requested a review from a team April 3, 2019 13:00
@ciarmcom
Copy link
Member

ciarmcom commented Apr 3, 2019

@juhoeskeli, thank you for your changes.
@ARMmbed/mbed-os-maintainers please review.

@0xc0170 0xc0170 requested a review from a team April 3, 2019 14:26
@0xc0170
Copy link
Contributor

0xc0170 commented Apr 11, 2019

@ARMmbed/team-st-mcd Please review

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.

My issue is still the same...
I would expect that tool chain files for these 3 targets:

  • TARGET_STM32L475xG
  • TARGET_STM32L476xG
  • TARGET_STM32L486xG
    are the same (except RAM and ROM values of course)

And maybe this PR is not compatible with all the works that @deepikabhavnani is doing n other PR ?

@juhoeskeli
Copy link
Contributor Author

juhoeskeli commented Apr 15, 2019

@jeromecoutant I tried @deepikabhavnani PR for this target and the allocation made by that change is such that the 32kB RAM is left unused (this happens due to forced ordering of regions). The changes I present here have been adapted from her work and utilize all of the RAM which I believe was her intention as well. Let's wait for @deepikabhavnani to comment.

If the only thing blocking is the need to support those two targets you mention, I can add those as well.

@mbed-ci
Copy link

mbed-ci commented Apr 17, 2019

Test run: FAILED

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

Failed test jobs:

  • jenkins-ci/mbed-os-ci_greentea-test

@juhoeskeli
Copy link
Contributor Author

@jeromecoutant please take a look. I added those two targets you requested. I was not able to run the code on L476 as I don't have that. For all three the map file looked good and RAM was utilized as expected. Also, it was OK for @deepikabhavnani to proceed with this PR.

A sample of the map file:

"P2":                                            0x400
  CSTACK                          0x1000'0188    0x400  <Block>
    CSTACK               uninit   0x1000'0188    0x400  <Block tail>
                                - 0x1000'0588    0x400

"P3", part 1 of 4:                               0x7b9
  P3 s0                           0x1000'058c    0x7b9  <Init block>
    .data                inited   0x1000'058c    0x334  mbed_retarget.o [160]
    .data                inited   0x1000'08c0     0xec  main.o [1]
    .data.os             inited   0x1000'09ac     0xa4  rtx_kernel.o [168]
...
"P3", part 2 of 4:                              0x511c
  .bss                   zero     0x1000'0d48   0x1058  mbed_rtos_rtx.o [164]
  .bss                   zero     0x1000'1da0    0xbe4  lwip_memp.o [51]
  .ethusbram             zero     0x1000'2984    0x91c  lwip_sys_arch.o [49]
  .bss                   zero     0x1000'32a0    0x394  QUECTEL_UG96_MCB.o [2]
  .bss                   zero     0x1000'3634    0x344  lwip_memp.o [51]
...
"P3", part 3 of 4:                                 0x4
  __iar_tls$$DATA                 0x1000'5e60      0x4  <Block>
    .tbss                         0x1000'5e60      0x4  <Block>
      .tbss              zero     0x1000'5e60      0x4  errno.o [186]
                                - 0x1000'5e64      0x4

"P3", part 4 of 4:                             0x17f00
  HEAP                            0x2000'0100  0x17f00  <Block>
    HEAP                 uninit   0x2000'0100  0x17f00  <Block tail>
                                - 0x2001'8000  0x17f00

@juhoeskeli juhoeskeli changed the title STM32L486xG: IAR memory map updated STM32L4xx: IAR memory maps updated Apr 23, 2019
@adbridge
Copy link
Contributor

ci started

@adbridge
Copy link
Contributor

ci restarted

@mbed-ci
Copy link

mbed-ci commented Apr 29, 2019

Test run: SUCCESS

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

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.

6 participants