provide a weak print char impl #674

Merged
mohr merged 2 commits from mueller/provide-weak-print-char into development 2022-09-12 14:10:32 +02:00
Owner

Part of a small workshop project fsfw-from-zero. Provide a weak print char impl which is suitable for hosts.

Part of a small workshop project fsfw-from-zero. Provide a weak print char impl which is suitable for hosts.
muellerr added 1 commit 2022-09-02 08:53:04 +02:00
fsfw/fsfw/pipeline/head Build started... Details
fsfw/fsfw/pipeline/pr-development This commit looks good Details
ebc02673dd
provide a weak print char impl
muellerr added this to the v6.0.0 milestone 2022-09-02 08:54:55 +02:00
muellerr requested review from gaisser 2022-09-02 08:55:00 +02:00
muellerr added 1 commit 2022-09-05 14:14:09 +02:00
fsfw/fsfw/pipeline/pr-development This commit looks good Details
26bc80964e
Merge branch 'development' into mueller/provide-weak-print-char
gaisser approved these changes 2022-09-05 15:36:10 +02:00
Dismissed
gaisser left a comment
Owner

LGTM

LGTM
gaisser dismissed gaisser’s review 2022-09-05 15:38:56 +02:00
gaisser reviewed 2022-09-05 15:40:06 +02:00
@ -0,0 +1,10 @@
#include <stdio.h>
#include <stdbool.h>
void __attribute__((weak)) printChar(const char* character, bool errStream) {
Owner
Does not build with MSVC https://godbolt.org/z/s8hav4sdn There seems to be solution for MSVC https://stackoverflow.com/questions/2290587/gcc-style-weak-linking-in-visual-studio
Author
Owner

Wow, this looks.. interesting. Yet another MS specific solution

Wow, this looks.. interesting. Yet another MS specific solution
Author
Owner

The solution above is for an extern const char*.
Actually, https://docs.microsoft.com/en-us/cpp/cpp/selectany?view=msvc-170 might work as well. I can't really test this as MSVC does not compile anyway, so I suggest support for this is added in a seprate PR.

The solution above is for an extern const char*. Actually, https://docs.microsoft.com/en-us/cpp/cpp/selectany?view=msvc-170 might work as well. I can't really test this as MSVC does not compile anyway, so I suggest support for this is added in a seprate PR.
Owner

Agree with robin, MSVC is not really a supported compiler atm.

Agree with robin, MSVC is not really a supported compiler atm.
mohr approved these changes 2022-09-12 14:10:03 +02:00
mohr merged commit 7e379d2159 into development 2022-09-12 14:10:32 +02:00
mohr deleted branch mueller/provide-weak-print-char 2022-09-12 14:10:34 +02:00
Sign in to join this conversation.
No description provided.