Skip to content
Snippets Groups Projects
Commit 5b22528b authored by Henrik Tjäder's avatar Henrik Tjäder
Browse files

Added Initial README and gitignore from earlier projects

parents
No related branches found
No related tags found
No related merge requests found
Debug
Lab4-serial.elf.launch
stm32f4_flash.ld
.cproject
.settings
serial.elf.launch
.project
kuppe.elf
kuppe.hex
src/.main.c.swp
Project base for STM32 Cortex MCUs
----------------------------------
Install arm-none-eabi-* series of tools
[](https://www.archlinux.org/packages/community/x86_64/arm-none-eabi-gcc/)
[](https://packages.debian.org/jessie/devel/gcc-arm-none-eabi)
Install st-link
[](https://github.com/texane/stlink)
After cloning the project add code in:
src/main.c
Compile with regular GNU make:
make
Modify the Makefile and linker scripts to suit your requirements.
Possibly change the memory size in stm32_linker.ld,
included libraries in the Makefile.
Connect your MCU and connect st-link.
Sometimes it will complain it cannot find the chip, try erasing first:
st-flash --reset erase
Then connect with st-util:
st-util
On my laptop some powermanagement settings interfere with longer debugging sessions,
a workaround is to enable very verbose logging functioning as a keep-alive.
st-util -v99
Launch your debugger with the compiled executable:
arm-none-eabi-gdb stm32f4.elf
Useful regular GDB commands (which of most are possible to shorten to just the initial character):
continue
run
print
step
Useful non-regular GDB commands:
reload
This one is provided by the
.gdbinit
file included in this project. It will kill the current program and reload from the same file again.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment