-
Notifications
You must be signed in to change notification settings - Fork 2
Firmware
Following software and hardware components are necessary to compile and flash the StarPointer firmware:
- GNU Arm Embedded Toolchain
- An open-source version of the STMicroelectronics ST-LINK Tools
- ST-LINK/V2 USB debugger / programmer or clone
- 3.3V USB to TTL serial cable/adapter
This firmware is developed in a Linux environment, and therefore it is recommended to use a Linux-based system to build the firmware.
The complete source code of the StarPointer firmware is available on the GitHub repository. Use the following commands to obtain the source code with the LibOpenCM3 library:
git clone [email protected]:dilshan/star-pointer.git
cd star-pointer/
git submodule update --init --recursive
After cloning the source code, issue the following commands to compile the firmware:
cd firmware/libopencm3/
make
cd ..
make
After the successful compilation, the starpointer.hex
file may need to generate in the firmware
directory.
The compiled firmware binary is also available to download in the release section of this project repository.
To flash the firmware connect ST-LINK/V2 USB programmer to the J2 ICP port.
To flash the firmware, use the stlink-gui
tool with a 0x08000000
memory offset.
If stlink-gui
is not detecting the MCU, follow the steps given below:
- Short-circuit the JP1 jumper
- Click the Connect button at
stlink-gui
and immediately remove the short-circuit applied in JP1.
Firmware logs can use to identify the firmware/device issues. To access the firmware logs, connect the 3.3V USB to TTL serial adapter to the J1 port.
The firmware logs can view using a serial console tool such as minicom with the following parameters:
- baud rate:
38400
- Data bits:
8
- Parity bit:
No
- Stop bit:
1
If all the modules and peripherals are working fine, the serial console must display a log message similar to the below listing:
SysTick verification completed
Initialize I2C interface 2
Initialize magnetometer
Compass scale = 0.920000
Initialize accelerometer
Loading user configuration
Latitdue : 0.000000
Longitude : 0.000000
Offset MAG: 0.000000
Offset INC: 0.000000
Initialize RTC
TIME = 15:7:11
DATE = 15-0-2022
Setup USB CDC interface