Skip to content

build failed with undefined reference to app_main' #1601

@stc1988

Description

@stc1988

Build environment: macOS,
Moddable SDK version: 8.0.1
Target device: M5stack, M5stackCores3

Steps to Reproduce

  1. clone stack-chan repository
  2. cd firmware/stackchan
  3. mcconfig -d -m -p esp32/m5stack_cores3 -t build
/home/runner/.espressif/tools/xtensa-esp-elf/esp-15.2.0_20251204/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/15.2.0/../../../../xtensa-esp-elf/bin/ld: esp-idf/freertos/libfreertos.a(app_startup.c.obj):(.literal.main_task+0x4): undefined reference to `app_main'
/home/runner/.espressif/tools/xtensa-esp-elf/esp-15.2.0_20251204/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/15.2.0/../../../../xtensa-esp-elf/bin/ld: esp-idf/freertos/libfreertos.a(app_startup.c.obj): in function `main_task':
/home/runner/.local/share/esp32/esp-idf/components/freertos/app_startup.c:158:(.text.main_task+0x39): undefined reference to `app_main'
collect2: error: ld returned 1 exit status

Other information

Full build is here.

I tried building several applications, but no issues occurred except with stack-chan. When I rolled back the commits, I confirmed that the issue started occurring from 6dcb076.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions