These are chat archives for SmingHub/Sming

18th
Jul 2016
Karthikeyan
@lxkarthi
Jul 18 2016 09:07

any facing the following issues with latest SMING

code
C+ system/m_printf.cpp
In file included from c:\tools\sming\sming\smingcore\HardwarePWM.h:25:0,
from c:\tools\sming\sming\smingcore\smingcore.h:25,
from system/m_printf.cpp:10:
SmingCore/pwm.h:61:18: error: conflicting declaration of 'DriverPWM EspPWM' wit
'C' linkage
extern DriverPWM EspPWM;
^
In file included from c:\tools\sming\sming\smingcore\smingcore.h:24:0,
from system/m_printf.cpp:10:
c:\tools\sming\sming\smingcore\DriverPWM.h:61:18: note: previous declaration wi
h 'C++' linkage
extern DriverPWM EspPWM;
^
In file included from c:\tools\sming\sming\smingcore\smingcore.h:25:0,
from system/m_printf.cpp:10:
c:\tools\sming\sming\smingcore\HardwarePWM.h:47:17: error: 'PWM_CHANNEL_NUM_MAX
was not declared in this scope
uint8 channels[PWM_CHANNEL_NUM_MAX];
^
make: * [out/build/system/m_printf.o] Error 1

C:\tools\sming\Sming>grep -r _CHANNEL_NUM_MAX .
Binary file ./SmingCore/.HardwarePWM.h.swp matches
./SmingCore/HardwarePWM.cpp: uint32 io_info[PWM_CHANNEL_NUM_MAX][3];
// pin information
./SmingCore/HardwarePWM.cpp: uint32 pwm_duty_init[PWM_CHANNEL_NUM_MA
]; // pwm duty
./SmingCore/HardwarePWM.h: uint8 channels[PWM_CHANNEL_NUM_MAX];
code

Karthikeyan
@lxkarthi
Jul 18 2016 09:53
fixed for both issues. Here is the fix.
1) commented extra declaration in DriverPWM.h
2) Problem for undefined PWM_CHANNEL_NUM_MAX is, same file name in include paths is messing up. Renamed SmingCore/PWM.h to SmingCore/SMINGPWM.h
Compilation passed.
if these are real issues, please fix them in repo :)