Merge branch 'printfloating' of https://github.com/autopulated/target-mbed-gcc
Conflicts: readme.md
This commit is contained in:
commit
3dd151a252
2 changed files with 27 additions and 0 deletions
|
@ -69,6 +69,9 @@ set(CMAKE_MODULE_LINKER_FLAGS_INIT
|
|||
"-fno-exceptions -fno-unwind-tables -Wl,--gc-sections -Wl,--sort-common -Wl,--sort-section=alignment"
|
||||
)
|
||||
set(CMAKE_EXE_LINKER_FLAGS_INIT "${CMAKE_MODULE_LINKER_FLAGS_INIT} -Wl,-wrap,main")
|
||||
if((NOT DEFINED YOTTA_CFG_GCC_PRINTF_FLOAT) OR (YOTTA_CFG_GCC_PRINTF_FLOAT))
|
||||
set(CMAKE_EXE_LINKER_FLAGS_INIT "${CMAKE_EXE_LINKER_FLAGS_INIT} -Wl,-u,_printf_float")
|
||||
endif()
|
||||
|
||||
# Set the compiler to ARM-GCC
|
||||
if(CMAKE_VERSION VERSION_LESS "3.5.0")
|
||||
|
|
24
readme.md
24
readme.md
|
@ -50,3 +50,27 @@ yotta build --config testconfig.json
|
|||
```
|
||||
yotta build --config '"debug" : { "options" : { "coverage" : { "modules" : { "sockets" : true } } } }'
|
||||
```
|
||||
|
||||
## Configuring floating point support in `printf`
|
||||
|
||||
Floating point support in `printf` is enabled by default by this target
|
||||
description. (Although derived targets may override this behaviour through the
|
||||
[yotta config](http://yottadocs.mbed.com/reference/config.html) system.)
|
||||
|
||||
If you need to change the default behaviour (perhaps because the increase in
|
||||
code-size is unacceptable to you), then you can do this in the `config` section
|
||||
of a target description, or in an application's `config.json` file:
|
||||
|
||||
```JSON
|
||||
"gcc": {
|
||||
"printf-float": false
|
||||
}
|
||||
```
|
||||
|
||||
Or:
|
||||
|
||||
```JSON
|
||||
"gcc": {
|
||||
"printf-float": true
|
||||
}
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue