Skip to content

Conversation

@facchinm
Copy link
Member

@per1234 per1234 added the bug Something isn't working label Nov 18, 2025
@pennam pennam merged commit 6b3c144 into arduino:main Dec 4, 2025
24 checks passed
@mjs513
Copy link

mjs513 commented Dec 12, 2025

@facchinm @KurtE

I have been testing this change with my Threading testing sketches. Some sketches are still still failing.

  • Thread create - works
  • Thread define -works
  • Thread Mutexes, Thread Semaphore failing with following error message:
[00:00:00.202,000] <err> llext: Region 1 ELF file range (0x1bc0-0x1e87) overlaps with 2 (0x1c20-0x1e67)
[00:00:00.214,000] <err> llext: Failed to map ELF sections, ret -8
Failed to load sketch, rc -8

@KurtE
Copy link

KurtE commented Dec 12, 2025

@facchinm @mjs513 @pillo79 - I believe I have this synced in... (I rebased my defer camera branch) to the latest this morning,
and CONFIG_EVENTS=y is in prj.conf. I did a sync to it, did a west update, extras/build_all, copy the stuff to windows...

I then rebuilt sketch to run using events:

struct k_event my_event;
#define STACK_SIZE 1024
#define PRIORITY 7

K_THREAD_STACK_DEFINE(thread1_stack, STACK_SIZE);
struct k_thread thread1_data;
k_tid_t thread1_tid;


void thread1(void *p1, void *p2, void *p3) {
  UNUSED(p1);
  UNUSED(p2);
  UNUSED(p3);
  while (1) {
    printk("%u: Thread\n", (uint32_t)millis());
    k_sleep(K_MSEC(1000));
    k_event_set(&my_event, 0x001);
    k_sleep(K_MSEC(1000));
  }
}


void setup() {
  k_event_init(&my_event);
  thread1_tid = k_thread_create(&thread1_data, thread1_stack, K_THREAD_STACK_SIZEOF(thread1_stack),
                                thread1, NULL, NULL, NULL, PRIORITY, 0, K_NO_WAIT);
}

void loop() {
  uint32_t events;
  events = k_event_wait(&my_event, 0xFFF, true, K_MSEC(2000));
  if (events == 0) {
    printk("Timeout");
  } else {
    printk("l%u:loop\n", (uint32_t)millis());
  }
}

Uploaded it to the Q, and my debug window shows:

uart:~$
[00:00:00.202,000] <err> llext: Undefined symbol with no entry in symbol table z_impl_k_event_set, offset 60, link                                section 8
[00:00:00.216,000] <err> elf: Could not find symbol z_impl_k_event_set!
[00:00:00.226,000] <err> llext: Undefined symbol with no entry in symbol table z_impl_k_event_init, offset 128, li                               nk section 8
[00:00:00.240,000] <err> elf: Could not find symbol z_impl_k_event_init!
[00:00:00.250,000] <err> llext: Undefined symbol with no entry in symbol table z_impl_k_event_wait, offset 216, li                               nk section 8
[00:00:00.264,000] <err> elf: Could not find symbol z_impl_k_event_wait!
[00:00:00.274,000] <err> llext: Failed to link, ret -61
Failed to load sketch, rc -61
uart:~$

@KurtE
Copy link

KurtE commented Dec 12, 2025

Oops - forgot to redo the bootloader, now appears to run... 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Simple Thread example fails with region overlap

6 participants