Arm Mbed OS support forum

How to compile my Mbed project made by Mbed Compiler on STM32CubeIDE

Hi.
I made a project on Mbed Compiler and exported it as SW4STM32 (Not to include STM32CubeIDE).
I opened STM32CubeIDE and imported the project as SW4STM32 project.
The IDE output error under that
Please teach me the solve for this problem.
STM32CubeIDE version 1.2.0
Mbed project : OS2
Target board: NUCLEO-F303K8
Project name : 303K8_CAN_send


06:44:07 **** Incremental Build of configuration Release for project 303K8_CAN_send ****
make all
echo “export PREPROC_CMD = /arm-none-eabi-cpp -E -P” > C:/Users/user/STM32CubeIDE/workspace_1.2.0/303K8_CAN_send_sw4stm32_nucleo_f303k8.zip_expanded/303K8_CAN_send/makefile.defs

arm-none-eabi-g++ “…/send.cpp” -mcpu=cortex-m4 -std=gnu++14 -DTARGET_STM32F303K8 ‘-DTARGET_NAME=NUCLEO_F303K8’ -DTARGET_CORTEX -D__CORTEX_M4 ‘-DDEVICE_PORTINOUT=1’ ‘-DDEVICE_SERIAL=1’ ‘-DCOMPONENT_PSA_SRV_EMUL=1’ -D__CMSIS_RTOS -DUSE_HAL_DRIVER ‘-DDEVICE_SERIAL_FC=1’ ‘-DDEVICE_ANALOGOUT=1’ -DTARGET_RTOS_M4_M7 ‘-D__FPU_PRESENT=1’ -DTARGET_NUCLEO_F303K8 ‘-DDEVICE_ANALOGIN=1’ -DTARGET_RELEASE ‘-DDEVICE_PORTOUT=1’ -DUSE_FULL_LL_DRIVER ‘-DDEVICE_PWMOUT=1’ ‘-DDEVICE_SPISLAVE=1’ ‘-DCOMPONENT_NSPE=1’ ‘-DDEVICE_SLEEP=1’ ‘-DDEVICE_WATCHDOG=1’ ‘-DDEVICE_I2C_ASYNCH=1’ -D__MBED_CMSIS_RTOS_CM -DTARGET_LIKE_MBED ‘-DDEVICE_STDIO_MESSAGES=1’ ‘-DDEVICE_SPI_ASYNCH=1’ ‘-DTRANSACTION_QUEUE_SIZE_SPI=2’ ‘-DDEVICE_RTC=1’ ‘-DDEVICE_LPTICKER=1’ ‘-D__MBED__=1’ ‘-DDEVICE_I2C=1’ -DTARGET_FAMILY_STM32 -DTOOLCHAIN_GCC_ARM -DTARGET_STM32F303x8 ‘-DDEVICE_PORTIN=1’ ‘-DDEVICE_I2CSLAVE=1’ -DTARGET_M4 -DTARGET_LIKE_CORTEX_M4 -DARM_MATH_CM4 ‘-DCOMPONENT_PSA_SRV_IMPL=1’ -DTOOLCHAIN_GCC ‘-DMBED_BUILD_TIMESTAMP=1590871915.3582232’ ‘-DDEVICE_CRC=1’ -DTARGET_STM32F3 ‘-DDEVICE_SPI=1’ ‘-DDEVICE_USTICKER=1’ ‘-DDEVICE_CAN=1’ -DTARGET_STM ‘-DDEVICE_RESET_REASON=1’ -DTARGET_CORTEX_M ‘-DDEVICE_INTERRUPTIN=1’ -DMBED_DEBUG ‘-DMBED_TRAP_ERRORS_ENABLED=1’ -DMBED_RTOS_SINGLE_THREAD -DMBED_DEBUG ‘-DMBED_TRAP_ERRORS_ENABLED=1’ -DMBED_RTOS_SINGLE_THREAD -DNDEBUG -DMBED_RTOS_SINGLE_THREAD -DNDEBUG -DMBED_RTOS_SINGLE_THREAD -c -I"…//usr/src/mbed-sdk" -I"…/mbed" -I"…/mbed/TARGET_NUCLEO_F303K8" -I"…/mbed/TARGET_NUCLEO_F303K8/TARGET_STM" -I"…/mbed/TARGET_NUCLEO_F303K8/TARGET_STM/TARGET_STM32F3" -I"…/mbed/TARGET_NUCLEO_F303K8/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303x8" -I"…/mbed/TARGET_NUCLEO_F303K8/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303x8/TARGET_NUCLEO_F303K8" -I"…/mbed/TARGET_NUCLEO_F303K8/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303x8/device" -I"…/mbed/TARGET_NUCLEO_F303K8/TARGET_STM/TARGET_STM32F3/device" -I"…/mbed/drivers" -I"…/mbed/hal" -I"…/mbed/platform" -includeC:/Users/user/STM32CubeIDE/workspace_1.2.0/303K8_CAN_send_sw4stm32_nucleo_f303k8.zip_expanded/303K8_CAN_send/mbed_config.h -O3 -ffunction-sections -fdata-sections -fno-exceptions -fno-rtti -fno-threadsafe-statics -fno-use-cxa-atexit -Wall -Wextra -funsigned-char -fno-delete-null-pointer-checks -fomit-frame-pointer -Wvla -Wno-unused-parameter -Wno-missing-field-initializers -fstack-usage -MMD -MP -MF"send.d" -MT"send.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -mthumb -o “send.o”
In file included from …/mbed/mbed.h:56:0,
from …/send.cpp:1:
…/mbed/platform/mbed_application.h:25:5: warning: this use of “defined” may not be portable [-Wexpansion-to-defined]
#if MBED_APPLICATION_SUPPORT
^~~~~~~~~~~~~~~~~~~~~~~~
…/mbed/platform/mbed_application.h:25:5: warning: this use of “defined” may not be portable [-Wexpansion-to-defined]
…/mbed/platform/mbed_application.h:25:5: warning: this use of “defined” may not be portable [-Wexpansion-to-defined]
make[1]: *** No rule to make target ‘C:/Users/user/STM32CubeIDE/workspace_1.2.0/303K8_CAN_send_sw4stm32_nucleo_f303k8.zip_expanded/303K8_CAN_send/Release/linker-script-release.ld’, needed by ‘303K8_CAN_send-release.elf’. Stop.
make: *** [makefile:54: all] Error 2
“make all” terminated with exit code 2. Build might be incomplete.

06:44:17 Build Failed. 2 errors, 3 warnings. (took 9s.963ms)