Update readme.md
This commit is contained in:
parent
19148125fe
commit
36004d98a0
42
readme.md
42
readme.md
@ -1,21 +1,49 @@
|
|||||||
|
## Build environment
|
||||||
|
|
||||||
On Ubuntu/Debian install
|
On Ubuntu/Debian install
|
||||||
|
|
||||||
* gcc-arm-none-eabi
|
* ``gcc-arm-none-eabi``
|
||||||
* openocd
|
* ``openocd``
|
||||||
|
|
||||||
|
|
||||||
Alternatively use the Docker image wollud1969/build-env-arm-none-eabi:1.0.0
|
Alternatively use the Docker image ``wollud1969/build-env-arm-none-eabi:1.0.0``
|
||||||
|
|
||||||
docker run -it --rm -v ${PWD}:/mnt wollud1969/build-env-arm-none-eabi:1.0.0 bash
|
docker run -it --rm -v ${PWD}:/mnt wollud1969/build-env-arm-none-eabi:1.0.0 bash
|
||||||
|
|
||||||
|
|
||||||
After code generation in CubeMX the Makefile and the file main.c in Core/Src needs
|
## Preparing generated code to include user code
|
||||||
to be edited to include user code. From the cube directory in the project root run:
|
|
||||||
|
After code generation in CubeMX the ``Makefile`` and the file ``main.c`` in ``Core/Src`` needs
|
||||||
|
to be edited to include user code. From the ``cube`` directory in the project root run:
|
||||||
|
|
||||||
../tools/insertMyCode.sh
|
../tools/insertMyCode.sh
|
||||||
|
|
||||||
User code has to life in User/Src and User/Inc. All *.c file from User/Src will be
|
User code has to life in ``User/Src`` and ``User/Inc``. All ``*.c`` file from ``User/Src`` will be
|
||||||
attached to the C_SOURCES variable in the Makefile.
|
attached to the ``C_SOURCES`` variable in the ``Makefile``.
|
||||||
|
|
||||||
|
|
||||||
|
## Building
|
||||||
|
|
||||||
|
From the ``cube`` directory in the project root simply run
|
||||||
|
|
||||||
|
make
|
||||||
|
|
||||||
|
|
||||||
|
## Uploading to the target
|
||||||
|
|
||||||
|
Start ``openocd`` from the project root using the existing configuration file (for derived projects
|
||||||
|
adjust the configuration concerning the use MCU)
|
||||||
|
|
||||||
|
openocd -f openocd.cfg
|
||||||
|
|
||||||
|
Connect to the started ``openocd`` server using
|
||||||
|
|
||||||
|
nc localhost 4444
|
||||||
|
|
||||||
|
To upload a built binary enter
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user