This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

STM32F051C8

Hello! How can i call function from asm file to the c file into one project using directive EXPORT?
Thanks.

Parents
  • Perhaps you could just look at the startup_stm32f0xx.s for inspiration?

    Calling C functions

            IMPORT  SystemInit
    
                     LDR     R0, =SystemInit
                     BLX     R0
    
    void SystemInit(void)
    {
     // ..
    }
    

    Calling ASM functions

    foo PROC
        EXPORT foo
    
        bx lr
    
        ENDP ; foo
    
    extern void foo(void);
    
    foo();
    

Reply
  • Perhaps you could just look at the startup_stm32f0xx.s for inspiration?

    Calling C functions

            IMPORT  SystemInit
    
                     LDR     R0, =SystemInit
                     BLX     R0
    
    void SystemInit(void)
    {
     // ..
    }
    

    Calling ASM functions

    foo PROC
        EXPORT foo
    
        bx lr
    
        ENDP ; foo
    
    extern void foo(void);
    
    foo();
    

Children