Raspberry Pi Pico への MicroPython 用 C 拡張機能コメント https://picockpit.com/raspberry-pi/ja/%e3%83%a9%e3%82%ba%e3%83%99%e3%83%aa%e3%83%bc%e3%83%91%e3%82%a4%e3%83%94%e3%82%b3%e3%81%a7%e3%81%ae%e3%83%9e%e3%82%a4%e3%82%af%e3%83%ad%e3%83%91%e3%82%a4%e3%82%bd%e3%83%b3%e7%94%a8c%e6%8b%a1%e5%bc%b5/ Fri, 24 May 2024 07:36:44 +0000 一刻一刻 1 https://wordpress.org/?v=6.7.2 Dr_Phil より https://picockpit.com/raspberry-pi/ja/%e3%83%a9%e3%82%ba%e3%83%99%e3%83%aa%e3%83%bc%e3%83%91%e3%82%a4%e3%83%94%e3%82%b3%e3%81%a7%e3%81%ae%e3%83%9e%e3%82%a4%e3%82%af%e3%83%ad%e3%83%91%e3%82%a4%e3%82%bd%e3%83%b3%e7%94%a8c%e6%8b%a1%e5%bc%b5/#comment-21214 Fri, 24 May 2024 07:36:44 +0000 https://picockpit.com/raspberry-pi/?p=774#comment-21214 I followed all the instruction and ended up with a built facfib.mpy file. I used
ARCH = armv6m
When loaded into the Pico I get this error:

ValueError: incompatible .mpy file

My Pico requires the following mpy values:
mpy version: 6
mpy sub-version: 2
mpy flags: -march=armv6m

Checking the first two bytes of the file give version 6 and sub-version 6.
Is there a way to correct this please?

]]>
アダム より https://picockpit.com/raspberry-pi/ja/%e3%83%a9%e3%82%ba%e3%83%99%e3%83%aa%e3%83%bc%e3%83%91%e3%82%a4%e3%83%94%e3%82%b3%e3%81%a7%e3%81%ae%e3%83%9e%e3%82%a4%e3%82%af%e3%83%ad%e3%83%91%e3%82%a4%e3%82%bd%e3%83%b3%e7%94%a8c%e6%8b%a1%e5%bc%b5/#comment-18235 Fri, 09 Feb 2024 09:22:45 +0000 https://picockpit.com/raspberry-pi/?p=774#comment-18235 Paulo への返信。

Thank you for the information, Paulo!

]]>
パウロ より https://picockpit.com/raspberry-pi/ja/%e3%83%a9%e3%82%ba%e3%83%99%e3%83%aa%e3%83%bc%e3%83%91%e3%82%a4%e3%83%94%e3%82%b3%e3%81%a7%e3%81%ae%e3%83%9e%e3%82%a4%e3%82%af%e3%83%ad%e3%83%91%e3%82%a4%e3%82%bd%e3%83%b3%e7%94%a8c%e6%8b%a1%e5%bc%b5/#comment-18221 Fri, 09 Feb 2024 01:44:59 +0000 https://picockpit.com/raspberry-pi/?p=774#comment-18221 Now you can compile to armv6 so just change this line in the Makefile and no need to change the micropython code
ARCH = armv6m

I had a few errors compiling the factfib.c, where are the fixes:

// missing the ” in the end.
#include “py/dynruntime.h”

// convert the return value to mp_obj_t
STATIC mp_obj_t factorial(mp_obj_t x_obj) {
mp_int_t x = mp_obj_get_int(x_obj);
mp_int_t rslt = factorial_helper(x);
return mp_obj_new_int(rslt);
}

]]>
paopao69 より https://picockpit.com/raspberry-pi/ja/%e3%83%a9%e3%82%ba%e3%83%99%e3%83%aa%e3%83%bc%e3%83%91%e3%82%a4%e3%83%94%e3%82%b3%e3%81%a7%e3%81%ae%e3%83%9e%e3%82%a4%e3%82%af%e3%83%ad%e3%83%91%e3%82%a4%e3%82%bd%e3%83%b3%e7%94%a8c%e6%8b%a1%e5%bc%b5/#comment-9539 Wed, 22 Mar 2023 17:59:43 +0000 https://picockpit.com/raspberry-pi/?p=774#comment-9539 Lynggaard への返信。

