同样的软件用gcc-arm-none-eabi-7-2018-q2,出现Conflicting CPU architectures错误,用Arm GNU Toolchain arm-none-eabi 11.2 2022.02 版本没有问题。
怀疑是GNU版本对CPU架构的定义不一样;CPU类型是 Cortex-M4。
d:/gcc-arm-none-eabi-7-2018-q2-update-win32/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld.exe: error: d:/gcc-arm-none-eabi-7-2018-q2-update-win32/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib\libc.a(lib_a-setjmp.o): Conflicting CPU architectures 13/0
为什么不用新版本,而用老版本的原因在于,新版本11.2 2022.02用-os,编译出来是483k flash;老版本7-2018-q2用-o2,只有400k flash,空间大大减少。
新的EIDE,发现看不到总成的makefile文件了,而老的有,好定位问题一些。
附上builder.params文件内容。
{
"name": "vesc-vscode",
"target": "Debug",
"toolchain": "GCC",
"showRepathOnLog": true,
"threadNum": 10,
"rootDir": "z:\vesc-vscode",
"dumpPath": ".eide\log",
"outDir": "build\Debug",
"ram": 20480,
"rom": 65536,
"incDirs": [
".eide/deps",
"vesc_firmware",
"vesc_firmware/qmlui",
"vesc_firmware/nrf",
"vesc_firmware/mcconf",
"vesc_firmware/lzo",
"vesc_firmware/lora",
"vesc_firmware/lispBM",
"vesc_firmware/lispBM/lispBM/src",
"vesc_firmware/lispBM/lispBM/src/extensions",
"vesc_firmware/lispBM/lispBM/platform/chibios/src",
"vesc_firmware/lispBM/lispBM/platform/chibios/include",
"vesc_firmware/lispBM/lispBM/include",
"vesc_firmware/lispBM/lispBM/include/extensions",
"vesc_firmware/libcanard",
"vesc_firmware/libcanard/dsdl/uavcan/protocol",
"vesc_firmware/libcanard/dsdl/uavcan/protocol/param",
"vesc_firmware/libcanard/dsdl/uavcan/protocol/file",
"vesc_firmware/libcanard/dsdl/uavcan/equipment/esc",
"vesc_firmware/imu",
"vesc_firmware/imu/Fusion",
"vesc_firmware/imu/BMI160_driver",
"vesc_firmware/hwconf",
"vesc_firmware/hwconf/luna",
"vesc_firmware/encoder",
"vesc_firmware/ChibiOS_3.0.5/os/various",
"vesc_firmware/ChibiOS_3.0.5/os/rt/src",
"vesc_firmware/ChibiOS_3.0.5/os/rt/ports/ARMCMx",
"vesc_firmware/ChibiOS_3.0.5/os/rt/ports/ARMCMx/compilers/GCC",
"vesc_firmware/ChibiOS_3.0.5/os/rt/include",
"vesc_firmware/ChibiOS_3.0.5/os/hal/src",
"vesc_firmware/ChibiOS_3.0.5/os/hal/ports/STM32/STM32F4xx",
"vesc_firmware/ChibiOS_3.0.5/os/hal/ports/STM32/LLD",
"vesc_firmware/ChibiOS_3.0.5/os/hal/ports/STM32/LLD/USARTv1",
"vesc_firmware/ChibiOS_3.0.5/os/hal/ports/STM32/LLD/TIMv1",
"vesc_firmware/ChibiOS_3.0.5/os/hal/ports/STM32/LLD/SPIv1",
"vesc_firmware/ChibiOS_3.0.5/os/hal/ports/STM32/LLD/OTGv1",
"vesc_firmware/ChibiOS_3.0.5/os/hal/ports/STM32/LLD/I2Cv1",
"vesc_firmware/ChibiOS_3.0.5/os/hal/ports/STM32/LLD/GPIOv2",
"vesc_firmware/ChibiOS_3.0.5/os/hal/ports/common/ARMCMx",
"vesc_firmware/ChibiOS_3.0.5/os/hal/osal/rt",
"vesc_firmware/ChibiOS_3.0.5/os/hal/include",
"vesc_firmware/ChibiOS_3.0.5/os/common/ports/ARMCMx/compilers/GCC",
"vesc_firmware/ChibiOS_3.0.5/ext/stdperiph_stm32f4/src",
"vesc_firmware/ChibiOS_3.0.5/ext/stdperiph_stm32f4/inc",
"vesc_firmware/blackmagic",
"vesc_firmware/blackmagic/target",
"vesc_firmware/applications",
"vesc_firmware/appconf"
],
"libDirs": [],
"defines": [],
"sourceList": [
"vesc_firmware/ChibiOS_3.0.5/ext/stdperiph_stm32f4/src/misc.c",
"vesc_firmware/ChibiOS_3.0.5/ext/stdperiph_stm32f4/src/stm32f4xx_adc.c",
"vesc_firmware/ChibiOS_3.0.5/ext/stdperiph_stm32f4/src/stm32f4xx_dma.c",
"vesc_firmware/ChibiOS_3.0.5/ext/stdperiph_stm32f4/src/stm32f4xx_exti.c",
"vesc_firmware/ChibiOS_3.0.5/ext/stdperiph_stm32f4/src/stm32f4xx_flash.c",
"vesc_firmware/ChibiOS_3.0.5/ext/stdperiph_stm32f4/src/stm32f4xx_iwdg.c",
"vesc_firmware/ChibiOS_3.0.5/ext/stdperiph_stm32f4/src/stm32f4xx_rcc.c",
"vesc_firmware/ChibiOS_3.0.5/ext/stdperiph_stm32f4/src/stm32f4xx_syscfg.c",
"vesc_firmware/ChibiOS_3.0.5/ext/stdperiph_stm32f4/src/stm32f4xx_tim.c",
"vesc_firmware/ChibiOS_3.0.5/ext/stdperiph_stm32f4/src/stm32f4xx_wwdg.c",
"vesc_firmware/ChibiOS_3.0.5/os/common/ports/ARMCMx/compilers/GCC/crt0_v7m.s",
"vesc_firmware/ChibiOS_3.0.5/os/common/ports/ARMCMx/compilers/GCC/crt1.c",
"vesc_firmware/ChibiOS_3.0.5/os/common/ports/ARMCMx/compilers/GCC/vectors.c",
"vesc_firmware/ChibiOS_3.0.5/os/hal/osal/rt/osal.c",
"vesc_firmware/ChibiOS_3.0.5/os/hal/ports/STM32/LLD/GPIOv2/pal_lld.c",
"vesc_firmware/ChibiOS_3.0.5/os/hal/ports/STM32/LLD/I2Cv1/i2c_lld.c",
"vesc_firmware/ChibiOS_3.0.5/os/hal/ports/STM32/LLD/OTGv1/usb_lld.c",
"vesc_firmware/ChibiOS_3.0.5/os/hal/ports/STM32/LLD/SPIv1/spi_lld.c",
"vesc_firmware/ChibiOS_3.0.5/os/hal/ports/STM32/LLD/TIMv1/icu_lld.c",
"vesc_firmware/ChibiOS_3.0.5/os/hal/ports/STM32/LLD/TIMv1/st_lld.c",
"vesc_firmware/ChibiOS_3.0.5/os/hal/ports/STM32/LLD/USARTv1/serial_lld.c",
"vesc_firmware/ChibiOS_3.0.5/os/hal/ports/STM32/LLD/can_lld.c",
"vesc_firmware/ChibiOS_3.0.5/os/hal/ports/STM32/STM32F4xx/hal_lld.c",
"vesc_firmware/ChibiOS_3.0.5/os/hal/ports/STM32/STM32F4xx/stm32_dma.c",
"vesc_firmware/ChibiOS_3.0.5/os/hal/ports/common/ARMCMx/nvic.c",
"vesc_firmware/ChibiOS_3.0.5/os/hal/src/can.c",
"vesc_firmware/ChibiOS_3.0.5/os/hal/src/hal.c",
"vesc_firmware/ChibiOS_3.0.5/os/hal/src/hal_mmcsd.c",
"vesc_firmware/ChibiOS_3.0.5/os/hal/src/hal_queues.c",
"vesc_firmware/ChibiOS_3.0.5/os/hal/src/i2c.c",
"vesc_firmware/ChibiOS_3.0.5/os/hal/src/icu.c",
"vesc_firmware/ChibiOS_3.0.5/os/hal/src/pal.c",
"vesc_firmware/ChibiOS_3.0.5/os/hal/src/serial.c",
"vesc_firmware/ChibiOS_3.0.5/os/hal/src/serial_usb.c",
"vesc_firmware/ChibiOS_3.0.5/os/hal/src/spi.c",
"vesc_firmware/ChibiOS_3.0.5/os/hal/src/st.c",
"vesc_firmware/ChibiOS_3.0.5/os/hal/src/usb.c",
"vesc_firmware/ChibiOS_3.0.5/os/rt/ports/ARMCMx/chcore.c",
"vesc_firmware/ChibiOS_3.0.5/os/rt/ports/ARMCMx/chcore_v7m.c",
"vesc_firmware/ChibiOS_3.0.5/os/rt/ports/ARMCMx/compilers/GCC/chcoreasm_v7m.s",
"vesc_firmware/ChibiOS_3.0.5/os/rt/src/chcond.c",
"vesc_firmware/ChibiOS_3.0.5/os/rt/src/chdebug.c",
"vesc_firmware/ChibiOS_3.0.5/os/rt/src/chdynamic.c",
"vesc_firmware/ChibiOS_3.0.5/os/rt/src/chevents.c",
"vesc_firmware/ChibiOS_3.0.5/os/rt/src/chheap.c",
"vesc_firmware/ChibiOS_3.0.5/os/rt/src/chmboxes.c",
"vesc_firmware/ChibiOS_3.0.5/os/rt/src/chmemcore.c",
"vesc_firmware/ChibiOS_3.0.5/os/rt/src/chmempools.c",
"vesc_firmware/ChibiOS_3.0.5/os/rt/src/chmsg.c",
"vesc_firmware/ChibiOS_3.0.5/os/rt/src/chmtx.c",
"vesc_firmware/ChibiOS_3.0.5/os/rt/src/chqueues.c",
"vesc_firmware/ChibiOS_3.0.5/os/rt/src/chregistry.c",
"vesc_firmware/ChibiOS_3.0.5/os/rt/src/chschd.c",
"vesc_firmware/ChibiOS_3.0.5/os/rt/src/chsem.c",
"vesc_firmware/ChibiOS_3.0.5/os/rt/src/chsys.c",
"vesc_firmware/ChibiOS_3.0.5/os/rt/src/chthreads.c",
"vesc_firmware/ChibiOS_3.0.5/os/rt/src/chtm.c",
"vesc_firmware/ChibiOS_3.0.5/os/rt/src/chvt.c",
"vesc_firmware/ChibiOS_3.0.5/os/various/syscalls.c",
"vesc_firmware/applications/app.c",
"vesc_firmware/applications/app_adc.c",
"vesc_firmware/applications/app_balance.c",
"vesc_firmware/applications/app_custom.c",
"vesc_firmware/applications/app_nunchuk.c",
"vesc_firmware/applications/app_pas.c",
"vesc_firmware/applications/app_ppm.c",
"vesc_firmware/applications/app_sten.c",
"vesc_firmware/applications/app_uartcomm.c",
"vesc_firmware/blackmagic/bm_if.c",
"vesc_firmware/blackmagic/exception.c",
"vesc_firmware/blackmagic/platform.c",
"vesc_firmware/blackmagic/swdptap.c",
"vesc_firmware/blackmagic/target/adiv5.c",
"vesc_firmware/blackmagic/target/adiv5_swdp.c",
"vesc_firmware/blackmagic/target/cortexm.c",
"vesc_firmware/blackmagic/target/nrf51.c",
"vesc_firmware/blackmagic/target/stm32f1.c",
"vesc_firmware/blackmagic/target/stm32f4.c",
"vesc_firmware/blackmagic/target/stm32h7.c",
"vesc_firmware/blackmagic/target/stm32l0.c",
"vesc_firmware/blackmagic/target/stm32l4.c",
"vesc_firmware/blackmagic/target/swdptap_generic.c",
"vesc_firmware/blackmagic/target/target.c",
"vesc_firmware/blackmagic/timing.c",
"vesc_firmware/bms.c",
"vesc_firmware/board.c",
"vesc_firmware/buffer.c",
"vesc_firmware/comm_can.c",
"vesc_firmware/comm_usb.c",
"vesc_firmware/comm_usb_serial.c",
"vesc_firmware/commands.c",
"vesc_firmware/conf_general.c",
"vesc_firmware/confgenerator.c",
"vesc_firmware/crc.c",
"vesc_firmware/digital_filter.c",
"vesc_firmware/eeprom.c",
"vesc_firmware/encoder/enc_abi.c",
"vesc_firmware/encoder/enc_ad2s1205.c",
"vesc_firmware/encoder/enc_as504x.c",
"vesc_firmware/encoder/enc_mt6816.c",
"vesc_firmware/encoder/enc_sincos.c",
"vesc_firmware/encoder/enc_ts5700n8501.c",
"vesc_firmware/encoder/encoder.c",
"vesc_firmware/encoder/encoder_cfg.c",
"vesc_firmware/events.c",
"vesc_firmware/flash_helper.c",
"vesc_firmware/foc_math.c",
"vesc_firmware/gpdrive.c",
"vesc_firmware/hwconf/drv8301.c",
"vesc_firmware/hwconf/drv8305.c",
"vesc_firmware/hwconf/drv8320s.c",
"vesc_firmware/hwconf/drv8323s.c",
"vesc_firmware/hwconf/hw.c",
"vesc_firmware/hwconf/luna/luna_display_serial.c",
"vesc_firmware/hwconf/si8900.c",
"vesc_firmware/i2c_bb.c",
"vesc_firmware/imu/BMI160_driver/bmi160.c",
"vesc_firmware/imu/Fusion/FusionAhrs.c",
"vesc_firmware/imu/Fusion/FusionBias.c",
"vesc_firmware/imu/Fusion/FusionCompass.c",
"vesc_firmware/imu/ahrs.c",
"vesc_firmware/imu/bmi160_wrapper.c",
"vesc_firmware/imu/icm20948.c",
"vesc_firmware/imu/imu.c",
"vesc_firmware/imu/lsm6ds3.c",
"vesc_firmware/imu/mpu9150.c",
"vesc_firmware/irq_handlers.c",
"vesc_firmware/ledpwm.c",
"vesc_firmware/libcanard/canard.c",
"vesc_firmware/libcanard/canard_driver.c",
"vesc_firmware/libcanard/dsdl/uavcan/equipment/esc/esc_RPMCommand.c",
"vesc_firmware/libcanard/dsdl/uavcan/equipment/esc/esc_RawCommand.c",
"vesc_firmware/libcanard/dsdl/uavcan/equipment/esc/esc_Status.c",
"vesc_firmware/libcanard/dsdl/uavcan/protocol/file/file_BeginFirmwareUpdate.c",
"vesc_firmware/libcanard/dsdl/uavcan/protocol/file/file_Read.c",
"vesc_firmware/libcanard/dsdl/uavcan/protocol/param/param_Empty.c",
"vesc_firmware/libcanard/dsdl/uavcan/protocol/param/param_ExecuteOpcode.c",
"vesc_firmware/libcanard/dsdl/uavcan/protocol/param/param_GetSet.c",
"vesc_firmware/libcanard/dsdl/uavcan/protocol/param/param_NumericValue.c",
"vesc_firmware/libcanard/dsdl/uavcan/protocol/param/param_Value.c",
"vesc_firmware/libcanard/dsdl/uavcan/protocol/protocol_GetNodeInfo.c",
"vesc_firmware/libcanard/dsdl/uavcan/protocol/protocol_HardwareVersion.c",
"vesc_firmware/libcanard/dsdl/uavcan/protocol/protocol_NodeStatus.c",
"vesc_firmware/libcanard/dsdl/uavcan/protocol/protocol_SoftwareVersion.c",
"vesc_firmware/lispBM/lispBM/platform/chibios/src/platform_mutex.c",
"vesc_firmware/lispBM/lispBM/src/env.c",
"vesc_firmware/lispBM/lispBM/src/eval_cps.c",
"vesc_firmware/lispBM/lispBM/src/extensions.c",
"vesc_firmware/lispBM/lispBM/src/extensions/array_extensions.c",
"vesc_firmware/lispBM/lispBM/src/fundamental.c",
"vesc_firmware/lispBM/lispBM/src/heap.c",
"vesc_firmware/lispBM/lispBM/src/lbm_c_interop.c",
"vesc_firmware/lispBM/lispBM/src/lbm_memory.c",
"vesc_firmware/lispBM/lispBM/src/lbm_variables.c",
"vesc_firmware/lispBM/lispBM/src/lispbm.c",
"vesc_firmware/lispBM/lispBM/src/print.c",
"vesc_firmware/lispBM/lispBM/src/qq_expand.c",
"vesc_firmware/lispBM/lispBM/src/stack.c",
"vesc_firmware/lispBM/lispBM/src/streams.c",
"vesc_firmware/lispBM/lispBM/src/symrepr.c",
"vesc_firmware/lispBM/lispBM/src/tokpar.c",
"vesc_firmware/lispBM/lispif.c",
"vesc_firmware/lispBM/lispif_vesc_dynamic_loader.c",
"vesc_firmware/lispBM/lispif_vesc_extensions.c",
"vesc_firmware/lora/SX1278.c",
"vesc_firmware/lora/SX1278_hw.c",
"vesc_firmware/lora/lora.c",
"vesc_firmware/lzo/minilzo.c",
"vesc_firmware/main.c",
"vesc_firmware/mc_interface.c",
"vesc_firmware/mcpwm.c",
"vesc_firmware/mcpwm_foc.c",
"vesc_firmware/mempools.c",
"vesc_firmware/nrf/nrf_driver.c",
"vesc_firmware/nrf/rf.c",
"vesc_firmware/nrf/rfhelp.c",
"vesc_firmware/nrf/spi_sw.c",
"vesc_firmware/packet.c",
"vesc_firmware/qmlui/qmlui.c",
"vesc_firmware/servo_dec.c",
"vesc_firmware/servo_simple.c",
"vesc_firmware/shutdown.c",
"vesc_firmware/spi_bb.c",
"vesc_firmware/terminal.c",
"vesc_firmware/timeout.c",
"vesc_firmware/timer.c",
"vesc_firmware/utils_math.c",
"vesc_firmware/utils_sys.c",
"vesc_firmware/virtual_motor.c",
"vesc_firmware/worker.c"
],
"sourceParams": {},
"sourceParamsMtime": 1652335403430.9788,
"options": {
"version": 4,
"beforeBuildTasks": [],
"afterBuildTasks": [],
"global": {
"$float-abi-type": "softfp",
"output-debug-info": "enable",
"toolPrefix": "arm-none-eabi-",
"microcontroller-cpu": "cortex-m4-sp",
"microcontroller-fpu": "cortex-m4-sp",
"microcontroller-float": "cortex-m4-sp",
"target": "cortex-m4-sp"
},
"c/cpp-compiler": {
"language-c": "c99",
"language-cpp": "c++11",
"optimization": "level-debug",
"warnings": "all-warnings",
"one-elf-section-per-function": true,
"one-elf-section-per-data": true,
"C_FLAGS": "-D_GNU_SOURCE -DBOARD_OTG_NOVBUSSENS -DUSE_LISPBM -DUSE_STDPERIPH_DRIVER -DHW_SOURCE=\\"hw_60_core.c\\" -DHW_HEADER=\\"hw_60.h\\" -Ivesc_firmware/ChibiOS_3.0.5/os/ext/CMSIS/ST -Ivesc_firmware/ChibiOS_3.0.5/os/ext/CMSIS/include -Ivesc_firmware/hwconf/trampa/vesc6 -Ivesc_firmware/libcanard/dsdl -Ivesc_firmware/lispBM/lispBM/platform/chibios/include"
},
"asm-compiler": {},
"linker": {
"output-format": "elf",
"remove-unused-input-sections": true,
"LD_FLAGS": "-Wdouble-promotion -specs=nosys.specs -ffunction-sections -fdata-sections -fno-common -mfloat-abi=hard -mfpu=fpv4-sp-d16 -nostartfiles",
"LIB_FLAGS": "-lm",
"link-scatter": [
"\"z:/vesc-vscode/vesc_firmware/ld_eeprom_emu.ld\""
]
}
},
"sha": {
"c/cpp-defines": "d751713988987e9331980363e24189ce",
"beforeBuildTasks": "d751713988987e9331980363e24189ce",
"afterBuildTasks": "d751713988987e9331980363e24189ce",
"global": "6262ba7c67c1a4efe83d701cb4be1577",
"c/cpp-compiler": "f768560d4dd4824f33dc359545516a90",
"asm-compiler": "99914b932bd37a50b983c5e7c90ae93b",
"linker": "764324550c77717f95a5a803346be8ba"
}
}