Well, best not let perfect be the enemy of good. While the Freescale board is clearly better, it doesn't actually work. So here is my new Dagu controller board being run from an Arduino. The speed sensor seems to work too - much less jitter than before. Also, top tip. Don't try to run your DCC railway with this board - it will catch fire. I don't think it like 10,000 direction changes a second.
Showing posts from December, 2016
- Other Apps
Now, as we know, the original Raspberry Pi uses an ARM11 core, which is based on the ARMv6 architecture. The Raspberry Pi 2 uses quad Cortex-A7 cores (although it's actually just been updated to have the same chip as the Pi 3 for volume reasons) which are based on the ARMv7-A architecture while the Pi 3 uses quad Cortex-A53s which are based on the ARMv8-A architecture. So what do this have to do with Rust? Well, in two ways really. One is that the compiler is downloaded as a binary, and it the instructions encoded into the machine code need to be ones that that processor core can understand and execute. Helpfully, the ARM architectures are backwards compatible, so the Pi 3 can run code compiled for an original Pi 2 and both can run code compiled for an original Pi. The second is in the choice of instructions the compiler chooses to emit. Now, by default, you would expect this to be the same as the compiler itself was compiled to - after all, 9 times out of 10 you're going
- Other Apps
There's a nasty code generation bug in Rust 1.13 stable. Because ARM isn't considered a 'tier-1' platform for Rust at this time, the team have decided to put the fix into 1.14 beta (and 1.15 nightly) but not up-issue 1.13. Unfortunately this means if you follow my last post, you'll get a compiler that doesn't work properly when using floating point functions. The best fix is probably switch to 1.14 beta until 1.14 stable comes out (around 22 December). You can do this as follows: pi@boron: ~ $ rustup toolchain install beta info: syncing channel updates for 'beta-armv7-unknown-linux-gnueabihf' info: downloading component 'rustc' 47.0 MiB / 47.0 MiB (100 %) 6.2 MiB/s ETA: 0 s info: downloading component 'rust-std' 60.3 MiB / 60.3 MiB (100 %) 6.2 MiB/s ETA: 0 s info: downloading component 'cargo' 4.2 MiB / 4.2 MiB (100 %) 737.2 KiB/s ETA: 0 s info: installing comp