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

Wrong MBED_ROM_START adress for Portenta H7 #15253

Closed
Flydroid opened this issue Mar 23, 2022 · 7 comments
Closed

Wrong MBED_ROM_START adress for Portenta H7 #15253

Flydroid opened this issue Mar 23, 2022 · 7 comments

Comments

@Flydroid
Copy link

Flydroid commented Mar 23, 2022

Description of defect

Compiling code for the Portenta H7 with the Arduino bootloader expects the code to start at mbed_rom_start=0x08040000.
The current targets.json this value is set to 0x08000000

"mbed_rom_start": "0x08000000",

Target(s) affected by this defect ?

Portenta H7 M7

Toolchain(s) (name and version) displaying this defect ?

gccarmnoneeabi@1.50401.211104
through platformio

What version of Mbed-os are you using (tag or sha) ?

mbed-os 6.9.0
"bare-metal" profile

What version(s) of tools are you using. List all that apply (E.g. mbed-cli)

Platformio
platformio-stm32 @ 15.2.0
framework-mbed @ 6.60900.210318 (6.9.0)

How is this defect reproduced ?

flashing the blinky script will not run without mbed_rom_start=0x08040000 changed in target.json in the framework-mbed folder in platformio/packages
(i think there is an mbed_app.json overwrite which can be used instead of editing target.json but It went under in today's debugging)

@mbedmain
Copy link

@Flydroid thank you for raising this issue.Please take a look at the following comments:

What toolchain(s) are you using?

NOTE: If there are fields which are not applicable then please just add 'n/a' or 'None'. This indicates to us that at least all the fields have been considered.
Please update the issue header with the missing information.

@Flydroid
Copy link
Author

Flydroid commented Mar 23, 2022

@mbedmain I have updated the issue description

This article got me on the right lead https://link.medium.com/nWas4OpNDob

@jeromecoutant
Copy link
Collaborator

@facchinm

@facchinm
Copy link
Contributor

Hi @Flydroid ,
we decided to keep the "project" start at the beginning of the flash for the following use cases:

  • users that don't need a bootloader
  • users that want to write a bootloader

Changing that filed in your own mbed_app.json is trivial https://github.com/arduino/ArduinoCore-mbed/blob/master/variants/PORTENTA_H7_M7/conf/mbed_app.json#L17 so I think that right way to handle this is by writing some better documentation 😉
@sebromero

@Flydroid
Copy link
Author

Alright, the mbed_app.json config works!
Better documentation is always appriciated!

I will also open an issue with platformio so the mbed framework gets added to the portenta H7.

@sebromero
Copy link

@facchinm @Flydroid we have a small piece of documentation on this here: https://docs.arduino.cc/tutorials/portenta-h7/por-ard-bl#memory-layout
Does that work or do you think we need to add more information?

@sebromero
Copy link

@facchinm @Flydroid I added the information about where to adjust the start address here: arduino/docs-content#119

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants