diff --git a/.gitattributes b/.gitattributes index 118a6c7..41406d6 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,3 @@ -content/**/*.png filter=lfs diff=lfs merge=lfs -text -content/**/*.webm filter=lfs diff=lfs merge=lfs -text -content/**/*.mp4 filter=lfs diff=lfs merge=lfs -text +static/media/*.png filter=lfs diff=lfs merge=lfs -text +static/media/*.webm filter=lfs diff=lfs merge=lfs -text +static/media/*.mp4 filter=lfs diff=lfs merge=lfs -text diff --git a/config.toml b/config.toml index 904ace7..90a3f7d 100644 --- a/config.toml +++ b/config.toml @@ -12,3 +12,6 @@ theme = 'beautifulhugo' website = 'https://git.skullnet.me' github = 'skull132' +[[module.mounts]] +source = 'static/media' +target = 'assets/media' diff --git a/content/posts/002-stm32begin-001-setup.md b/content/posts/002-stm32begin-001-setup.md index e17025d..cdb2ad2 100644 --- a/content/posts/002-stm32begin-001-setup.md +++ b/content/posts/002-stm32begin-001-setup.md @@ -52,36 +52,36 @@ Our goal is to configure the MCU as follows: To do this, first, we must remove the erroneous MCO function of the PF0 pin. Left click the green PF0 pin, and select "Reset state". -{{< video src="/posts/stm32begin-001-001.webm" type="video/webm" >}} +{{< video src="/media/stm32begin-001-001.webm" type="video/webm" >}} Then we have to configure the digital inputs and outputs. As will be explained later, digital inputs and outputs are handled via the GPIO (General Purpose Input-Output) functionality of a pin. The Nucleo board has on onboard LED tied to pin **PB3**. So we'll start from there. Click PB3, click "GPIO_Output". This assigns the pin as a digital output. Further, we should name the pin so that we could reference it in code later. Right click PB3, select "Enter user label", and type in "OUT_LED". -{{< video src="/posts/stm32begin-001-002.webm" type="video/webm" >}} +{{< video src="/media/stm32begin-001-002.webm" type="video/webm" >}} For the input, we have to choose a random pin. For the purposes of our setup, we'll choose **PB0** as our input. Click it, set it as a "GPIO_Input", and name it as "IN_BTN". -{{< video src="/posts/stm32begin-001-003.webm" type="video/webm" >}} +{{< video src="/media/stm32begin-001-003.webm" type="video/webm" >}} For purposes that we'll explain later, we need to set this pin as a **pull-up** as well. We do this from the left side panel of the STM32CubeMX window. From there, select "GPIO" under the "System Core" section, select "PB0" and configure it as a "Pull up" from the "GPIO Pull-up/Pull-down" drop down. -{{< video src="/posts/stm32begin-001-005.webm" type="video/webm" >}} +{{< video src="/media/stm32begin-001-005.webm" type="video/webm" >}} With this, our GPIOs are configured. We now need to check the VCP and USART2. By default, USART2 is enabled on pins PA15 and PA2. They should be named as "VCP_RX" and "VCP_TX" respectively. What we need to do is check and modify the baud rate for this subsystem. Again, from the left side panel, look for the "Connectivity" section, select "USART2", and look for the "Baud Rate" menu in the "Parameter Settings" area. Modify it to be `115200`. -{{< video src="/posts/stm32begin-001-009.mp4" type="video/mp4" >}} +{{< video src="/media/stm32begin-001-009.mp4" type="video/mp4" >}} With this, our setup is done! Save the file with "Ctrl-S" or from the "File" menu. It will ask if you want to generate the project, press "Yes". Alternatively, click the shaft and cog button on the top left. -{{< figure src="/posts/stm32begin-001-010.png" >}} +{{< figure src="/media/stm32begin-001-010.png" >}} After this, you will be taken to the `main.c` file. If the program asks for a perspective shift, press "Yes". diff --git a/content/posts/003-stm32begin-002-printing.md b/content/posts/003-stm32begin-002-printing.md index 679a733..b01214c 100644 --- a/content/posts/003-stm32begin-002-printing.md +++ b/content/posts/003-stm32begin-002-printing.md @@ -65,7 +65,7 @@ and This code can now be built with the hammer icon at the top left, and then loaded onto the microcontroller using the green play button: -{{< video src="/posts/stm32begin-001-006.mp4" type="video/mp4" preload="auto" caption="Don't mind the lack of an STM32 being connected...">}} +{{< video src="/media/stm32begin-001-006.mp4" type="video/mp4" preload="auto" caption="Don't mind the lack of an STM32 being connected...">}} ## Viewing the Output @@ -80,14 +80,14 @@ If you're on Windows, follow the link in the previous section to download PuTTY, users, I would suggest flatpak: `flatpak install uk.org.greenend.chiark.sgtatham.putty`. Once installed, run it. You'll encounter the following screen: -{{< figure src="/posts/stm32begin-001-007.png" >}} +{{< figure src="/media/stm32begin-001-007.png" >}} We need to change the "Connection type" to "Serial", configure the baud to match that of our USART2 (115200), and provide the proper serial line. On Windows, it'll be something similar to "COM00" where 00 is a set of numbers. On Linux, you'll be looking for a `ttyACM0` style entry in your `/dev/` folder. As a final result, before pressing "Open" at the bottom, your setup should look something like this: -{{< figure src="/posts/stm32begin-001-008.png" >}} +{{< figure src="/media/stm32begin-001-008.png" >}} ### minicom diff --git a/content/posts/stm32begin-001-001.webm b/static/media/stm32begin-001-001.webm similarity index 100% rename from content/posts/stm32begin-001-001.webm rename to static/media/stm32begin-001-001.webm diff --git a/content/posts/stm32begin-001-002.webm b/static/media/stm32begin-001-002.webm similarity index 100% rename from content/posts/stm32begin-001-002.webm rename to static/media/stm32begin-001-002.webm diff --git a/content/posts/stm32begin-001-003.webm b/static/media/stm32begin-001-003.webm similarity index 100% rename from content/posts/stm32begin-001-003.webm rename to static/media/stm32begin-001-003.webm diff --git a/content/posts/stm32begin-001-005.webm b/static/media/stm32begin-001-005.webm similarity index 100% rename from content/posts/stm32begin-001-005.webm rename to static/media/stm32begin-001-005.webm diff --git a/content/posts/stm32begin-001-006.mp4 b/static/media/stm32begin-001-006.mp4 similarity index 100% rename from content/posts/stm32begin-001-006.mp4 rename to static/media/stm32begin-001-006.mp4 diff --git a/content/posts/stm32begin-001-007.png b/static/media/stm32begin-001-007.png similarity index 100% rename from content/posts/stm32begin-001-007.png rename to static/media/stm32begin-001-007.png diff --git a/content/posts/stm32begin-001-008.png b/static/media/stm32begin-001-008.png similarity index 100% rename from content/posts/stm32begin-001-008.png rename to static/media/stm32begin-001-008.png diff --git a/content/posts/stm32begin-001-009.mp4 b/static/media/stm32begin-001-009.mp4 similarity index 100% rename from content/posts/stm32begin-001-009.mp4 rename to static/media/stm32begin-001-009.mp4 diff --git a/content/posts/stm32begin-001-010.png b/static/media/stm32begin-001-010.png similarity index 100% rename from content/posts/stm32begin-001-010.png rename to static/media/stm32begin-001-010.png