These are chat archives for SmingHub/Sming

21st
Dec 2016
crosofg
@crosofg
Dec 21 2016 16:34
which is hte lateset supported sdk
1.5.4?
C:\tools\Sming\samples\Basic_rBoot>make
LD out/build/app_0.out
out/build\libmain2.a(app_main.o): In function `flash_data_check':
(.irom0.text+0x6ac): undefined reference to `user_rf_cal_sector_set'
out/build\libmain2.a(app_main.o): In function `flash_data_check':
(.irom0.text+0x827): undefined reference to `user_rf_cal_sector_set'
collect2.exe: error: ld returned 1 exit status
make: *** [out/build/app_0.out] Error 1
I am using 1.5.4
@/all
crosofg
@crosofg
Dec 21 2016 16:40
used patch 1.5.4.1 and added code to user_main
seems to be working
extern "C" uint32 ICACHE_FLASH_ATTR __attribute__((weak)) user_rf_cal_sector_set(void)
{
    enum flash_size_map size_map = system_get_flash_size_map();
    uint32 rf_cal_sec = 0;

    switch (size_map) {
        case FLASH_SIZE_4M_MAP_256_256:
            rf_cal_sec = 128 - 5;
            break;

        case FLASH_SIZE_8M_MAP_512_512:
            rf_cal_sec = 256 - 5;
            break;

        case FLASH_SIZE_16M_MAP_512_512:
        case FLASH_SIZE_16M_MAP_1024_1024:
            rf_cal_sec = 512 - 5;
            break;

        case FLASH_SIZE_32M_MAP_512_512:
        case FLASH_SIZE_32M_MAP_1024_1024:
            rf_cal_sec = 1024 - 5;
            break;

        default:
            rf_cal_sec = 0;
            break;
    }

    return rf_cal_sec;
}
added to user_main.cpp and rebuilt
crosofg
@crosofg
Dec 21 2016 17:13
c:/tools/sming/Sming/compiler/lib/\libsming.a(HttpServer.o):(.text._ZN10HttpServer13initWebSocketER20HttpServerConnectionR11HttpRequestR12HttpResponse+0x18): undefined reference to `WebSocket::WebSocket(HttpServerConnection*)'
undefined reference to websocket
c:/tools/sming/Sming/compiler/lib/\libsming.a(HttpServer.o):(.text._ZN6VectorI9WebSocketED2Ev[_ZN6VectorI9WebSocketED5Ev]+0x4): undefined reference to `WebSocket::~WebSocket()'
c:/tools/sming/Sming/compiler/lib/\libsming.a(HttpServer.o): In function `Vector<WebSocket>::removeAllElements()':
C:\tools\Sming\Sming/Wiring/WVector.h:47: undefined reference to `WebSocket::~WebSocket()'
c:/tools/sming/Sming/compiler/lib/\libsming.a(HttpServer.o):(.text._ZN10HttpServer13initWebSocketER20HttpServerConnectionR11HttpRequestR12HttpResponse+0x18): undefined reference to `WebSocket::WebSocket(HttpServerConnection*)'
c:/tools/sming/Sming/compiler/lib/\libsming.a(HttpServer.o):(.text._ZN10HttpServer13initWebSocketER20HttpServerConnectionR11HttpRequestR12HttpResponse+0x1c): undefined reference to `WebSocket::initialize(HttpRequest&, HttpResponse&)'
c:/tools/sming/Sming/compiler/lib/\libsming.a(HttpServer.o):(.text._ZN10HttpServer13initWebSocketER20HttpServerConnectionR11HttpRequestR12HttpResponse+0x20): undefined reference to `WebSocket::enableCommand()'
c:/tools/sming/Sming/compiler/lib/\libsming.a(HttpServer.o):(.text._ZN10HttpServer13initWebSocketER20HttpServerConnectionR11HttpRequestR12HttpResponse+0x4c): undefined reference to `WebSocket::WebSocket(HttpServerConnection*)'
c:/tools/sming/Sming/compiler/lib/\libsming.a(HttpServer.o):(.text._ZN10HttpServer13initWebSocketER20HttpServerConnectionR11HttpRequestR12HttpResponse+0x58): undefined reference to `WebSocket::initialize(HttpRequest&, HttpResponse&)'
c:/tools/sming/Sming/compiler/lib/\libsming.a(HttpServer.o): In function `Delegate<void (WebSocket&)>::operator bool() const':
C:\tools\Sming\Sming/Wiring/WVector.h:47: undefined reference to `WebSocket::enableCommand()'
c:/tools/sming/Sming/compiler/lib/\libsming.a(HttpServer.o): In function `HttpServer::removeWebSocket(HttpServerConnection&)':
C:\tools\Sming\Sming/Wiring/WVector.h:47: undefined reference to `WebSocket::~WebSocket()'
collect2.exe: error: ld returned 1 exit status
make: *** [out/build/app.out] Error 1
slaff
@slaff
Dec 21 2016 17:26
@crosofg See the first answer: SmingHub/Sming#833
crosofg
@crosofg
Dec 21 2016 17:53
tx it did the magic