cancel
Showing results for 
Search instead for 
Did you mean: 

Upgrade issue IDE 1.10.1. Project to IDE 1.13.1

ekopi
Associate

Hi, I tried to use a broadcom lib (AFBR_S50, libafbrs50_m4_fpu.a)  on a STM32F401 nucleo board.

This works quite well for the IDE 1.10.1. I can compile the example program and run the debugger. But as soon as I try to migrate it to a higher IDE version (1.11 or 1.12 or 1.13.1) the compilation / linking fails with the message: 'undefined reference to main' in 'startup_stm32f401retx.s' in this file:

LoopFillZerobss:

ldr r3, = _ebss

cmp r2, r3

bcc FillZerobss

 

/* Call the clock system intitialization function.*/

bl SystemInit

/* Call static constructors */

bl __libc_init_array

/* Call the application's entry point.*/

bl main

bx lr

.size Reset_Handler, .-Reset_Handler

I did not find any hint how to fix this problem. It may be related to the migration of the .ioc file to a newer version / the new generated code. But how can I address this problem?

Thanks for your help!
Best, E

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

> undefined reference to main

Where is the main function defined? Typically this is in main.c. When you look at the output from the compiler, is that file being compiled?

Might want to ensure all source files are within "source" folders as defined in your project properties C/C++ General -> Paths and Symbols -> Source Location.

 

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

2 REPLIES 2
TDK
Guru

> undefined reference to main

Where is the main function defined? Typically this is in main.c. When you look at the output from the compiler, is that file being compiled?

Might want to ensure all source files are within "source" folders as defined in your project properties C/C++ General -> Paths and Symbols -> Source Location.

 

If you feel a post has answered your question, please click "Accept as Solution".

Thanks TDK for the answer,

that was the right trace. The main.c has been compiled but it did not hold the 'void main(void)' function. This was in another file in the example. I put that folder containing the file with the main() function in 'sources' and it worked well.

Thank's for your help! Best, E