Skip to content

Commit

Permalink
docs: fix some typos, relative path
Browse files Browse the repository at this point in the history
- fix some typos and formating stuff
- flash_can.py uses as the only command absolute paths,
    switch to relative paths for klippers docs.
- use apt instead of apt-get for interactive instructions

Signed-off-by: Joshua Schlicker <[email protected]>
  • Loading branch information
docgalaxyblock committed Mar 6, 2024
1 parent ca775cd commit 17d1b14
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 29 deletions.
10 changes: 4 additions & 6 deletions docs/Bootloader_Entry.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Entering bootloader on <DEVICE>
```

Where `<DEVICE>` is your serial device, such as
`/dev/serial.by-id/usb-Klipper[...]` or `/dev/ttyACM0`
`/dev/serial/by-id/usb-Klipper[...]` or `/dev/ttyACM0`

Note that if this fails, no output will be printed, success is indicated by
printing `Entering bootloader on <DEVICE>`.
Expand All @@ -34,7 +34,7 @@ picocom -b 1200 <DEVICE>
```

Where `<DEVICE>` is your serial device, such as
`/dev/serial.by-id/usb-Klipper[...]` or `/dev/ttyACM0`
`/dev/serial/by-id/usb-Klipper[...]` or `/dev/ttyACM0`

`<Ctrl-A><Ctrl-P>` means
holding `Ctrl`, pressing and releasing `a`, pressing and releasing `p`, then
Expand All @@ -48,8 +48,7 @@ is being used to connect to it), sending the string

`<SPACE>` is an ASCII literal space, 0x20.

`<FS>` is the ASCII File Separator,
0x1c.
`<FS>` is the ASCII File Separator, 0x1c.

Note that this is not a valid message as per the
[MCU Protocol](Protocol.md#micro-controller-interface), but sync characters(`~`)
Expand All @@ -69,8 +68,7 @@ echo $'~ \x1c Request Serial Bootloader!! ~' >> /dev/<DEVICE>
Where `<DEVICE>` is your serial port, such as `/dev/ttyS0`, or
`/dev/serial/by-id/gpio-serial2`, and

`<BAUD>` is the baud rate of the serial
port, such as `115200`.
`<BAUD>` is the baud rate of the serial port, such as `115200`.

### CANBUS

Expand Down
33 changes: 16 additions & 17 deletions docs/Bootloaders.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,8 @@ the following chip config:
source [find target/atsame5x.cfg]
```
Obtain a bootloader - several bootloaders are available from
[https://github.com/adafruit/uf2-samdx1/releases/latest](https://github.com/adafruit/uf2-samdx1/releases/latest). For example:
[https://github.com/adafruit/uf2-samdx1/releases/latest](https://github.com/adafruit/uf2-samdx1/releases/latest).
For example:
```
wget 'https://github.com/adafruit/uf2-samdx1/releases/download/v3.7.0/bootloader-itsybitsy_m4-v3.7.0.bin'
```
Expand Down Expand Up @@ -344,9 +345,8 @@ while it is running). Alternatively, set the "boot 0" pin to low and
### STM32F103 with HID bootloader

The [HID bootloader](https://github.com/Serasidis/STM32_HID_Bootloader) is a
compact, driverless bootloader capable of flashing over USB. Also available
is a [fork with builds specific to the SKR Mini E3 1.2](
https://github.com/Arksine/STM32_HID_Bootloader/releases/latest).
compact, driverless bootloader capable of flashing over USB. Also available is a
[fork with builds specific to the SKR Mini E3 1.2](https://github.com/Arksine/STM32_HID_Bootloader/releases/latest).

For generic STM32F103 boards such as the blue pill it is possible to flash
the bootloader via 3.3V serial using stm32flash as noted in the stm32duino
Expand All @@ -355,11 +355,10 @@ section above, substituting the file name for the desired hid bootloader binary

It is not possible to use stm32flash for the SKR Mini E3 as the boot0 pin is
tied directly to ground and not broken out via header pins. It is recommended
to use a STLink V2 with STM32Cubeprogrammer to flash the bootloader. If you
to use a STLink V2 with STM32Cubeprogrammer to flash the bootloader. If you
don't have access to a STLink it is also possible to use a
[Raspberry Pi and OpenOCD](#running-openocd-on-the-raspberry-pi) with
the following chip config:

```
source [find target/stm32f1x.cfg]
```
Expand Down Expand Up @@ -412,7 +411,7 @@ make

If the bootloader is running you can flash with something like:
```
~/klipper/lib/hidflash/hid-flash ~/klipper/out/klipper.bin
~/klipper/lib/hidflash/hid-flash out/klipper.bin
```
alternatively, you can use `make flash` to flash klipper directly:
```
Expand All @@ -427,22 +426,22 @@ It may be necessary to manually enter the bootloader, this can be done by
setting "boot 0" low and "boot 1" high. On the SKR Mini E3 "Boot 1" is
not available, so it may be done by setting pin PA2 low if you flashed
"hid_btt_skr_mini_e3.bin". This pin is labeled "TX0" on the TFT header in
the SKR Mini E3's "PIN" document. There is a ground pin next to PA2
the SKR Mini E3's "PIN" document. There is a ground pin next to PA2
which you can use to pull PA2 low.

### STM32F103/STM32F072 with MSC bootloader

The [MSC bootloader](https://github.com/Telekatz/MSC-stm32f103-bootloader) is a driverless bootloader capable of flashing over USB.
The [MSC bootloader](https://github.com/Telekatz/MSC-stm32f103-bootloader)
is a driverless bootloader capable of flashing over USB.

It is possible to flash the bootloader via 3.3V serial using stm32flash as noted
in the stm32duino section above, substituting the file name for the desired
MSC bootloader binary (ie: MSCboot-Bluepill.bin for the blue pill).

For STM32F072 boards it is also possible to flash the bootloader over USB (via DFU)
with something like:

For STM32F072 boards it is also possible to flash the bootloader over USB
(via DFU) with something like:
```
dfu-util -d 0483:df11 -a 0 -R -D MSCboot-STM32F072.bin -s0x08000000:leave
dfu-util -d 0483:df11 -a 0 -R -D MSCboot-STM32F072.bin -s 0x08000000:leave
```

This bootloader uses 8KiB or 16KiB of flash space, see description of the bootloader
Expand Down Expand Up @@ -481,11 +480,11 @@ This should include all nodes currently in the bootloader.

Once you have a UUID, you may upload firmware with following command:
```
python3 flash_can.py -i can0 -f ~/klipper/out/klipper.bin -u aabbccddeeff
python3 flash_can.py -i can0 -f out/klipper.bin -u aabbccddeeff
```

Where `aabbccddeeff` is replaced by your UUID. Note that the `-i` and `-f`
options may be omitted, they default to `can0` and `~/klipper/out/klipper.bin`
options may be omitted, they default to `can0` and `out/klipper.bin`
respectively.

When building Klipper for use with CanBoot, select the 8 KiB Bootloader option.
Expand Down Expand Up @@ -558,8 +557,8 @@ Begin by downloading and compiling the software (each step may take
several minutes and the "make" step may take 30+ minutes):

```
sudo apt-get update
sudo apt-get install autoconf libtool telnet
sudo apt update
sudo apt install autoconf libtool telnet
mkdir ~/openocd
cd ~/openocd/
git clone http://openocd.zylin.com/openocd
Expand Down
2 changes: 1 addition & 1 deletion docs/CANBUS_Troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ The Linux [can-utils](https://github.com/linux-can/can-utils) tool
provides the capture software. It is typically installed on a machine
by running:
```
sudo apt-get update && sudo apt-get install can-utils
sudo apt update && sudo apt install can-utils
```

Once installed, one may obtain a capture of all CAN bus messages on an
Expand Down
8 changes: 4 additions & 4 deletions docs/Debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ The resulting files can be read and graphed using the `motan_graph.py`
tool. To generate graphs on a Raspberry Pi, a one time step is
necessary to install the "matplotlib" package:
```
sudo apt-get update
sudo apt-get install python-matplotlib
sudo apt update
sudo apt install python-matplotlib
```
However, it may be more convenient to copy the data files to a desktop
class machine along with the Python code in the `scripts/motan/`
Expand Down Expand Up @@ -159,8 +159,8 @@ To generate a graph, a one time step is necessary to install the
"matplotlib" package:

```
sudo apt-get update
sudo apt-get install python-matplotlib
sudo apt update
sudo apt install python-matplotlib
```

Then graphs can be produced with:
Expand Down
2 changes: 1 addition & 1 deletion docs/RPi_microcontroller.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ _Linux GPIO character device_ to verify the configuration.
To install the _Linux GPIO character device - binary_ on a debian
based distro like octopi run:
```
sudo apt-get install gpiod
sudo apt install gpiod
```

To check available gpiochip run:
Expand Down

0 comments on commit 17d1b14

Please sign in to comment.