Skip to content
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

firmware: support compiling on SDCC >=4.0.3 #70

Merged
merged 1 commit into from
Mar 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion Firmware/include/compiler_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,14 @@ typedef union UU32
// NOP () macro support
#define NOP() _asm NOP _endasm

// In SDCC r11731 (version 4.0.3) the _*toa() functions were renamed to __*toa,
// so we add the __ names to older compiler versions here.
#if defined(__SDCC_REVISION) && (__SDCC_REVISION < 11731)
#define __itoa _itoa
#define __uitoa _uitoa
#define __ltoa _ltoa
#define __ultoa _ultoa
#endif

//-----------------------------------------------------------------------------

Expand Down Expand Up @@ -637,7 +645,7 @@ typedef union UU32

//-----------------------------------------------------------------------------

// Wickenh�user
// Wickenh�user
// http://www.wickenhaeuser.de

#elif defined __UC__
Expand Down
4 changes: 2 additions & 2 deletions Firmware/radio/printfl.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,9 @@ vprintfl(const char * fmt, va_list ap) __reentrant
char __idata * stri;

if (unsigned_flag) {
_ultoa(val, buffer, radix);
__ultoa(val, buffer, radix);
} else {
_ltoa(val, buffer, radix);
__ltoa(val, buffer, radix);
}
stri = buffer;
while (*stri) {
Expand Down