Did you eventually get it to work?

]]>
Lynggaard より https://picockpit.com/raspberry-pi/ja/%e3%83%a9%e3%82%ba%e3%83%99%e3%83%aa%e3%83%bc%e3%83%91%e3%82%a4%e3%83%94%e3%82%b3%e3%81%a7%e3%81%ae%e3%83%9e%e3%82%a4%e3%82%af%e3%83%ad%e3%83%91%e3%82%a4%e3%82%bd%e3%83%b3%e7%94%a8c%e6%8b%a1%e5%bc%b5/#comment-5438 Sun, 08 Jan 2023 20:09:41 +0000 https://picockpit.com/raspberry-pi/?p=774#comment-5438 I tried to do the above, but various things dont work out as described:

– I followed the instructions above, got micropython, modified the makefile as described
– I do make (but I get a factfib.native.mpy file instead of factfib.mpy)
– I copy the factfib.native.mpy file to the pico as factfib.mpy
(I tried rshell but I got a “timed out or error in transfer to remote: b””, but I could copy it over using Thonny)
– I can import the module (in thonny or rshell – the same) without errors
– I try and run the “ff.fibonacci(5)” but then I get:

“Traceback (most recent call last):
File “”, line 1, in
AttributeError: ‘module’ object has no attribute ‘fibonacci'”

What do I do wrong?

]]>
XMC.pl より https://picockpit.com/raspberry-pi/ja/%e3%83%a9%e3%82%ba%e3%83%99%e3%83%aa%e3%83%bc%e3%83%91%e3%82%a4%e3%83%94%e3%82%b3%e3%81%a7%e3%81%ae%e3%83%9e%e3%82%a4%e3%82%af%e3%83%ad%e3%83%91%e3%82%a4%e3%82%bd%e3%83%b3%e7%94%a8c%e6%8b%a1%e5%bc%b5/#comment-1048 Wed, 01 Jun 2022 03:31:26 +0000 https://picockpit.com/raspberry-pi/?p=774#comment-1048 How to configure joomla that can retrieve the data from mysql?

]]>
ラズベリー https://picockpit.com/raspberry-pi/ja/%e3%83%a9%e3%82%ba%e3%83%99%e3%83%aa%e3%83%bc%e3%83%91%e3%82%a4%e3%83%94%e3%82%b3%e3%81%a7%e3%81%ae%e3%83%9e%e3%82%a4%e3%82%af%e3%83%ad%e3%83%91%e3%82%a4%e3%82%bd%e3%83%b3%e7%94%a8c%e6%8b%a1%e5%bc%b5/#comment-245 Sat, 27 Nov 2021 17:56:48 +0000 https://picockpit.com/raspberry-pi/?p=774#comment-245 PeterB への返信。

Thank you for your feedback 🙂

]]>
PeterB より https://picockpit.com/raspberry-pi/ja/%e3%83%a9%e3%82%ba%e3%83%99%e3%83%aa%e3%83%bc%e3%83%91%e3%82%a4%e3%83%94%e3%82%b3%e3%81%a7%e3%81%ae%e3%83%9e%e3%82%a4%e3%82%af%e3%83%ad%e3%83%91%e3%82%a4%e3%82%bd%e3%83%b3%e7%94%a8c%e6%8b%a1%e5%bc%b5/#comment-218 Fri, 26 Nov 2021 08:29:10 +0000 https://picockpit.com/raspberry-pi/?p=774#comment-218 Apart from the error in the c program it worked a treat. Thanks.

STATIC mp_obj_t factorial(mp_obj_t x_obj) {
mp_int_t x = mp_obj_get_int(x_obj);
mp_int_t rslt = factorial_helper(x);
return mp_obj_new_int(rslt);
}

]]>