Problem in assemble .s files in project?

Sysprogs forums Forums VisualGDB Problem in assemble .s files in project?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #10354
    FesianXu
    Participant

    Hi!

     

    I am new to VisualGDB,recently i new a stm32 stand-alone project in VisualGDB, any cpp or c files can be compiled correctly.But when i migrate UCOSII into the project, i found that os_cpu_a.s cannot be correctly assembled.Error log is shown as follows:
    <h6>1> ../UCOSII/PORT/os_cpu_a.s: Assembler messages:
    1>C:\Users\Administrator\Desktop\ucos_in\ucos_in\..\UCOSII\PORT\os_cpu_a.s(9): error : bad instruction `import OSRunning'</em>
    <em> 1>C:\Users\Administrator\Desktop\ucos_in\ucos_in\..\UCOSII\PORT\os_cpu_a.s(9): error : bad instruction `external references’

    1>C:\Users\Administrator\Desktop\ucos_in\ucos_in\..\UCOSII\PORT\os_cpu_a.s(10): error : bad instruction `import OSPrioCur'</em>
    <em> 1>C:\Users\Administrator\Desktop\ucos_in\ucos_in\..\UCOSII\PORT\os_cpu_a.s(11): error : bad instruction `import OSPrioHighRdy’

    1>C:\Users\Administrator\Desktop\ucos_in\ucos_in\..\UCOSII\PORT\os_cpu_a.s(12): error : bad instruction `import OSTCBCur'</em>
    <em> 1>C:\Users\Administrator\Desktop\ucos_in\ucos_in\..\UCOSII\PORT\os_cpu_a.s(13): error : bad instruction `import OSTCBHighRdy’

    1>C:\Users\Administrator\Desktop\ucos_in\ucos_in\..\UCOSII\PORT\os_cpu_a.s(14): error : bad instruction `import OSIntNesting'</em>
    <em> 1>C:\Users\Administrator\Desktop\ucos_in\ucos_in\..\UCOSII\PORT\os_cpu_a.s(15): error : bad instruction `import OSIntExit’

    1>C:\Users\Administrator\Desktop\ucos_in\ucos_in\..\UCOSII\PORT\os_cpu_a.s(16): error : bad instruction `import OSTaskSwHook'</em>
    <em> 1>C:\Users\Administrator\Desktop\ucos_in\ucos_in\..\UCOSII\PORT\os_cpu_a.s(18): error : bad instruction `export OSStartHighRdy’

    1>C:\Users\Administrator\Desktop\ucos_in\ucos_in\..\UCOSII\PORT\os_cpu_a.s(19): error : bad instruction `export OSCtxSw'</em>
    <em> 1>C:\Users\Administrator\Desktop\ucos_in\ucos_in\..\UCOSII\PORT\os_cpu_a.s(20): error : bad instruction `export OSIntCtxSw’
    </h6>
    (here i only list part of them:) )

    It seems that compiler didnt recognize those instruction?

    And my makefile setting shown as follows:
    <h6>CFLAGS: -mcpu=cortex-m3 -mthumb</h6>
    <h6>LDFLAGS: </h6>
    <h6>ASFLAGS: -mcpu=cortex-m3 -mthumb</h6>
    <h6>Common Flags: -mcpu=cortex-m3 -mthumb</h6>
    <h6>Defines: ARM_MATH_CM3 STM32F103ZE stm32_flash_layout STM32F10X_HD</h6>
    I am no sure whether my setting is right or not, please give me some suggestions.

    Any help will be appreciated!

    #10368
    support
    Keymaster

    Hi,

    You might be using assembly files that are intended for a different compiler (e.g. Keil or IAR). Unfortunately unlike C/C++, the syntax of the assembly files is totally different for the different compilers (mainly when it comes to special directives, declaring symbols, etc) and they are not compatible with each other. Please double-check that your codebase contains a version of the assembly files that is compatible with GCC.

    #10376
    FesianXu
    Participant

    Thanks for your kindly  help!I have an additional question.Are there any methods to replace visualGDB’s compiler with Keil’s compiler?Thansk in advance!

    #10378
    support
    Keymaster

    Hi,

    Yes, we actually have a detailed tutorial showing how to use VisualGDB with Keil: https://visualgdb.com/tutorials/arm/keil/

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