Skip to content

Add guide for serial flashing #47

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

Conversation

DarinelSanguino
Copy link
Contributor

Added section 'Flashing tool' indicating how to select flashing tool.
Added section "Serial port" instructing to set FLASHING_SERIAL_PORT variable in case stm32flash is used.

Copy link
Contributor

@ThomasGravekamp ThomasGravekamp left a comment

Choose a reason for hiding this comment

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

Looks good, apart from those two smaller issues.

@@ -14,6 +14,19 @@ Before flashing code on your device, there are some things to be checked first.

Each template contains a make file located at the root of the template and is called `Makefile`. This make file contains a variable called `DEVICE`. This variable should contain the name of the device you want to compile your code for. You should format the name of your device like this: `STM32____x_`, where the "_" should be replaced by characters from the actual name (uppercase!) and the "x" is fixed. There are some exceptions to this naming scheme for STM32F4 devices, see the [Device name mapping page]({{ site.url }}/cheatsheets/device-name-mapping) for more information.

### Flashing tool

There are differennt interfaces (serial, I2C, SPI, SWD, etc.) and programs you can use to flash code to your device. Make sure to set the `FLASHING_TOOL` variable in your makefile to the name of your flashing tool. Currently the project has two options available:
Copy link
Contributor

Choose a reason for hiding this comment

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

Spelling error in here "There are differennt interfaces"

A user does not have to "make sure to set the FLASHING_TOOL variable". This variable only applies when you want to use the non default stm32flash tool. So you could actually make this whole text simpler by removing that sentence and...

- [st-flash](https://github.com/stlink-org/stlink) uses SWD interface. (default)
- [stm32flash](https://github.com/stm32duino/stm32flash) uses serial interface.

### Serial port
Copy link
Contributor

Choose a reason for hiding this comment

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

... remove this header and explain briefly how to use stm32flash with the STM32-base project:

"If you want to use stm32flash, set the FLASHING_TOOL variable in your makefile with the value stm32flash. Make sure to also set the FLASHING_SERIAL_PORT variable to the name of the serial port you want to use."

@DarinelSanguino DarinelSanguino force-pushed the add-guide-for-serial-flashing branch from 003b011 to eef8190 Compare November 24, 2022 03:15
@ThomasGravekamp ThomasGravekamp merged commit 9f6b21f into STM32-base:master Dec 2, 2022
@ThomasGravekamp
Copy link
Contributor

Thanks for also updating the docs

@DarinelSanguino DarinelSanguino deleted the add-guide-for-serial-flashing branch December 5, 2022 01:37
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

Successfully merging this pull request may close these issues.

2 participants