Giter VIP home page Giter VIP logo

micropython-raspberrypi's People

Contributors

astrelsky avatar boochow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

micropython-raspberrypi's Issues

Stuck at the rainbow splash screen on RPi2

Followed the instructions to the letter -- but stuck at the rainbow splash screen. Looks like
the kernel firmware.img has some problem...

I am building on the Ubuntu sub-system on Windows 10.

I see no error or warnings except this:

source/device/hid/keyboard.c: In function 'KeyboardAttach':
source/device/hid/keyboard.c:163:7: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
if (parse->Report[i]->Fields[j].Usage.Keyboard >= KeyboardLeftControl
^~
source/device/hid/keyboard.c:166:8: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
data->KeyFields[(u16)parse->Report[i]->Fields[j].Usage.Keyboard - (u16)KeyboardLeftControl] =
^~~~
LINK build/firmware.elf

[README.md] Missing information to compile?

make BOARD=RPI1
/bin/sh: 1: arm-none-eabi-gcc: not found

Debian, Ubuntu, Mint, and variants

The following packages will need to be installed before you can compile and run MicroPython:

build-essential
libreadline-dev
libffi-dev
git
pkg-config (required at least in ubuntu 14.04)
gcc-arm-none-eabi
libnewlib-arm-none-eabi

Troubleshooting. SD Card not supported.

Is this supposed to be functional? I've compiled the current branch and installed it as described in the readme. I have also tried the release distribution and I get the same result. Running on raspberry pi zero V1.3. I've tried raspbian and that works just fine so I know the board is at least functional. I had also tried the release about a year ago, uncommented the lines in main.py and was always presented with a bunch of random colors on the screen.

Here is a screenshot of the layout of my sd card.
root

This is the contents of main.py. Everything else remains unchanged.

from machine import Pin

led = Pin(47, Pin.OUT)   # create output pin on GPIO47 (on-board LED)
led(0)                   # set pin to on/low
while True:
    pass

I would expect the led to turn on and remain on. However, it blinks a couple times, turns off pauses and then quickly blinks and stays off. This appears to be the behavior when it fails to boot the .img file.

VC4 baremetal?

Hi boochow, this is great, thank you.

Did you think about going even lower and making it VC4 baremetal instead of ARM baremetal? There is gcc compiler for VC4 VPU and accessing peripherials should be very similar. There is example VPU firmware https://github.com/christinaa/rpi-open-firmware with serial console working that enables SDRAM, turns on ARM core and tries to boot linux there.

Then it would not need extra bootcode.bin and other closed stuff and would boot faster and could even draw less power if you don't enable ARM core at all. Maybe it could even fit into 128KB L2 SRAM where bootcode.bin is initially loaded so even 512MB SDRAM could be off for some use cases (or maybe not, 128KB may be too small for micropython, OTOH microbit has 128+16KB). Disadvantage of bare metal VC4 is not having easy HDMI out and all those VC4 mailbox api calls but the ARM core is free to do other stuff.

Is It really so slow ?

I just tried micropython-raspberrypi on RP1 and it seems to work quite slow. The results from pystone_lowmem.py:

Pystone(1.2) time for 500 passes = 853ms
This machine benchmarks at 586 pystones/second

The result is compatible with a 64 MHz Cortex-M4 MCU, Has anyone performed similar testing ?

error when I compile

I have this error then I run "make BOARD=RPI1":

Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
GEN build/genhdr/qstr.i.last
GEN build/genhdr/qstr.split
GEN build/genhdr/qstrdefs.collected.h
QSTR updated
GEN build/genhdr/qstrdefs.generated.h
mkdir -p build/build/
mkdir -p build/extmod/
mkdir -p build/lib/embed/
mkdir -p build/lib/libc/
mkdir -p build/lib/libm/
mkdir -p build/lib/mp-readline/
mkdir -p build/lib/oofatfs/
mkdir -p build/lib/timeutils/
mkdir -p build/lib/utils/
mkdir -p build/py/
CC ../micropython/py/mpstate.c
In file included from ./mpconfigport.h:2,
                 from ../micropython/py/mpconfig.h:62,
                 from ../micropython/py/mpstate.h:31,
                 from ../micropython/py/mpstate.c:27:
./arm_exceptions.h:34:1: error: FP registers might be clobbered despite 'interrupt' attribute: compile with '-mgeneral-regs                                      -only' [-Werror=attributes]
   34 | extern void __attribute__((interrupt("UNDEF"))) undef_handler(void);
      | ^~~~~~
./arm_exceptions.h:35:1: error: FP registers might be clobbered despite 'interrupt' attribute: compile with '-mgeneral-regs                                      -only' [-Werror=attributes]
   35 | extern void __attribute__((interrupt("SWI"))) svc_handler(void);
      | ^~~~~~
./arm_exceptions.h:36:1: error: FP registers might be clobbered despite 'interrupt' attribute: compile with '-mgeneral-regs                                      -only' [-Werror=attributes]
   36 | extern void __attribute__((interrupt("ABORT"))) abort_handler(void);
      | ^~~~~~
./arm_exceptions.h:37:1: error: FP registers might be clobbered despite 'interrupt' attribute: compile with '-mgeneral-regs                                      -only' [-Werror=attributes]
   37 | extern void __attribute__((interrupt("IRQ"))) irq_handler(void);
      | ^~~~~~
./arm_exceptions.h:38:1: error: FP registers might be clobbered despite 'interrupt' attribute: compile with '-mgeneral-regs                                      -only' [-Werror=attributes]
   38 | extern void __attribute__((interrupt("FIQ"))) fiq_handler(void);
      | ^~~~~~
cc1: all warnings being treated as errors
make: *** [../micropython/py/mkrules.mk:47: build/py/mpstate.o] Error 1

Can i use it for this?

So... What is this? I have a two python files I need to run at the boot on a RPI zero w. Those files call i2c components. A multiplexor, 4 mcp, 1 htk1633 for LEDs and a LCD display. (And I need wifi)

Can I use micro python to make that work? (im currently using raspbian).

how to run micropython-raspberry

I installed micropython-raspberry on a Pi Zero. It also has python 3 installed. What is the command to run micropython-raspberry files? Probably this should be obvious to me but it might be good to add that detail to the README file.

Does micropython-raspberry do WiFi yet?

Thanks for your work to make this library. There are lots of libraries in micropython for microcontrollers but I haven't found any for Pi computers so you've filled a big gap.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.