cmake: Build all examples in CI

Includes some fixes for compile errors/warnings in examples.
This commit is contained in:
Angus Gratton
2018-04-18 17:54:28 +10:00
committed by Angus Gratton
parent 858b95a924
commit 381be65472
23 changed files with 310 additions and 66 deletions
@@ -586,6 +586,12 @@ The file's contents will be added to the .rodata section in flash, and are avail
The names are generated from the full name of the file, as given in ``COMPONENT_EMBED_FILES``. Characters /, ., etc. are replaced with underscores. The _binary prefix in the symbol name is added by objcopy and is the same for both text and binary files.
To embed a file into a project, rather than a component, you can call the function ``target_add_binary_data`` like this::
target_add_binary_data(myproject.elf "main/data.bin" TEXT)
Place this line after the ``project()`` line in your project CMakeLists.txt file. Replace ``myproject.elf`` with your project name. The final argument can be ``TEXT`` to embed a null-terminated string, or ``BINARY`` to embed the content as-is.
For an example of using this technique, see :example:`protocols/https_request` - the certificate file contents are loaded from the text .pem file at compile time.