Coder Social home page Coder Social logo

raspberrypi's Issues

memmap

Hi,

I've seen several memmap-files on the net now. I just wonder what the second * in

{ *(.text*) } > ram

means or what affect it takes?

Running examples using qemu 2.6?

Qemu 2.6 added support for raspi2. But I couldn't get the uart01 example run correctly using raspi2.

The steps I took was:

  • Edit uart01/memmap and change origin to 0x10000 (which is the address qemu starts executing),
  • make
  • /usr/local/bin/qemu-system-arm -machine raspi2 -m 512M -nographic -gdb tcp::26000 -S -kernel uart01.bin

Then start arm-none-eabi-gdb and run following commands:

target remote localhost:26000
symbol-file ./uart01.elf

Then, when I start the program, it seems that the inner while loop never breaks and I don't see any output.

I am wondering if I'm doing any steps incorrectly.

USB device mode boot recipe for A+/Zero/CM

Here's a Makefile recipe for booting a USB-device capable Pi over USB cable without an SD card. You only need rpiboot from the tools repository, start.elf, and your program binary. The FAT image is treated the same as the one on SD card would be, so this can also work with a full Linux kernel.img, config.txt, initrd etc. However the size is quite limited so it's not really practical to boot a full OS this way. It might be useful to someone doing bare metal work though.

all: fatimage

fatimage: blinker01.bin start.elf
    dd if=/dev/zero of=fatimage bs=1M count=4
    mkfs.vfat fatimage
    mkdir -p .fatmnt
    sudo mount -o loop fatimage .fatmnt/
    sudo cp start.elf .fatmnt/
    sudo cp blinker01.bin .fatmnt/kernel.img
    sudo umount .fatmnt
    rmdir .fatmnt

clean:
    rm -f fatimage

run: all
    sudo rpiboot -b fatimage

read/write capability

hi,
first of all great work.
I was wondering if their is any example for reading and writing .text file to some storage or probably the sd-card itself..?I mean Fat filesystem support. πŸ‘

How to generate kernel.img files?

HI David,

Your tutorials helps a lot in understanding the bare metal programming. thanks :)

I'm using a Raspberry pi 2 and attempting to compile and generate the kernel image, with modifications. Hitting make in my RPI 2 OS for the programs doesnt seem to work for me. It throws "arm-none-eabi-as command not found" error..

Any suggestions..

Thanks.

How to run the Raspberry Pi 2 blinker example?

