Smoothieware_best-for-pnp 工具链的升级尝试

news2025/1/11 22:55:31

文章目录

    • Smoothieware_best-for-pnp 工具链的升级尝试
    • 概述
    • 实验
    • 工具链安装的思路
    • 更换工具链的工作
    • 备注
    • END

Smoothieware_best-for-pnp 工具链的升级尝试

概述

正在迁移Smoothieware_best-for-pnp到MCUXPresso的失败实验中徘徊.
现在已知2者的工具链版本是不一样的. 通过2进制比对, 知道2家用的都是公版的gcc for arm的版本.
MCUXPresso 是10.3, NXP家并没有改gcc, 是公版的实现. gcc-arm-none-eabi-10.3-2021.10-win32.zip
Smoothieware_best-for-pnp 是4.8, 也是公版的实现 gcc-arm-none-eabi-4_8-2014q1-20140314-win32.zip

但是在MCUXPresso尝试编译, 发现有些语法都过不了, 要手工改实现.
Smoothieware_best-for-pnp的命令行编译, 是直接能编译过的.

先怀疑自己吧, 有点怀疑我编译的文件集合不太对, 或者文件编译时, 编译宏是否没加上? 头文件路径包含的不对?
那就去仔细研究一下Smoothieware_best-for-pnp的工具链安装和makefile.

做过实验后才知道, 正如Smoothieware_best-for-pnp作者在工程文档中说的那样, 这个工程只能用他们提供的工具链(gcc-arm-none-eabi-4_8-2014q1-20140314-win32.zip)进行编译, 验证了作者的这个说明真是杯具.

不过每个实验都没有白做的, 或多或少的都有收获.
以后如果有命令行编译的工程, 那我就知道怎么给他们升级工具链了.

也启发了新实验想法:

  • 将IDE的工具链换为Smoothieware_best-for-pnp的, 再实验吧.
  • 将makefile弄清楚, 那么我就可以将要编译的文件集合弄清, 将每个文件要包含的头文件, 参数宏弄清. 在IDE中, 哪里语法不合适, 哪个文件编译的命令行不合适, 手工修改也不难啊.

将这次实验记录一下.

实验

改了win_install.cmd为case_win_install.cmd, 打印了每句脚本的含义, 弄清楚了工具链的安装过程, 工具链环境的构造.
case_win_install.cmd 内容如下:

