trns1997 commented on PR #16976:
URL: https://github.com/apache/nuttx/pull/16976#issuecomment-3258692508

   @leducp was right in comment: 
https://github.com/apache/nuttx/pull/16970#issuecomment-3257700071. This commit 
is caused the issue. The commit moved/centralized `crt0.c` from arch/* into 
arch/common and builds crt0.o as part of libarch.a. That means `__start` is now 
provided both by board startup code (e.g. stm32_start.o in libarch.a) and by 
the exported crt0.o in startup/, which leads to a "multiple definition of 
__start" error when building apps against an export package. Updating the line 
22 in `scripts/toolchain.cmake` from `file(GLOB STARTUP_OBJS 
${NUTTX_PATH}/startup/*)` to `set(STARTUP_OBJ ${NUTTX_PATH}/startup/crt0.o)` 
forces the app to use `crt0.o`. I have the app that build in 
https://github.com/apache/nuttx/pull/16970 but not sure this is the correct 
expected solution. I would like someones input on this before i implement this 
fix.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to