Zephyr 3.4.99: main function conflicts with one in MCUboot

Hello,

I'm updating from Zephyr 3.2.99 to Zephyr 3.4.99.

I attempted to add a main() function to my application. (Heretofore I have not been using a main() function, just spawning threads.)

I'm using MCUboot.

I got this build failure, indicating multiple definitions of function main(), where the first is in MCUboot:

<path_to_gcc>/ld.bfd: modules/common/lib..__puffin__common.a(zephyr_update.c.obj): in function `main':
<path>/common/zephyr_update.c:8: multiple definition of `main'; app/libapp.a(main.c.obj):<path>/bootloader/mcuboot/boot/zephyr/main.c:568: first defined here

How do I get around this? How do I get the build system to allow me to have a main() function in my application while MCUboot has its own main() function?

Thanks!

Parents
  • Turns out that the issue is that I placed that main() function in a file in the common dir of my project.

    Looks like MCUboot includes the common dir of my project.

    Is there something magickal about any dir, anywhere, whose name is "common"? Does MCUboot automatically include those?

    What are other magickal aspects of the MCUboot build that I should be aware of?

    Thanks!

Reply
  • Turns out that the issue is that I placed that main() function in a file in the common dir of my project.

    Looks like MCUboot includes the common dir of my project.

    Is there something magickal about any dir, anywhere, whose name is "common"? Does MCUboot automatically include those?

    What are other magickal aspects of the MCUboot build that I should be aware of?

    Thanks!

Children
Related