Open khoih-prog opened 3 years ago
I tried to change in defines.txt#L28 to
-DPICO_TIME_DEFAULT_ALARM_POOL_DISABLED=0
but still not OK yet.
Error
sketch/Stdio_Issue.ino.cpp.o: In function `add_alarm_in_ms':
/home/kh/.arduino15/packages/arduino/hardware/mbed_rp2040/2.1.0/cores/arduino/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/common/pico_time/include/pico/time.h:549: undefined reference to `alarm_pool_get_default'
collect2: error: ld returned 1 exit status
exit status 1
Error compiling for board Raspberry Pi Pico.
Confirmed, i cannot change the cpu clock speed on the pico with this simple sketch because of that error
#include "pico/stdlib.h"
void setclock_khz(uint32_t khz) {
set_sys_clock_khz(khz,true);
}
int main() {
sleep_ms(3000);
printf("setting cpu clock to: %d Khz \n", 50000);
set_sys_clock_khz(50000,true);
}
Arduino: 1.8.15 (Windows 10), Board: "Raspberry Pi Pico"
In file included from C:\Users\Ernesto\AppData\Local\Temp\arduino_modified_sketch_761225\sketch_jun17b.ino:1:0:
C:\Users\Ernesto\AppData\Local\Arduino15\packages\arduino\hardware\mbed_rp2040\2.1.0\cores\arduino/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/common/pico_stdlib/include/pico/stdlib.h:11:10: fatal error: pico/stdio.h: No such file or directory
#include "pico/stdio.h"
compilation terminated.
exit status 1
Error compiling for board Raspberry Pi Pico.
I concur. Without the stdio.h file there does not seem to be any way to set the system clock with the Pico Pi. I posted this question a week ago but see that khioh-prog and ernesto75 posted it back in June. This seems like a handicap to the Mbed implementation.
Is there anyway to get the attention of the Mbed core developers concerning this? My attempts at adding the stdio.h from the Earle core have not been successful... Thanks, Bill
Confirmed, i cannot change the cpu clock speed on the pico with this simple sketch because of that error
#include "pico/stdlib.h" void setclock_khz(uint32_t khz) { set_sys_clock_khz(khz,true); } int main() { sleep_ms(3000); printf("setting cpu clock to: %d Khz \n", 50000); set_sys_clock_khz(50000,true); } Arduino: 1.8.15 (Windows 10), Board: "Raspberry Pi Pico" In file included from C:\Users\Ernesto\AppData\Local\Temp\arduino_modified_sketch_761225\sketch_jun17b.ino:1:0: C:\Users\Ernesto\AppData\Local\Arduino15\packages\arduino\hardware\mbed_rp2040\2.1.0\cores\arduino/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/common/pico_stdlib/include/pico/stdlib.h:11:10: fatal error: pico/stdio.h: No such file or directory #include "pico/stdio.h" compilation terminated. exit status 1 Error compiling for board Raspberry Pi Pico.
Same problem, can't change sys clk. the version come to 2.8.0 , but this problem is still.
I'm trying this simple timer-related code, which is simplified from RPI pico SDK hardware_timer
This code compiles OK using SDK or RP2040 arduino-pico core
But there are some issues with this core
stdio.h
In stdlib.h#L10-L12
but compiler finds no
pico/stdio.h
in the coretime.c
Comment out
The compiler also generates error with this core, possibly no
time.c
was included in the coreIn time.h#L548-L549, the function
add_alarm_in_ms
is declared asRegards,