Skip to content

Commit

Permalink
firmware: support compiling on SDCC >=4.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
neggles authored and tridge committed Mar 22, 2022
1 parent 97448a5 commit 7276fb9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
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

0 comments on commit 7276fb9

Please sign in to comment.