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 \
openocd
git clone [email protected]:pylover/stlink.git
cd stlink
make clean
make release
sudo make install
sudo ldconfig
Update 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.sh
Reboot the system, then:
./scripts/rollup.sh
cd build
make clean all
make flash
make elfread
make elfsize
# Run both above commands.
make analyze
First, start OpenOCD
server:
make openocd
Then, run make gdb
in another terminal.
make gdb
Or, run make debug
to automate the above two commands:
make debug
pip install prettyc
cd build
make lint