What I've done so far:

  • sudo apt-get install gcc-arm-none-eabi binutils-arm-none-eabi
  • make inside boards/pi2/bootloader07 and boards/pi2/HYP/blinker01. Seems to work, I get kernel7.img, bootloader07.elf, blinker01.bin and blinker01.elf
  • format SD card with fdisk, create a single fat partition with mkfs.fat, copy the entire bootloader07/* and blinker01/* to root
  • copy bootcode.bin and start.elf to the root partition as well from: https://github.com/raspberrypi/firmware/tree/master/boot

Now what do I have to do? I plug the SD card into Pi, and power it up, but nothing happens (both leds stay on all the time, as if I had no SD card).

I recommend that you add some very direct step by step bash commands at the top of the README, otherwise hard to make work. :-)

Ubuntu 16.04 host.

Thanks for awesome repo!

Update the README with your config.txt settings

At the moment, I can't get any of the .bin files to work despite meticulously following your instructions. Could you update the README with your config.txt settings? I'm using the bootloader.bin, loader.bin and start.elf as of today (6/19/2012) along with the appropriate .bin file copied in as kernel.img.

Ran newlib0 and now RPi wont boot

Raspberry Pi Model B.
I compiled newlib0 but changed the libpaths to match the ones on my system,
and now the thing wont boot up anymore :S.

aarch64 gone?

Did you have some problem with the aarch64 examples for the Pi 3? Maybe I'm looking in the wrong place?

Problem with record and play wav files on pi

Hello,
I want to record and play a wav file at the same time with the setup (pi + 6mic tool +jbl speaker) so I have to play a modulated sound from the speaker and record that sound from the 6mic tool which is connected to pi. So I am ablt to do that but the wav file that's generated has some hissshhhh kinds sound instead of the recorded expected sound which shoukd be recorded. Can you help me fix this. Don't know it might be issue with the Alsa mixer. @HinTak

Problem with Enabling JTAG in RPI B

I am following your steps and i am struck here

" (copy armjtag.bin to kernel.img on the raspbery pi sd card and power
the raspberry pi, verify it is right from the blinking led). "

kernel.img is a file. Do you want to replace it or put it in the boot partion?

Save ELR_hyp and cpsr in pi 2 blinker 5

push {r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,lr}

Since we are dealing with the raspberry pi 2 in hypervisor mode I think it is a bit misleading to just save those registers in the irq handler since the actual lr used by eret is ELR_hyp. Additionally, the cpsr register has some important information for conditional instructions that should be saved across the irq handler.

I think adding the following code would be beneficial for users:

  mrs r0, ELR_hyp
  mrs r1, cpsr
  push {r0, r1}
  bl c_irq_handler
  pop {r0, r1}
  msr ELR_hyp, r0 
  msr cpsr, r1

(for context, I was trying to implement context switching for a bare metal os and the lack of state saving caused a few bugs for me πŸ˜„)

More detailed bootloader example steps

I've tried a bunch of different combinations of upload to upload the src using the bootloader but without any luck. Would it be possible to share the exact commands/steps you use?

For example, I am using bootloader07 from boards/pizero. I got the expected serial output rather easily. I then modify an output string and try to upload. I am unable to successfully upload the .hex using either minicom or CoolTerm (I'm on a mac.)

Any guidance would be much appreciated!

I almost give up raspberry pi

I've learned David Welch's tutorial before buying raspberry pi2.
I'v been stucked in blinking the ACT LED in the past a few days.I thought I could succeed.
I was annoyed When I found that the GPIO base address in RPI2 was not 0x20200000 any more.
Today David updated his code which lift me up though he is late :).
Hi,David, I read a tutorial from Brian who said that he knew RPI2's GPIO address from u-boot source code. How do you know that? The PI foundation doesn't supply enough datasheet which make me worried about how far can we go with RPI's bare metal programming.

Ordering

This isn't really an issue, and more of a request, but could you order these by difficulty, or by knowledge needed from "previous" "tutorials" or however you see fit? The alphabetical sorting as of now doesn't make sense to go from learning how to use the gcc tools to a full fledged bootloader, but that's just my opinion...

uart04 example unexpectedly reboots

Hi, I updated uart04 exmple to fit raspberry pi 2, here.

It seems to work in the beginning , the code runs 2 loops of 5 iterations each on the uart rx input, and then calls enable_irq(); and then runs an infinite loop where it echos the input.
So I clicked 10 times on the keyboard and the expected to get to the infinite loop, but what actually happened is that upon the 11th click the main notmain function starts from the beginning. Why is that ?

it seems to me that there is a bug that cause it to reboot

Success with Raspberry PI B+ jtag with Olimex ARM-USB-TINY-H

jtag

Just wanted to report success and say thanks for the project/repo/info. I'm able to control my old PI using jtag now following your armjtag instructions and kernel.img.

I'm running an old 18.04 LTS Ubuntu linux desktop and the stock openocd installed fine, and I launch it with

openocd -f olimex-arm-usb-tiny-h.cfg -f raspi.cfg

olimex-arm-usb-tiny-h.cfg is from the openocd package, but here's a copy:

interface ftdi
ftdi_device_desc "Olimex OpenOCD JTAG ARM-USB-TINY-H"
ftdi_vid_pid 0x15ba 0x002a
ftdi_layout_init 0x0808 0x0a1b
ftdi_layout_signal nSRST -oe 0x0200
ftdi_layout_signal nTRST -data 0x0100 -oe 0x0100
ftdi_layout_signal LED -data 0x0800

And raspi.cfg is the same as yours here:
https://raw.githubusercontent.com/dwelch67/raspberrypi/master/armjtag/raspi.cfg

When it works I get this:

Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
adapter speed: 1000 kHz
none separate
Info : auto-selecting first available session transport "jtag". To override use 'transport select '.
raspi.arm
Info : clock speed 1000 kHz
Info : JTAG tap: raspi.arm tap/device found: 0x07b7617f (mfg: 0x0bf (Broadcom), part: 0x7b76, ver: 0x0)
Info : found ARM1176
Info : raspi.arm: hardware has 6 breakpoints, 2 watchpoints

uartx01 example

Hello, the example with the uart that use PL011 seems not to work. Anyone else got a problem with this?

Newlib build

You can built newlib without using empty syscalls.c and crt0.S to avoid runinng into compile errors.

./configure
--target=arm-none-eabi
--disable-newlib-supplied-syscalls
--prefix=/devel/arch/raspberrypi/devkit

Coroutines in ARM Assembly

Hi,
I've sort of kept a ⭐ on your projects since I'm interested in ARM Assembly Language programming, and was wondering if anyone's interested in a coroutines implementation in ARM Assembly language. All my searches for ARM Assembly implementation of coroutines have come up empty.

I ported it from in4lio's implementation to ARM Assembly. The files are MIT Licensed.

You can find arm-stddef.h and enum-asm.h via the provided links.

I have not tested it for interworking so I can't say that it will work correctly for ARM-Thumb and Thumb-ARM calls as is. The main sticking point is that I'm not sure if the Linker will replace the direct BL calls with BLX calls automatically or not.

Project lacks any sort of license information

First of all, this looks absolutely fantastic. One way it could be more useful to people is if it included a license declaration, so people who extend the work would know what they're able to do with it. How about MIT or BSD?

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.