Files
bacnet_stack/ports/xplained
Kari Argillander 6271632944 Add and fix compiler warnings (#718)
* Add and remove compiler warning compile options

Add some new compiler warnings. Some of those does not build clean so
ignore them for now. This also helps if some user use those options so
we ignore those for them also.

Also remove following ignores as they do not produce any warnings:

  - Wno-attributes
  - Wno-long-long
  - Wno-implicit-fallthrough

* Fix -Wmissing-declarations compiler warnings

Fix new -Wmissing-declarations compiler warnings. I tried to look which
should be in headers and which should be static. Might be that some
statics should be in header as it is not easy to choose if something
should be exported or not.

* Fix -Wmissing-field-initializers compiler warnings

If we use { { 0 } } compiler thinks we might have mean that we only
meant initialize first member of struct or have forgotton to add second
one. We could do { { 0 }, 0 } but we can just do { 0 } which tells
compiler that hey just intialize this whole thing to zero.

* tests: Fix couple -Wfloat-conversion warnings

Add f prefix to floating point numbers to get some double to float
warnings away.

* ci: Make warnings as errors with cmake main build

To keep repo more clean from warnings use Werror flag when building main
project.

Windows should need -DCMAKE_C_FLAGS="/WX" but we have not ignore errors
for that yet so let's not yet take it in use.

* ci: Build also tests in matrix build

Enable also tests to be builded in our main matrix build. This way tests
will be builded also with clang and in future also with MSVC. We also
keep build very clean now as all warnings as catched.

With this we can also take out -Werror from compile_options as we add
that in CI. It is not good practice to keep that option always on. It
makes development lot harder. See example this blog post [1].

[1]: https://embeddedartistry.com/blog/2017/05/22/werror-is-not-your-friend/

* getevent: Deprecate getevent_encode_apdu()

Steve suggested that we should deprecate getevent_encode_apdu() [1].

Suggested-by: Steve Karg

[1]: https://github.com/bacnet-stack/bacnet-stack/pull/718#discussion_r1715821735

---------

Co-authored-by: Kari Argillander <kari.argillander@fidelix.com>
2024-08-13 16:32:44 -05:00
..
2019-10-08 23:47:53 -05:00
2019-10-08 23:47:53 -05:00
2019-10-08 23:47:53 -05:00
2019-10-20 13:46:21 -05:00
2024-08-13 16:32:44 -05:00
2019-10-08 23:47:53 -05:00

BACnet MS/TP on Atmel XMEGA-A3BU XPLAINED evaluation board.

An RS-485 add-on board (daughterboard, shield) was designed
to handle the RS-485 interface and some LEDs.  See rs485-shield/
folder for EAGLE CAD design files.

Use the Configuration "Debug-XPLAINED" and not in "Debug" or "Release".
"CONF_BOARD_ENABLE_RS485_XPLAINED" is defined and used in led.c, rs485.c,
and main.c for specific board I/O. When it is not defined, the I/O is
either removed (i.e. led.c, main.c) or altered (rs485.c).

There are other defines in the "Debug-XPLAINED" Configuration
which include other parts of the XPLAINED platform code.

For your own board, you could just change rs485.c, main.c, and led.c
to use the I/O that you want to use, and not worry about the
"CONF_BOARD_ENABLE_RS485_XPLAINED". Or you can leave the
"CONF_BOARD_ENABLE_RS485_XPLAINED" in the files so that you can
always test on the XPLAINED platform with Debug-XPLAINED, and use
"Debug" or "Release" for your project.