文章目录
- Smoothieware_best-for-pnp 工程文件编译选项含义整理
- 概述
- arm-none-eabi-gcc 的编译选项含义整理 - S(汇编)文件
- arm-none-eabi-gcc 的编译选项含义整理 - C文件
- arm-none-eabi-gcc 的编译选项含义整理 - CPP文件
- 库的打包
- arm-none-eabi-gcc 的编译选项含义整理 - C文件 - debug版
- arm-none-eabi-g++ 的编译选项含义整理 - CPP文件 - debug版
- 即使是编译一类文件(.c/.cpp)由于文件内, 存在编译开关宏的判断, 命令行传进去的编译宏(-Dx)也是不同的
- 编译采用的语言标准
- 编译目标的链接
- 从可执行文件生成hex
- 从可执行文件生成bin
- 从可执行文件生成反汇编文件
- 显示可执行文件的内部size信息
- END
Smoothieware_best-for-pnp 工程文件编译选项含义整理
概述
用MCUXPresso迁移出来的Smoothieware工程, 编译出来后, ROM用量超出了500%, 不能用啊.
大概率是调试信息, 优化这样的参数不一致. 如果调试信息等级低一些, 优化的多一些, 编译后的目标size就能降下来.
还有一些可能是, 我无脑编译, 将太多的无关文件编译进了工程.
反正要仔细看看命令行工程如何具体编译链接的, 才有可能迁移出正确的工程.
将Smoothieware Makefile工程换用了和MCUXPresso同样的10.3的工具链, 编译出来后, ROM用量为400KB. ROM用量为 78%
Smoothieware工程是先编译了一个mdeb库, 然后将 src目录编译后和mdeb库连接到了一起.
文件的编译选项不一样啊, 在Makefile工程上确认一下.
先用如下指令, 将编译的所有信息都存到2个日志文件(一个正常编译信息, 一个屏幕编译报错/警告输出)中.
make clean
make VERBOSE=1 1>build_log_info_v.txt 2>build_log_err_v.txt
build_log_err_v.txt 有些警告, 不管他.
build_log_info_v.txt 有所有编译过程的细节操作.
先看一下.c和.cpp编译的gcc选项.
.c文件用arm-none-eabi-gcc编译
.cpp用 arm-none-eabi-g++(make 命令行)或者arm-none-eabi-c++(MCUXPresso IDE)编译. arm-none-eabi-g++和arm-none-eabi-c++功能是完全相同的, 只是编译后有少许2进制的区别.
比较过了, 不同.c/.cpp的编译区别主要是要编译的源文件不同, 编译后的目标文件不同, 头文件目录不同.
但是, 同一类文件(.c/.cpp)的编译参数基本是相同的.
那么只要分别确认一个arm-none-eabi-gcc的命令行, 一个arm-none-eabi-g++的命令行就可以搞清楚所有的编译选项的具体参数, 然后在MCUXPresso中调整成一样就搞定(理论上).
arm-none-eabi-gcc和arm-none-eabi-g++(c++) 就是gcc, 编译选项的语法完全符合最新版的gcc手册.
arm-none-eabi-gcc 是ARM处理器目标的C文件/.S文件用的gcc
arm-none-eabi-g++(c++) 是ARM处理器目标的CPP文件用的gcc
在gnu官网可以找到最新版的gcc.pdf下载, 语法适用于旧版的gcc.
arm-none-eabi-gcc 的编译选项含义整理 - S(汇编)文件
.s文件
Assembling vendor/NXP/cmsis/LPC1768/GCC_ARM/startup_LPC17xx.s
mkdir Release\LPC1768\.\vendor\NXP\cmsis\LPC1768\GCC_ARM\ >nul 2>nul & exit 0
arm-none-eabi-gcc -c vendor/NXP/cmsis/LPC1768/GCC_ARM/startup_LPC17xx.s -o Release/LPC1768/./vendor/NXP/cmsis/LPC1768/GCC_ARM/startup_LPC17xx.o
// 不带任何参数, 只需要指定源文件, 目标文件就行
arm-none-eabi-gcc
-c vendor/NXP/cmsis/LPC1768/GCC_ARM/startup_LPC17xx.s
-o Release/LPC1768/./vendor/NXP/cmsis/LPC1768/GCC_ARM/startup_LPC17xx.o
汇编文件的Debug版和Release版编译都是相同的, 不存在区别.
arm-none-eabi-gcc 的编译选项含义整理 - C文件
arm-none-eabi-gcc编译一个文件的命令行是很长的一行.
Compiling vendor/NXP/capi/PinNames.c
mkdir Release\LPC1768\.\vendor\NXP\capi\ >nul 2>nul & exit 0
arm-none-eabi-gcc -g3 -mcpu=cortex-m3 -mthumb -mthumb-interwork -ffunction-sections -fdata-sections -fno-exceptions -fno-delete-null-pointer-checks -Wall -Wextra -Wno-unused-parameter -Wcast-align -Wpointer-arith -Wredundant-decls -Wcast-qual -Wcast-align -I./capi -I./vendor/NXP/capi/LPC1768 -I./vendor/NXP/cmsis/LPC1768 -DTARGET_LPC1768 -DTOOLCHAIN_GCC_ARM -MMD -MP -std=c99 -O2 -DNDEBUG -c vendor/NXP/capi/PinNames.c -o Release/LPC1768/./vendor/NXP/capi/PinNames.o
整理成了多行, 好观察.
arm-none-eabi-gcc -g3 -mcpu=cortex-m3 -mthumb -mthumb-interwork -ffunction-sections -fdata-sections -fno-exceptions -fno-delete-null-pointer-checks -Wall -Wextra -Wno-unused-parameter
-Wcast-align -Wpointer-arith -Wredundant-decls -Wcast-qual -Wcast-align -I./capi -I./vendor/NXP/capi/LPC1768 -I./vendor/NXP/cmsis/LPC1768 -DTARGET_LPC1768 -DTOOLCHAIN_GCC_ARM -MMD -MP
-std=c99 -O2 -DNDEBUG -c vendor/NXP/capi/PinNames.c -o Release/LPC1768/./vendor/NXP/capi/PinNames.o
将命令行每个参数都放在单独一行, 加上注释, 就清楚了这个命令行的完整含义.
arm-none-eabi-gcc // 编译用的程序为gcc
-g3 // 编译后的目标文件, 调试信息等级为3(是最多调试信息的等级)
-mcpu=cortex-m3 // 目标处理器名称为m3
-mthumb // 产生的代码格式为ARM中的thumb
-mthumb-interwork // 产生代码的指令集为 ARM中的thumb
-ffunction-sections // 每个函数都在一个单独的扇区中
-fdata-sections // 每个数据都在一个单独的扇区中
-fno-exceptions // 关闭异常
-fno-delete-null-pointer-checks // 关闭删除时的空指针检查
-Wall // 打开编译时的警告
-Wextra // 打开编译时的扩展警告信息(这个选项会显示比 -Wall 之外的警告信息).
-Wno-unused-parameter // 关掉警告 - 不使用的参数, 新版gcc不叫这个名字
-Wpointer-arith // 打开警告 - 对void或函数使用sizeof时.
-Wredundant-decls // 打开警告 - 多次声明同一个目标
-Wcast-qual // 打开警告 - 强转时, 类型发生变化. e.g. char* => const char*
-Wcast-align // 打开警告 - 类型强转时, 引起内存对齐字节数发生变化. e.g. char* => int*
-I./capi // 定义头文件路径
-I./vendor/NXP/capi/LPC1768 // 同上
-I./vendor/NXP/cmsis/LPC1768 // 同上
-DTARGET_LPC1768 // 定义宏 - TARGET_LPC1768
-DTOOLCHAIN_GCC_ARM // 定义宏 - TOOLCHAIN_GCC_ARM
-DNDEBUG // 定义宏 - NDEBUG
-MMD // 只使用用户指定的头文件, 不使用系统头文件
-MP // 为主文件的每个依赖项生成一个伪目标
-std=c99 // 语言采用C99标准
-O2 // 优化等级为O2
-c vendor/NXP/capi/PinNames.c // 要编译的源文件
-o Release/LPC1768/./vendor/NXP/capi/PinNames.o // 编译后的输出文件
可以看出, 命令行的makefile编译, 产生了g3级别的调试信息, 采用了O2优化, 定义了非调试的宏. 这样的目标, 是可以被gdb调试的(可能细节语句调试的不准, 但是通过单步去看函数调用流程和函数入参的值(非局部变量), 是没有问题的).
arm-none-eabi-gcc 的编译选项含义整理 - CPP文件
.cpp文件
Compiling cpp/BusInOut.cpp
mkdir Release\LPC1768\.\cpp\ >nul 2>nul & exit 0
arm-none-eabi-g++ -g3 -mcpu=cortex-m3 -mthumb -mthumb-interwork -ffunction-sections -fdata-sections -fno-exceptions -fno-delete-null-pointer-checks -Wall -Wextra -Wno-unused-parameter -Wcast-align -Wpointer-arith -Wredundant-decls -Wcast-qual -Wcast-align -I./capi -I./vendor/NXP/capi/LPC1768 -I./vendor/NXP/cmsis/LPC1768 -DTARGET_LPC1768 -DTOOLCHAIN_GCC_ARM -MMD -MP -fno-rtti -O2 -DNDEBUG -c cpp/BusInOut.cpp -o Release/LPC1768/./cpp/BusInOut.o
arm-none-eabi-g++
-g3 // 编译后的目标文件, 调试信息等级为3(是最多调试信息的等级)
-mcpu=cortex-m3 // 目标处理器名称为m3
-mthumb // 产生的代码格式为ARM中的thumb
-mthumb-interwork // 产生代码的指令集为 ARM中的thumb
-ffunction-sections // 每个函数都在一个单独的扇区中
-fdata-sections // 每个数据都在一个单独的扇区中
-fno-exceptions // 关闭异常
-fno-delete-null-pointer-checks // 关闭删除时的空指针检查
-Wall // 打开编译时的警告
-Wextra // 打开编译时的扩展警告信息(这个选项会显示比 -Wall 之外的警告信息).
-Wno-unused-parameter // 关掉警告 - 不使用的参数, 新版gcc不叫这个名字
-Wpointer-arith // 打开警告 - 对void或函数使用sizeof时.
-Wredundant-decls // 打开警告 - 多次声明同一个目标
-Wcast-qual // 打开警告 - 强转时, 类型发生变化. e.g. char* => const char*
-Wcast-align // 打开警告 - 类型强转时, 引起内存对齐字节数发生变化. e.g. char* => int*
-I./capi // 定义头文件路径
-I./vendor/NXP/capi/LPC1768 // 同上
-I./vendor/NXP/cmsis/LPC1768 // 同上
-DTARGET_LPC1768 // 定义宏 - TARGET_LPC1768
-DTOOLCHAIN_GCC_ARM // 定义宏 - TOOLCHAIN_GCC_ARM
-MMD // 只使用用户指定的头文件, 不使用系统头文件
-MP // 为主文件的每个依赖项生成一个伪目标
-fno-rtti // 禁止类的虚函数的运行时信息
-O2 // 优化等级为O2
-DNDEBUG // 定义宏 - NDEBUG
-c cpp/BusInOut.cpp // 要编译的源文件
-o Release/LPC1768/./cpp/BusInOut.o // 编译后的输出文件
可以看出, CPP文件命令行的makefile编译 和 C文件的命令行编译参数 大部分相同.
区别 :
- 增加了-fno-rtti // 禁止类的虚函数的运行时信息
库的打包
Linking release library ../drop/LPC1768/GCC_ARM/libmbed.a
mkdir ..\drop\LPC1768\GCC_ARM\ >nul 2>nul & exit 0
arm-none-eabi-ar -rc ../drop/LPC1768/GCC_ARM/libmbed.a Release/LPC1768/./vendor/NXP/capi/PinNames.o Release/LPC1768/./vendor/NXP/capi/analogin_api.o Release/LPC1768/./vendor/NXP/capi/analogout_api.o Release/LPC1768/./vendor/NXP/capi/board.o Release/LPC1768/./vendor/NXP/capi/can_api.o Release/LPC1768/./vendor/NXP/capi/ethernet_api.o Release/LPC1768/./vendor/NXP/capi/gpio_api.o Release/LPC1768/./vendor/NXP/capi/gpio_irq_api.o Release/LPC1768/./vendor/NXP/capi/i2c_api.o Release/LPC1768/./vendor/NXP/capi/pinmap.o Release/LPC1768/./vendor/NXP/capi/port_api.o Release/LPC1768/./vendor/NXP/capi/pwmout_api.o Release/LPC1768/./vendor/NXP/capi/rtc_api.o Release/LPC1768/./vendor/NXP/capi/semihost.o Release/LPC1768/./vendor/NXP/capi/serial_api.o Release/LPC1768/./vendor/NXP/capi/sleep.o Release/LPC1768/./vendor/NXP/capi/spi_api.o Release/LPC1768/./vendor/NXP/capi/us_ticker_api.o Release/LPC1768/./vendor/NXP/cmsis/LPC1768/cmsis_nvic.o Release/LPC1768/./vendor/NXP/cmsis/LPC1768/core_cm3.o Release/LPC1768/./vendor/NXP/cmsis/LPC1768/system_LPC17xx.o Release/LPC1768/./capi/exit.o Release/LPC1768/./capi/mbed_interface.o Release/LPC1768/./capi/pinmap_common.o Release/LPC1768/./capi/rtc_time.o Release/LPC1768/./capi/semihost_api.o Release/LPC1768/./capi/wait_api.o Release/LPC1768/./vendor/NXP/cmsis/LPC1768/GCC_ARM/startup_LPC17xx.o Release/LPC1768/./cpp/BusIn.o Release/LPC1768/./cpp/BusInOut.o Release/LPC1768/./cpp/BusOut.o Release/LPC1768/./cpp/CAN.o Release/LPC1768/./cpp/Ethernet.o Release/LPC1768/./cpp/FileBase.o Release/LPC1768/./cpp/FileLike.o Release/LPC1768/./cpp/FilePath.o Release/LPC1768/./cpp/FileSystemLike.o Release/LPC1768/./cpp/FunctionPointer.o Release/LPC1768/./cpp/I2C.o Release/LPC1768/./cpp/I2CSlave.o Release/LPC1768/./cpp/InterruptIn.o Release/LPC1768/./cpp/LocalFileSystem.o Release/LPC1768/./cpp/SPI.o Release/LPC1768/./cpp/SPISlave.o Release/LPC1768/./cpp/Serial.o Release/LPC1768/./cpp/Stream.o Release/LPC1768/./cpp/Ticker.o Release/LPC1768/./cpp/Timeout.o Release/LPC1768/./cpp/Timer.o Release/LPC1768/./cpp/TimerEvent.o Release/LPC1768/./cpp/stdio.o
arm-none-eabi-ar
-rc ../drop/LPC1768/GCC_ARM/libmbed.a
Release/LPC1768/./vendor/NXP/capi/PinNames.o
Release/LPC1768/./vendor/NXP/capi/analogin_api.o
Release/LPC1768/./vendor/NXP/capi/analogout_api.o
Release/LPC1768/./vendor/NXP/capi/board.o
Release/LPC1768/./vendor/NXP/capi/can_api.o
Release/LPC1768/./vendor/NXP/capi/ethernet_api.o
Release/LPC1768/./vendor/NXP/capi/gpio_api.o
Release/LPC1768/./vendor/NXP/capi/gpio_irq_api.o
Release/LPC1768/./vendor/NXP/capi/i2c_api.o
Release/LPC1768/./vendor/NXP/capi/pinmap.o
Release/LPC1768/./vendor/NXP/capi/port_api.o
Release/LPC1768/./vendor/NXP/capi/pwmout_api.o
Release/LPC1768/./vendor/NXP/capi/rtc_api.o
Release/LPC1768/./vendor/NXP/capi/semihost.o
Release/LPC1768/./vendor/NXP/capi/serial_api.o
Release/LPC1768/./vendor/NXP/capi/sleep.o
Release/LPC1768/./vendor/NXP/capi/spi_api.o
Release/LPC1768/./vendor/NXP/capi/us_ticker_api.o
Release/LPC1768/./vendor/NXP/cmsis/LPC1768/cmsis_nvic.o
Release/LPC1768/./vendor/NXP/cmsis/LPC1768/core_cm3.o
Release/LPC1768/./vendor/NXP/cmsis/LPC1768/system_LPC17xx.o
Release/LPC1768/./capi/exit.o Release/LPC1768/./capi/mbed_interface.o
Release/LPC1768/./capi/pinmap_common.o
Release/LPC1768/./capi/rtc_time.o
Release/LPC1768/./capi/semihost_api.o
Release/LPC1768/./capi/wait_api.o
Release/LPC1768/./vendor/NXP/cmsis/LPC1768/GCC_ARM/startup_LPC17xx.o
Release/LPC1768/./cpp/BusIn.o
Release/LPC1768/./cpp/BusInOut.o Release/LPC1768/./cpp/BusOut.o
Release/LPC1768/./cpp/CAN.o
Release/LPC1768/./cpp/Ethernet.o
Release/LPC1768/./cpp/FileBase.o
Release/LPC1768/./cpp/FileLike.o
Release/LPC1768/./cpp/FilePath.o
Release/LPC1768/./cpp/FileSystemLike.o
Release/LPC1768/./cpp/FunctionPointer.o
Release/LPC1768/./cpp/I2C.o
Release/LPC1768/./cpp/I2CSlave.o
Release/LPC1768/./cpp/InterruptIn.o
Release/LPC1768/./cpp/LocalFileSystem.o
Release/LPC1768/./cpp/SPI.o
Release/LPC1768/./cpp/SPISlave.o
Release/LPC1768/./cpp/Serial.o
Release/LPC1768/./cpp/Stream.o
Release/LPC1768/./cpp/Ticker.o
Release/LPC1768/./cpp/Timeout.o
Release/LPC1768/./cpp/Timer.o
Release/LPC1768/./cpp/TimerEvent.o
Release/LPC1768/./cpp/stdio.o
可以看出 arm-none-eabi-ar 用-rc选项后面指定编译后的目标库名称, 然后跟一堆要塞进库的.o即可.
arm-none-eabi-gcc 的编译选项含义整理 - C文件 - debug版
Compiling vendor/NXP/capi/PinNames.c
mkdir Debug\LPC1768\.\vendor\NXP\capi\ >nul 2>nul & exit 0
arm-none-eabi-gcc -g3 -mcpu=cortex-m3 -mthumb -mthumb-interwork -ffunction-sections -fdata-sections -fno-exceptions -fno-delete-null-pointer-checks -Wall -Wextra -Wno-unused-parameter -Wcast-align -Wpointer-arith -Wredundant-decls -Wcast-qual -Wcast-align -I./capi -I./vendor/NXP/capi/LPC1768 -I./vendor/NXP/cmsis/LPC1768 -DTARGET_LPC1768 -DTOOLCHAIN_GCC_ARM -MMD -MP -std=c99 -O0 -c vendor/NXP/capi/PinNames.c -o Debug/LPC1768/./vendor/NXP/capi/PinNames.o
arm-none-eabi-gcc
-g3
-mcpu=cortex-m3
-mthumb
-mthumb-interwork
-ffunction-sections
-fdata-sections
-fno-exceptions
-fno-delete-null-pointer-checks
-Wall
-Wextra
-Wno-unused-parameter
-Wcast-align
-Wpointer-arith
-Wredundant-decls
-Wcast-qual
-Wcast-align
-I./capi
-I./vendor/NXP/capi/LPC1768
-I./vendor/NXP/cmsis/LPC1768
-DTARGET_LPC1768
-DTOOLCHAIN_GCC_ARM
-MMD
-MP
-std=c99
-O0 // 优化等级为0(不优化)
-c vendor/NXP/capi/PinNames.c
-o Debug/LPC1768/./vendor/NXP/capi/PinNames.o
可以看出和非debug版的C文件编译参数的区别:
* 没有定义宏 - - NDEBUG
* 优化等级为O0
arm-none-eabi-g++ 的编译选项含义整理 - CPP文件 - debug版
Compiling cpp/BusIn.cpp
mkdir Debug\LPC1768\.\cpp\ >nul 2>nul & exit 0
arm-none-eabi-g++ -g3 -mcpu=cortex-m3 -mthumb -mthumb-interwork -ffunction-sections -fdata-sections -fno-exceptions -fno-delete-null-pointer-checks -Wall -Wextra -Wno-unused-parameter -Wcast-align -Wpointer-arith -Wredundant-decls -Wcast-qual -Wcast-align -I./capi -I./vendor/NXP/capi/LPC1768 -I./vendor/NXP/cmsis/LPC1768 -DTARGET_LPC1768 -DTOOLCHAIN_GCC_ARM -MMD -MP -fno-rtti -O0 -c cpp/BusIn.cpp -o Debug/LPC1768/./cpp/BusIn.o
arm-none-eabi-g++
-g3
-mcpu=cortex-m3
-mthumb
-mthumb-interwork
-ffunction-sections
-fdata-sections
-fno-exceptions
-fno-delete-null-pointer-checks
-Wall
-Wextra
-Wno-unused-parameter
-Wcast-align
-Wpointer-arith
-Wredundant-decls
-Wcast-qual
-Wcast-align
-I./capi
-I./vendor/NXP/capi/LPC1768
-I./vendor/NXP/cmsis/LPC1768
-DTARGET_LPC1768
-DTOOLCHAIN_GCC_ARM
-MMD
-MP
-fno-rtti
-O0
-c cpp/BusIn.cpp
-o Debug/LPC1768/./cpp/BusIn.o
可以看出和非debug版的CPP文件编译参数的区别:
- 没有定义宏 - - NDEBUG
- 优化等级为O0
即使是编译一类文件(.c/.cpp)由于文件内, 存在编译开关宏的判断, 命令行传进去的编译宏(-Dx)也是不同的
如果迁移一个工程, 那么需要将文件根据编译参数分为几类, 才不会将文件编译错.
Compiling libs/Network/uip/clock-arch.c
mkdir ..\LPC1768\.\libs\Network\uip\ >nul 2>nul & exit 0
arm-none-eabi-gcc
-O2
-g3
-mcpu=cortex-m3
-mthumb
-mthumb-interwork
-ffunction-sections
-fdata-sections
-fno-exceptions
-fno-delete-null-pointer-checks
-I. -I./ -I./libs/ -I./libs/ADC/ -I./libs/ChaNFS/ -I./libs/ChaNFS/CHAN_FS/ -I./libs/ChaNFS/CHAN_FS/option/ -I./libs/ConfigSources/ -I./libs/LPC17xx/ -I./libs/LPC17xx/LPC17xxLib/ -I./libs/LPC17xx/LPC17xxLib/inc/ -I./libs/LPC17xx/LPC17xxLib/src/ -I./libs/Network/ -I./libs/Network/Drivers/ -I./libs/Network/uip/ -I./libs/Network/uip/dhcpc/ -I./libs/Network/uip/lib/ -I./libs/Network/uip/plan9/ -I./libs/Network/uip/sftp/ -I./libs/Network/uip/telnetd/ -I./libs/Network/uip/uip/ -I./libs/Network/uip/webserver/ -I./libs/Network/uip/webserver/httpd-fs-src/ -I./libs/Network/uip/webserver/httpd-fs/ -I./libs/USBDevice/ -I./libs/USBDevice/USBDevice/ -I./libs/USBDevice/USBMSD/ -I./libs/USBDevice/USBSerial/ -I./modules/ -I./modules/communication/ -I./modules/communication/utils/ -I./modules/robot/ -I./modules/robot/arm_solutions/ -I./modules/tools/ -I./modules/tools/drillingcycles/ -I./modules/tools/endstops/ -I./modules/tools/extruder/ -I./modules/tools/filamentdetector/ -I./modules/tools/laser/ -I./modules/tools/rotarydeltacalibration/ -I./modules/tools/scaracal/ -I./modules/tools/spindle/ -I./modules/tools/spindle/Modbus/ -I./modules/tools/spindle/SoftSerial/ -I./modules/tools/switch/ -I./modules/tools/temperaturecontrol/ -I./modules/tools/temperatureswitch/ -I./modules/tools/toolmanager/ -I./modules/tools/zprobe/ -I./modules/utils/ -I./modules/utils/PlayLed/ -I./modules/utils/configurator/ -I./modules/utils/currentcontrol/ -I./modules/utils/killbutton/ -I./modules/utils/motordrivercontrol/ -I./modules/utils/motordrivercontrol/drivers/ -I./modules/utils/motordrivercontrol/drivers/DRV8711/ -I./modules/utils/motordrivercontrol/drivers/TMC26X/ -I./modules/utils/panel/ -I./modules/utils/panel/panels/ -I./modules/utils/panel/panels/ST7565/ -I./modules/utils/panel/panels/rrdglcd/ -I./modules/utils/panel/screens/ -I./modules/utils/panel/screens/3dprinter/ -I./modules/utils/panel/screens/cnc/ -I./modules/utils/player/ -I./modules/utils/simpleshell/ -I./testframework/ -I./testframework/easyunit/ -I./testframework/unittests/ -I./testframework/unittests/libs/ -I./testframework/unittests/tools/ -I./testframework/unittests/tools/switch/ -I./testframework/unittests/tools/temperatureswitch/ -I../build/../mri -I../build/../mbed/drop -I../build/../mbed/drop/LPC1768
-D__GITVERSIONSTRING__=\"master-64866084\"
-DCHECKSUM_USE_CPP
-DDEFAULT_SERIAL_BAUD_RATE=9600
-D__LPC17XX__
-DNOPLAN9
-DNO_TOOLS_DRILLINGCYCLES
-DNO_TOOLS_SPINDLE
-DTARGET_LPC1768
-DMRI_ENABLE=1
-DMRI_INIT_PARAMETERS='"MRI_UART_0 MRI_UART_SHARE"'
-DMRI_BREAK_ON_INIT=0
-DMRI_SEMIHOST_STDIO=0
-DWRITE_BUFFER_DISABLE=0
-DSTACK_SIZE=3072
-MMD
-MP
-Wall
-Wextra
-Wno-unused-parameter
-Wcast-align
-Wpointer-arith
-Wredundant-decls
-Wcast-qual
-Wcast-align
-c libs/Network/uip/clock-arch.c
-o ../LPC1768/./libs/Network/uip/clock-arch.o
编译采用的语言标准
C文件采用的是C99 => -std=c99
C++文件采用的是gnuc++11 => -std=gnu++11
编译目标的链接
Linking ../LPC1768/main.elf
mkdir ..\LPC1768\ >nul 2>nul & exit 0
arm-none-eabi-g++ -mcpu=cortex-m3 -mthumb -specs=../build/startfile.spec -Wl,-Map=../LPC1768/main.map,--cref,--gc-sections,--wrap=_isatty,--wrap=malloc,--wrap=realloc,--wrap=free,--wrap=_read,--wrap=_write,--wrap=semihost_connected -T../build/../mbed/drop/LPC1768/GCC_ARM/LPC1768.ld -L /gcc/LPC1768 -u _scanf_float -u _printf_float ../LPC1768/./libs/Network/uip/clock-arch.o ../LPC1768/./libs/ChaNFS/CHAN_FS/option/ccsbcs.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_adc.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_can.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_clkpwr.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_dac.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_debug_frmwrk.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_emac.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_exti.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_gpdma.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_gpio.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_i2c.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_i2s.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_libcfg_default.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_mcpwm.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_nvic.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_pinsel.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_pwm.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_qei.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_rit.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_rtc.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_spi.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_ssp.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_systick.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_timer.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_uart.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_wdt.o ../LPC1768/./libs/Network/uip/dhcpc/dhcpc.o ../LPC1768/./libs/Network/uip/lib/memb.o ../LPC1768/./libs/Network/uip/uip/psock.o ../LPC1768/./libs/Network/uip/uip/timer.o ../LPC1768/./libs/Network/uip/uip/uip-fw.o ../LPC1768/./libs/Network/uip/uip/uip-neighbor.o ../LPC1768/./libs/Network/uip/uip/uip-split.o ../LPC1768/./libs/Network/uip/uip/uip.o ../LPC1768/./libs/Network/uip/uip/uip_arp.o ../LPC1768/./libs/Network/uip/uip/uiplib.o ../LPC1768/./libs/Network/uip/webserver/http-strings.o ../LPC1768/./libs/Network/uip/webserver/httpd-fs.o ../LPC1768/./libs/Network/uip/webserver/httpd.o ../LPC1768/./main.o ../LPC1768/./version.o ../LPC1768/./libs/Adc.o ../LPC1768/./libs/AppendFileStream.o ../LPC1768/./libs/Config.o ../LPC1768/./libs/ConfigCache.o ../LPC1768/./libs/ConfigSource.o ../LPC1768/./libs/ConfigValue.o ../LPC1768/./libs/Hook.o ../LPC1768/./libs/Kernel.o ../LPC1768/./libs/MRI_Hooks.o ../LPC1768/./libs/MemoryPool.o ../LPC1768/./libs/Module.o ../LPC1768/./libs/Pin.o ../LPC1768/./libs/PublicData.o ../LPC1768/./libs/Pwm.o ../LPC1768/./libs/SDFAT.o ../LPC1768/./libs/SlowTicker.o ../LPC1768/./libs/SoftPWM.o ../LPC1768/./libs/StepTicker.o ../LPC1768/./libs/StepperMotor.o ../LPC1768/./libs/StreamOutput.o ../LPC1768/./libs/Vector3.o ../LPC1768/./libs/Watchdog.o ../LPC1768/./libs/ahbmalloc.o ../LPC1768/./libs/gpio.o ../LPC1768/./libs/md5.o ../LPC1768/./libs/platform_memory.o ../LPC1768/./libs/utils.o ../LPC1768/./libs/ADC/adc.o ../LPC1768/./libs/ChaNFS/FATDirHandle.o ../LPC1768/./libs/ChaNFS/FATFileHandle.o ../LPC1768/./libs/ChaNFS/FATFileSystem.o ../LPC1768/./libs/ConfigSources/FileConfigSource.o ../LPC1768/./libs/ConfigSources/FirmConfigSource.o ../LPC1768/./libs/Network/net_util.o ../LPC1768/./libs/USBDevice/DFU.o ../LPC1768/./libs/USBDevice/USB.o ../LPC1768/./modules/communication/GcodeDispatch.o ../LPC1768/./modules/communication/SerialConsole.o ../LPC1768/./modules/robot/Block.o ../LPC1768/./modules/robot/BlockQueue.o ../LPC1768/./modules/robot/Conveyor.o ../LPC1768/./modules/robot/Planner.o ../LPC1768/./modules/robot/Robot.o ../LPC1768/./libs/ChaNFS/CHAN_FS/diskio.o ../LPC1768/./libs/ChaNFS/CHAN_FS/ff.o ../LPC1768/./libs/Network/Drivers/LPC17XX_Ethernet.o ../LPC1768/./libs/Network/uip/CallbackStream.o ../LPC1768/./libs/Network/uip/CommandQueue.o ../LPC1768/./libs/Network/uip/Network.o ../LPC1768/./libs/Network/uip/fifo.o ../LPC1768/./libs/USBDevice/USBDevice/USBDevice.o ../LPC1768/./libs/USBDevice/USBDevice/USBHAL_LPC11U.o ../LPC1768/./libs/USBDevice/USBDevice/USBHAL_LPC17.o ../LPC1768/./libs/USBDevice/USBMSD/SDCard.o ../LPC1768/./libs/USBDevice/USBMSD/USBMSD.o ../LPC1768/./libs/USBDevice/USBSerial/USBCDC.o ../LPC1768/./libs/USBDevice/USBSerial/USBSerial.o ../LPC1768/./modules/communication/utils/Gcode.o ../LPC1768/./modules/robot/arm_solutions/CartesianSolution.o ../LPC1768/./modules/robot/arm_solutions/CoreXZSolution.o ../LPC1768/./modules/robot/arm_solutions/ExperimentalDeltaSolution.o ../LPC1768/./modules/robot/arm_solutions/HBotSolution.o ../LPC1768/./modules/robot/arm_solutions/LinearDeltaSolution.o ../LPC1768/./modules/robot/arm_solutions/MorganSCARASolution.o ../LPC1768/./modules/robot/arm_solutions/RotaryDeltaSolution.o ../LPC1768/./modules/robot/arm_solutions/RotatableCartesianSolution.o ../LPC1768/./modules/tools/endstops/Endstops.o ../LPC1768/./modules/tools/extruder/Extruder.o ../LPC1768/./modules/tools/extruder/ExtruderMaker.o ../LPC1768/./modules/tools/filamentdetector/FilamentDetector.o ../LPC1768/./modules/tools/laser/Laser.o ../LPC1768/./modules/tools/rotarydeltacalibration/RotaryDeltaCalibration.o ../LPC1768/./modules/tools/scaracal/SCARAcal.o ../LPC1768/./modules/tools/switch/Switch.o ../LPC1768/./modules/tools/switch/SwitchPool.o ../LPC1768/./modules/tools/temperaturecontrol/AD8495.o ../LPC1768/./modules/tools/temperaturecontrol/PID_Autotuner.o ../LPC1768/./modules/tools/temperaturecontrol/PT100_E3D.o ../LPC1768/./modules/tools/temperaturecontrol/TemperatureControl.o ../LPC1768/./modules/tools/temperaturecontrol/TemperatureControlPool.o ../LPC1768/./modules/tools/temperaturecontrol/Thermistor.o ../LPC1768/./modules/tools/temperaturecontrol/max31855.o ../LPC1768/./modules/tools/temperatureswitch/TemperatureSwitch.o ../LPC1768/./modules/tools/toolmanager/ToolManager.o ../LPC1768/./modules/tools/zprobe/CartGridStrategy.o ../LPC1768/./modules/tools/zprobe/DeltaCalibrationStrategy.o ../LPC1768/./modules/tools/zprobe/DeltaGridStrategy.o ../LPC1768/./modules/tools/zprobe/Plane3D.o ../LPC1768/./modules/tools/zprobe/ThreePointStrategy.o ../LPC1768/./modules/tools/zprobe/ZProbe.o ../LPC1768/./modules/utils/PlayLed/PlayLed.o ../LPC1768/./modules/utils/configurator/Configurator.o ../LPC1768/./modules/utils/currentcontrol/CurrentControl.o ../LPC1768/./modules/utils/killbutton/KillButton.o ../LPC1768/./modules/utils/motordrivercontrol/MotorDriverControl.o ../LPC1768/./modules/utils/panel/Button.o ../LPC1768/./modules/utils/panel/Panel.o ../LPC1768/./modules/utils/panel/PanelScreen.o ../LPC1768/./modules/utils/player/Player.o ../LPC1768/./modules/utils/simpleshell/SimpleShell.o ../LPC1768/./libs/Network/uip/sftp/sftpd.o ../LPC1768/./libs/Network/uip/telnetd/shell.o ../LPC1768/./libs/Network/uip/telnetd/telnetd.o ../LPC1768/./modules/utils/panel/panels/LcdBase.o ../LPC1768/./modules/utils/panel/panels/ReprapDiscountGLCD.o ../LPC1768/./modules/utils/panel/panels/ST7565.o ../LPC1768/./modules/utils/panel/panels/UniversalAdapter.o ../LPC1768/./modules/utils/panel/screens/ControlScreen.o ../LPC1768/./modules/utils/panel/screens/CustomScreen.o ../LPC1768/./modules/utils/panel/screens/DynMenuScreen.o ../LPC1768/./modules/utils/panel/screens/FileScreen.o ../LPC1768/./modules/utils/panel/screens/ModifyValuesScreen.o ../LPC1768/./modules/utils/motordrivercontrol/drivers/DRV8711/drv8711.o ../LPC1768/./modules/utils/motordrivercontrol/drivers/TMC26X/TMC26X.o ../LPC1768/./modules/utils/panel/panels/rrdglcd/RrdGlcd.o ../LPC1768/./modules/utils/panel/screens/3dprinter/ExtruderScreen.o ../LPC1768/./modules/utils/panel/screens/3dprinter/JogScreen.o ../LPC1768/./modules/utils/panel/screens/3dprinter/MainMenuScreen.o ../LPC1768/./modules/utils/panel/screens/3dprinter/PrepareScreen.o ../LPC1768/./modules/utils/panel/screens/3dprinter/ProbeScreen.o ../LPC1768/./modules/utils/panel/screens/3dprinter/WatchScreen.o ../LPC1768/mbed_custom.o ../LPC1768/configdefault.o ../build/../mri/mri.ar ../build/../mbed/drop/LPC1768/GCC_ARM/libmbed.a -specs=nano.specs -lstdc++ -lsupc++ -lm -lgcc -lc -lnosys -o ../LPC1768/main.elf
将参与编译的多个文件的.o 链接为一个可执行文件
arm-none-eabi-g++
-mcpu=cortex-m3 // 目标CPU为M3
-mthumb // 指令集为 ARM_THUMB
-Wl, // 传递给连接器的参数
-Map=../LPC1768/main.map, // 指定编译后产生的map文件名称
--cref, // 没查到
--gc-sections, // 链接为size更小的静态链接exe文件
--wrap=_isatty, // 没查到
--wrap=malloc, // 没查到
--wrap=realloc, // 没查到
--wrap=free, // 没查到
--wrap=_read, // 没查到
--wrap=_write, // 没查到
--wrap=semihost_connected // 没查到
-T../build/../mbed/drop/LPC1768/GCC_ARM/LPC1768.ld // 使用的链接脚本(在.ld中指定该目标MCU的ROM大小, RAM大小, 起止地址等)
-L /gcc/LPC1768 // 要连接的库所在目录, 这里的gcc\LPC1768是无效的目录, 这个目录不存在
-u _scanf_float // 去掉符号的定义, 强制使用所链接的库中的同名符号
-u _printf_float // 去掉符号的定义, 强制使用所链接的库中的同名符号
// 要链接的所有.o
../LPC1768/./libs/Network/uip/clock-arch.o
../LPC1768/./libs/ChaNFS/CHAN_FS/option/ccsbcs.o
../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_adc.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_can.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_clkpwr.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_dac.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_debug_frmwrk.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_emac.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_exti.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_gpdma.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_gpio.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_i2c.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_i2s.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_libcfg_default.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_mcpwm.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_nvic.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_pinsel.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_pwm.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_qei.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_rit.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_rtc.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_spi.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_ssp.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_systick.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_timer.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_uart.o ../LPC1768/./libs/LPC17xx/LPC17xxLib/src/lpc17xx_wdt.o ../LPC1768/./libs/Network/uip/dhcpc/dhcpc.o ../LPC1768/./libs/Network/uip/lib/memb.o ../LPC1768/./libs/Network/uip/uip/psock.o ../LPC1768/./libs/Network/uip/uip/timer.o ../LPC1768/./libs/Network/uip/uip/uip-fw.o ../LPC1768/./libs/Network/uip/uip/uip-neighbor.o ../LPC1768/./libs/Network/uip/uip/uip-split.o ../LPC1768/./libs/Network/uip/uip/uip.o ../LPC1768/./libs/Network/uip/uip/uip_arp.o ../LPC1768/./libs/Network/uip/uip/uiplib.o ../LPC1768/./libs/Network/uip/webserver/http-strings.o ../LPC1768/./libs/Network/uip/webserver/httpd-fs.o ../LPC1768/./libs/Network/uip/webserver/httpd.o ../LPC1768/./main.o ../LPC1768/./version.o ../LPC1768/./libs/Adc.o ../LPC1768/./libs/AppendFileStream.o
../LPC1768/./libs/Config.o ../LPC1768/./libs/ConfigCache.o ../LPC1768/./libs/ConfigSource.o ../LPC1768/./libs/ConfigValue.o ../LPC1768/./libs/Hook.o ../LPC1768/./libs/Kernel.o ../LPC1768/./libs/MRI_Hooks.o ../LPC1768/./libs/MemoryPool.o ../LPC1768/./libs/Module.o ../LPC1768/./libs/Pin.o ../LPC1768/./libs/PublicData.o ../LPC1768/./libs/Pwm.o ../LPC1768/./libs/SDFAT.o ../LPC1768/./libs/SlowTicker.o ../LPC1768/./libs/SoftPWM.o ../LPC1768/./libs/StepTicker.o ../LPC1768/./libs/StepperMotor.o ../LPC1768/./libs/StreamOutput.o ../LPC1768/./libs/Vector3.o ../LPC1768/./libs/Watchdog.o ../LPC1768/./libs/ahbmalloc.o ../LPC1768/./libs/gpio.o ../LPC1768/./libs/md5.o ../LPC1768/./libs/platform_memory.o ../LPC1768/./libs/utils.o ../LPC1768/./libs/ADC/adc.o ../LPC1768/./libs/ChaNFS/FATDirHandle.o ../LPC1768/./libs/ChaNFS/FATFileHandle.o ../LPC1768/./libs/ChaNFS/FATFileSystem.o ../LPC1768/./libs/ConfigSources/FileConfigSource.o ../LPC1768/./libs/ConfigSources/FirmConfigSource.o ../LPC1768/./libs/Network/net_util.o ../LPC1768/./libs/USBDevice/DFU.o ../LPC1768/./libs/USBDevice/USB.o
../LPC1768/./modules/communication/GcodeDispatch.o ../LPC1768/./modules/communication/SerialConsole.o ../LPC1768/./modules/robot/Block.o ../LPC1768/./modules/robot/BlockQueue.o ../LPC1768/./modules/robot/Conveyor.o ../LPC1768/./modules/robot/Planner.o ../LPC1768/./modules/robot/Robot.o ../LPC1768/./libs/ChaNFS/CHAN_FS/diskio.o ../LPC1768/./libs/ChaNFS/CHAN_FS/ff.o ../LPC1768/./libs/Network/Drivers/LPC17XX_Ethernet.o ../LPC1768/./libs/Network/uip/CallbackStream.o ../LPC1768/./libs/Network/uip/CommandQueue.o ../LPC1768/./libs/Network/uip/Network.o ../LPC1768/./libs/Network/uip/fifo.o ../LPC1768/./libs/USBDevice/USBDevice/USBDevice.o ../LPC1768/./libs/USBDevice/USBDevice/USBHAL_LPC11U.o ../LPC1768/./libs/USBDevice/USBDevice/USBHAL_LPC17.o ../LPC1768/./libs/USBDevice/USBMSD/SDCard.o ../LPC1768/./libs/USBDevice/USBMSD/USBMSD.o ../LPC1768/./libs/USBDevice/USBSerial/USBCDC.o ../LPC1768/./libs/USBDevice/USBSerial/USBSerial.o ../LPC1768/./modules/communication/utils/Gcode.o ../LPC1768/./modules/robot/arm_solutions/CartesianSolution.o ../LPC1768/./modules/robot/arm_solutions/CoreXZSolution.o ../LPC1768/./modules/robot/arm_solutions/ExperimentalDeltaSolution.o ../LPC1768/./modules/robot/arm_solutions/HBotSolution.o ../LPC1768/./modules/robot/arm_solutions/LinearDeltaSolution.o ../LPC1768/./modules/robot/arm_solutions/MorganSCARASolution.o ../LPC1768/./modules/robot/arm_solutions/RotaryDeltaSolution.o ../LPC1768/./modules/robot/arm_solutions/RotatableCartesianSolution.o ../LPC1768/./modules/tools/endstops/Endstops.o ../LPC1768/./modules/tools/extruder/Extruder.o ../LPC1768/./modules/tools/extruder/ExtruderMaker.o ../LPC1768/./modules/tools/filamentdetector/FilamentDetector.o ../LPC1768/./modules/tools/laser/Laser.o ../LPC1768/./modules/tools/rotarydeltacalibration/RotaryDeltaCalibration.o ../LPC1768/./modules/tools/scaracal/SCARAcal.o ../LPC1768/./modules/tools/switch/Switch.o ../LPC1768/./modules/tools/switch/SwitchPool.o ../LPC1768/./modules/tools/temperaturecontrol/AD8495.o ../LPC1768/./modules/tools/temperaturecontrol/PID_Autotuner.o ../LPC1768/./modules/tools/temperaturecontrol/PT100_E3D.o ../LPC1768/./modules/tools/temperaturecontrol/TemperatureControl.o ../LPC1768/./modules/tools/temperaturecontrol/TemperatureControlPool.o ../LPC1768/./modules/tools/temperaturecontrol/Thermistor.o ../LPC1768/./modules/tools/temperaturecontrol/max31855.o ../LPC1768/./modules/tools/temperatureswitch/TemperatureSwitch.o ../LPC1768/./modules/tools/toolmanager/ToolManager.o ../LPC1768/./modules/tools/zprobe/CartGridStrategy.o ../LPC1768/./modules/tools/zprobe/DeltaCalibrationStrategy.o ../LPC1768/./modules/tools/zprobe/DeltaGridStrategy.o ../LPC1768/./modules/tools/zprobe/Plane3D.o ../LPC1768/./modules/tools/zprobe/ThreePointStrategy.o ../LPC1768/./modules/tools/zprobe/ZProbe.o ../LPC1768/./modules/utils/PlayLed/PlayLed.o ../LPC1768/./modules/utils/configurator/Configurator.o ../LPC1768/./modules/utils/currentcontrol/CurrentControl.o ../LPC1768/./modules/utils/killbutton/KillButton.o ../LPC1768/./modules/utils/motordrivercontrol/MotorDriverControl.o ../LPC1768/./modules/utils/panel/Button.o
../LPC1768/./modules/utils/panel/Panel.o ../LPC1768/./modules/utils/panel/PanelScreen.o ../LPC1768/./modules/utils/player/Player.o ../LPC1768/./modules/utils/simpleshell/SimpleShell.o ../LPC1768/./libs/Network/uip/sftp/sftpd.o ../LPC1768/./libs/Network/uip/telnetd/shell.o ../LPC1768/./libs/Network/uip/telnetd/telnetd.o ../LPC1768/./modules/utils/panel/panels/LcdBase.o ../LPC1768/./modules/utils/panel/panels/ReprapDiscountGLCD.o ../LPC1768/./modules/utils/panel/panels/ST7565.o ../LPC1768/./modules/utils/panel/panels/UniversalAdapter.o ../LPC1768/./modules/utils/panel/screens/ControlScreen.o ../LPC1768/./modules/utils/panel/screens/CustomScreen.o ../LPC1768/./modules/utils/panel/screens/DynMenuScreen.o ../LPC1768/./modules/utils/panel/screens/FileScreen.o ../LPC1768/./modules/utils/panel/screens/ModifyValuesScreen.o ../LPC1768/./modules/utils/motordrivercontrol/drivers/DRV8711/drv8711.o ../LPC1768/./modules/utils/motordrivercontrol/drivers/TMC26X/TMC26X.o ../LPC1768/./modules/utils/panel/panels/rrdglcd/RrdGlcd.o ../LPC1768/./modules/utils/panel/screens/3dprinter/ExtruderScreen.o
../LPC1768/./modules/utils/panel/screens/3dprinter/JogScreen.o ../LPC1768/./modules/utils/panel/screens/3dprinter/MainMenuScreen.o
../LPC1768/./modules/utils/panel/screens/3dprinter/PrepareScreen.o ../LPC1768/./modules/utils/panel/screens/3dprinter/ProbeScreen.o
../LPC1768/./modules/utils/panel/screens/3dprinter/WatchScreen.o ../LPC1768/mbed_custom.o ../LPC1768/configdefault.o
../build/../mri/mri.ar ../build/../mbed/drop/LPC1768/GCC_ARM/libmbed.a
-specs=../build/startfile.spec // 开始文件的特殊指定, 暂时不明白含义
-specs=nano.specs // 如果是同样的编译参数项, 后面定义的生效
-lstdc++ // 标准库使用stdc++
-lsupc++ // 没查到
-lm // 没查到
-lgcc // 没查到
-lc // 没查到
-lnosys // 没查到
-o ../LPC1768/main.elf // 链接完成的可执行文件
从可执行文件生成hex
arm-none-eabi-objcopy -R .stack -O ihex ../LPC1768/main.elf ../LPC1768/main.hex
arm-none-eabi-objcopy
-R .stack // 移除 .stack 扇区数据
-O ihex ../LPC1768/main.elf ../LPC1768/main.hex // 输出格式为hex
从可执行文件生成bin
arm-none-eabi-objcopy -O binary ../LPC1768/main.elf ../LPC1768/main.bin // 输出格式为bin
从可执行文件生成反汇编文件
arm-none-eabi-objdump -d -f -M reg-names-std --demangle ../LPC1768/main.elf >../LPC1768/main.disasm
arm-none-eabi-objdump
-d // 反汇编
-f // 显示文件头信息
-M reg-names-std 寄存器名称是ARM MCU的
--demangle ../LPC1768/main.elf // 解码符号名称
>../LPC1768/main.disasm // 将输出重定向到文件
显示可执行文件的内部size信息
arm-none-eabi-size ../LPC1768/main.elf
text data bss dec hex filename
401604 704 9896 412204 64a2c ../LPC1768/main.elf