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

feat: add offset option to stm32CubeProg upload method #1993

Merged
merged 4 commits into from
Apr 5, 2023

Conversation

fpistm
Copy link
Member

@fpistm fpistm commented Apr 4, 2023

Linked to stm32duino/Arduino_Tools#90

Thanks this PR, it is now possible to flash at specific offset using STM32CubeProgrammer upload method.
Then start at the specified address.

Using boards.local.txt feature:
https://arduino.github.io/arduino-cli/latest/platform-specification/#boardslocaltxt

For example to flash at 0x08002000 the Generic STM32F103C8T, define the offset like this:
GenF1.menu.pnum.GENERIC_F103C8TX.build.flash_offset=0x2000

Then,

stm32CubeProg.sh 0 Blink.ino.bin 0x2000 -g
      -------------------------------------------------------------------
                       STM32CubeProgrammer v2.13.0                  
      -------------------------------------------------------------------

ST-LINK SN  : 0023003E3137510539383538
ST-LINK FW  : V3J10M3B5S1
Board       : STLINK-V3SET
Voltage     : 0.00V
SWD freq    : 8000 KHz
Connect mode: Under Reset
Reset mode  : Hardware reset
Device ID   : 0x410
Revision ID : Rev X
Device name : STM32F101/F102/F103 Medium-density
Flash size  : 64 KBytes
Device type : MCU
Device CPU  : Cortex-M3
BL Version  : --



Memory Programming ...
Opening and parsing file: Blink.ino.bin
  File          : Blink.ino.bin
  Size          : 23.30 KB 
  Address       : 0x08002000 


Erasing memory corresponding to segment 0:
Erasing internal memory sectors [8 31]
Download in Progress:


File download complete
Time elapsed during download operation: 00:00:01.408

RUNNING Program ... 
  Address:      : 0x8002000
Application is running, Please Hold on...
Start operation achieved successfully

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
@fpistm fpistm added this to the 2.6.0 milestone Apr 4, 2023
@fpistm fpistm added this to In progress in STM32 core based on ST HAL via automation Apr 4, 2023
@fpistm fpistm changed the title feat(stm32CubeProg): add offset option feat: add offset option to stm32CubeProg upload method Apr 4, 2023
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
start at specified address option added by default to
the script.

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
@fpistm fpistm merged commit 3ac4049 into stm32duino:main Apr 5, 2023
21 checks passed
STM32 core based on ST HAL automation moved this from In progress to Done Apr 5, 2023
@fpistm fpistm deleted the upload_offset branch April 5, 2023 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

None yet

1 participant