@echo on
rem Copyright 2013 Adam Green (http://mbed.org/users/AdamGreen/)
rem
rem Licensed under the Apache License, Version 2.0 (the "License");
rem you may not use this file except in compliance with the License.
rem You may obtain a copy of the License at
rem
rem     http://www.apache.org/licenses/LICENSE-2.0
rem
rem Unless required by applicable law or agreed to in writing, software
rem distributed under the License is distributed on an "AS IS" BASIS,
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rem See the License for the specific language governing permissions and
rem limitations under the License.


rem Setup batch file specific environment variables.
setlocal

rem ROOTDIR = D:\3rd_prj\Smoothieware_best-for-pnp\
set ROOTDIR=%~dp0

rem LOGFILE = D:\3rd_prj\Smoothieware_best-for-pnp\win_install.log
set LOGFILE=%ROOTDIR%win_install.log

rem ERRORFILE = D:\3rd_prj\Smoothieware_best-for-pnp\win_install.err
set ERRORFILE=%ROOTDIR%win_install.err

rem GCC4ARM_VERSION = gcc-arm-none-eabi-4_8-2014q1
set GCC4ARM_VERSION=gcc-arm-none-eabi-10.3-2021.10

rem GCC4ARM_FILENAME = gcc-arm-none-eabi-4_8-2014q1-20140314-win32.zip
set GCC4ARM_FILENAME=gcc-arm-none-eabi-10.3-2021.10_M.zip

rem GCC4ARM_URL = https://launchpad.net/gcc-arm-embedded/4.8/4.8-2014-q1-update/+download/gcc-arm-none-eabi-4_8-2014q1-20140314-win32.zip
set GCC4ARM_URL=https://launchpad.net/gcc-arm-embedded/4.8/4.8-2014-q1-update/+download/%GCC4ARM_FILENAME%

rem GCC4ARM_TAR = D:\3rd_prj\Smoothieware_best-for-pnp\gcc-arm-none-eabi-4_8-2014q1-20140314-win32.zip
set GCC4ARM_TAR=%ROOTDIR%%GCC4ARM_FILENAME%

rem GCC4ARM_MD5 = 09c19b3248863074f5498a88f31bee16
set GCC4ARM_MD5=355ac5330cc42d316f92dc39313c6dba

rem GCC4ARM_MD5_FILENAME = D:\3rd_prj\Smoothieware_best-for-pnp\gcc-arm-none-eabi.md5
set GCC4ARM_MD5_FILENAME=%ROOTDIR%gcc-arm-none-eabi.md5

rem GCC4ARM_DIR = D:\3rd_prj\Smoothieware_best-for-pnp\gcc-arm-none-eabi
set GCC4ARM_DIR=%ROOTDIR%gcc-arm-none-eabi

rem GCC4ARM_BINDIR = D:\3rd_prj\Smoothieware_best-for-pnp\gcc-arm-none-eabi\bin
set GCC4ARM_BINDIR=%GCC4ARM_DIR%\bin

rem OUR_MAKE = D:\3rd_prj\Smoothieware_best-for-pnp\build\win32\make.exe
set OUR_MAKE=%ROOTDIR%build\win32\make.exe

rem BUILDENV_CMD = D:\3rd_prj\Smoothieware_best-for-pnp\gcc-arm-none-eabi\bin\buildenv.cmd
set BUILDENV_CMD=%GCC4ARM_BINDIR%\buildenv.cmd

rem BUILDSHELL_CMD = D:\3rd_prj\Smoothieware_best-for-pnp\BuildShell.cmd
set BUILDSHELL_CMD=%ROOTDIR%BuildShell.cmd

rem BUILDSHELL_DEBUG_CMD = D:\3rd_prj\Smoothieware_best-for-pnp\BuildShellDebug.cmd
set BUILDSHELL_DEBUG_CMD=%ROOTDIR%BuildShellDebug.cmd

echo ROOTDIR = %ROOTDIR%
echo LOGFILE = %LOGFILE%
echo ERRORFILE = %ERRORFILE%
echo GCC4ARM_VERSION = %GCC4ARM_VERSION%
echo GCC4ARM_FILENAME = %GCC4ARM_FILENAME%
echo GCC4ARM_URL = %GCC4ARM_URL%
echo GCC4ARM_TAR = %GCC4ARM_TAR%
echo GCC4ARM_MD5 = %GCC4ARM_MD5%
echo GCC4ARM_MD5_FILENAME = %GCC4ARM_MD5_FILENAME%
echo GCC4ARM_DIR = %GCC4ARM_DIR%
echo GCC4ARM_BINDIR = %GCC4ARM_BINDIR%
echo OUR_MAKE = %OUR_MAKE%
echo BUILDENV_CMD = %BUILDENV_CMD%
echo BUILDSHELL_CMD = %BUILDSHELL_CMD%
echo BUILDSHELL_DEBUG_CMD = %BUILDSHELL_DEBUG_CMD%



rem Make sure that we are running with current directory set to where this
rem batch file is located.
pushd %ROOTDIR%

rem Initialize install log files.
echo Logging install results to %LOGFILE%
echo %DATE% %TIME%  Starting %0 %*>%LOGFILE%



rem echo Downloading GNU Tools for ARM Embedded Processors...
rem echo %DATE% %TIME%  Executing build\win32\curl -kL0 %GCC4ARM_URL%>>%LOGFILE%

rem curl -kL0 https://launchpad.net/gcc-arm-embedded/4.8/4.8-2014-q1-update/+download/gcc-arm-none-eabi-4_8-2014q1-20140314-win32.zip  1>D:\3rd_prj\Smoothieware_best-for-pnp\gcc-arm-none-eabi-4_8-2014q1-20140314-win32.zip
rem build\win32\curl -kL0 %GCC4ARM_URL% >%GCC4ARM_TAR%

rem if errorlevel 1 goto ExitOnError


echo Validating md5 signature of GNU Tools for ARM Embedded Processors...
echo %GCC4ARM_MD5% *%GCC4ARM_FILENAME%>%GCC4ARM_MD5_FILENAME%




call :RunAndLog build\win32\md5sum --check %GCC4ARM_MD5_FILENAME%
if errorlevel 1 goto ExitOnError
rem del "%GCC4ARM_MD5_FILENAME%"





echo Extracting GNU Tools for ARM Embedded Processors...
call :RunAndLog rd /s /q %GCC4ARM_DIR%
call :RunAndLog md %GCC4ARM_DIR%
if errorlevel 1 goto ExitOnError
call :RunAndLog cd %GCC4ARM_DIR%
call :RunAndLog ..\build\win32\bsdtar xf %GCC4ARM_TAR%
if errorlevel 1 goto ExitOnError
call :RunAndLog cd ..



echo Creating helper scripts...
echo @echo off>%BUILDENV_CMD%
echo REM Uncomment next line and set destination drive to match mbed device>>%BUILDENV_CMD%
echo REM SET LPC_DEPLOY=copy PROJECT.bin f:\>>%BUILDENV_CMD%
echo.>>%BUILDENV_CMD%
echo SET PATH=%%~dp0;%%~dp0..\..\build\win32;%%PATH%%>>%BUILDENV_CMD%
echo.>>%BUILDENV_CMD%
echo REM execute given command if any >>%BUILDENV_CMD%
echo %%*>>%BUILDENV_CMD%
rem



echo @cmd.exe /K %%~dp0\gcc-arm-none-eabi\bin\buildenv.cmd %%*>%BUILDSHELL_CMD%



rem Place GNU Tool for ARM Embedded Processors in the path before building gcc4mbed code.
set path=%GCC4ARM_BINDIR%;%ROOTDIR%build\win32;%PATH%



echo Performing a clean build of the gcc4mbed samples...
call :RunAndLog %OUR_MAKE% clean
if errorlevel 1 goto ExitOnError



call :RunAndLog %OUR_MAKE%
if errorlevel 1 goto ExitOnError

rem case by ls
goto :MyEnd

echo Cleaning up intermediate files...
rem call :RunAndLog del /f %GCC4ARM_TAR%

echo **************************************************************************
echo To build gcc4mbed samples, you will first need to run the following batch
echo file so that your environment variables are set correctly:
echo  %BUILDSHELL_CMD%
echo You will want to run this each time you start a new Command Prompt.  You
echo can simply double-click on this batch file from Explorer to launch a
echo Command Prompt that has been properly initialized for building gcc4mbed
echo based code.
echo **************************************************************************

rem Restore current directory and exit batch file on success.
echo %DATE% %TIME%  Finished successfully>>%LOGFILE%
echo Finished successfully
goto Exit



rem Logs the command to be run and then executes the command while logging the results.
:RunAndLog
echo %DATE% %TIME%  Executing %*>>%LOGFILE%
%* 1>>%LOGFILE% 2>%ERRORFILE%
goto :EOF


:my_after_call
echo %DATE% %TIME%  Executing %*>>log1.txt
%* 1>>log1.txt 2>log2.txt
goto :EOF


rem Exits the batch file due to error.
rem Make sure that any stderr text ends up in win_install.log and then restore
rem the current directory before forcing an early exit.
:ExitOnError
type %ERRORFILE% >>%LOGFILE%
echo %DATE% %TIME%  Failure forced early exit>>%LOGFILE%
type %LOGFILE%


:Exit
del %ERRORFILE%
popd
pause

:MyEnd
rem >> :MyEnd
popd
pause

工具链安装的思路

Smoothieware_best-for-pnp工程中, 已经自带了编译时用到的工具 位置 ./build/win32
在这里插入图片描述
脚本中用到的exe如下:
curl.exe 下载远端的https链接的gcc_for_arm预编译好的zip包
md5sum.exe 验证下载后的zip包的哈希值是否正确.
bsdtar.exe 用来将下载后的.zip文件解包.
make.exe 用来编译工程. 只需要make即可, 具体操作定义在makefile和子目录中的.mk中, 需要用到解压后的gcc工具链…

win_install.cmd运行时, 先去下载远端编译好的gcc压缩包. 到本地后, 比较win_install.cmd中手工预定义的md5
解压gcc的zip包到工程根目录, 名称为gcc-arm-none-eabi.
在这里插入图片描述

然后写2个cmd, 作为工具链环境.
在这里插入图片描述
在这里插入图片描述
编译时, 需要先执行buildShell.cmd, 然后执行make编译工程.

更换工具链的工作

将gcc-arm-none-eabi-10.3-2021.10-win32.zip解压开, 再打一个zip包, 让根目录下直接为4个子目录, 保持和4.8的目录结构一致.
在这里插入图片描述
用/build/win32/md5sum.exe 来确定新做的.zip包的hash值, 填入case_win_install.cmd
在这里插入图片描述

因为我们用的是手工摆放的gcc.zip包, 就不需要下载了.
将case_win_installed.cmd中的包下载和解压完删除下载后的.zip包的操作注释掉.
在这里插入图片描述
在这里插入图片描述
运行完case_win_installed.cmd时, 其实已经编译工程一次了, 不过没编译过. 因为很多屏幕上的结果都重定向到日志中了.
此时, 在工具链环境中尝试编译, 先运行 BuildShell.cmd, 然后运行make.

D:\3rd_prj\Smoothieware_best-for-pnp>make
make[1]: Entering directory `D:/3rd_prj/Smoothieware_best-for-pnp/mbed'
Building src
make[2]: Entering directory `D:/3rd_prj/Smoothieware_best-for-pnp/mbed/src'
Building mbed-lpc1768.mk
make[3]: Entering directory `D:/3rd_prj/Smoothieware_best-for-pnp/mbed/src'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `D:/3rd_prj/Smoothieware_best-for-pnp/mbed/src'
Building mbed-lpc11u24.mk
make[3]: Entering directory `D:/3rd_prj/Smoothieware_best-for-pnp/mbed/src'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `D:/3rd_prj/Smoothieware_best-for-pnp/mbed/src'
make[2]: Leaving directory `D:/3rd_prj/Smoothieware_best-for-pnp/mbed/src'
make[1]: Leaving directory `D:/3rd_prj/Smoothieware_best-for-pnp/mbed'
Building Smoothie
**NOTE** Excluding modules tools/drillingcycles tools/spindle
make[1]: Entering directory `D:/3rd_prj/Smoothieware_best-for-pnp/src'
Building for device lpc1768
make[2]: Entering directory `D:/3rd_prj/Smoothieware_best-for-pnp/src'
Compiling version.cpp
Compiling modules/tools/zprobe/CartGridStrategy.cpp
In file included from modules/tools/zprobe/CartGridStrategy.cpp:87:
modules/tools/zprobe/CartGridStrategy.h:39:10: error: 'string' in namespace 'std' does not name a type
   39 |     std::string before_probe, after_probe;
      |          ^~~~~~
modules/tools/zprobe/CartGridStrategy.h:7:1: note: 'std::string' is defined in header '<string>'; did you forget to '#include <string>'?
    6 | #include <tuple>
  +++ |+#include <string>
    7 |
modules/tools/zprobe/CartGridStrategy.h:48:9: error: 'uint8_t' does not name a type; did you mean 'wint_t'?
   48 |         uint8_t configured_grid_x_size:8;
      |         ^~~~~~~
      |         wint_t
modules/tools/zprobe/CartGridStrategy.h:49:9: error: 'uint8_t' does not name a type; did you mean 'wint_t'?
   49 |         uint8_t configured_grid_y_size:8;
      |         ^~~~~~~
      |         wint_t
modules/tools/zprobe/CartGridStrategy.h:50:9: error: 'uint8_t' does not name a type; did you mean 'wint_t'?
   50 |         uint8_t current_grid_x_size:8;
      |         ^~~~~~~
      |         wint_t
modules/tools/zprobe/CartGridStrategy.h:51:9: error: 'uint8_t' does not name a type; did you mean 'wint_t'?
   51 |         uint8_t current_grid_y_size:8;
      |         ^~~~~~~
      |         wint_t
modules/tools/zprobe/CartGridStrategy.cpp: In member function 'virtual bool CartGridStrategy::handleConfig()':
modules/tools/zprobe/CartGridStrategy.cpp:146:11: error: 'class CartGridStrategy' has no member named 'current_grid_x_size'
  146 |     this->current_grid_x_size = this->configured_grid_x_size = THEKERNEL->config->value(leveling_strategy_checksum, cart_grid_leveling_strategy_checksum, grid_x_size_checksum)->by_default(grid_size)->as_number();
      |           ^~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:146:39: error: 'class CartGridStrategy' has no member named 'configured_grid_x_size'
  146 |     this->current_grid_x_size = this->configured_grid_x_size = THEKERNEL->config->value(leveling_strategy_checksum, cart_grid_leveling_strategy_checksum, grid_x_size_checksum)->by_default(grid_size)->as_number();
      |                                       ^~~~~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:147:11: error: 'class CartGridStrategy' has no member named 'current_grid_y_size'
  147 |     this->current_grid_y_size = this->configured_grid_y_size = THEKERNEL->config->value(leveling_strategy_checksum, cart_grid_leveling_strategy_checksum, grid_y_size_checksum)->by_default(grid_size)->as_number();
      |           ^~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:147:39: error: 'class CartGridStrategy' has no member named 'configured_grid_y_size'
  147 |     this->current_grid_y_size = this->configured_grid_y_size = THEKERNEL->config->value(leveling_strategy_checksum, cart_grid_leveling_strategy_checksum, grid_y_size_checksum)->by_default(grid_size)->as_number();
      |                                       ^~~~~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:150:29: error: 'configured_grid_x_size' was not declared in this scope
  150 |     this->new_file_format= (configured_grid_x_size != configured_grid_y_size);
      |                             ^~~~~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:150:55: error: 'configured_grid_y_size' was not declared in this scope
  150 |     this->new_file_format= (configured_grid_x_size != configured_grid_y_size);
      |                                                       ^~~~~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:210:11: error: 'class CartGridStrategy' has no member named 'before_probe'
  210 |     this->before_probe = THEKERNEL->config->value(leveling_strategy_checksum, cart_grid_leveling_strategy_checksum, before_probe_gcode_checksum)->by_default("")->as_string();
      |           ^~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:211:11: error: 'class CartGridStrategy' has no member named 'after_probe'
  211 |     this->after_probe = THEKERNEL->config->value(leveling_strategy_checksum, cart_grid_leveling_strategy_checksum, after_probe_gcode_checksum)->by_default("")->as_string();
      |           ^~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:214:18: error: 'before_probe' was not declared in this scope
  214 |     std::replace(before_probe.begin(), before_probe.end(), '_', ' '); // replace _ with space
      |                  ^~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:215:18: error: 'after_probe' was not declared in this scope
  215 |     std::replace(after_probe.begin(), after_probe.end(), '_', ' '); // replace _ with space
      |                  ^~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp: In member function 'void CartGridStrategy::save_grid(StreamOutput*)':
modules/tools/zprobe/CartGridStrategy.cpp:242:9: error: 'current_grid_x_size' was not declared in this scope
  242 |     if((current_grid_x_size != configured_grid_x_size) || (current_grid_y_size != configured_grid_y_size)) {
      |         ^~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:242:32: error: 'configured_grid_x_size' was not declared in this scope
  242 |     if((current_grid_x_size != configured_grid_x_size) || (current_grid_y_size != configured_grid_y_size)) {
      |                                ^~~~~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:242:60: error: 'current_grid_y_size' was not declared in this scope
  242 |     if((current_grid_x_size != configured_grid_x_size) || (current_grid_y_size != configured_grid_y_size)) {
      |                                                            ^~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:242:83: error: 'configured_grid_y_size' was not declared in this scope
  242 |     if((current_grid_x_size != configured_grid_x_size) || (current_grid_y_size != configured_grid_y_size)) {
      |                                                                                   ^~~~~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:254:40: error: 'configured_grid_x_size' was not declared in this scope; did you mean 'tmp_configured_grid_size'?
  254 |     uint8_t tmp_configured_grid_size = configured_grid_x_size;
      |                                        ^~~~~~~~~~~~~~~~~~~~~~
      |                                        tmp_configured_grid_size
modules/tools/zprobe/CartGridStrategy.cpp:262:36: error: 'configured_grid_y_size' was not declared in this scope; did you mean 'tmp_configured_grid_size'?
  262 |         tmp_configured_grid_size = configured_grid_y_size;
      |                                    ^~~~~~~~~~~~~~~~~~~~~~
      |                                    tmp_configured_grid_size
modules/tools/zprobe/CartGridStrategy.cpp:282:25: error: 'configured_grid_y_size' was not declared in this scope; did you mean 'tmp_configured_grid_size'?
  282 |     for (int y = 0; y < configured_grid_y_size; y++) {
      |                         ^~~~~~~~~~~~~~~~~~~~~~
      |                         tmp_configured_grid_size
modules/tools/zprobe/CartGridStrategy.cpp: In member function 'bool CartGridStrategy::load_grid(StreamOutput*)':
modules/tools/zprobe/CartGridStrategy.cpp:320:28: error: 'configured_grid_x_size' was not declared in this scope; did you mean 'load_grid_x_size'?
  320 |     if(load_grid_x_size != configured_grid_x_size) {
      |                            ^~~~~~~~~~~~~~~~~~~~~~
      |                            load_grid_x_size
modules/tools/zprobe/CartGridStrategy.cpp:335:32: error: 'configured_grid_y_size' was not declared in this scope; did you mean 'load_grid_y_size'?
  335 |         if(load_grid_y_size != configured_grid_y_size) {
      |                                ^~~~~~~~~~~~~~~~~~~~~~
      |                                load_grid_y_size
modules/tools/zprobe/CartGridStrategy.cpp:336:102: error: 'configured_grid_x_size' was not declared in this scope; did you mean 'load_grid_x_size'?
  336 |             stream->printf("error:grid size y is different read %d - config %d\n", load_grid_y_size, configured_grid_x_size);
      |                                                                                                      ^~~~~~~~~~~~~~~~~~~~~~
      |                                                                                                      load_grid_x_size
modules/tools/zprobe/CartGridStrategy.cpp:360:25: error: 'configured_grid_y_size' was not declared in this scope; did you mean 'load_grid_y_size'?
  360 |     for (int y = 0; y < configured_grid_y_size; y++) {
      |                         ^~~~~~~~~~~~~~~~~~~~~~
      |                         load_grid_y_size
modules/tools/zprobe/CartGridStrategy.cpp:361:29: error: 'configured_grid_x_size' was not declared in this scope; did you mean 'load_grid_x_size'?
  361 |         for (int x = 0; x < configured_grid_x_size; x++) {
      |                             ^~~~~~~~~~~~~~~~~~~~~~
      |                             load_grid_x_size
modules/tools/zprobe/CartGridStrategy.cpp: In member function 'virtual bool CartGridStrategy::handleGcode(Gcode*)':
modules/tools/zprobe/CartGridStrategy.cpp:386:17: error: 'before_probe' was not declared in this scope
  386 |             if(!before_probe.empty()) {
      |                 ^~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:399:17: error: 'after_probe' was not declared in this scope
  399 |             if(!after_probe.empty()) {
      |                 ^~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:415:17: error: 'before_probe' was not declared in this scope
  415 |             if(!before_probe.empty()) {
      |                 ^~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:424:17: error: 'after_probe' was not declared in this scope
  424 |             if(!after_probe.empty()) {
      |                 ^~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp: In member function 'bool CartGridStrategy::scan_bed(Gcode*)':
modules/tools/zprobe/CartGridStrategy.cpp:522:56: error: 'configured_grid_x_size' was not declared in this scope
  522 |     int n = gc->has_letter('I') ? gc->get_value('I') : configured_grid_x_size;
      |                                                        ^~~~~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:523:56: error: 'configured_grid_y_size' was not declared in this scope
  523 |     int m = gc->has_letter('J') ? gc->get_value('J') : configured_grid_y_size;
      |                                                        ^~~~~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp: In member function 'bool CartGridStrategy::doProbe(Gcode*)':
modules/tools/zprobe/CartGridStrategy.cpp:621:29: error: 'current_grid_x_size' was not declared in this scope
  621 |     if(gc->has_letter('I')) current_grid_x_size = gc->get_value('I'); // override default grid x size
      |                             ^~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:622:29: error: 'current_grid_y_size' was not declared in this scope
  622 |     if(gc->has_letter('J')) current_grid_y_size = gc->get_value('J'); // override default grid y size
      |                             ^~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:624:15: error: 'class CartGridStrategy' has no member named 'current_grid_x_size'
  624 |     if((this->current_grid_x_size * this->current_grid_y_size)  > (this->configured_grid_x_size * this->configured_grid_y_size)){
      |               ^~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:624:43: error: 'class CartGridStrategy' has no member named 'current_grid_y_size'
  624 |     if((this->current_grid_x_size * this->current_grid_y_size)  > (this->configured_grid_x_size * this->configured_grid_y_size)){
      |                                           ^~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:624:74: error: 'class CartGridStrategy' has no member named 'configured_grid_x_size'
  624 |     if((this->current_grid_x_size * this->current_grid_y_size)  > (this->configured_grid_x_size * this->configured_grid_y_size)){
      |                                                                          ^~~~~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:624:105: error: 'class CartGridStrategy' has no member named 'configured_grid_y_size'
  624 |     if((this->current_grid_x_size * this->current_grid_y_size)  > (this->configured_grid_x_size * this->configured_grid_y_size)){
      |                                                                                                         ^~~~~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:626:35: error: 'class CartGridStrategy' has no member named 'current_grid_x_size'
  626 |                             this->current_grid_x_size, this->current_grid_y_size, this->current_grid_x_size*this->current_grid_x_size,
      |                                   ^~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:626:62: error: 'class CartGridStrategy' has no member named 'current_grid_y_size'
  626 |                             this->current_grid_x_size, this->current_grid_y_size, this->current_grid_x_size*this->current_grid_x_size,
      |                                                              ^~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:626:89: error: 'class CartGridStrategy' has no member named 'current_grid_x_size'
  626 |                             this->current_grid_x_size, this->current_grid_y_size, this->current_grid_x_size*this->current_grid_x_size,
      |                                                                                         ^~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:626:115: error: 'class CartGridStrategy' has no member named 'current_grid_x_size'
  626 |                             this->current_grid_x_size, this->current_grid_y_size, this->current_grid_x_size*this->current_grid_x_size,
      |                                                                                                                   ^~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:627:35: error: 'class CartGridStrategy' has no member named 'configured_grid_x_size'
  627 |                             this->configured_grid_x_size, this->configured_grid_y_size, this->configured_grid_x_size*this->configured_grid_y_size);
      |                                   ^~~~~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:627:65: error: 'class CartGridStrategy' has no member named 'configured_grid_y_size'
  627 |                             this->configured_grid_x_size, this->configured_grid_y_size, this->configured_grid_x_size*this->configured_grid_y_size);
      |                                                                 ^~~~~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:627:95: error: 'class CartGridStrategy' has no member named 'configured_grid_x_size'
  627 |                             this->configured_grid_x_size, this->configured_grid_y_size, this->configured_grid_x_size*this->configured_grid_y_size);
      |                                                                                               ^~~~~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:627:124: error: 'class CartGridStrategy' has no member named 'configured_grid_y_size'
  627 |                             this->configured_grid_x_size, this->configured_grid_y_size, this->configured_grid_x_size*this->configured_grid_y_size);
      |                                                                                                                            ^~~~~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:651:209: error: 'current_grid_x_size' was not declared in this scope
  651 |     gc->stream->printf("Probe start ht: %0.3f mm, start MCS x,y: %0.3f,%0.3f, rectangular bed width,height in mm: %0.3f,%0.3f, grid size: %dx%d\n", zprobe->getProbeHeight(), x_start, y_start, x_size, y_size, current_grid_x_size, current_grid_y_size);
      |                                                                                                                                                                                                                 ^~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:651:230: error: 'current_grid_y_size' was not declared in this scope
  651 |     gc->stream->printf("Probe start ht: %0.3f mm, start MCS x,y: %0.3f,%0.3f, rectangular bed width,height in mm: %0.3f,%0.3f, grid size: %dx%d\n", zprobe->getProbeHeight(), x_start, y_start, x_size, y_size, current_grid_x_size, current_grid_y_size);
      |                                                                                                                                                                                                                                      ^~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:663:41: error: 'class CartGridStrategy' has no member named 'current_grid_y_size'
  663 |     for (int yCount = 0; yCount < this->current_grid_y_size; yCount++) {
      |                                         ^~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:664:63: error: 'class CartGridStrategy' has no member named 'current_grid_y_size'
  664 |         float yProbe = this->y_start + (this->y_size / (this->current_grid_y_size - 1)) * yCount;
      |                                                               ^~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:667:28: error: 'class CartGridStrategy' has no member named 'current_grid_x_size'
  667 |             xStart = this->current_grid_x_size - 1;
      |                            ^~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:672:27: error: 'class CartGridStrategy' has no member named 'current_grid_x_size'
  672 |             xStop = this->current_grid_x_size;
      |                           ^~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:677:67: error: 'class CartGridStrategy' has no member named 'current_grid_x_size'
  677 |             float xProbe = this->x_start + (this->x_size / (this->current_grid_x_size - 1)) * xCount;
      |                                                                   ^~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:685:34: error: 'class CartGridStrategy' has no member named 'current_grid_x_size'
  685 |             grid[xCount + (this->current_grid_x_size * yCount)] = measured_z;
      |                                  ^~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp: In member function 'void CartGridStrategy::doCompensation(float*, bool)':
modules/tools/zprobe/CartGridStrategy.cpp:737:52: error: 'class CartGridStrategy' has no member named 'current_grid_x_size'
  737 |     float grid_x = std::max(0.001F, std::min(this->current_grid_x_size - 1.001F, (x_target - this->x_start) / (this->x_size / (this->current_grid_x_size - 1))));
      |                                                    ^~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:737:134: error: 'class CartGridStrategy' has no member named 'current_grid_x_size'
  737 |     float grid_x = std::max(0.001F, std::min(this->current_grid_x_size - 1.001F, (x_target - this->x_start) / (this->x_size / (this->current_grid_x_size - 1))));
      |                                                                                                                                      ^~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:738:52: error: 'class CartGridStrategy' has no member named 'current_grid_x_size'
  738 |     float grid_y = std::max(0.001F, std::min(this->current_grid_x_size - 1.001F, (y_target - this->y_start) / (this->y_size / (this->current_grid_y_size - 1))));
      |                                                    ^~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:738:134: error: 'class CartGridStrategy' has no member named 'current_grid_y_size'
  738 |     float grid_y = std::max(0.001F, std::min(this->current_grid_x_size - 1.001F, (y_target - this->y_start) / (this->y_size / (this->current_grid_y_size - 1))));
      |                                                                                                                                      ^~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:743:52: error: 'class CartGridStrategy' has no member named 'current_grid_x_size'
  743 |     float z1 = grid[(floor_x) + ((floor_y) * this->current_grid_x_size)];
      |                                                    ^~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:744:56: error: 'class CartGridStrategy' has no member named 'current_grid_x_size'
  744 |     float z2 = grid[(floor_x) + ((floor_y + 1) * this->current_grid_x_size)];
      |                                                        ^~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:745:56: error: 'class CartGridStrategy' has no member named 'current_grid_x_size'
  745 |     float z3 = grid[(floor_x + 1) + ((floor_y) * this->current_grid_x_size)];
      |                                                        ^~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:746:60: error: 'class CartGridStrategy' has no member named 'current_grid_x_size'
  746 |     float z4 = grid[(floor_x + 1) + ((floor_y + 1) * this->current_grid_x_size)];
      |                                                            ^~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp: In member function 'void CartGridStrategy::print_bed_level(StreamOutput*)':
modules/tools/zprobe/CartGridStrategy.cpp:785:29: error: 'current_grid_y_size' was not declared in this scope
  785 |         for (int y = 0; y < current_grid_y_size; y++) {
      |                             ^~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:786:33: error: 'current_grid_x_size' was not declared in this scope
  786 |             for (int x = 0; x < current_grid_x_size; x++) {
      |                                 ^~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:793:40: error: 'current_grid_x_size' was not declared in this scope
  793 |         int xStart = (x_size>0) ? 0 : (current_grid_x_size - 1);
      |                                        ^~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:797:40: error: 'current_grid_y_size' was not declared in this scope
  797 |         int yStart = (y_size<0) ? 0 : (current_grid_y_size - 1);
      |                                        ^~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp: In member function 'void CartGridStrategy::reset_bed_level()':
modules/tools/zprobe/CartGridStrategy.cpp:826:25: error: 'current_grid_y_size' was not declared in this scope
  826 |     for (int y = 0; y < current_grid_y_size; y++) {
      |                         ^~~~~~~~~~~~~~~~~~~
modules/tools/zprobe/CartGridStrategy.cpp:827:29: error: 'current_grid_x_size' was not declared in this scope
  827 |         for (int x = 0; x < current_grid_x_size; x++) {
      |                             ^~~~~~~~~~~~~~~~~~~
make[2]: *** [../LPC1768/./modules/tools/zprobe/CartGridStrategy.o] Error 1
make[2]: Leaving directory `D:/3rd_prj/Smoothieware_best-for-pnp/src'
make[1]: *** [lpc1768] Error 2
make[1]: Leaving directory `D:/3rd_prj/Smoothieware_best-for-pnp/src'
make: *** [all] Error 2

D:\3rd_prj\Smoothieware_best-for-pnp>

可以看到, 有语法差异. 导致编译不过.
现在准备将工具链换为原版的, 将日志加细致一些, 先将每个文件的命令行编译参数确认清楚.

备注

真正规范的工程, 换了工具链, 高版本的工具链可以正常编译低版本工具链能通过的工程才正常.
程序员正常写程序就好, 不用关心工具链的问题. 这不就是向下兼容么? 如果换了同一个系列的高版本编译器, 工程就编译不过了, 那成啥了…

Smoothieware_best-for-pnp工程选择的工具链挺膈应的, 初始作者的思路清奇.

END

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/547893.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

MAC免密登录服务器

文章目录 1.Mac本机打开终端生成公私钥2.找打刚才生成的公钥3.上传公钥到远程 Linux 服务器4.远程登录到Linux系统服务器里面执行如下操作5.设置后在退出终端,输入如下命令即可免密登录6. 禁止 Linux 使用账号密码登录 1.Mac本机打开终端生成公私钥 输入ssh-keygen&#xff0c…

python获取某电商平台口红数据并制作词云

目录标题 前言开发环境:模块使用数据来源分析代码展示获取数据制作词云 尾语 &#x1f49d; 前言 嗨喽~大家好呀&#xff0c;这里是魔王呐 ❤ ~! 开发环境: Python 3.8 Pycharm 模块使用 requests jieba 结巴分词 wordcloud 词云 第三方模块安装&#xff1a; win R 输…

Apache Kafka - 重识Kafka

文章目录 概述一、Kafka的概念二、Kafka的特点三、Kafka的使用场景导图 概述 Kafka是一个高性能、分布式的消息队列系统&#xff0c;它的出现为大规模的数据处理提供了一种可靠、快速的解决方案。我们先初步了解Kafka的概念、特点和使用场景。 一、Kafka的概念 Kafka是由Apac…

《设计模式》状态模式

《设计模式》状态模式 定义&#xff1a; 状态模式也称为状态机模式&#xff0c;允许对象在内部状态发生改变时改变它的行为&#xff0c;对象看起来好像修改了它的类。属于行为型模式。 状态模式的角色组成&#xff1a; State(抽象状态类)&#xff1a;定义一个接口用来封装与…

文本三剑客正则表达式3

文章目录 文本三剑客&正则表达式31 awk工作原理2 awk的基本格式及其内置变量2.1 基本格式2.2 内置变量2.3 示例2.3.1 直接打印所有内容2.3.2 取每一行的第一列2.3.3 打印行号&#xff0c;及所有内容2.3.4 打印第三行2.3.5 打印2-4行2.3.6 打印第2行和第4行2.3.7 用正则表达…

面试面麻了,别再难为测试人了····

去面试吧 面不被录用的试 面hr为了完成任务的试 面一轮二轮没有下文试 面需要通勤2小时的试 面随时加班的试 ...... 今年的“金三银四”被网友们称为“铜三铁四”&#xff0c;招聘软件上的岗位都能背下来了&#xff0c;简历却依然石沉大海。 好不容易等来个回复&#xff0c;还不…

手写西瓜书bp神经网络 mnist10 c#版本

本文根据西瓜书第五章中给出的公式编写&#xff0c;书中给出了全连接神经网络的实现逻辑&#xff0c;本文在此基础上编写了Mnist10手写10个数字的案例&#xff0c;网上也有一些其他手写的例子参考。demo使用unity进行编写&#xff0c;方便且易于查错。 该案例仅作为学习&#x…

Linux网络——shell编程之免交互

Linux网络——shell编程之shell编程之免交互 一、概述1.常用的交互程序&#xff1a;2.语法格式&#xff1a; 二、Here Document常规用法1.read 命令的读取2.wc -l 的内容行数统计3.passwd用户密码的修改4.cat 查看内容并输出到文件中5.cat 查看交互内容并输出到新的文件中6.交互…

【计算机系统基础4】程序的机器级表示

4.程序的机器级表示 4.1&#xff08;&#x1f3eb; CMU补充 &#xff09;x86-64 Linux 寄存器使用 %rax 返回值调用函数保存可以通过程序修改 rdi&#xff0c;…&#xff0c;%r9 传入参数&#xff08;arguments&#xff09;调用函数保存可通过程序进行修改 %r10&#xff0c;%…

【网络协议详解】——VLAN技术(学习笔记)

目录 &#x1f552; 1. VLAN介绍&#x1f558; 1.1 目标&#x1f558; 1.2 帧格式&#x1f558; 1.3 划分方式&#x1f558; 1.4 链路&#x1f558; 1.5 端口模式&#x1f564; 1.5.1 接入端口&#x1f564; 1.5.2 干道端口&#x1f564; 1.5.3 混合端口&#xff08;仅华为交换…

信息收集-端口

&#xff08;一&#xff09;端口号 端口号&#xff0c;是指在Internet传输控制协议&#xff08;TCP&#xff09;或用户数据报协议&#xff08;UDP&#xff09;中&#xff0c;用于标识具体应用程序与计算机之间通信的端口号码 互联网上有许多使用TCP和UDP协议进行通信的应用程…

【网络协议详解】——STP技术(学习笔记)

目录 &#x1f552; 1. STP技术工作原理&#x1f552; 2. BPDU报文&#x1f558; 2.1 配置BPDU&#x1f558; 2.2 TCN BPDU &#x1f552; 3. 实验&#xff1a;了解STP生成过程 &#x1f552; 1. STP技术工作原理 以太网交换机使用生成树协议STP&#xff08;Spanning Tree Pro…

连续签到积分兑换试用流量主小程序开发

每日签到积分兑换试用流量主小程序开发 打卡兑奖小程序。用户签到活得积分。积分可以兑换商品。观看激励视频广告可以积分翻倍。 用户可以参加试用商品活动参加试用需要提交信息。可以通过分享方式直接获取试用资格。 以下是流量主小程序的功能列表&#xff1a; 广告位管理&a…

JavaWeb——HTTP 协议的基本格式和 fiddler 的用法

目录 一、HTTP定义 二、HTTP协议的工作流程 三、抓包工具Fiddler的用法 1、介绍 2、原理 3、抓包结果 &#xff08;1&#xff09;、HTTP请求 &#xff08;2&#xff09;、HTTP响应 四、HTTP协议的格式 1、HTTP请求 &#xff08;1&#xff09;、请求行 &#xff08;2…

OpenAPI的签名校验

前言 作为一个后端开发&#xff0c;提供API接口或者对接第三方API接口的时候&#xff0c;考虑接口的防刷、重放等安全问题&#xff0c;严格意义上&#xff0c;都需要加上双方约定的签名规则。 大致思路 一般情况下&#xff0c;签名规则没有墨守成规的规定&#xff0c;只要考…

MediaPipe Face Detection可运行在移动设备上的亚毫秒级人脸检测

MediaPipe人脸检测 MediaPipe人脸检测是一种超快速的人脸检测解决方案,具有6个界标和多人脸支持。它基于BlazeFace,BlazeFace是为移动GPU推理量身定制的轻巧且性能良好的面部检测器。检测器的超实时性能使其可应用于需要准确地关注面部区域作为其他任务特定模型: 例如 1、3…

如何有效解决企业文件安全事件频发问题?

企业文件安全是企业必须解决的一个关键问题。随着数字化趋势的不断发展&#xff0c;企业严重依赖于以电子格式存储和访问数据。这种转变使得组织必须实施适当的安全协议&#xff0c;以确保其敏感数据免受未经授权的访问或盗窃。 企业网盘的使用已经在公司中流行起来&#xff0c…

ChatGPT:3. 使用OpenAI创建自己的AI网站:2. 使用 flask web框架快速搭建网站主体

使用OpenAI创建自己的AI网站 如果你还是一个OpenAI的小白&#xff0c;有OpenAI的账号&#xff0c;但想调用OpenAI的API搞一些有意思的事&#xff0c;那么这一系列的教程将仔细的为你讲解如何使用OpenAI的API制作属于自己的AI网站。博主只能利用下班时间更新&#xff0c;进度慢…

mybatis是如何集成到spring的之SqlSessionFactoryBean

文章目录 1 前言1.1 集成spring前使用mybatis的方式1.2 集成mybatis到spring的关键步骤 2 SqlSessionFactoryBean对象分析2.1 buildSqlSessionFactory做了什么事情&#xff1f;2.2 为什么是SqlSessionFactoryBean却可以使用SqlSessionFactory&#xff1f; 3 验证demo4 举一反三…

【QT】自定义工程封装成DLL并如何调用(带ui界面的)

一、动态库的封装 1、首先新建一个Library工程 2、修改类型为共享库&#xff0c;自定义项目名称以及项目路径 3、选择编译器 4、选择动态库所需要的模块 5、自定义类名&#xff0c;点击下一步 6、点击下一步 7、项目总览 8、此时的文件中还没有ui文件&#xff0c;因为要封装带…