MCU-ZHISHAN-IoT / HML_FwLib_STC89

A lite firmware library for STC micro STC89 series MCU based on SDCC complier | 基於SDCC編譯器實現的針對宏晶微电子(STC Micro)STC89系列單晶片的輕量級固件庫
https://hw.zhishan-iot.tk/page/hml/detail/fwlib_stc89.html
Do What The F*ck You Want To Public License
62 stars 19 forks source link

Failed in compiling test.c #5

Closed IOsetting closed 3 years ago

IOsetting commented 3 years ago

Compilation failed in Ubuntu20.04 with sdcc 4.1.0, what could be the problem?

$ sdcc --version
SDCC : mcs51/z80/z180/r2k/r2ka/r3ka/gbz80/tlcs90/ez80_z80/z80n/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8/pdk13/pdk14/pdk15 4.1.0 #12072 (Linux)
published under GNU General Public License (GPL)

$ more ../VERSION 
v1.3.1

$ make -j
 - Collect MCU config information
[mcu-model] STC89C52RC (code=8192B, iram=256B, xram=256B)
[mcu-clock] 11.059200 MHz
[prescaler] 12T mode
 - Start to build!
CC  ../src/tim.c
CC  ../src/uart.c
CC  ../src/gpio.c
CC  ../src/tim2.c
CC  ../src/wdt.c
../src/uart.c:28: warning 112: function 'complement' implicit declaration
../src/uart.c:28: error 101: too many parameters 
../src/uart.c:28: error 45: operand invalid for bitwise operation
../src/uart.c:28: warning 113: left & right types are 
void,unsigned-char fixed
../src/uart.c:321: warning 112: function 'complement' implicit declaration
../src/uart.c:321: error 101: too many parameters 

I got the same error with v1.2.0.

WeilunFong commented 3 years ago

This problem is caused by a offical changes in between sdcc v4.0.0 and sdcc v4.1.0(ref to r11619). We will follow this change from sdcc, and if you want to enjoy current version of HML now, try building it with sdcc v4.0.0. Thank you for your report

WeilunFong commented 3 years ago

@zsiothsu Please fix this problem.

IOsetting commented 3 years ago

Thanks for the fix!