raspberry pi pico 使用 studio 产生 uf2 无法运行

发布于 2021-03-23 16:14:29

使用 RT-Thread Studio 的 raspberry pi pico sdk 产生的 uf2 在板子上无法运行。

TIM截图20210323160401.png

TIM截图20210323160430.png

TIM截图20210323160509.png

main.c 无修改


#include <rtthread.h>
#include <rtdevice.h>

#define LED_PIN 25

int main(void)
{
    rt_kprintf("Hello, RT-Thread!\n");

    rt_pin_mode(LED_PIN, PIN_MODE_OUTPUT);

    while (1)
    {
        rt_pin_write(LED_PIN, 1);
        rt_thread_mdelay(1000);
        rt_pin_write(LED_PIN, 0);
        rt_thread_mdelay(1000);
    }
}

编的 Log 无报错

16:07:25 **** Build of configuration Debug for project 403_pico ****
scons.bat -j6 
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...

scons: warning: you do not seem to have the pywin32 extensions installed;
    parallel (-j) builds may not work reliably with open Python files.
File "C:\RT-ThreadStudio\platform\env_released\env\tools\Python27\Scripts\scons.py", line 204, in <module>
scons: building associated VariantDir targets: build
CC build\applications\main.o
CC build\drivers\board.o
CC build\drivers\drv_gpio.o
CC build\drivers\drv_uart.o
CC build\kernel\components\drivers\misc\pin.o
CC build\kernel\components\drivers\serial\serial.o
CC build\kernel\components\drivers\src\completion.o
CC build\kernel\components\drivers\src\dataqueue.o
CC build\kernel\components\drivers\src\pipe.o
CC build\kernel\components\drivers\src\ringblk_buf.o
CC build\kernel\components\drivers\src\ringbuffer.o
CC build\kernel\components\drivers\src\waitqueue.o
CC build\kernel\components\drivers\src\workqueue.o
CC build\kernel\components\finsh\cmd.o
CC build\kernel\components\finsh\msh.o
CC build\kernel\components\finsh\shell.o
CC build\kernel\components\libc\compilers\common\time.o
CC build\kernel\components\libc\compilers\newlib\minilib.o
CC build\kernel\libcpu\arm\common\backtrace.o
CC build\kernel\libcpu\arm\common\div0.o
CC build\kernel\libcpu\arm\common\showmem.o
AS build\kernel\libcpu\arm\cortex-m0\context_gcc.o
CC build\kernel\libcpu\arm\cortex-m0\cpuport.o
CC build\kernel\src\clock.o
CC build\kernel\src\components.o
CC build\kernel\src\device.o
CC build\kernel\src\idle.o
CC build\kernel\src\ipc.o
CC build\kernel\src\irq.o
CC build\kernel\src\kservice.o
CC build\kernel\src\mem.o
CC build\kernel\src\mempool.o
CC build\kernel\src\object.o
CC build\kernel\src\scheduler.o
CC build\kernel\src\thread.o
CC build\kernel\src\timer.o
AS build\libraries\generated\bs2_default_padded_checksummed.o
CC build\libraries\pico-sdk\src\common\pico_sync\critical_section.o
CC build\libraries\pico-sdk\src\common\pico_sync\lock_core.o
CC build\libraries\pico-sdk\src\common\pico_sync\mutex.o
CC build\libraries\pico-sdk\src\common\pico_sync\sem.o
CC build\libraries\pico-sdk\src\common\pico_time\time.o
CC build\libraries\pico-sdk\src\common\pico_time\timeout_helper.o
CC build\libraries\pico-sdk\src\common\pico_util\datetime.o
CC build\libraries\pico-sdk\src\common\pico_util\pheap.o
CC build\libraries\pico-sdk\src\common\pico_util\queue.o
CC build\libraries\pico-sdk\src\rp2_common\hardware_claim\claim.o
CC build\libraries\pico-sdk\src\rp2_common\hardware_clocks\clocks.o
AS build\libraries\pico-sdk\src\rp2_common\hardware_divider\divider.o
CC build\libraries\pico-sdk\src\rp2_common\hardware_gpio\gpio.o
CC build\libraries\pico-sdk\src\rp2_common\hardware_irq\irq.o
AS build\libraries\pico-sdk\src\rp2_common\hardware_irq\irq_handler_chain.o
CC build\libraries\pico-sdk\src\rp2_common\hardware_pll\pll.o
CC build\libraries\pico-sdk\src\rp2_common\hardware_sync\sync.o
CC build\libraries\pico-sdk\src\rp2_common\hardware_timer\timer.o
CC build\libraries\pico-sdk\src\rp2_common\hardware_uart\uart.o
CC build\libraries\pico-sdk\src\rp2_common\hardware_vreg\vreg.o
CC build\libraries\pico-sdk\src\rp2_common\hardware_watchdog\watchdog.o
CC build\libraries\pico-sdk\src\rp2_common\hardware_xosc\xosc.o
AS build\libraries\pico-sdk\src\rp2_common\pico_bit_ops\bit_ops_aeabi.o
CC build\libraries\pico-sdk\src\rp2_common\pico_bootrom\bootrom.o
AS build\libraries\pico-sdk\src\rp2_common\pico_divider\divider.o
AS build\libraries\pico-sdk\src\rp2_common\pico_double\double_aeabi.o
CC build\libraries\pico-sdk\src\rp2_common\pico_double\double_init_rom.o
CC build\libraries\pico-sdk\src\rp2_common\pico_double\double_math.o
AS build\libraries\pico-sdk\src\rp2_common\pico_double\double_v1_rom_shim.o
AS build\libraries\pico-sdk\src\rp2_common\pico_float\float_aeabi.o
CC build\libraries\pico-sdk\src\rp2_common\pico_float\float_init_rom.o
CC build\libraries\pico-sdk\src\rp2_common\pico_float\float_math.o
AS build\libraries\pico-sdk\src\rp2_common\pico_float\float_v1_rom_shim.o
AS build\libraries\pico-sdk\src\rp2_common\pico_int64_ops\pico_int64_ops_aeabi.o
CC build\libraries\pico-sdk\src\rp2_common\pico_malloc\pico_malloc.o
AS build\libraries\pico-sdk\src\rp2_common\pico_mem_ops\mem_ops_aeabi.o
CC build\libraries\pico-sdk\src\rp2_common\pico_platform\platform.o
CC build\libraries\pico-sdk\src\rp2_common\pico_printf\printf.o
CC build\libraries\pico-sdk\src\rp2_common\pico_runtime\runtime.o
CC build\libraries\pico-sdk\src\rp2_common\pico_standard_link\binary_info.o
AS build\libraries\pico-sdk\src\rp2_common\pico_standard_link\crt0.o
CXX build\libraries\pico-sdk\src\rp2_common\pico_standard_link\new_delete.o
CC build\libraries\pico-sdk\src\rp2_common\pico_stdio\stdio.o
CC build\libraries\pico-sdk\src\rp2_common\pico_stdio_uart\stdio_uart.o
CC build\libraries\pico-sdk\src\rp2_common\pico_stdlib\stdlib.o
LINK rtthread-pico.elf
arm-none-eabi-objcopy -O binary rtthread-pico.elf rtthread.bin
arm-none-eabi-size rtthread-pico.elf
   text       data        bss        dec        hex    filename
  75380          0      83896     159276      26e2c    rtthread-pico.elf
C:\RT-ThreadStudio\workspace\403_pico\libraries\generated\elf2uf2.exe rtthread-pico.elf rtthread-pico.uf2
scons: done building targets.

16:07:44 Build Finished. 0 errors, 0 warnings. (took 19s.685ms)

是否那儿设置不对,导致产生的 elf , uf2 有问题呢?

PS1. PICO 板子使用树梅官方的 uf2 及使用 linux 去编 sdk 是可以正常运行的!

查看更多

关注者
0
被浏览
202
3 个回答
Thread_Liu
Thread_Liu 2021-03-23

在 linux 下编译 rtthread-pico 是好使的吗

flashman2002
flashman2002 2021-03-23

就是说源码都没有改动过,只是编译后就无法正常运行了,对吗?你使用单步调试了吗?

撰写答案

请登录后再发布答案,点击登录

发布
问题

分享
好友

手机
浏览

扫码手机浏览