Permalink
Browse files

documentation

  • Loading branch information...
dpiegdon committed Feb 22, 2017
1 parent 4b99ea3 commit c215528bbaf9df3e62a9d4b5d2d5cb8d62867c3f
Showing with 48 additions and 13 deletions.
  1. +0 −4 Makefile
  2. +48 −9 README.md
View
@@ -103,10 +103,6 @@ gdb-server:
gdb: $(PROJECT).elf
$(GDB) --eval-command="target extended-remote localhost:$(GDB_PORT)" --eval-command="monitor halt" $(PROJECT).elf
# usefull commands in gdb:
# load => load elf file into device, i.e. flash and start app via gdb
# kill => stop execution of application
# run => start application again
################
# dependency graphs for wildcard rules
View
@@ -9,34 +9,71 @@ hackers choice of tools:
* GCC
* Make
* GNU Make
* GDB and one of st-link or openocd for debugging
* GDB and one of ST-Link or OpenOCD for debugging and flashing
Originally based on https://github.com/ulfen/stm32f7-discovery-blinky.git
(thanks to http://github.com/ulfen!), the Makefile has been enhanced with
additional debugging options and simple GDB integration.
The sources and Makefile have been stripped to bare minimum by referencing the
original CUBE7 package downloadable from ST at
http://www.st.com/en/embedded-software/stm32cubef7.html
original CUBE7 package downloadable from ST.
Use
---
Usage
-----
* You need to download the CUBE F7 zip from ST and set the correspondig
environment variable or fix the Makefile (see Notes and pointers).
* The setup is optimized for debugging and GDB integration. Thus, it uses `-O0
-g -gdwarf2` to allow remote debugging. For production use, you might want to
change `DEBUG_OPTIMIZE_FLAGS` to `-O2`
change `DEBUG_OPTIMIZE_FLAGS` to `-O2`.
* HEAP SIZE is currently fixed to 0x400 (in the Makefile). For a larger heap,
fix this. It is used in `sys/_sbrk.c`. A better solution would be to create an
appropriate linker script that defines the value for `HEAP_SIZE`, just like it
currently defines the start of the heap as `_end`.
* You need to download the CUBE F7 zip from ST and set the correspondig
environment variable or fix the Makefile.
Notes and pointers
------------------
### Tools
* STM32 CUBEF7 package - http://www.st.com/en/embedded-software/stm32cubef7.html
* GNU ARM Embedded Toolchain - https://launchpad.net/gcc-arm-embedded
* ST-Link tool for linux - https://github.com/texane/stlink
* OpenOCD (you probably will need version 0.10.0 or higher for STM32F7xx
support) - http://openocd.org/
### Documentation
* STM32F767ZI documentation, especially the Reference Manual, the Programming
Manual and the DataSheet -
http://www.st.com/en/microcontrollers/stm32f767zi.html
* STM32F767ZI-Nucleo-144 documentation, especially the User Manual and the
Schematic Packs -
http://www.st.com/content/st_com/en/products/evaluation-tools/product-evaluation-tools/mcu-eval-tools/stm32-mcu-eval-tools/stm32-mcu-nucleo/nucleo-f767zi.html
* GCC linker scripts - https://sourceware.org/binutils/docs-2.27/ld/Scripts.html
* NewLib, the provided libc - https://sourceware.org/newlib/
* GDB command documentation - https://sourceware.org/gdb/onlinedocs/gdb/ --
`load` to flash firmware, `kill` to stop execution of currently running
application, `run` to start execution.
* ARM documentation for delwing really deep into the subject - ARMv7-M
Architecture Reference Manual and ARM Cortex-M7 Processor Technical Reference
Manual and the ARM and Thumb-2 InstructionSet QuickRefCard
@@ -64,3 +101,5 @@ https://github.com/ulfen/stm32f7-discovery-blinky.git
* ChibiOS has an example for many different boards, including this one:
http://chibios.org/
* plenty of howtos and guides when searching for `gcc gdb stm32 gnu make`

0 comments on commit c215528

Please sign in to comment.