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

STM32L4xx: IAR memory maps updated #10303

Merged
merged 1 commit into from Apr 29, 2019

Conversation

Projects
None yet
6 participants
@juhoeskeli
Copy link
Contributor

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 ARMmbed/mbed-os-maintainers Apr 3, 2019

@ciarmcom

This comment has been minimized.

Copy link
Member

commented Apr 3, 2019

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

@0xc0170 0xc0170 requested a review from ARMmbed/team-st-mcd Apr 3, 2019

@0xc0170

This comment has been minimized.

Copy link
Member

commented Apr 11, 2019

@ARMmbed/team-st-mcd Please review

@jeromecoutant
Copy link
Contributor

left a comment

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 ?

@0xc0170 0xc0170 added needs: work and removed needs: review labels Apr 12, 2019

@juhoeskeli

This comment has been minimized.

Copy link
Contributor Author

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Contributor Author

commented Apr 23, 2019

@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

This comment has been minimized.

Copy link
Contributor

commented Apr 26, 2019

ci started

@adbridge

This comment has been minimized.

Copy link
Contributor

commented Apr 29, 2019

ci restarted

@mbed-ci

This comment has been minimized.

Copy link

commented Apr 29, 2019

Test run: SUCCESS

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

@0xc0170 0xc0170 merged commit 2cd7aa1 into ARMmbed:master Apr 29, 2019

26 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci/build-ARM Success
Details
jenkins-ci/build-GCC_ARM Success
Details
jenkins-ci/build-IAR Success
Details
jenkins-ci/cloud-client-test Success
Details
jenkins-ci/dynamic-memory-usage Success
Details
jenkins-ci/exporter Success
Details
jenkins-ci/greentea-test Success
Details
jenkins-ci/mbed2-build-ARM Success
Details
jenkins-ci/mbed2-build-GCC_ARM Success
Details
jenkins-ci/mbed2-build-IAR Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Success!
Details
travis-ci/docs Success!
Details
travis-ci/doxy-spellcheck Success!
Details
travis-ci/events Success! Runtime is 8651 cycles.
Details
travis-ci/gitattributestest Success!
Details
travis-ci/include_check Success!
Details
travis-ci/licence_check Success!
Details
travis-ci/littlefs Success! Code size is 8448B.
Details
travis-ci/psa-autogen Success!
Details
travis-ci/tools-py2.7 Success!
Details
travis-ci/tools-py3.5 Success!
Details
travis-ci/tools-py3.6 Success!
Details
travis-ci/tools-py3.7 Success!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.