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

Make dfu-util flash to the offset set by modm:platform:cortex-m:linkerscript.flash_offset #1163

Merged
merged 2 commits into from
May 14, 2024

Conversation

el-han
Copy link
Contributor

@el-han el-han commented May 14, 2024

Today I started playing around with my Arduino Portenta H7 board. It has a (yet unsupported) dual core STM32H7 and a bootloader. When trying to set the flash offset with modm:platform:cortex-m:linkerscript.flash_offset I noted that the dfu scripts always flash to 0x08000000.

This is my proposal to support dfu with flash offsets. I have tested it with the Portenta H7 board using scons and make. CMake currently does not support dfu-util as a programming tool, right?

I have also verified that make and scons still work and dfu-util flashes to 0x08000000 when modm:platform:cortex-m:linkerscript.flash_offset is not specified.

I'm looking forward to add support for the STM32H747 soon, at least for the Cortex M7 core.

Copy link
Member

@salkinium salkinium left a comment

Choose a reason for hiding this comment

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

Yes, thanks! (just some small cosmetic changes)

CMake currently does not support dfu-util as a programming tool, right?

No, but if you need it, you can add it. There's no technical reason not to.

tools/build_script_generator/cmake/module.lb Outdated Show resolved Hide resolved
tools/build_script_generator/make/module.lb Outdated Show resolved Hide resolved
tools/build_script_generator/scons/module.lb Outdated Show resolved Hide resolved
@salkinium
Copy link
Member

There is already a PR for dual core devices: #844, I'm also fixing the atomics support, which we will need for a multi-core message queue (plus MPU support to disable caching).

@el-han
Copy link
Contributor Author

el-han commented May 14, 2024

CMake currently does not support dfu-util as a programming tool, right?

No, but if you need it, you can add it. There's no technical reason not to.

No, I just wondered if I need to port the flash offset to CMake, too.

@el-han
Copy link
Contributor Author

el-han commented May 14, 2024

There is already a PR for dual core devices: #844, I'm also fixing the atomics support, which we will need for a multi-core message queue (plus MPU support to disable caching).

Thanks for the pointer! This looks like a good start for me.

@salkinium salkinium merged commit 19bfa81 into modm-io:develop May 14, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

2 participants