Comments (9)
I've brought everything up to date to 1.18 now, and will be pushing it soon (tomorrow if I get the time). It's now been simplified enough to not need a patch: there's a folder of new stuff, and folder of stuff to copy over the top of 1.18 ports/rp2 and then it's good to make.
from canhack.
I've updated everything to v1.18 of MicroPython and changed the way it's patched: no more patch files. It's staged on another branch:
@Miki-AG - can you try it out against a clean MicroPython upstream and check that everything builds and that I haven't left any files out? If you give the OK I'll merge this into the master branch.
from canhack.
@kentindell Yes, the new version builds just fine:
git clone -b master https://github.com/micropython/micropython.git
cd micropython
git checkout v1.18
git submodule update --init -- lib/pico-sdk lib/tinyusb lib/axtls
cp -a ../canis-patches/v1.18/canis/ ./ports/rp2/
cp -a ../canis-patches/v1.18/overwrite/ ./ports/rp2/
make -C mpy-cross
cd ports/rp2
make submodules
make
Just one thing I did differently, I only initialized the 3 submodules I need, pico-sdk, tinyusb, axtls, does your patch require any other module than the pico-sdk?
Building all of them is rather time consuming, so you prob can get away with a lighter build.
Best
from canhack.
Good point: that's probably sufficient. I'll make a note in the README.
from canhack.
Awesome work BTW. Have you considered publishing a driver under micropython/drivers?
from canhack.
I would like to get some stuff into the upstream MicroPython build: MIN and indeed the CAN driver.
The MIN should be fairly straightforward. There's an issue with the second USB serial port that's a future TODO for MicroPython (I'll dump mine as soon as they sort it). The problem for the upstream is that the serial ports share a ring buffer with REPL and it's a mess (they get each others data). That's not a problem for MIN because it's driven from the REPL command line (from main.py, typically). I have no doubt they will sort the second USB port issue because it's a hugely useful thing to do.
The CAN driver is an issue too: the upstream CAN support is a bit weak (they've only just changed it from having "Extended" a property of the controller to having it a property of the frame). And the driver here embodies a certain approach to CAN, which doesn't fit with the upstream CAN view. The CANPico view of CAN is the bottom layer of CAN concepts that are common in industry (e.g. J1939, OBD-II). To move it upstream would require an overhaul of the whole CAN approach, which I don't think anyone is ready for yet, not least because it would require getting all the other drivers into the same framework. This is quite a lot of work, since the drivers must be free of priority inversion but it's something commonly messed up with CAN. The Zephyr project re-wrote all their CAN drivers after I reported the priority inversion problem to them but it was quite a few and took quite some effort.
from canhack.
Understood, thanks.
from canhack.
I made a mistake this morning while copying some files and the build was actually being completed without applying part of the patch. Seems that the build misses common.h, which is not included in the patch.
from canhack.
Fixed. 12dc3c9
from canhack.
Related Issues (20)
- βcanisβ directory files HOT 5
- RuntimeError: Cannot put MCP2517/18FD into config mode HOT 5
- Location of the canis folder required to apply v1.16 patch HOT 5
- Patch V1.18 in macos HOT 4
- MicroPython CANPico: Is the received CAN messages delayed by the GC? HOT 6
- Create optional Python interrupt callback HOT 3
- Issue with build a firmware.uf2 on a Pi 4 HOT 12
- compile error HOT 3
- How to build the firmware.uf2 file? HOT 6
- Add MicroPython API call to the CANHack toolkit to mutate bits in the CAN frame
- Will no longer compile for Micropython HOT 19
- Support for MicroPython 1.21 HOT 5
- Docs mistake: CANHack_schm.pdf same as CANProbe_schm.pdf HOT 10
- Firmware/Hardware HOT 1
- CANID class does not seem to have get_id() method HOT 2
- Bus-off status not reported properly HOT 1
- Hardware buffer pointer C1TXQUA sometimes goes out of range HOT 1
- CANHack sometimes freezes, killing USB on a Raspberry Pi host HOT 1
- bug in the overwrite mode repeating HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from canhack.