Comments (18)
from rust-raspberrypi-os-tutorials.
yep, you can see here it's trying to bind the usb device into the docker container.
unfortunately this is not supported on docker for mac, looking at what that command is actually doing, you may be able to install and execute minipush on your native system instead.
from rust-raspberrypi-os-tutorials.
Hi,
some thoughts on that:
It's true that Mac support is only experimental at the moment, but even that is not documented right now.
The problem with device names on Linux and Mac is that you never know what you are getting. /dev/ttyUSB0
is a good bet on Linux, but even there you sometimes get other names. On Mac, I've seen /dev/tty.usbmodem*
or /dev/ttyAMA0
, among others.
For that reason the Makefile has the quoted section you've already modified:
# Default to /dev/ttyUSB0
ifndef DEV_SERIAL
DEV_SERIAL = /dev/ttyUSB0
endif
The way this is written also allows you to override it from commandline: DEV_SERIAL=tty.SLAB_USBtoUART make chainboot
.
About the Minipush
issue: One of the main philosophies of the tutorials is that beginners should not have hassles with installing third party stuff on their machines apart from Docker, which handles all the rest. Hence the strategy to pack everything into Docker containers. That this falls apart for Mac because we can`t pass through the USB device is a bit unfortunate.
I agree with Ryan that there's a good chance you can run Minipush native, though, once you installed the dependencies on your Mac. It should be something like:
sudo gem install bundler
bundle install --path .vendor/bundle #From the root directory
And then:
$ ruby ../utils/minipush.rb /dev/tty.SLAB_USBtoUART kernel8.img
Let me know if that works.
I'll take an action item to add notes about Mac support. I will CC you for review once I've done that 👍
P.S.: Please not that tutorial 9 will be a stumble again, because it uses OpenOCD and GDB inside Docker, and those again expect the USB device. You can again try to install them locally.
from rust-raspberrypi-os-tutorials.
Running out of ideas for now...
Will try on a Mac this weekend. Stay tuned.
from rust-raspberrypi-os-tutorials.
I figured it out, but I am not sure why it's called this instead.
this is the command that eventually worked
sudo screen /dev/tty.SLAB_USBtoUART 230400
from rust-raspberrypi-os-tutorials.
I am not sure why it's called this instead
this is probably because macos names serial devices differently to linux (and windows, which is also different), it would perhaps be useful to update the docs to indicate you will need to find the respective serial device
from rust-raspberrypi-os-tutorials.
getting stuck on 7 as well.
tried this:
# Default to /dev/ttyUSB0
ifndef DEV_SERIAL
#DEV_SERIAL = /dev/ttyUSB0
DEV_SERIAL = /dev/tty.SLAB_USBtoUART
endif
and it just hangs at [MP] ⏳ Waiting for /dev/tty.SLAB_USBtoUART
I can see the docker image is loading, i can see tty.SLAB_USBtoUART
being added and removed when I take out the USB or put it back in but nothing is seeming to change Minipush
Also tried it without editing the code, but I assumed that wouldn't work and of course it didn't.
Thoughts?
from rust-raspberrypi-os-tutorials.
@andre-richter the steps you laid out got me further. I can now get connected and the lights flash a bit on the Rpi but then I get stopped at[MP] ⚡ Protocol Error: Remove and insert the USB serial again
now
from rust-raspberrypi-os-tutorials.
I presume it never works regardless of how often you try?
- You could see output in the console in the previous tutorial using
sudo screen /dev/tty.SLAB_USBtoUART 230400
right? - You also exchanged the
kernel8.img
on the SD card for the one from tutorial 7?
Can you try with sudo, just to be sure:
$ sudo ruby ../utils/minipush.rb /dev/tty.SLAB_USBtoUART kernel8.img
from rust-raspberrypi-os-tutorials.
@andre-richter Correct, replugging doesn't help. sudo screen /dev/tty.SLAB_USBtoUART 230400
does work and I just reverified it again to make sure. Yes I exchanged the kernel8.img
in step 7, also did it again just incase. Tried with sudo
same results.
from rust-raspberrypi-os-tutorials.
I just had a look at the data sheets and realized that the A+ apparently has only 512 MiB of RAM. We are currently assuming 1 GiB.
Can you apply the following change, build the kernel using make
, copy the resulting kernel8.img
on the SD card and try again:
diff --git a/07_uart_chainloader/src/bsp/raspberrypi/link.ld b/07_uart_chainloader/src/bsp/raspberrypi/link.ld
index 8061183..14e7103 100644
--- a/07_uart_chainloader/src/bsp/raspberrypi/link.ld
+++ b/07_uart_chainloader/src/bsp/raspberrypi/link.ld
@@ -5,8 +5,8 @@
SECTIONS
{
- /* Set the link address to the top-most 40 KiB of DRAM (assuming 1GiB) */
- . = 0x3F000000 - 0x10000;
+ /* Set the link address to 256 MiB */
+ . = 0x10000000;
__binary_start = .;
.text :
from rust-raspberrypi-os-tutorials.
Just tried your suggestion, same results.
from rust-raspberrypi-os-tutorials.
Also tried updating Ruby just in case since I had 2.3 on my system, but that didn't help either.
from rust-raspberrypi-os-tutorials.
I just tried Minipush on a Mac and it worked for me.
I suspect it has to do with you having an A+ device. I only have B devices, do can’t really debug further myself.
Can you try reducing the linker address of the chainloader that we changed earlier even more for a few times. Maybe halving it on every step.
from rust-raspberrypi-os-tutorials.
@andre-richter tried:
0x8000000
0x4000000
and on 0x2000000
I get (but only sometimes?):
[MP] ✅ Connected
__ __ _ _ _ _
| \/ (_)_ _ (_) | ___ __ _ __| |
| |\/| | | ' \| | |__/ _ \/ _` / _` |
|_| |_|_|_||_|_|____\___/\__,_\__,_|
Raspberry Pi 3
[ML] Requesting binary
[MP] ⏩ Pushing 7 KiB ==========================================🦀 100% 0 KiB/s Time: 00:00:00
[ML] Loaded! Executing the payload now
__ __ _ _ _ _
| \/ (_)_ _ (_) | ___ __ _ __| |
| |\/| | | ' \| | |__/ _ \/ _` / _` |
|_| |_|_|_||_|_|____\___/\__,_\__,_|
Raspberry Pi 3
[ML] Requesting binary
Got it on the first try with that linker address, then couldn't replicate it for like 5 more tries, then it did it a second time, then couldn't get it to do it again. Tried refreshing the card with fresh files. I also tried 0x1000000 but that has not worked successfully yet (or even partially successful as above)
from rust-raspberrypi-os-tutorials.
That’s something!
There was a slight error on my side. On the commandline it should not be kernel8.img (this would load the chainloader again), but the demo_payload_... file.
On any other tutorial than 7, kernel8.img would be correct, though.
from rust-raspberrypi-os-tutorials.
That worked! Not every time... but it still worked, had to unplug replug when it prompted me.
from rust-raspberrypi-os-tutorials.
Yeah that can always happen. Also does for me from time to time. It’s not the robustest of protocols. A tradeoff done to keep it simple.
I don’t understand yet why it only starts working as low as at 0x2000000 (that’s 32 MiB), since the A+ has 512 MiB of RAM. At least according to Wikipedia.
So the 256 MiB should have been a safe bet. Anyways, I might permanently change it to 0x2000000 to have compatibility for all Pi3 devices.
Thanks for bringing this up.
P.S.: will also push a change soon so that „make chainboot“ will natively call the ruby command on macOS and not attempt the dockerized version.
from rust-raspberrypi-os-tutorials.
Related Issues (20)
- invalid file operation error HOT 3
- error[E0463]: can't find crate for `core` HOT 2
- Complete Chinese Translation HOT 3
- I want to know about other microcontrollers, you can refer to this example HOT 3
- Pure rust chainboot HOT 1
- Cannot start to work with this repo
- error: linker `cc` not found [Makefile:123: target/aarch64-unknown-none-softfloat/release/kernel] Error 101 HOT 1
- chapter 6 can not get correct output, stuck at: [ML] Requesting binary HOT 1
- everything seems to work fine but I cant input anything HOT 3
- Miniterminal not working on Raspberry pi 4 HOT 1
- ICR management question
- Error regarding Github CI/CD HOT 3
- Depracated link in The tl;dr Version subsection of README.md file HOT 2
- Invalid links in 11_exceptions_part1_groundwork/README.md HOT 2
- Consider generating these documents into a website
- Plans for even more embedded devices
- Please Change README HOT 2
- Why use Makefile handle build process? HOT 1
- Currently porting to RISC-V
- What determines the value of GPIO_PUP_PDN_CONTR_REG ?
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 rust-raspberrypi-os-tutorials.