Skip to content

Fetch ram/rom start/size #8607

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 7 commits into from
Nov 22, 2018
Merged

Fetch ram/rom start/size #8607

merged 7 commits into from
Nov 22, 2018

Conversation

aashishc1988
Copy link
Contributor

@aashishc1988 aashishc1988 commented Oct 31, 2018

Description

Fetch rom/ram start/size information and create defines for the same.

Pull request type

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

@aashishc1988
Copy link
Contributor Author

Copy link
Contributor

@theotherjimmy theotherjimmy left a comment

Choose a reason for hiding this comment

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

Mostly formatting. A little use of private APIs outside their own class.

@aashishc1988
Copy link
Contributor Author

Changes added. @theotherjimmy @deepikabhavnani please review

Copy link
Contributor

@bridadan bridadan left a comment

Choose a reason for hiding this comment

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

Quite a few questions, a few suggested changes, but nothing scary 😄 good work!

@aashishc1988
Copy link
Contributor Author

@bridadan @theotherjimmy Made some more changes. Can you guys review again?

Copy link
Contributor

@theotherjimmy theotherjimmy left a comment

Choose a reason for hiding this comment

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

This is looking better. Further comments below.

I think that get_all_rom_regions and get_all_ram_regions look very similar. Could we de-deplicate this into a single helper function that takes in the differences?

@aashishc1988
Copy link
Contributor Author

Did some refactoring. Combined get_all_rom/ram regions function into one. Created a new function that gives the list of all available region for ram/rom, since this information is used at couple of places, it was better to put it one place than to duplicate.

Copy link
Contributor

@bridadan bridadan left a comment

Choose a reason for hiding this comment

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

Definitely looking better! Just echoing some of @theotherjimmy's comments.

@deepikabhavnani
Copy link

deepikabhavnani commented Nov 5, 2018

@aashishc1988 - I tried this PR for K64F to fetch RAM/ROM sizes and it looks RAM size is incorrect.

Steps to reproduce: mbed compile -m K64F -t GCC_ARM -v

As per the build log, defines passed are:
-DMBED_ROM_START=0x0 -DMBED_ROM_SIZE=0x100000 -DMBED_RAM_START=0x20000000 -**DMBED_RAM_SIZE=0x30000** -DMBED_RAM1_START=0x1fff0000 -DMBED_RAM1_SIZE=0x10000
As per CMSIS pack : "SRAM_UPPER": {"start": "0x20000000", "size": "0x020000"}}
Looks like DMBED_RAM_SIZE - is addition of SRAM_Upper and SRAM_lower sizes

Verified it again in /tools/arm_pack_manager/index.json and SRAM size is 0x30000 for MK64FN1M0xxx12

@aashishc1988
Copy link
Contributor Author

Adding in the suggested changes.

Copy link
Contributor

@bridadan bridadan left a comment

Choose a reason for hiding this comment

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

Nice work!

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 7, 2018

@deepikabhavnani Waiting for your review (you have one PR depending on this one), please review

Copy link

@deepikabhavnani deepikabhavnani left a comment

Choose a reason for hiding this comment

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

Please squash the commits and add commit message describing the change

@deepikabhavnani
Copy link

deepikabhavnani commented Nov 7, 2018

@0xc0170 - I have tested this PR with dependent PR for single target, so it should be good to go after appropriate commit messages are added

@cmonr - PR adds few defines to build steps, which can be verified by #8661. Can we add both of them in single CI test as 8661 is essentially a test for this PR

@mbed-ci
Copy link

mbed-ci commented Nov 16, 2018

Test run: FAILED

Summary: 4 of 7 test jobs failed
Build number : 25
Build artifacts
Build logs

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-ARM
  • jenkins-ci/mbed-os-ci_mbed2-build-GCC_ARM
  • jenkins-ci/mbed-os-ci_mbed2-build-ARM
  • jenkins-ci/mbed-os-ci_mbed2-build-IAR

@deepikabhavnani
Copy link

NRF error looks related to UART, seems I have seen this before and was resolved?

[1542407234.13][CONN][RXD] :144::FAIL: Expected 'passed' Was 'pased'

@deepikabhavnani
Copy link

