-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Copy memory regions and sectors from tools/arm_pack_manager/index.json to targets.json (On hold) #14975
Conversation
@rajkan01, thank you for your changes. |
This pull request has automatically been marked as stale because it has had no recent activity. @ARMmbed/mbed-os-maintainers, please complete review of the changes to move the PR forward. Thank you for your contributions. |
@@ -1689,7 +1787,11 @@ | |||
"SERIAL_ASYNCH", | |||
"FLASH", | |||
"MPU" | |||
] | |||
], | |||
"mbed_rom_start": "0x8000000", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which device in index.json did these come from?
Should we add a "device_name": "somedevice"
entry here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MCU_STM32xxxx represents a "family" of devices with RAM and ROM common values.
But you can't define a specific device_name here, this has to be defined in the board target.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
device_name: STM32F303RETx
and target NUCLEO_F303RE
& device name : STM32F303ZETx
and target NUCLEO_F303ZE
.
Both device_name has similar memory configuration and both targets inherited from MCU_STM32F303xE
@@ -1834,7 +1946,11 @@ | |||
], | |||
"extra_labels_add": [ | |||
"STM32F411xE" | |||
] | |||
], | |||
"mbed_rom_start": "0x8000000", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which device in index.json are these from? Should we add "device_name"
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Targets: NUCLEO_F411RE
, MTS_DRAGONFLY_F411RE
, MTS_MDOT_F411RE
has from the same device_name: STM32F411RETx
and all targets are inherited from MCU_STM32F411xE
family device
@@ -1906,7 +2022,11 @@ | |||
"device_has_add": [ | |||
"CAN", | |||
"TRNG" | |||
] | |||
], | |||
"mbed_rom_start": "0x8000000", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which device in index.json are these from? Should we add "device_name"
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Targets: NUCLEO_F412ZG
, WIO_EMW3166
has the same device_name: STM32F412ZGTx
and all targets are inherited from MCU_STM32F412xG
family
"mbed_rom_start": "0x8000000", | ||
"mbed_rom_size": "0x100000", | ||
"mbed_ram_start": "0x20000000", | ||
"mbed_ram_size": "0x40000" | ||
}, | ||
"NUCLEO_F412ZG": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add rom and ram entries for the NUCLEO_F412ZG target directly? I see it inherits from MCU_STM32F412xG to get these, but we are putting "device_name"
here, not under MCU_STM32F412xG
. Shouldn't we keep "device_name"
entries next to the mbed_rom_*
and mbed_ram_*
entries to make it easy to verify which device the values came from in index.json
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is better to keep memory info in the device family instead of duplicating the same configuration.
And In this case Targets: NUCLEO_F412ZG
, WIO_EMW3166
has the same device_name: STM32F412ZGTx
and both targets are derived from the same MCU_STM32F412xG
family
@@ -7601,6 +8028,8 @@ | |||
"CYBSP_WIFI_CAPABLE" | |||
], | |||
"device_name": "CY8C6247BZI-D54", | |||
"mbed_rom_start": "0x10000000", | |||
"mbed_rom_size": "0x100000", | |||
"mbed_ram_start": "0x08002000", | |||
"mbed_ram_size": "0x00045800", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these RAM values correct? They seem to have similar issues to the CY8C624ABZI-D44
issues.
@@ -7642,6 +8071,8 @@ | |||
"PSOC6" | |||
], | |||
"device_name": "CY8C6347BZI-BLD53", | |||
"mbed_rom_start": "0x10000000", | |||
"mbed_rom_size": "0x100000", | |||
"mbed_ram_start": "0x08002000", | |||
"mbed_ram_size": "0x00045800", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these RAM values correct? They seem to have similar issues to the CY8C624ABZI-D44
issues.
@@ -7686,6 +8117,8 @@ | |||
"CYBSP_WIFI_CAPABLE" | |||
], | |||
"device_name": "CY8C6247BZI-D54", | |||
"mbed_rom_start": "0x10000000", | |||
"mbed_rom_size": "0x100000", | |||
"mbed_ram_start": "0x08002000", | |||
"mbed_ram_size": "0x00045800", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these RAM values correct? They seem to have similar issues to the CY8C624ABZI-D44
issues.
@@ -7741,6 +8174,8 @@ | |||
"CYBSP_WIFI_CAPABLE" | |||
], | |||
"device_name": "CY8C6247FDI-D52", | |||
"mbed_rom_start": "0x10000000", | |||
"mbed_rom_size": "0x100000", | |||
"mbed_ram_start": "0x08002000", | |||
"mbed_ram_size": "0x00045800", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these RAM values correct? They seem to have similar issues to the CY8C624ABZI-D44
issues.
65536, | ||
32768 | ||
] | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is this change tested in CI? What tests would fail in our CI if we got these sector values incorrect?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I am not wrong, currently, we don't have any test available to test the sector values.
I'm curious to know which greentea tests require adding this sectors and ram_start stuff. Could you add that in the commit message as part of the "why" behind these changes? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a big change, please don't merge it just before a new release version...
You could also remove arm_pack_manager/index.json to validate the changes...?
"mbed_ram_size": "0x40000", | ||
"sectors" : [ | ||
[ 134217728, 4096 ], | ||
[ 134221824, 4096 ], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only 1 line is needed ?
This pull request has automatically been marked as stale because it has had no recent activity. @rajkan01, please carry out any necessary work to get the changes merged. Thank you for your contributions. |
Previously mbed CLI1 parses index.json to get the memory information as going further with CLI2 like to get mem info from target.json as part of targets configuration, so this PR changes copy all memory regions into targets JSON and retain the existing mem info in index.json until CLI1 deprecate
Previously mbed CLI1 parses index.json to get the sector information for a target which has "bootloader_supported" with "true" in targets configuration in targets.json as going further with CLI2 like to get sectors info from target.json as part of targets configuration, so this PR changes copy sectors info into targets JSON and retain the existing sectors info in index.json until CLI1 deprecate
f99b803
to
9ceccca
Compare
Pull request has been modified.
Removing index.json file will break the export feature which is well appreciated by customers |
When we copy the mbed_rom_size, mbed_ram_size configs from index.json to targets.json causes the build failure for non-bootloader supported targets as MBED CLI1 expects that if any of the mem (ROM, RAM) configs are present in targets.json should have bootloader support, so putting these PR changes on hold until MBED CLI1 is deprecated. Meanwhile introducing new rom-size and ram-size using config in targets.json to generate MBED_CONF_TARGET_ROM_SIZE and MBED_CONF_TARGET_RAM_SIZE macros by Mbed CLI1 and Mbed CLI2 which can be used in the greentea test. |
This PR cannot be merged due to conflicts. Please rebase to resolve them. |
We are closing this pull request due to inactivity |
Summary of changes
fixes ARMmbed/mbed-tools#271
Previously Mbed CLI1 parses index.json to get the memory information and sectors information for a target which has
bootloader_supported
withtrue
in targets configuration intargets.json
as going further with CLI2 like to get mem and sectors info from target.json as part of targets configuration, so this PR changes copy mem regions and sectors info into targets JSON and retain the existing mem and sectors info in index.json until CLI1 is deprecatedImpact of changes
None.
Migration actions required
As going further new targets gets added or existing targets have to add/update mem and sectors info in targets.json instead of index.json
Documentation
None.
Pull request type
Test results
Reviewers