Skip to main content
ABlum.2
Associate III
March 31, 2021
Question

How can I change the access point (main function) to an external access point outside the STCubeIde project?

  • March 31, 2021
  • 2 replies
  • 596 views

Hello everyone!

I am trying to call my access point (main) outside the STCube projects, I already created a project that contains the STCube project, but the assembly code doesn't recognize the external project to find the access point, is there any quite tutorial about it?

Thanks in advance

Alan

This topic has been closed for replies.

2 replies

Vangelis Fortounas
Associate II
March 31, 2021

Hello

>>but the assembly code doesn't recognize the external project.

Probably mean the startup file's assembly code. in this case "IMPORT" is the keyword to tell the linker to search for void your_main(void) function

Note that __main function called from reset handler initializes CRT and ZI RW data-variables and subsequently calls int main(void) main function.

0693W000008yNdhQAE.jpg 

ABlum.2
ABlum.2Author
Associate III
April 1, 2021

I don't have this structure in the .s file, but anyway, I solved by included the folder in the project properties, C/C++ General, Paths and Symbols, Source Location with the button "Link Folder".

Thanks for the help!