VisualGDB stuck trying to build

Sysprogs forums Forums VisualGDB VisualGDB stuck trying to build

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #25469
    tm123
    Participant

    I have a project with .cpp files and one .s file and the compiler gets stuck building the assembly file. There is no error it just hangs on it. However it might be hanging on main.cpp because that’s the one Atollic hangs on as well and in VisualGDB in the output it doesn’t say 1>main.cpp it says 1>kernel_asm.s

    The code compiles fine on Keil.

    Any ideas?

    #25470
    tm123
    Participant

    Yeah it seems to be the assembly file this time. I emptied it and it “compiles” it.

    #25471
    tm123
    Participant

    Even tried downgrading the ARM toolchain or using the latest one. Same thing.

    #25473
    tm123
    Participant

    Switched to make instead of msbuild and the output error was this

    1>—— Build started: Project: EmbeddedProject2, Configuration: Debug Win32 ——
    1>VisualGDB: Run “C:\SysGCC\arm-eabi\bin\make.exe CONFIG=Debug -j12” in directory “C:\Users\TM\source\repos\EmbeddedProject2\EmbeddedProject2” on local computer
    1>C:/SysGCC/arm-eabi/bin/arm-eabi-g++.exe -ggdb -ffunction-sections -fno-exceptions -fno-rtti -O0 -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -I. -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/STM32F3xx_HAL_Driver/Inc -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/STM32F3xx_HAL_Driver/Inc/Legacy -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/CMSIS_HAL/Device/ST/STM32F3xx/Include -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/CMSIS_HAL/Include -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/CMSIS_HAL/Core/Include -DDEBUG=1 -DARM_MATH_CM4 -Dflash_layout -DSTM32F303K8 -DUSE_LEGACY -DSTM32F303x8 -DUSE_FULL_LL_DRIVER -c EmbeddedProject2.cpp -o Debug/EmbeddedProject2.o -MD -MF Debug/EmbeddedProject2.dep
    1>as -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -DDEBUG=1 -DARM_MATH_CM4 -Dflash_layout -DSTM32F303K8 -DUSE_LEGACY -DSTM32F303x8 -DUSE_FULL_LL_DRIVER -c kernel_asm.s -o Debug/kernel_asm.o -MD -MF Debug/kernel_asm.dep
    1>as: unrecognized option `-mcpu=cortex-m4′
    1>C:/SysGCC/arm-eabi/bin/arm-eabi-gcc.exe -ggdb -ffunction-sections -O0 -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -I. -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/STM32F3xx_HAL_Driver/Inc -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/STM32F3xx_HAL_Driver/Inc/Legacy -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/CMSIS_HAL/Device/ST/STM32F3xx/Include -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/CMSIS_HAL/Include -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/CMSIS_HAL/Core/Include -DDEBUG=1 -DARM_MATH_CM4 -Dflash_layout -DSTM32F303K8 -DUSE_LEGACY -DSTM32F303x8 -DUSE_FULL_LL_DRIVER -c C:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_pccard.c -o Debug/stm32f3xx_hal_pccard.o -MD -MF Debug/stm32f3xx_hal_pccard.dep
    1>C:/SysGCC/arm-eabi/bin/arm-eabi-gcc.exe -ggdb -ffunction-sections -O0 -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -I. -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/STM32F3xx_HAL_Driver/Inc -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/STM32F3xx_HAL_Driver/Inc/Legacy -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/CMSIS_HAL/Device/ST/STM32F3xx/Include -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/CMSIS_HAL/Include -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/CMSIS_HAL/Core/Include -DDEBUG=1 -DARM_MATH_CM4 -Dflash_layout -DSTM32F303K8 -DUSE_LEGACY -DSTM32F303x8 -DUSE_FULL_LL_DRIVER -c C:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_pcd.c -o Debug/stm32f3xx_hal_pcd.o -MD -MF Debug/stm32f3xx_hal_pcd.dep
    1>C:/SysGCC/arm-eabi/bin/arm-eabi-gcc.exe -ggdb -ffunction-sections -O0 -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -I. -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/STM32F3xx_HAL_Driver/Inc -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/STM32F3xx_HAL_Driver/Inc/Legacy -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/CMSIS_HAL/Device/ST/STM32F3xx/Include -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/CMSIS_HAL/Include -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/CMSIS_HAL/Core/Include -DDEBUG=1 -DARM_MATH_CM4 -Dflash_layout -DSTM32F303K8 -DUSE_LEGACY -DSTM32F303x8 -DUSE_FULL_LL_DRIVER -c C:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_pcd_ex.c -o Debug/stm32f3xx_hal_pcd_ex.o -MD -MF Debug/stm32f3xx_hal_pcd_ex.dep
    1>C:/SysGCC/arm-eabi/bin/arm-eabi-gcc.exe -ggdb -ffunction-sections -O0 -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -I. -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/STM32F3xx_HAL_Driver/Inc -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/STM32F3xx_HAL_Driver/Inc/Legacy -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/CMSIS_HAL/Device/ST/STM32F3xx/Include -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/CMSIS_HAL/Include -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/CMSIS_HAL/Core/Include -DDEBUG=1 -DARM_MATH_CM4 -Dflash_layout -DSTM32F303K8 -DUSE_LEGACY -DSTM32F303x8 -DUSE_FULL_LL_DRIVER -c C:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_pwr.c -o Debug/stm32f3xx_hal_pwr.o -MD -MF Debug/stm32f3xx_hal_pwr.dep
    1>C:/SysGCC/arm-eabi/bin/arm-eabi-gcc.exe -ggdb -ffunction-sections -O0 -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -I. -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/STM32F3xx_HAL_Driver/Inc -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/STM32F3xx_HAL_Driver/Inc/Legacy -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/CMSIS_HAL/Device/ST/STM32F3xx/Include -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/CMSIS_HAL/Include -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/CMSIS_HAL/Core/Include -DDEBUG=1 -DARM_MATH_CM4 -Dflash_layout -DSTM32F303K8 -DUSE_LEGACY -DSTM32F303x8 -DUSE_FULL_LL_DRIVER -c C:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_pwr_ex.c -o Debug/stm32f3xx_hal_pwr_ex.o -MD -MF Debug/stm32f3xx_hal_pwr_ex.dep
    1>C:/SysGCC/arm-eabi/bin/arm-eabi-gcc.exe -ggdb -ffunction-sections -O0 -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -I. -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/STM32F3xx_HAL_Driver/Inc -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/STM32F3xx_HAL_Driver/Inc/Legacy -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/CMSIS_HAL/Device/ST/STM32F3xx/Include -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/CMSIS_HAL/Include -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/CMSIS_HAL/Core/Include -DDEBUG=1 -DARM_MATH_CM4 -Dflash_layout -DSTM32F303K8 -DUSE_LEGACY -DSTM32F303x8 -DUSE_FULL_LL_DRIVER -c C:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_rcc.c -o Debug/stm32f3xx_hal_rcc.o -MD -MF Debug/stm32f3xx_hal_rcc.dep
    1>C:/SysGCC/arm-eabi/bin/arm-eabi-gcc.exe -ggdb -ffunction-sections -O0 -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -I. -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/STM32F3xx_HAL_Driver/Inc -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/STM32F3xx_HAL_Driver/Inc/Legacy -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/CMSIS_HAL/Device/ST/STM32F3xx/Include -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/CMSIS_HAL/Include -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/CMSIS_HAL/Core/Include -DDEBUG=1 -DARM_MATH_CM4 -Dflash_layout -DSTM32F303K8 -DUSE_LEGACY -DSTM32F303x8 -DUSE_FULL_LL_DRIVER -c C:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_rcc_ex.c -o Debug/stm32f3xx_hal_rcc_ex.o -MD -MF Debug/stm32f3xx_hal_rcc_ex.dep
    1>C:/SysGCC/arm-eabi/bin/arm-eabi-gcc.exe -ggdb -ffunction-sections -O0 -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -I. -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/STM32F3xx_HAL_Driver/Inc -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/STM32F3xx_HAL_Driver/Inc/Legacy -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/CMSIS_HAL/Device/ST/STM32F3xx/Include -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/CMSIS_HAL/Include -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/CMSIS_HAL/Core/Include -DDEBUG=1 -DARM_MATH_CM4 -Dflash_layout -DSTM32F303K8 -DUSE_LEGACY -DSTM32F303x8 -DUSE_FULL_LL_DRIVER -c C:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_rtc.c -o Debug/stm32f3xx_hal_rtc.o -MD -MF Debug/stm32f3xx_hal_rtc.dep
    1>C:/SysGCC/arm-eabi/bin/arm-eabi-gcc.exe -ggdb -ffunction-sections -O0 -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -I. -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/STM32F3xx_HAL_Driver/Inc -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/STM32F3xx_HAL_Driver/Inc/Legacy -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/CMSIS_HAL/Device/ST/STM32F3xx/Include -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/CMSIS_HAL/Include -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/CMSIS_HAL/Core/Include -DDEBUG=1 -DARM_MATH_CM4 -Dflash_layout -DSTM32F303K8 -DUSE_LEGACY -DSTM32F303x8 -DUSE_FULL_LL_DRIVER -c C:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_rtc_ex.c -o Debug/stm32f3xx_hal_rtc_ex.o -MD -MF Debug/stm32f3xx_hal_rtc_ex.dep
    1>C:/SysGCC/arm-eabi/bin/arm-eabi-gcc.exe -ggdb -ffunction-sections -O0 -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -I. -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/STM32F3xx_HAL_Driver/Inc -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/STM32F3xx_HAL_Driver/Inc/Legacy -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/CMSIS_HAL/Device/ST/STM32F3xx/Include -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/CMSIS_HAL/Include -IC:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/CMSIS_HAL/Core/Include -DDEBUG=1 -DARM_MATH_CM4 -Dflash_layout -DSTM32F303K8 -DUSE_LEGACY -DSTM32F303x8 -DUSE_FULL_LL_DRIVER -c C:/Users/TM/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F3xxxx/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_sdadc.c -o Debug/stm32f3xx_hal_sdadc.o -MD -MF Debug/stm32f3xx_hal_sdadc.dep
    1>make: *** [Debug/kernel_asm.o] Error 1
    1>make: *** Waiting for unfinished jobs….
    1>————————————————————-
    1>Command exited with code 2
    1>Executable: C:\SysGCC\arm-eabi\bin\make.exe
    1>Arguments: CONFIG=Debug -j12
    1>Directory: C:\Users\TM\source\repos\EmbeddedProject2\EmbeddedProject2
    1>VisualGDB : error : Command-line action failed
    1>VisualGDB : error : Build has failed. See the Output window for more details.
    1>H:\VS\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command “”C:\Program Files (x86)\Sysprogs\VisualGDB\\VisualGDB.exe” /build “C:\Users\TM\source\repos\EmbeddedProject2\EmbeddedProject2\EmbeddedProject2.vcxproj” “/solution:C:\Users\TM\source\repos\EmbeddedProject2\EmbeddedProject2.sln” “/config:Debug” “/platform:Win32″” exited with code 1.
    1>Done building project “EmbeddedProject2.vcxproj” — FAILED.
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

    • This reply was modified 5 years, 4 months ago by tm123.
    #25478
    tm123
    Participant

    So apparently it’s because Keil uses different assembly directives than GCC and I switched to the proper ones.

     

    Now the issue is that Keil assembly allows you to access registers 8 to registers 12 using thumb mode but GCC doesn’t. And if you force arm mode it doesn’t compile because the processor won’t let it.

    #25479
    tm123
    Participant

    Problem solved! I put the .thumb directive in the wrong place and needed .syntax unified to go with it;

     

    I had to convert;

    AREA |.text|, CODE, READONLY, ALIGN=2
    THUMB
    PRESERVE8

     

    To this;

    .thumb
    .syntax unified
    .section .text, “ax”
    .balign 4
    .eabi_attribute Tag_ABI_align_preserved, 1

     

    It compiles now.

    #25483
    support
    Keymaster

    Sorry for the delay and good to know it works. Just FYI, if you are using the STM32 libraries, ST typically provides Keil-compatible, GCC-compatible and IAR-compatible versions of the assembly files, so you can simply pick a GCC-compatible one instead of manually editing the file that uses the Keil syntax.

    #25485
    tm123
    Participant

    Good to know but this is a file I wrote from scratch and I only ever used and learned to write ARM assembler using Keil.

    #25487
    support
    Keymaster

    Thanks for clarifying this. In that case you would indeed need to edit the file manually.

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.