README: replace make with rake

This commit is contained in:
King Kévin 2017-08-07 23:13:30 +02:00
parent 0d5476b926
commit 55e75183c6
1 changed files with 11 additions and 10 deletions

View File

@ -45,17 +45,18 @@ dependencies
The source code uses the [libopencm3](http://libopencm3.org/) library. The source code uses the [libopencm3](http://libopencm3.org/) library.
The projects is already a git submodules. The projects is already a git submodules.
To initialize and it you just need to run once: `git submodule init` and `git submodule update`. It will be initialized when compiling the firmware.
Alternatively you can run once: `git submodule init` and `git submodule update`.
firmware firmware
-------- --------
To compile the firmware run `make`. To compile the firmware run `rake`.
documentation documentation
------------- -------------
To generate doxygen documentation run `make doc`. To generate doxygen documentation run `rake doc`.
flash flash
----- -----
@ -63,23 +64,23 @@ flash
There are two firmware images: `bootloader` and `application`. There are two firmware images: `bootloader` and `application`.
The `bootloader` image allows to flash the `application` over USB using the DFU protocol. The `bootloader` image allows to flash the `application` over USB using the DFU protocol.
The `bootloader` is started first and immediately jumps to the `application` if it is valid and the DFU mode is not forced (i.e. by pressing the user button on the board or requesting a DFU detach in the `application`). The `bootloader` is started first and immediately jumps to the `application` if it is valid and the DFU mode is not forced (i.e. by pressing the user button on the board or requesting a DFU detach in the `application`).
The main application should be implemented in `application.c`. The `application` image is the main application and is implemented in `application.c`.
It is up to the application to advertise USB DFU support (i.e. as does the provided USB CDC ACM example). It is up to the application to advertise USB DFU support (i.e. as does the provided USB CDC ACM example).
The `bootloader` image will be flashed using SWD (Serial Wire Debug). The `bootlaoder` image will be flashed using SWD (Serial Wire Debug).
For that you need an SWD adapter. For that you need an SWD adapter.
The `Makefile` uses a Black Magic Probe (per default), or a ST-Link V2 along OpenOCD software. The `Makefile` uses a Black Magic Probe (per default), or a ST-Link V2 along OpenOCD software.
To flash the `booltoader` using SWD run `make flash_bootloader`. To flash the `booltoader` using SWD run `rake flash_booloader`.
Once the `bootloader` flashed it is possible to flash the `application` over USB using the DFU protocol by running `make flash`. Once the `bootloader` is flashed it is possible to flash the `application` over USB using the DFU protocol by running `rake flash`.
To force the bootloader to start the DFU mode press the user button or short a pin, depending on the board. To force the bootloader to start the DFU mode press the user button or short a pin, depending on the board.
It is also possible to flash the `application` using SWD by running `make flash_application`. It is also possible to flash the `application` image using SWD by running `rake flash_application`.
debug debug
----- -----
SWD also allows to debug the code running on the micro-controller using GDB. SWD also allows to debug the code running on the micro-controller using GDB.
To start the debugging session run `make debug`. To start the debugging session run `rake debug`.
USB USB
--- ---
@ -87,5 +88,5 @@ USB
The firmware offers serial communication over USART1 and USB (using the CDC ACM device class). The firmware offers serial communication over USART1 and USB (using the CDC ACM device class).
You can also reset the board by setting the serial width to 5 bits over USB. You can also reset the board by setting the serial width to 5 bits over USB.
To reset the board run `make reset`. To reset the board run `rake reset`.
This only works if provided USB CDC ACM is running correctly and the micro-controller isn't stuck. This only works if provided USB CDC ACM is running correctly and the micro-controller isn't stuck.