Skip to content

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

Merged
salkinium merged 2 commits into
modm-io:developfrom
el-han:fix/dfu-flash-offset
May 14, 2024
Merged

Make dfu-util flash to the offset set by modm:platform:cortex-m:linkerscript.flash_offset#1163
salkinium merged 2 commits into
modm-io:developfrom
el-han:fix/dfu-flash-offset

Conversation

@el-han

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

Copy link
Copy Markdown
Contributor

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.

@salkinium salkinium left a comment

Copy link
Copy Markdown
Member

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.

Comment thread tools/build_script_generator/cmake/module.lb Outdated
Comment thread tools/build_script_generator/make/module.lb Outdated
Comment thread tools/build_script_generator/scons/module.lb Outdated
@salkinium

Copy link
Copy Markdown
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

el-han commented May 14, 2024

Copy link
Copy Markdown
Contributor Author

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

el-han commented May 14, 2024

Copy link
Copy Markdown
Contributor Author

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
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.

2 participants