[ADAFRUIT_F405_EXPRESS] neopixel port advice

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
ilium007
Posts: 37
Joined: Tue Feb 16, 2021 10:29 am

Re: [ADAFRUIT_F405_EXPRESS] neopixel port advice

Post by ilium007 » Sun Feb 21, 2021 2:24 am

That worked, but does this mean I am now tracking a branch that is not up to date with master, I mean, apart from drivers/neopixel.py

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: [ADAFRUIT_F405_EXPRESS] neopixel port advice

Post by dhylands » Sun Feb 21, 2021 5:23 am

That branch will no longer track master automatically. You can repeat the process of pulling a new master and rebasing your neopixel branch on top of that.

ilium007
Posts: 37
Joined: Tue Feb 16, 2021 10:29 am

Re: [ADAFRUIT_F405_EXPRESS] neopixel port advice

Post by ilium007 » Tue Feb 23, 2021 10:08 pm

Great - thanks again! That all working and gives me something to start playing around with. First project, canbus control of that neopixel :D

ilium007
Posts: 37
Joined: Tue Feb 16, 2021 10:29 am

Re: [ADAFRUIT_F405_EXPRESS] neopixel port advice

Post by ilium007 » Sat May 01, 2021 10:53 am

For some reason this is no longer working. I tried to build for uC 1.15 but can't import neopixel after deploying to the board and resetting:

Code: Select all

❯ git checkout master                                                                                                                                                                                                                                    
Switched to branch 'master'
Your branch is up to date with 'origin/master'.

~/projects/micropython/source master                                                                                                                                                                                                     
❯ git pull                                                                                                                                                                                                                                               
hint: Pulling without specifying how to reconcile divergent branches is
hint: discouraged. You can squelch this message by running one of the following
hint: commands sometime before your next pull:
hint: 
hint:   git config pull.rebase false  # merge (the default strategy)
hint:   git config pull.rebase true   # rebase
hint:   git config pull.ff only       # fast-forward only
hint: 
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
Already up to date.

~/projects/micropython/source master                                                                                                                                                                                                        
❯ git pr 5318                                                                                                                                                                                                                                            git fetch -fu origin pull/5318/head:pr/origin/5318
From https://github.com/micropython/micropython
 + 7e07ddcfb...dee49682d refs/pull/5318/head -> pr/origin/5318  (forced update)
warning: unable to rmdir 'lib/btstack': Directory not empty
warning: unable to rmdir 'lib/libhydrogen': Directory not empty
warning: unable to rmdir 'lib/nxp_driver': Directory not empty
warning: unable to rmdir 'lib/pico-sdk': Directory not empty
Updating files: 100% (2153/2153), done.
M       lib/mbedtls
M       lib/mynewt-nimble
M       lib/nrfx
M       lib/stm32lib
M       lib/tinyusb
Switched to branch 'pr/origin/5318'

~/projects/micropython/source pr/origin/5318 !5 ?4                                                                                                                                                                                          
❯ git rebase master                                                                                                                                                                                                                                     
Successfully rebased and updated refs/heads/pr/origin/5318.

~/projects/micropython/source pr/origin/5318                                                                                                                                                                                             
❯ git submodule update --init --recursive                                                                                                                                                                                                                

~/projects/micropython/source pr/origin/5318                                                                                                                                                                                            
❯ cd ports/stm32                                                                                                                                                                                                                                         

~/projects/micropython/source/ports/stm32 pr/origin/5318                                                                                                                                                                                    
❯ make BOARD=ADAFRUIT_F405_EXPRESS                                                                                                                                                                                                                       
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
GEN build-ADAFRUIT_F405_EXPRESS/genhdr/pins.h
GEN stmconst build-ADAFRUIT_F405_EXPRESS/modstm_qstr.h
.
.
.
.
AS ../../lib/utils/gchelper_m3.s
CC ../../lib/oofatfs/ff.c
CC ../../lib/oofatfs/ffunicode.c
CC build-ADAFRUIT_F405_EXPRESS/pins_ADAFRUIT_F405_EXPRESS.c
LINK build-ADAFRUIT_F405_EXPRESS/firmware.elf
   text    data     bss     dec     hex filename
 339580      16   27240  366836   598f4 build-ADAFRUIT_F405_EXPRESS/firmware.elf
