-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for ARMC5 compilation errors for some targets #11949
Conversation
the following compilation error is seen for a number of targets when compiling using ARMC5 `tools.utils.ToolException: "./mbed-os/features/cellular/framework/AT/AT_CellularContext.cpp", line 247: Error: #20: identifier "sprintf" is undefined` Failing command: > 5.06u6/bin/armcc -c --gnu -Ospace --split_sections --apcs=interwork --brief_diagnostics --restrict --multibyte_chars -O3 -DMBED_TRAP_ERRORS_ENABLED=1 --cpu=Cortex-M4.fp.sp --md --no_depend_system_headers --c99 -D__ASSERT_MSG --cpp11 --no_rtti --no_vla -DDEVICE_SERIAL_ASYNCH=1 -D__MBED__=1 -D__CORTEX_M4 -DTOOLCHAIN_ARM -DMBED_BUILD_TIMESTAMP=1574735332.2275832 -DTARGET_RELEASE -DTARGET_GigaDevice -DDEVICE_SERIAL_FC=1 -DARM_MATH_CM4 -DTARGET_LIKE_MBED -DTARGET_GD32E10X -D__FPU_PRESENT=1 -DTARGET_GD32_Target -DTARGET_M4 -DDEVICE_RTC=1 -DDEVICE_INTERRUPTIN=1 -DCOMPONENT_PSA_SRV_EMUL=1 -D__CMSIS_RTOS -DTOOLCHAIN_ARMC5 -DDEVICE_SPISLAVE=1 -DTARGET_GD32_E103VB -DTARGET_CORTEX -DDEVICE_PORTIN=1 -DDEVICE_ANALOGOUT=1 -DDEVICE_I2C=1 -DDEVICE_ANALOGIN=1 -DDEVICE_FLASH=1 -DDEVICE_SLEEP=1 -DCOMPONENT_NSPE=1 -DDEVICE_SERIAL=1 -DDEVICE_PORTOUT=1 -DTARGET_GD32E103VB -DDEVICE_CAN=1 -DTARGET_NAME=GD32_E103VB -DTARGET_CORTEX_M -D__MBED_CMSIS_RTOS_CM -DDEVICE_PWMOUT=1 -DTARGET_FF_ARDUINO -DGD32E10X -DDEVICE_USTICKER=1 -DTARGET_RTOS_M4_M7 -DDEVICE_PORTINOUT=1 -DTOOLCHAIN_ARM_STD -DCOMPONENT_PSA_SRV_IMPL=1 -DDEVICE_SPI=1 -DTARGET_LIKE_CORTEX_M4 -DDEVICE_I2CSLAVE=1 --preinclude=./BUILD/GD32_E103VB/ARMC5/mbed_config.h --via ./BUILD/GD32_E103VB/ARMC5/.includes_022feb5c2e44b9896df9a82c69438bc9.txt --depend BUILD/GD32_E103VB/ARMC5/mbed-os/features/cellular/framework/AT/AT_CellularContext.d -o BUILD/GD32_E103VB/ARMC5/mbed-os/features/cellular/framework/AT/AT_CellularContext.o ./mbed-os/features/cellular/framework/AT/AT_CellularContext.cpp [Error] AT_CellularContext.cpp@247,0: #20: identifier "sprintf" is undefined
@acabarbaye have you tested that this actually fixes the problem? It is strange that this only seems to affect ARMC5.... ie is the header being pulled in from somewhere else silently for the other compilers? |
Similar issue for a different target `./mbed-os/features/cellular/framework/targets/QUECTEL/BG96/QUECTEL_BG96_CellularStack.cpp", line 431: Error: #20: identifier "sprintf" is undefined` > armcc -c --gnu -Ospace --split_sections --apcs=interwork --brief_diagnostics --restrict --multibyte_chars -O3 -DMBED_TRAP_ERRORS_ENABLED=1 --cpu=Cortex-M4.fp.sp --md --no_depend_system_headers --c99 -D__ASSERT_MSG --cpp11 --no_rtti --no_vla -DMBED_ROM_START=0x0 -DMBED_ROM_SIZE=0x80000 -DMBED_RAM_START=0x20000000 -DMBED_RAM_SIZE=0x10000 -DTARGET_SOFTDEVICE_NONE -DTARGET_NORDIC -DCMSIS_VECTAB_VIRTUAL_HEADER_FILE="cmsis_nvic.h" -DTARGET_NRF52 -DCMSIS_VECTAB_VIRTUAL -DTARGET_MCU_NRF52832 -DDEVICE_SPI_ASYNCH=1 -DMBED_TICKLESS -DDEVICE_SLEEP=1 -DFEATURE_BLE=1 -DNRF52_PAN_12 -D__CMSIS_RTOS -DTARGET_SDK_15_0 -DNRF52_PAN_64 -DDEVICE_SPI=1 -DDEVICE_I2C=1 -DNRF52_PAN_15 -DDEVICE_SERIAL=1 -DTARGET_LIKE_MBED -DDEVICE_PORTOUT=1 -DDEVICE_SERIAL_ASYNCH=1 -DTARGET_M4 -DNRF52_PAN_31 -D__FPU_PRESENT=1 -D__CORTEX_M4 -DTARGET_RTOS_M4_M7 -DDEVICE_PORTIN=1 -DTARGET_CORDIO_LL -DTARGET_NRF5x -DCONFIG_GPIO_AS_PINRESET -DDEVICE_SERIAL_FC=1 -DDEVICE_USTICKER=1 -DTARGET_RELEASE -D__MBED__=1 -DTARGET_CORDIO -DMBED_MPU_CUSTOM -DNRF52_PAN_54 -DSWI_DISABLE0 -DDEVICE_INTERRUPTIN=1 -DNRF52_PAN_63 -DNRF52_PAN_51 -DDEVICE_ANALOGIN=1 -DCOMPONENT_PSA_SRV_EMUL=1 -DTARGET_NORDIC_CORDIO -DNRF52_PAN_62 -DNRF52_PAN_55 -DTARGET_CORTEX -DNRF52_PAN_53 -DDEVICE_PWMOUT=1 -DDEVICE_PORTINOUT=1 -DTOOLCHAIN_ARMC5 -DTARGET_CORTEX_M -DDEVICE_ITM=1 -DMBED_BUILD_TIMESTAMP=1574735595.5081437 -DNRF52_PAN_20 -DDEVICE_I2C_ASYNCH=1 -DDEVICE_LPTICKER=1 -DNRF52_PAN_30 -DTARGET_LIKE_CORTEX_M4 -DTARGET_NAME=MTB_UBLOX_NINA_B1 -DCOMPONENT_NSPE=1 -DDEVICE_TRNG=1 -DNRF52_PAN_58 -DTOOLCHAIN_ARM -DARM_MATH_CM4 -D__MBED_CMSIS_RTOS_CM -DNRF52 -DBOARD_PCA10040 -DDEVICE_FLASH=1 -DCOMPONENT_PSA_SRV_IMPL=1 -DTARGET_MTB_UBLOX_NINA_B1 -DDEVICE_SYSTICK_CLK_OFF_DURING_SLEEP=1 -DTARGET_NRF52832 -DTOOLCHAIN_ARM_STD -DNRF52_PAN_36 --preinclude=./BUILD/MTB_UBLOX_NINA_B1/ARMC5/mbed_config.h --via ./BUILD/MTB_UBLOX_NINA_B1/ARMC5/.includes_3003a516b3c5c98831c114756251051b.txt --depend BUILD/MTB_UBLOX_NINA_B1/ARMC5/mbed-os/features/cellular/framework/targets/QUECTEL/BG96/QUECTEL_BG96_CellularStack.d -o BUILD/MTB_UBLOX_NINA_B1/ARMC5/mbed-os/features/cellular/framework/targets/QUECTEL/BG96/QUECTEL_BG96_CellularStack.o ./mbed-os/features/cellular/framework/targets/QUECTEL/BG96/QUECTEL_BG96_CellularStack.cpp
The header is not included so I would assume that it works by luck for the other compilers. |
CI started |
Test run: FAILEDSummary: 1 of 11 test jobs failed Failed test jobs:
|
Set to 5.15, as it affects ARMC5 build. Tools team reported similar issue today. |
Restarted client test, timeouts in there |
Description
Summary of change
the following compilation error is seen for a number of targets when compiling using ARMC5
tools.utils.ToolException: "./mbed-os/features/cellular/framework/AT/AT_CellularContext.cpp", line 247: Error: #20: identifier "sprintf" is undefined
Failing command:
Documentation
Included the libc header for sprintf
Pull request type
Test results
Impact of changes
None