-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGetting Started with ChiBIOS and STM32
68 lines (40 loc) · 1.39 KB
/
Getting Started with ChiBIOS and STM32
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
Getting Started with ChiBIOS and STM32
Oliver Rew
2017-12-05
I used Ubuntu with the STM32F0 devboard , but it should be similar for the F4.
Clone "devsat" repo
- sudo git clone https://github.com/oresat/devsat.git
Install OpenOCD
- sudo apt install openocd
Install GCC
- sudo apt git install gcc
Get ChiBIOS submodules in Git repo. (Miles had a different solution to this problem, but this is what worked for me)
- cd ./devsat/
- git submodule update --init
Install ARM GCC
- sudo apt-get install gcc-arm-none-eabi
Check that STM32 USB is showing up. You should see something like "Bus 001 Device 003: ID 0483:374b STMicroelectronics ST-LINK/V2.1 (Nucleo-F103RB)'
- lsusb
Program STM32
- cd ./devsat/firmware/chib_stf0x/src/app_blinky
- make write
Your should see something like:
** Verified OK **
** Resetting Target **
Yay! You have now successfully programmed the STM32. If You want change the blink rate, change the line:
"chThdSleepMilliseconds(100);"
--Install minicom for debugging
- sudo apt install minicom
open minicom
- sudo minicom
Setup minicom port
>CTRL-A Z //open help
>o //configuration optioon
>Serial port setup
>Serial Device : /dev/ttyACM0 //Where I put /dev/ttyACM0, put your serial port
>Save setup as dfl
>CTRL-A Z X //exit with reset
reopen minicom
- sudo minicom
Notes:
- I was running on a virtual machine and I had to forward the USB port to the virtual machine.