This project is configured for target device: STM32L071CZT6. Use
STMCubeIDE to generate startup assembly: stm32l0xxx.s and flash linker
script: stm32l0xxx_flash.ld for other devices.
sudo apt-get install \
libncurses-dev \
libusb-1.0-0-dev \
libncursesw5 \
openocdgit clone git@github.com:pylover/stlink.git
cd stlink
make clean
make release
sudo make install
sudo ldconfigUpdate your programmer's firmware using CubeProgrammer if required:
st-info --probe
Found 1 stlink programmers
version: V2J42S7
serial: 030030000800003550334D4E
flash: 196608 (pagesize: 128)
sram: 20480
chipid: 0x447
dev-type: STM32L0xxx_Cat_5
Install the latest ARM toolchain.
./scripts/install-toolchain.shReboot the system, then:
./scripts/rollup.sh
cd build
make clean all
make flashmake elfread
make elfsize
# Run both above commands.
make analyzeFirst, start OpenOCD server:
make openocdThen, run make gdb in another terminal.
make gdbOr, run make debug to automate the above two commands:
make debugpip install prettyc
cd build
make lint