Skip to content

Conversation

hug-dev
Copy link
Contributor

@hug-dev hug-dev commented Jan 15, 2018

To allow to write .elf file path in the test_spec.json file, this patch
keeps the same extension when copying mbed.extension file onto the MPS2
board.

Signed-off-by: Hugues de Valon [email protected]

To allow to write .elf file path in the test_spec.json file, this patch
keeps the same extension when copying mbed.extension file onto the MPS2
board.

Signed-off-by: Hugues de Valon <[email protected]>
@coveralls
Copy link

coveralls commented Jan 15, 2018

Coverage Status

Coverage increased (+1.4%) to 47.146% when pulling cb7de51 on hug-dev:mps2_elf_files into 9648fd7 on ARMmbed:master.

@ashok-rao
Copy link

@bridadan @theotherjimmy .. bump!

@theotherjimmy
Copy link
Contributor

That looks like someone made an assumption that turned out to be invalid. @ashok-rao Could you write a unit test for this? (You're welcome to say "no")

@hug-dev
Copy link
Contributor Author

hug-dev commented Jan 29, 2018

I think that the name of the function and its comment say that the file will always be copied as mbed.bin, see below:

     def mps2_bin_copy(self, image_path, destination_disk):
         """! mps2 copy method for "mbed enabled" devices.
            this copies the binary always as mbed.bin

I am going to update those as well to reflect the good behaviour and add a unit test.

@theotherjimmy
Copy link
Contributor

Thanks @hug-dev ! If you would like any help with that unit test please ask!

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.

Looks great, good catch

Also changes copy function name to be more generic.

Signed-off-by: Hugues de Valon <[email protected]>
@theotherjimmy
Copy link
Contributor

Coveralls numbers look good. @bridadan Does the test look okay to you?

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.

Looks great!

@theotherjimmy theotherjimmy merged commit 935967a into ARMmbed:master Feb 1, 2018
hug-dev added a commit to hug-dev/mbed-os that referenced this pull request Feb 16, 2018
This patch changes the linker files and defines to use the ZBT SSRAM
instead of the FPGA Block RAM for code and data.
The section 4.1.1, Code and RAM memory map, of the CM3DS Eval RTL and
testbench user guide explains the available memories.
This switch improves code memory from 256 kB to 4 MB and data memory
from 128 kB to 4 MB.

However, the ZBT SSRAM1 for code memory begins at 0x00400000 while the
processor can only boot at address 0x00000000 which means that it
expects the vector table to be at that address. That is why we have to
create 2 load regions in the linker scripts: one with only the vector
table at address 0x0 and one with code + data at address 0x00400000.
Because of these two load regions, linker will produce different
behaviours:
    * GCC_ARM and IAR will only create 1 binary with both load regions
padding with 0 in between. The binary will then be very large (at least
4 MB) and the flash process will take longer.
    * ARM and ARMC6 will create 2 binaries for the two load regions. The
load addresses of the two binaries can be written in the images.txt file
on the MPS2 board. You can also use the --bincombined option of fromelf
utility to produce only 1 large binary.

This patch also adds the memory_zones.h file to try to put in common all
the memory addresses that were previously hard coded in the linker
scripts / startup files.

With that patch in, the simplest option is to directly use the .elf file
with the MPS2, which is only possible with mbb_v225.ebf and more recent
firmwares.

Because greentea does not support .elf file out of the box, a script
that changes the test_spec.json file to replace test binary path
extension from .bin to .elf has been added.
This allows to use ELF greentea test binaries for CM3DS on MPS2+.
It is made to work with the now merged pull request
ARMmbed/htrun#181 in order to copy .elf file to the MPS2 board.

Signed-off-by: Hugues de Valon <[email protected]>
hug-dev added a commit to hug-dev/mbed-os that referenced this pull request Mar 12, 2018
This patch changes the linker files and defines to use the ZBT SSRAM
instead of the FPGA Block RAM for code and data.
The section 4.1.1, Code and RAM memory map, of the CM3DS Eval RTL and
testbench user guide explains the available memories.
This switch improves code memory from 256 kB to 4 MB and data memory
from 128 kB to 4 MB.

However, the ZBT SSRAM1 for code memory begins at 0x00400000 while the
processor can only boot at address 0x00000000 which means that it
expects the vector table to be at that address. That is why we have to
create 2 load regions in the linker scripts: one with only the vector
table at address 0x0 and one with code + data at address 0x00400000.
Because of these two load regions, linker will produce different
behaviours:
    * GCC_ARM and IAR will only create 1 binary with both load regions
padding with 0 in between. The binary will then be very large (at least
4 MB) and the flash process will take longer.
    * ARM and ARMC6 will create 2 binaries for the two load regions. The
load addresses of the two binaries can be written in the images.txt file
on the MPS2 board. You can also use the --bincombined option of fromelf
utility to produce only 1 large binary.

This patch also adds the memory_zones.h file to try to put in common all
the memory addresses that were previously hard coded in the linker
scripts / startup files.

With that patch in, the simplest option is to directly use the .elf file
with the MPS2, which is only possible with mbb_v225.ebf and more recent
firmwares. It will now be the default for CM3DS.

This commit works with greentea thanks to the now merged pull request
ARMmbed/htrun#181 in order to copy .elf file to the MPS2 board.

Signed-off-by: Hugues de Valon <[email protected]>
adbridge pushed a commit to ARMmbed/mbed-os that referenced this pull request Mar 26, 2018
This patch changes the linker files and defines to use the ZBT SSRAM
instead of the FPGA Block RAM for code and data.
The section 4.1.1, Code and RAM memory map, of the CM3DS Eval RTL and
testbench user guide explains the available memories.
This switch improves code memory from 256 kB to 4 MB and data memory
from 128 kB to 4 MB.

However, the ZBT SSRAM1 for code memory begins at 0x00400000 while the
processor can only boot at address 0x00000000 which means that it
expects the vector table to be at that address. That is why we have to
create 2 load regions in the linker scripts: one with only the vector
table at address 0x0 and one with code + data at address 0x00400000.
Because of these two load regions, linker will produce different
behaviours:
    * GCC_ARM and IAR will only create 1 binary with both load regions
padding with 0 in between. The binary will then be very large (at least
4 MB) and the flash process will take longer.
    * ARM and ARMC6 will create 2 binaries for the two load regions. The
load addresses of the two binaries can be written in the images.txt file
on the MPS2 board. You can also use the --bincombined option of fromelf
utility to produce only 1 large binary.

This patch also adds the memory_zones.h file to try to put in common all
the memory addresses that were previously hard coded in the linker
scripts / startup files.

With that patch in, the simplest option is to directly use the .elf file
with the MPS2, which is only possible with mbb_v225.ebf and more recent
firmwares. It will now be the default for CM3DS.

This commit works with greentea thanks to the now merged pull request
ARMmbed/htrun#181 in order to copy .elf file to the MPS2 board.

Signed-off-by: Hugues de Valon <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants