Open Memotech-Bill opened 1 month ago
Found the problem.
The source file panic.c is missing:
#include "pico/platform/compiler.h"
As a result, the following definition is missing:
#define pico_default_asm(...) __asm (".syntax unified\n" __VA_ARGS__)
So the compiler thinks pico_default_asm()
is a standard C function call, and the colons are a syntax error.
I just need work out how to fix that in my build until the SDK gets fixed.
Messy, but adding the following line to my CMakeLists.txt file works around the issue for now:
target_compile_options(${PROJECT_NAME} PUBLIC -include pico/platform/compiler.h)
Ah, good spot, only happens with PICO_PANIC_FUNCTION
defined which is how we missed it
My build defines
PICO_PANIC_FUNCTION=sys_panic
. With that definition, building panic.c fails.This is on a fully updated copy of Bullseye. Compiler version: