In the makefiles, I see the PRINTF_LIB_MIN, PRINTF_LIB_FLOAT, etc. Do I need these for chprintf to work? When I comment these out, the program compiles just fine, and the sizes are the same. The same stays true for scanf related stuff, although there is no chScanf equivalent.
Actually, `chPrintf()` is not thread safe... Is the only advantage that I can use drivers as parameters?
Do I need to link printf libraries if I use chprintf?
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: Do I need to link printf libraries if I use chprintf?
Hi,
chprintf() is part of ChibiOS and is not affected by those library-related settings.
Giovanni
chprintf() is part of ChibiOS and is not affected by those library-related settings.
Giovanni
Re: Do I need to link printf libraries if I use chprintf?
Ah, I see. Just as a side question, is there a way to use chprintf atomically? Or is there something that can acquire the serial bus? Or must I use other method of locking?
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: Do I need to link printf libraries if I use chprintf?
You could use a mutex for mutual exclusion.
Giovanni
Giovanni
Who is online
Users browsing this forum: No registered users and 26 guests