project error at: https://github.com/0x1abin/M5Stack_TinyBasicPlus



  • When I compile the files on this file,often error:... is not declared in this scope...



  • Anyone can fix it?



  • Somebody?



  • A screenshot or full text of the error would be helpful...



  • Error:
    Arduino:1.8.9 (Windows 7), 开发板:"M5Stack-Core-ESP32, QIO, 80MHz, No OTA (Large APP), 921600, None"

    C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Administrator\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Administrator\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Administrator\Documents\Arduino\libraries -fqbn=esp32:esp32:m5stack-core-esp32:FlashMode=qio,FlashFreq=80,PartitionScheme=no_ota,UploadSpeed=921600,DebugLevel=none -ide-version=10809 -build-path
    (many words)
    正在编译项目...
    "C:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0/bin/xtensa-esp32-elf-g++" -DESP_PLATFORM "-DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h"" -DHAVE_CONFIG_H "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/config" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/app_trace" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/app_update" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/asio" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/bootloader_support" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/bt" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/coap" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/console" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/driver" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/esp-tls" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/esp32" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/esp_adc_cal" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/esp_event" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/esp_http_client" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/esp_http_server" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/esp_https_ota" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/esp_ringbuf" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/ethernet" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/expat" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/fatfs" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/freemodbus" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/freertos" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/heap" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/idf_test" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/jsmn" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/json" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/libsodium" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/log" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/lwip" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/mbedtls" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/mdns" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/micro-ecc" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/mqtt" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/newlib" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/nghttp" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/nvs_flash" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/openssl" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/protobuf-c" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/protocomm" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/pthread" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/sdmmc" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/smartconfig_ack" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/soc" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/spi_flash" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/spiffs" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/tcp_transport" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/tcpip_adapter" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/ulp" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/vfs" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/wear_levelling" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/wifi_provisioning" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/wpa_supplicant" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/xtensa-debug-module" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/esp32-camera" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/esp-face" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/include/fb_gfx" -std=gnu++11 -fno-exceptions -Os -g3 -Wpointer-arith -fexceptions -fstack-protector -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -w -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -fno-rtti -MMD -c -DF_CPU=240000000L -DARDUINO=10809 -DARDUINO_M5Stack_Core_ESP32 -DARDUINO_ARCH_ESP32 "-DARDUINO_BOARD="M5Stack_Core_ESP32"" "-DARDUINO_VARIANT="m5stack_core_esp32"" -DESP32 -DCORE_DEBUG_LEVEL=0 "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\cores\esp32" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\variants\m5stack_core_esp32" "-IC:\Users\Administrator\Documents\Arduino\libraries\M5Stack\src" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\libraries\Wire\src" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\libraries\SPI\src" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\libraries\FS\src" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\libraries\SD\src" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\libraries\SPIFFS\src" "C:\Users\ADMINI~1\AppData\Local\Temp\arduino_build_883032\sketch\M5Stack_TinyBasicPlus.ino.cpp" -o "C:\Users\ADMINI~1\AppData\Local\Temp\arduino_build_883032\sketch\M5Stack_TinyBasicPlus.ino.cpp.o"
    C:\Users\Administrator\Desktop\M5Stack_TinyBasicPlus-master\M5Stack_TinyBasicPlus\M5Stack_TinyBasicPlus.ino: In function 'void setup()':

    M5Stack_TinyBasicPlus:2029:40: error: 'printString' was not declared in this scope

    printString((unsigned char*)initLogok);

    C:\Users\Administrator\Desktop\M5Stack_TinyBasicPlus-master\M5Stack_TinyBasicPlus\M5Stack_TinyBasicPlus.ino: In function 'void outchar(unsigned char)':

    M5Stack_TinyBasicPlus:2182:18: error: 'termPutchar' was not declared in this scope

     termPutchar(c);
    
                  ^
    

    使用 0.2.8 版本的库 M5Stack 在文件夹: C:\Users\Administrator\Documents\Arduino\libraries\M5Stack
    使用 1.0.1 版本的库 Wire 在文件夹: C:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\libraries\Wire
    使用 1.0 版本的库 SPI 在文件夹: C:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\libraries\SPI
    使用 1.0 版本的库 FS 在文件夹: C:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\libraries\FS
    使用 1.0.5 版本的库 SD 在文件夹: C:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\libraries\SD
    使用 1.0 版本的库 SPIFFS 在文件夹: C:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\libraries\SPIFFS
    exit status 1
    'printString' was not declared in this scope



  • questions at:

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    • termInit();

    • printString((unsigned char*)initLogok);

    • termPutchar(c);



  • somebody???



  • problems at...

    void setup()
    {
    #ifdef ARDUINO
    // Serial.begin(kConsoleBaud); // opens serial port
    M5.begin();
    Wire.begin();


    • termInit();

    // while( !Serial ); // for Leonardo

    Serial.println( sentinel );

    // const unsigned char initlogo[] = "\n"
    // " ___ __ \r\n"
    // " / _ )/ /
    _____ / /
    \r\n"
    // " / _ / / // / _ \/ '
    /\r\n"
    // " ///\, /////\\\r\n"
    // " /___/ v" " on " "\r\n"
    // ;

    // const unsigned char initLogo[] =
    // " __ __ ____ \r\n"
    // " | \/ | | \r\n"
    // " | |\/| |
    \ \r\n"
    // " | | | |) |\r\n"
    // " |
    | |
    |
    ___/ \r\n"
    // ;

    const unsigned char initLogo[] =
    "__ __ ____ ____ _ _ \r\n"
    "| \/ | / || | __ _ | | \r\n"
    "| |\/| |
    \
    \| / ` |/ | |/ / \r\n"
    "| | | |
    ) |
    ) | || (
    | | (
    | < \r\n"
    "|
    | ||// \\,|\_||\\ \r\n"
    ;

    const unsigned char initLogox[] =
    "## ## ######## ###### ######## ### ###### ## ## \r\n"
    "### ### ## ## ## ## ## ## ## ## ## ## \r\n"
    "#### #### ## ## ## ## ## ## ## ## \r\n"
    "## ### ## ####### ###### ## ## ## ## ##### \r\n"
    "## ## ## ## ## ######### ## ## ## \r\n"
    "## ## ## ## ## ## ## ## ## ## ## ## ## \r\n"
    "## ## ###### ###### ## ## ## ###### ## ##";

    const unsigned char initLogok[] =
    "## ## ######## \r\n"
    "### ### ## \r\n"
    "#### #### ## \r\n"
    "## ### ## ####### \r\n"
    "## ## ## \r\n"
    "## ## ## ## \r\n"
    "## ## ###### \r\n";

    const char initLogoz[] =
    "'##::::'##:'########:\r\n"
    "###::'###: ##.....::\r\n"
    "####'####: ##:::::::\r\n"
    "## ### ##: #######::\r\n"
    "##. #: ##:...... ##:\r\n"
    "##:.:: ##:'##::: ##:\r\n"
    "##:::: ##:. ######::\r\n"
    "..:::::..:::......:::\r\n";

    const unsigned char initLogop[] =
    " DD \r\n"
    " DG DD \r\n"
    " LD; # DD \r\n"
    " DD # j## DD \r\n"
    " DD # # # G\r\n"
    " DD ## G, DDD\r\n"
    " DD # DD D\r\n"
    " D DD DD D\r\n"
    " D DDGD. D\r\n"
    " D D\r\n"
    " Dj DD\r\n"
    " iDD DG \r\n"
    " DD DD \r\n"
    " DD DG \r\n"
    " GDDD \r\n";

    // M5.Lcd.print(initLogoz);


    • printString((unsigned char*)initLogok);

    printString((unsigned char*)"\r\nhttp://www.m5stack.com\r\n");
    printString((unsigned char*)"Basic on the M5Stack library 0.1.2\r\n");
    printmsg(initmsg);
    // printmsg(initlogo);

    #ifdef ENABLE_FILEIO
    initSD();

    #ifdef ENABLE_AUTORUN
    if( SD.exists( kAutorunFilename )) {
    program_end = program_start;
    fp = SD.open( kAutorunFilename );
    inStream = kStreamFile;
    inhibitOutput = true;
    runAfterLoad = true;
    }
    #endif /* ENABLE_AUTORUN */

    #endif /* ENABLE_FILEIO */

    #ifdef ENABLE_EEPROM
    #ifdef ENABLE_EAUTORUN
    // read the first byte of the eeprom. if it's a number, assume it's a program we can load
    int val = EEPROM.read(0);
    if( val >= '0' && val <= '9' ) {
    program_end = program_start;
    inStream = kStreamEEProm;
    eepos = 0;
    inhibitOutput = true;
    runAfterLoad = true;
    }
    #endif /* ENABLE_EAUTORUN /
    #endif /
    ENABLE_EEPROM */

    #endif /* ARDUINO */
    }

    problems at:

    • [text]