pico-sdk icon indicating copy to clipboard operation
pico-sdk copied to clipboard

multicore_lockout_start_blocking assertion failure

Open jonbro opened this issue 3 years ago • 4 comments

void draw_screen()
{
    multicore_lockout_victim_init();
    while(1)
    {
// in the actual application, I'm doing some i2c work here, but this code also fails.
        tight_loop_contents();
    }
}

int main()
{
    stdio_init_all();
    multicore_launch_core1(draw_screen);
    sleep_ms(100);
    multicore_lockout_start_blocking();
    multicore_lockout_end_blocking();
}

with the above code, I'm getting the following assertion failure:

assertion "us_since_boot <= INT64_MAX" failed: file "C:\Users\...\pico-sdk\src\common\pico_base\include/pico/types.h", line 63, function: update_us_since_boot

I'm on sdk 1.3, and using pico probe to debug... at some point, this code was running for me.

jonbro avatar Dec 24 '21 06:12 jonbro

Looking at https://github.com/raspberrypi/pico-sdk/commit/684986aae6674c3892cc0d85a5d4daa19b0eca4b that would seem to imply that your at_the_end_of_time is getting set to a value > INT64_MAX ? (i.e. the topmost bit is set). What OS and compiler-version are you using?

lurch avatar Dec 24 '21 10:12 lurch

I'm on windows, using gcc for arm-none-eabi 10.2.1 / GNU Arm Embedded toolchain 10 2020-q4-major

jonbro avatar Dec 24 '21 16:12 jonbro

Same with gcc version 10.3.1 20210621 (release) (GNU Arm Embedded Toolchain 10.3-2021.07) on macOS 12.4 (M1). Does anybody know of a workaround?

jsphpl avatar Jul 11 '22 05:07 jsphpl

Same on Ubuntu with arm-none-eabi-gcc (15:9-2019-q4-0ubuntu2) 9.2.1 20191025 (release)

dangiu avatar Jul 28 '22 21:07 dangiu

fix is merged into develop

kilograham avatar Aug 17 '22 21:08 kilograham

I do get this issue with the latest SDK version, i am calling the block from core 1 and victim is core 0.

EDIT: i also tried develop branch and the issue persists

RaresAil avatar Oct 11 '22 18:10 RaresAil

@RaresAil Probably best if you open a new issue, and include example code that reproduces the problem?

lurch avatar Oct 11 '22 20:10 lurch

Sure

EDIT: I opened the issue at #1059

RaresAil avatar Oct 12 '22 04:10 RaresAil