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

How to Call Flash with JLink or STLink in CMake? #4

Open
breakersun opened this issue Jun 29, 2023 · 0 comments
Open

How to Call Flash with JLink or STLink in CMake? #4

breakersun opened this issue Jun 29, 2023 · 0 comments

Comments

@breakersun
Copy link

Found the flash-st and flash-jlink target in makefile are quite handy for daily jobs.

stm32/Makefile

Lines 55 to 67 in 79d6508

flash-st: build
st-flash --reset write $(FIRMWARE) 0x08000000
$(BUILD_DIR)/jlink-script:
touch $@
@echo device $(DEVICE) > $@
@echo si 1 >> $@
@echo speed 4000 >> $@
@echo loadfile $(FIRMWARE),0x08000000 >> $@
@echo -e "r\ng\nqc" >> $@
flash-jlink: build | $(BUILD_DIR)/jlink-script
JLinkExe -commanderScript $(BUILD_DIR)/jlink-script

So I was wondering, how can we achieve the same thing in CMake process?

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

No branches or pull requests

1 participant