Skip to content

va_start & va_end are not defined #240

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Adminius opened this issue May 4, 2018 · 8 comments
Closed

va_start & va_end are not defined #240

Adminius opened this issue May 4, 2018 · 8 comments
Assignees
Labels

Comments

@Adminius
Copy link
Contributor

Adminius commented May 4, 2018

i'm missing this two functions:

  • va_start
  • va_end

i had success with this workaround:

`if defined(ARDUINO_ARCH_STM32)
#include <stdarg.h>
#define va_start(v,l) __builtin_va_start(v,l)
#define va_end(v) __builtin_va_end(v)
#endif

in which file i can make PR? :)

@fpistm
Copy link
Member

fpistm commented May 5, 2018

I think you could simply include stdio.h here:

#include <stdint.h>

Edit: seems not enough. Anyway, i think solution should be to include properly stdarg.h.

@fpistm
Copy link
Member

fpistm commented May 7, 2018

I've made some test/search
Adding this in Wiring.h is sufficient:

#include <stdio.h>
#include <stdarg.h>

But it seems not directly include in other core, it is present in wring_private.h.
Only included in source file requiring this.
https://github.com/arduino/Arduino/blob/a5aea72cc6cf5161eedeb1f08692adb26fbb9305/hardware/arduino/avr/cores/arduino/wiring_private.h#L28
https://github.com/PaulStoffregen/cores/blob/27cdeb1cb9d2a26a44fa9cf7169c97944cf39a19/teensy3/wiring_private.h#L26

So I think, I should not add it directly in wiring.h while not understand why other use wiring_private.h

@Adminius
Copy link
Contributor Author

Adminius commented May 7, 2018

if add my implementaion in wiring_privat.h it doesn't work.
But it works in wiring.h...

P.S. im on vacation in paris until weekend, so i'm not available...

@fpistm
Copy link
Member

fpistm commented May 17, 2018

Hi @Adminius ,
could you share with me your use case to understand why it's not working with wiring_private.h

@fpistm fpistm self-assigned this May 17, 2018
@fpistm fpistm added enhancement New feature or request arduino compatibility labels May 17, 2018
@Adminius
Copy link
Contributor Author

Adminius commented May 17, 2018

we use in our KONNEKTING Library a Debug Class, that uses this to functions.

You can complie a DemoSketch with KDEBUG enabled to test it

fpistm added a commit to fpistm/Arduino_Core_STM32 that referenced this issue May 19, 2018
va_start & va_end was not defined
To have them defined include wiring_private.h

Fix stm32duino#240

Signed-off-by: Frederic Pillon <[email protected]>
fpistm added a commit to fpistm/KonnektingDeviceLibrary that referenced this issue May 19, 2018
Remove workarounf for va_start and va_end not defined

See:
stm32duino/Arduino_Core_STM32#240

Fix:
stm32duino/Arduino_Core_STM32#253

Signed-off-by: Frederic Pillon <[email protected]>
fpistm added a commit to fpistm/KonnektingDeviceLibrary that referenced this issue May 19, 2018
Remove workaround for va_start and va_end not defined
Include wiring_private.h

See:
stm32duino/Arduino_Core_STM32#240

Fix:
stm32duino/Arduino_Core_STM32#253

Signed-off-by: Frederic Pillon <[email protected]>
@fpistm
Copy link
Member

fpistm commented May 19, 2018

@Adminius
I've tested and build is now ok.
Let me know if it is ok then I will merge #253

@Adminius
Copy link
Contributor Author

Hi @fpistm
it works, thx.
I will accept your PR after new STM32 core will be released, deal?

Issue can be closed.

@fpistm
Copy link
Member

fpistm commented May 20, 2018

Of course ;)
New release is planned this week or the next one.

tuxedo0801 pushed a commit to KONNEKTING/KonnektingDeviceLibrary that referenced this issue Jun 11, 2018
Remove workaround for va_start and va_end not defined
Include wiring_private.h

See:
stm32duino/Arduino_Core_STM32#240

Fix:
stm32duino/Arduino_Core_STM32#253

Signed-off-by: Frederic Pillon <[email protected]>
benwaffle pushed a commit to benwaffle/Arduino_Core_STM32 that referenced this issue Apr 10, 2019
va_start & va_end was not defined
To have them defined include wiring_private.h

Fix stm32duino#240

Signed-off-by: Frederic Pillon <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants