[riot-notifications] [RIOT-OS/RIOT] cpu/esp32: use 'printf' instead of 'echo' (#12283)

Gaëtan Harter notifications at github.com
Fri Sep 20 11:43:48 CEST 2019

### Contribution description 

Use 'printf' instead of 'echo' as the behavior is different between Linux
and OSx.
OSx default 'echo' does not support `-n`, so it appears in the generated

Also 'printf' is recommended over 'echo' in general.

> Nowadays, echo(1) is only portable if you omit flags and escape sequences.
> Use printf(1) instead, if you need more than plain text.


Fixes #12244 

### Testing procedure

The generated `partition.csv` is the same with this PR:

ESPTOOL=esptool.py BUILD_IN_DOCKER=1 RIOT_CI_BUILD=1 BOARD=esp32-wroom-32 make -C examples/hello-world/ flash

This file is the same with this PR and `master`:

cat examples/hello-world/bin/esp32-wroom-32/partitions.csv
cat examples/hello-world/bin/esp32-wroom-32/partitions.csv 

nvs, data, nvs, 0x9000, 0x6000
phy_init, data, phy, 0xf000, 0x1000
factory, app, factory, 0x10000, 112864

#### Testing #12244 

Try flashing on OSX when setting `CC_NOCOLOR=1` to be sure `/bin/bash` as shell as https://github.com/RIOT-OS/RIOT/blob/bd5ceb58e7628b51882eeff0db2c1b103e88a4fb/makefiles/color.inc.mk#L25-L27 is not triggered.

I cannot really do this one.

### Issues/PRs references

Fixes #12244 
You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * cpu/esp32: use 'printf' instead of 'echo'

-- File Changes --

    M cpu/esp32/Makefile.include (8)

-- Patch Links --


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190920/a8e09d29/attachment.htm>

More information about the notifications mailing list