GEN build-ADAFRUIT_F405_EXPRESS/firmware0.bin
GEN build-ADAFRUIT_F405_EXPRESS/firmware1.bin
GEN build-ADAFRUIT_F405_EXPRESS/firmware.dfu
GEN build-ADAFRUIT_F405_EXPRESS/firmware.hex

~/projects/micropython/source/ports/stm32 pr/origin/5318                                                                                                                                                                             
❯ make BOARD=ADAFRUIT_F405_EXPRESS deploy                                                                                                                                                                                                                
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
GEN build-ADAFRUIT_F405_EXPRESS/genhdr/qstrdefs.collected.h
QSTR not updated
GEN build-ADAFRUIT_F405_EXPRESS/genhdr/compressed.collected
Compressed data not updated
Writing build-ADAFRUIT_F405_EXPRESS/firmware.dfu to the board
File: build-ADAFRUIT_F405_EXPRESS/firmware.dfu
    b'DfuSe' v1, image size: 339901, targets: 1
    b'Target' 0, alt setting: 0, name: "ST...", size: 339616, elements: 2
      0, address: 0x08000000, size: 14792
      1, address: 0x08020000, size: 324808
    usb: 0483:df11, device: 0x0000, dfu: 0x011a, b'UFD', 16, 0x820ed45e
Writing memory...
0x08000000   14792 [=========================] 100% 
0x08020000  324808 [=========================] 100% 
Exiting DFU...
Finished
Restart uC and enter REPL but can't import neopixel:

Code: Select all

MicroPython v1.15-57-gd3994f77a on 2021-05-01; Adafruit Feather STM32F405 with STM32F405RG
Type "help()" for more information.
>>> import neopixel
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: no module named 'neopixel'
>>> 

ilium007
Posts: 37
Joined: Tue Feb 16, 2021 10:29 am

Re: [ADAFRUIT_F405_EXPRESS] neopixel port advice

Post by ilium007 » Sat May 01, 2021 10:57 am

This is from git log, I def have the right pr for the neopixel code and its rebased on to current master:

Code: Select all

commit d3994f77ad8d2638d30917cc2e0cbded943edf5e (HEAD -> pr/origin/5318)
Author: Damien George <damien.p.george@gmail.com>
Date:   Mon Nov 11 16:10:07 2019 +1100

    drivers/neopixel: Add high-level neopixel module with NeoPixel class.

commit 254de3b3eddb879c68d1dffab63e46172640a814
Author: Damien George <damien.p.george@gmail.com>
Date:   Mon Nov 11 15:39:53 2019 +1100

    stm32: Integrate low-level neopixel write as pyb.neopixel_write.

commit a0513f073617aeea242596c173e1bb4d59636233
Author: Damien George <damien.p.george@gmail.com>
Date:   Mon Nov 11 15:39:00 2019 +1100

    drivers/neopixel: Add low-level general neopixel output driver.
    
    It uses bit-banging and takes in a 4-tuple of timing values in nanoseconds.

commit 9e1b25a99e9107619c6ed607c730ea2869582799 (origin/master, origin/HEAD, master)
Author: Damien George <damien@micropython.org>
Date:   Fri Apr 30 16:42:51 2021 +1000

    docs/library/machine: Specify initial machine.PWM class.
    
    This adds an initial specification of the machine.PWM class, to provide a
    way to generate PWM output that is portable across the different ports.
    Such functionality may already be available in one way or another (eg
    through a Timer object), but because configuring PWM via a Timer is very
    port-specific, and because it's a common thing to do, it's beneficial to
    have a top-level construct for it.
    
    The specification in this commit aims to provide core functionality in a
    minimal way.  It also somewhat matches most existing ad-hoc implementations
    of machine.PWM.
    
    See discussion in #2283 and #4237.
    
    Signed-off-by: Damien George <damien@micropython.org>

Post Reply