GithubHelp home page GithubHelp logo

Comments (22)

 avatar commented on August 15, 2024 1

@Piping Looks like the simple answer to your question in its entirety is yes.

Thanks @bluecereal!

from raspberrypi.

 avatar commented on August 15, 2024 1

In the first zip file I provided the exact command line to use for picocom, which is a pretty simple program. I agree minicom is pretty tough to use. If you do what I wrote in the text file, you just specify the file path (you can drag 'n' drop to copy the path depending on your OS), hit enter, and it sends the file. Once the file is sent, IIRC you just press "g" and it runs your new thing. I might also have a version that auto-runs the sent file without waiting for the "g" key to be pressed somewhere.

I think the only difference between Mac using MacPorts and linux is that on linux /dev/tty.usberserial is actually /dev/tty[somethingelse].

from raspberrypi.

Piping avatar Piping commented on August 15, 2024

Hi, can you talk a bit more on how to setup the Ethernet and IP for the client?

So in bare metal environment what is required steps to achieve this?

from raspberrypi.

 avatar commented on August 15, 2024

Why not go all the way and just SSH in instead of UART? The binary would be a bit big, but then you'd be able to do everything with 2 wires and have the flexibility to transfer large files.

from raspberrypi.

Piping avatar Piping commented on August 15, 2024

@KNNSpeed Hi, this is bare metal programming and SSH is just not there.

from raspberrypi.

 avatar commented on August 15, 2024

@Piping I know, I'm saying it could be implemented at the cost of a rather large binary (and yes, it--or something reasonably similar in functionality--can most definitely be done)

from raspberrypi.

Piping avatar Piping commented on August 15, 2024

@KNNSpeed this is a problem like chicken and eggs. Anyway, I am just looking for Ethernet solution relies on the bootcode.bin that is provided by the pi.

UART + boot loader to load program solution should be fine too, although I cannot get the code in this repo to work with pi3 B +.

from raspberrypi.

 avatar commented on August 15, 2024

I have working uart bootloader code somewhere for a Pi 3 B+. Let me see if I can find it.

from raspberrypi.

 avatar commented on August 15, 2024

Here you go. I haven't used this in a while, but on a Pi 3 I was able to transfer files over UART and press "g" to run them, no SD card swapping needed. Included is a little text file with the command line syntax to transfer stuff over terminal (for Mac, but linux isn't all that different).

UART_Raspi3_Bootloader.zip

from raspberrypi.

Piping avatar Piping commented on August 15, 2024

@KNNSpeed This is great! I appreciate that!!!

from raspberrypi.

Piping avatar Piping commented on August 15, 2024

@KNNSpeed so correct me if I am wrong, dwelch67's bootloader load the code at 0x8000 position right? the bootloader itself resides in the 0x0 for pi3?

from raspberrypi.

 avatar commented on August 15, 2024

I... can't remember. It's been like a year and I didn't write it down... Hopefully I used the 64-bit stuff. You could send a program that just prints its memory address and find out (I'd like to know, too).

from raspberrypi.

 avatar commented on August 15, 2024

Well, I also found these compiled kernel IMGs.

Bootloader07 from aarch64:
bootloader07_64bit.zip

Bootloader07 from the root of this repo:
bootloader07.zip

I don't remember if these actually work, though; like I said it's been a while... Some combination of these do work, since I was able to use UART over GPIO to load some test programs (like I used UART to load one of the blinker programs and print "hello world"). Unfortunately I neither have the UART cable or a bare Pi 3 at the moment to check all this myself. :/

from raspberrypi.

bluecereal avatar bluecereal commented on August 15, 2024

@Piping check out the memmaps in some of the examples. like this and this.

from raspberrypi.

bluecereal avatar bluecereal commented on August 15, 2024

also this anddddd also also this:

I normally set my stack pointer to be at the top of some bank of ram
if only one ram bank in the system then the top of that ram bank. See
the top level README, they force us to start somewhere other than zero
so for such simple programs like these I am setting the program to start
at 0x8000 and the stack to start at 0x7FFC. Note that on an ARM the
stack pointer (r13) points at the first address after the top of the
stack so setting r13 to 0x8000 means the stack starts at 0x7FFC and
works down away from our program.

basically yes dwelch67's bootloader usually loads the code at 0x8000, but you can set the bootloader to load code at any memory address you like.

from raspberrypi.

Piping avatar Piping commented on August 15, 2024

@bluecereal @KNNSpeed Thanks for your reply.

I am testing with the aarch64 code inside the board/pi3/aarch64.

I set up my config file with kernel_old=1 and other settings in @dwelch67 's repo.

The bootloader07 can print 12345678 and ihex string as expected. Although the bootloader does not load program correctly with cu, while minicom is just too hard to learn to use.

I use the following command if anyone interest.

sudo cu -s 115200 -l /dev/cu.usbserial
and use type ~> to send a file. But it only prints 1 R R R R timeout error. I am not sure what is going here. I used serial cable from uart to ttl with a chip called PL2303.

I also used the toolchains from linaro, aarch64-elf-gcc for example.

from raspberrypi.

timanu90 avatar timanu90 commented on August 15, 2024

For terminal, I like to use GTKTERM is very simple. To send a file just go file->send raw file select your gcc generated file in format ihex and done. Works great give it a try.

from raspberrypi.

Piping avatar Piping commented on August 15, 2024

@KNNSpeed Thanks again. I install the picocom using brew. And it works great!!

Another problem is then after uart02 program loaded into the system, it pints number, but it could not echo back what I typed. Is there any special control I need to input before send character to PI3 side?

@timanu90 Hi, I am on a mac computer and picocom is just easier to get. Thanks anyway!

from raspberrypi.

Piping avatar Piping commented on August 15, 2024

@KNNSpeed nvm, when I turn picocom local echo (Ctrl-a Ctrl-c) on I can see the characters I typed in appears twice.

from raspberrypi.

 avatar commented on August 15, 2024

Is the Pi echoing back anything? That might be why.
As I said I don't have a Uart cable or bare pi handy, so I can't do much in the way of checking. :/

from raspberrypi.

Piping avatar Piping commented on August 15, 2024

@KNNSpeed The code does work as echo back what I am typing. The picocom itself does not echo the character i typed. That's why I was confused.

from raspberrypi.

zhangboyang avatar zhangboyang commented on August 15, 2024

@Piping What I did was copy (and only copy) bootloader to SD card, set up a DHCP and a TFTP server, put all boot files to TFTP root directory. Then when rpi2 starts up, it will try network booting.
However, I did it about a year ago and I can't recall the details. But it seems you have succefully used @KNNSpeed 's bootloader to solve the same problem. So the details is no longer useful. :)

from raspberrypi.

Related Issues (20)

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.