Samba on Ubuntu, using Mac

On Ubuntu:

sudo apt update
sudo apt install samba
sudo nano /etc/samba/smb.conf

At the bottom of the file, add the following lines:

    comment = Samba on Ubuntu
    path = /home/username/sambashare
    read only = no
    browsable = yes

Restart samba

sudo service smbd restart

Update the firewall rules to allow Samba traffic:

sudo ufw allow samba

Set up a Samba password for user account:

sudo smbpasswd -a username

On Mac :

Open finder and press COMMAND+k, this will open the window “Connect to server”
Enter the URL: smb://server-ip/sambashare

STM32F103C8Tx Setup on Mac

  1. Install STM32CubeIDE and create a STM32 project
  2. Search for the STM32F103C8, select it and click next.

  3. In the Project Setup name your project, select preferred target language and click finish.
  4. In System Core select RCC and set High Speed Clock (HSE) and Low Speed Clock (LSE) to Crystal/Ceramic Resonator.

  5. In System Core select SYS, set Debug to Serial Wire and Timebase Source to TIM1

  6. In Pinout View click on the PC13 and select GPIO_Output.
    In GPIO Mode and Configuration select PC13 and select a label in the User Label textfield.

  7. In the Clock Configuration change the HCLK to 72 MHz.

  8. In the Project Manager->Code Generator select Generate peripheral initialization as a pair of ‘.c/ .h’ files per peripheral.

  9. Go to Project->Generate Code

    The source code can now be viewed in your STM32 project.

We are almost there! Now we need to write some code for making the LED blink. Open main.c and add the code below. If you don’t remember the label name you used for the PIC13 open the main.h file and find out!

  while (1)
   HAL_GPIO_TogglePin(MyLed_GPIO_Port, MyLed_Pin);
    /* USER CODE BEGIN 3 */

The next step is to flash the the target (STM32F103C8Tx).

I will be using the programmer ST-LINK V2.
The ST-LINK/V2 is an in-circuit debugger and programmer for the STM8 and STM32 microcontroller families.

Connect the ST-link v2 to the target and flash the target by clicking on the Debug button or by using the menu Run->Debug.

Your debugger configuration should look like the image below.

Happy coding 🙂