Not able to find failures in jenkins-ci, logs and results say success.. :-(

@cmonr
Copy link
Contributor

cmonr commented Nov 17, 2018

Not able to find failures in jenkins-ci, logs and results say success.. :-(

NRF issue. Will restart in a bit.

Retriggered the pr-head job. Looks odd.

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 19, 2018

Info: This PR has been re-bundled into a new rollup PR (#8800).

No further work is needed here, as once that PR is merged, this PR will also be closed and marked as merged.
If any more commits are made in this PR, this PR will remain open and have to go through CI on its own.

@cmonr
Copy link
Contributor

cmonr commented Nov 22, 2018

Restarting CI.

@mbed-ci
Copy link

mbed-ci commented Nov 22, 2018

Test run: SUCCESS

Summary: 4 of 4 test jobs passed
Build number : 27
Build artifacts
Build logs

@0xc0170 0xc0170 merged commit 5b42e28 into ARMmbed:master Nov 22, 2018
@0xc0170 0xc0170 removed the rollup PR label Nov 22, 2018
deepikabhavnani pushed a commit to deepikabhavnani/mbed-os that referenced this pull request Nov 22, 2018
RAM/ROM sizes in tools were updated to report entire device size, and in M2351
they were used earlier to report secure/non-secure partition size.

M2351 files are updated to take full RAM/ROM device size and derive secure
and non-secure partition size based on that.
@cmonr cmonr removed the risk: G label Dec 11, 2018
theotherjimmy added a commit to theotherjimmy/mbed that referenced this pull request Dec 12, 2018
### Description

PR ARMmbed#8607 will cause problems for the NRF52832 and the NRF52840
in the online compiler starting with 5.10.2. This PR prevents this problem
by using a toggle in `targets.json` to enable these new defines for every
target except for the NRF52832 and NRF52840.

### Pull request type

    [x] Fix
    [ ] Refactor
    [ ] Target update
    [ ] Functionality change
    [ ] Docs update
    [ ] Test update
    [ ] Breaking change
adbridge pushed a commit that referenced this pull request Dec 13, 2018
### Description

PR #8607 will cause problems for the NRF52832 and the NRF52840
in the online compiler starting with 5.10.2. This PR prevents this problem
by using a toggle in `targets.json` to enable these new defines for every
target except for the NRF52832 and NRF52840.

### Pull request type

    [x] Fix
    [ ] Refactor
    [ ] Target update
    [ ] Functionality change
    [ ] Docs update
    [ ] Test update
    [ ] Breaking change
desmond-blue added a commit to desmond-blue/mbed-os that referenced this pull request Dec 13, 2018
    - Adjust memory for SoftDevice
    - Enable PRIO=5 for interrupt priority check
    - Change NRF_SD_BLE_API_VERSION to 6
    - Add handle and buffer for advertising and scanning
    - Remove guard for phy update
    - Change scatter files and mbed_lib.json for PR ARMmbed#8607
@TacoGrandeTX TacoGrandeTX mentioned this pull request Dec 18, 2018
paul-szczepanek-arm pushed a commit to paul-szczepanek-arm/mbed-os that referenced this pull request Mar 4, 2019
    - Adjust memory for SoftDevice
    - Enable PRIO=5 for interrupt priority check
    - Change NRF_SD_BLE_API_VERSION to 6
    - Add handle and buffer for advertising and scanning
    - Remove guard for phy update
    - Change scatter files and mbed_lib.json for PR ARMmbed#8607
j3hill pushed a commit to j3hill/mbed-os that referenced this pull request Apr 18, 2019
    - Adjust memory for SoftDevice
    - Enable PRIO=5 for interrupt priority check
    - Change NRF_SD_BLE_API_VERSION to 6
    - Add handle and buffer for advertising and scanning
    - Remove guard for phy update
    - Change scatter files and mbed_lib.json for PR ARMmbed#8607
desmond-blue added a commit to desmond-blue/mbed-os that referenced this pull request May 24, 2019
    - Adjust memory for SoftDevice
    - Enable PRIO=5 for interrupt priority check
    - Change NRF_SD_BLE_API_VERSION to 6
    - Add handle and buffer for advertising and scanning
    - Remove guard for phy update
    - Change scatter files and mbed_lib.json for PR ARMmbed#8607
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.