I’m trying to port code from Arduino Uno to Bluepill but I have problem with snprintf(). When I’m compiling code I have error:
test_snprintf:9: error: 'snprintf' was not declared in this scope
#include <cstdio>
… someplace at the top of the your code
I’ve found solution:
viewtopic.php?f=3&t=1241
In stdio.h snprintf in in preprocessor if:
#if !defined(__STRICT_ANSI__) || (__STDC_VERSION__ >= 199901L)
[...]
int _EXFUN(snprintf, (char *__restrict, size_t, const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__printf__, 3, 4))));
[...]
#endif /* !__STRICT_ANSI__ */
There is a separate thread where we are testing whether adding. -std=gnu++11. causes any problems.
But we had not considered also adding -std=gnu11 for C files.
compiler.c.flags=[...] -std=gnu11 [...]
compiler.cpp.flags=[...] -std=gnu++11 [...]
The plan is to add both the C and C++ flags
I hope to update the repo this weekend
I hope to update the repo this weekend
There are some PRs which I will never action,because they solve a problem for one individual but break things for everyone else.
I know there is @stevstrong’s SPI PR but it slows down the SPI, last time I tried it, and speed decreases usually dont go down well with users even though there is a valid bug fix that causes the slowdown.
But as Victor is currently working on improved DMA for SPU, I was going to wait and do all the SPI changes at the same time.
So its likely I will only change the compiler switches and change to using nanolib at the weekend
Do you usually update a change record?

![[Pending Enhancement] RTC values resetting](https://sparklogic.ru/wp-content/uploads/2019/11/nucleo-l476rg-zestaw-startowy-z-mikrokontrolerem-z-rodziny-stm32-stm32l476-90x90.jpg)

