Commit 5be03dca authored by Thanassis Tsiodras's avatar Thanassis Tsiodras

Update the docs with all new options

parent 9c949c57
Pipeline #74 skipped
...@@ -10,27 +10,19 @@ how to use the EDISOFT and OAR platforms, to: ...@@ -10,27 +10,19 @@ how to use the EDISOFT and OAR platforms, to:
Application sources Application sources
------------------- -------------------
The sources of your project must be set inside the Makefile, in the FPU_SRC and The sources of your project must be set inside the Makefile, in the SRC
NONFPU_SRC variables. The VPATH can be used to automatically locate them in variable. The VPATH can be used to automatically locate them in
your source tree: your source tree:
VPATH=src:Library/foo:Library/bar:... VPATH=src:Library/foo:Library/bar:...
NONFPU_SRC= \ SRC= \
init.c \ init.c \
tasking.c \ tasking.c \
...
FPU_SRC= \
gnc.c \ gnc.c \
compute_pi.c compute_pi.c
As their names suggest, you add a file in the FPU_SRC list There are 3 orthogonal compilation options that you can control:
if you want it to be compiled for native FPU use (i.e. without `-msoft-float`).
Whether native or emulated FPU compilation is performed on it, is selected
during build time ; by the FPU=1 Makefile parameter (see below)
There are in fact, 3 orthogonal compilation options that you can control:
## Debug/Release mode ## Debug/Release mode
...@@ -39,25 +31,28 @@ compilation: ...@@ -39,25 +31,28 @@ compilation:
$ make CFG=debug $ make CFG=debug
... ...
$ ls -l bin.debug/ $ ls -l bin.debug.NONFPU.leon3/
-rwxr-xr-x 1 user user 645273 Mar 16 17:43 fputest -rwxr-xr-x 1 user user 645273 Mar 16 17:43 fputest
$ make CFG=release $ make CFG=release
... ...
$ ls -l bin.release/ $ ls -l bin.release.NONFPU.leon3/
-rwxr-xr-x 1 root root 47860 Mar 16 17:48 fputest -rwxr-xr-x 1 root root 47860 Mar 16 17:48 fputest
-rwxr-xr-x 1 root root 585178 Mar 16 17:48 fputest.debug -rwxr-xr-x 1 root root 585178 Mar 16 17:48 fputest.debug
(* If no `CFG` option is provided, the default is `debug` compilation. *) ( *If no `CFG` option is provided, the default is `debug` compilation.* )
Notice that in release compilation, the process creates a small binary - In release compilation, the process creates a small binary
(containing only the executable code) and separately, the debug information - (containing only the executable code) and separately, the debug information -
for loading from inside GDB via the `file` command. for loading from inside GDB via the `file` command.
- Notice also that the output folder tells you this build did not use
native FPU, and targeted Leon3 (the defaults). To compile for
native FPU or a different Leon target, use the next two options.
## Native or emulated FPU compilation for the FPU_SRC source files ## Native or emulated FPU compilation for the source files
To use native FPU compilation for the FPU_SRC list of source files, use the To use native FPU compilation for the source files, use the `FPU`
`FPU` Makefile parameter: Makefile parameter:
$ make CFG=debug FPU=1 $ make CFG=debug FPU=1
...@@ -73,6 +68,13 @@ The `FPU` and `CFG` options are completely independent ; you can e.g. ...@@ -73,6 +68,13 @@ The `FPU` and `CFG` options are completely independent ; you can e.g.
compile a debug version that uses native FPU, and a release one that uses compile a debug version that uses native FPU, and a release one that uses
emulation. emulation.
## Select Leon target
Use the `LEON` Makefile parameter to decide which target to build for
(currently, only `leon2` and `leon3` are supported):
$ make CFG=debug FPU=1 LEON=leon3
## Verbosity ## Verbosity
Messages shown during compilation follow the semantics of the Linux kernel Messages shown during compilation follow the semantics of the Linux kernel
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment