Go to advanced search

by dwelch67
Mon Jan 22, 2018 8:20 pm
Forum: Bare metal, Assembly language
Topic: Up to date way to debug Bare Metal
Replies: 6
Views: 1394

Re: Up to date way to debug Bare Metal

since the assembly (gcc -S) shows pseudo code and lacks pool data, I prefer to disassemble vs compile to assembly, you get an accurate or more accurate account of what is actually going on. the gnu disassembler (arm-whatever-objdump -D myfile.elf > myfile.list) disassembles everything it can so asci...
by dwelch67
Wed Jan 17, 2018 9:35 pm
Forum: Bare metal, Assembly language
Topic: Difference between Interrupts in x86 and Exceptions in Arm
Replies: 5
Views: 1113

Re: Difference between Interrupts in x86 and Exceptions in Arm

I hate to say it or maybe I dont, probably better off starting with a pi-zero and the ARM 11 than diving into arm with this chip. My two cents...
by dwelch67
Wed Jan 17, 2018 9:33 pm
Forum: Bare metal, Assembly language
Topic: JTag for Pi 3
Replies: 10
Views: 4066

Re: JTag for Pi 3

serial bootloader, yes I have. well worth doing IMO. place/solder down a reset button, get some usb uart or other development machine to pi solution and just press the reset buttton and try again...

David
by dwelch67
Mon Jan 15, 2018 2:13 pm
Forum: Bare metal, Assembly language
Topic: JTag for Pi 3
Replies: 10
Views: 4066

Re: JTag for Pi 3

I agree you dont need that, not required. but if you do get one an ftdi based part that supports mpsse is all you need, can be had for under $50, no reason to get the expensive ones. Use openocd. My jtag examples were based on the original pi, arm11 based, and a little into the armv7 based one. But ...
by dwelch67
Mon Jan 15, 2018 2:07 pm
Forum: Bare metal, Assembly language
Topic: Raspberry Pi 3 Kernel Development with Broadcom 2835
Replies: 2
Views: 561

Re: Raspberry Pi 3 Kernel Development with Broadcom 2835

Note the sticky topics have lots of good links, somewhere in there you will find a community based errata for the broadcom documentation, bugs in the docs that folks have found and bothered to document. No need to re-hack the same wheel.
by dwelch67
Mon Jan 15, 2018 2:06 pm
Forum: Bare metal, Assembly language
Topic: General Approach for a Minimal Kernel in ARM
Replies: 2
Views: 594

Re: General Approach for a Minimal Kernel in ARM

there are some sticky topics at the top of this forum that contain links to many different baremetal resources. covering framebuffer (not required for kernel development, a uart will do), mmu, usb (keyboard, etc, not required for kernel development, uart will do), booting the chip, interrupts, etc. ...
by dwelch67
Sun Jan 14, 2018 10:37 pm
Forum: Bare metal, Assembly language
Topic: Timer with nanosecond accuracy for electronic purpose
Replies: 15
Views: 4145

Re: Timer with nanosecond accuracy for electronic purpose

Really interesting and extensive answer. In my case, it is just a loop with: another_cycle: nop subs r0,r0,1 beq another_cycle Could it really change from one time to another ? Sure I have demonstrated this many times, in the pi the execution speed of that loop or even simpler without the nop, can ...
by dwelch67
Sun Jan 14, 2018 10:28 pm
Forum: Bare metal, Assembly language
Topic: understanding the arm timer
Replies: 1
Views: 563

Re: understanding the arm timer

no it means the interrupt from this peripheral fires when it reaches zero. this is fairly typical with timers, when the roll over they fire an interrupt, some count down some count up some count down to zero some count up to N and reload with zero, etc. You control the interrupt rate in this case wi...
by dwelch67
Wed Jan 10, 2018 3:58 pm
Forum: Bare metal, Assembly language
Topic: Timer with nanosecond accuracy for electronic purpose
Replies: 15
Views: 4145

Re: Timer with nanosecond accuracy for electronic purpose

I dont think the timer is your problem, there are a couple there already, it is the herky jerky nature of a pipeline, assuming you can keep the code in L1 then great, but it it bounces out to L2/DRAM then big performance hit, all accuracy is lost. Microcontrollers have a much better chance, similar ...
by dwelch67
Wed Jan 10, 2018 3:36 am
Forum: Bare metal, Assembly language
Topic: What can be realistically programmed in assembler today?
Replies: 39
Views: 5888

Re: What can be realistically programmed in assembler today?

While the everything that is possible is absolutely the answer, another interesting side effect is you can do MORE than you can with high level languages as you have no limitations other than the hardware/instruction set rules. The real question is knowing that anything that is remotely possible to ...
by dwelch67
Tue Jan 09, 2018 3:05 am
Forum: Bare metal, Assembly language
Topic: Hello world! bare metal boot of PI Zero, ASM + C
Replies: 2
Views: 1848

Re: Hello world! bare metal boot of PI Zero, ASM + C

vectors.s .globl _start _start: mov sp,#0x8000 bl notmain hang: b hang .globl PUT32 PUT32: str r1,[r0] bx lr .globl GET32 GET32: ldr r0,[r0] bx lr .globl dummy dummy: bx lr notmain.c extern void PUT32 ( unsigned int, unsigned int ); extern unsigned int GET32 ( unsigned int ); extern void dummy ( uns...
by dwelch67
Tue Jan 09, 2018 2:59 am
Forum: Bare metal, Assembly language
Topic: Hello world! bare metal boot of PI Zero, ASM + C
Replies: 2
Views: 1848

Re: Hello world! bare metal boot of PI Zero, ASM + C

absolutely I have examples for pi-zero look in the boards/pi-zero directory or look at the standalone repo https://github.com/dwelch67/raspberrypi-zero
by dwelch67
Mon Jan 08, 2018 9:57 pm
Forum: Bare metal, Assembly language
Topic: Powering CPUs on/off in RPi3
Replies: 11
Views: 2190

Re: Powering CPUs on/off in RPi3

nCPUPORESET[CN:0]

nCORERESET[CN:0]

as with other arm cores that came before there are individual reset lines per core that the chip vendor controls. its a chip vendor question not an arm TRM question.
by dwelch67
Mon Jan 08, 2018 3:50 pm
Forum: Bare metal, Assembly language
Topic: Practical question: RPi SD card reader worn
Replies: 5
Views: 667

Re: Practical question: RPi SD card reader worn

I agree, go with a bootloader. the original pi something about that full sized slot would crack a corner of my sd card adapters, ran through a number of them (before having a solid bootloader). later adafruit made a pcb flush mount micro sd adapter that would slide in and that problem got solved.
by dwelch67
Sun Jan 07, 2018 1:25 pm
Forum: Bare metal, Assembly language
Topic: Dave Welche's bootloaders for RPi3 or other alternative
Replies: 18
Views: 3129

Re: Dave Welche's bootloaders for RPi3 or other alternative

This is very typical for uarts, sadly on a platform like this it doesnt have to be this way they could have the uart shifters run off of the 100mhz (or whatever) reference clock not the PLL clock, and or they could allow for a PLL tap for the peripherals. which the system clock at 250MHz should have...
by dwelch67
Sun Jan 07, 2018 1:21 pm
Forum: Bare metal, Assembly language
Topic: Powering CPUs on/off in RPi3
Replies: 11
Views: 2190

Re: Powering CPUs on/off in RPi3

I am still curious about this as well, I would hope it is just an undocumented register and they flip on all four at once. (and have four sets of controls) Why? Because it is there, like why climb the mountain. In part if you are not using the core why have the other three be beating on the cache/dr...
by dwelch67
Fri Jan 05, 2018 6:39 pm
Forum: Bare metal, Assembly language
Topic: Access GPIO with assembly gives segmentation fault
Replies: 2
Views: 671

Re: Access GPIO with assembly gives segmentation fault

this is a baremegal forum, looks like you are writing a user application on an operating system (by definition not bare metal). there are many examples and we can help with baremetal, but hit up one of the other forums for application work (hint google mmap())
by dwelch67
Thu Jan 04, 2018 9:31 pm
Forum: Bare metal, Assembly language
Topic: uart04 in bare metal examples does not work
Replies: 6
Views: 692

Re: uart04 in bare metal examples does not work

those are compatible instructions, the return from the isr is probably wanting to be an eret, but see the pi2 examples not the pi1.
by dwelch67
Thu Jan 04, 2018 2:03 am
Forum: Bare metal, Assembly language
Topic: uart04 in bare metal examples does not work
Replies: 6
Views: 692

Re: uart04 in bare metal examples does not work

you are in the right place as in the folks here are very knowledgeable about events/interrupts on the various chips/cores. look at the options pick one path (for example the without config.txt path) see if you can get that to work, then get a little more complicated as needed/desired.
by dwelch67
Thu Jan 04, 2018 2:01 am
Forum: Bare metal, Assembly language
Topic: uart04 in bare metal examples does not work
Replies: 6
Views: 692

Re: uart04 in bare metal examples does not work

You are in the right place, but first you need to figure out if you have the pi2 with the armv7 or with the armv8. then what mode do you want 32 or 64 bit (if the armv8), HYP, SVC, etc...Then from there you can determine how exceptions work. The folks here are very well versed. I have a selection of...
by dwelch67
Thu Jan 04, 2018 1:52 am
Forum: Bare metal, Assembly language
Topic: uart04 in bare metal examples does not work
Replies: 6
Views: 692

Re: uart04 in bare metal examples does not work

Need to change that readme as well, those top level examples are for the original pi. Try the boards directory and see the options as how you startup and run the chip determines how events/interrupts work. gets worse for the pi3. and sadly if this pi2 you have uses the pi3 chip not the old pi2 chip ...
by dwelch67
Wed Dec 27, 2017 1:32 am
Forum: Bare metal, Assembly language
Topic: Machine Learning on the Video Core of the Pi's
Replies: 4
Views: 2511

Re: Machine Learning on the Video Core of the Pi's

did you read up on the gpu and its instruction set? it is floating point heavy, so if you you want to do a fair amount of math then perhaps that is a/the way to go. as far as what algorithms you write that have some purpose that is up to you. I have not messed with it in a very long time, back when ...
by dwelch67
Wed Dec 27, 2017 1:28 am
Forum: Bare metal, Assembly language
Topic: Enabling MMU slows down VFP?
Replies: 5
Views: 902

Re: Enabling MMU slows down VFP?

every single access including fetching of code goes through the mmu, which goes to a table in ram. there is some table caching but not perfect. when you enabled or disabled the mmu did you add any code (or simply nop or not nop the mrc or other instructions that do the enable). changing the alignmen...
by dwelch67
Wed Dec 27, 2017 1:25 am
Forum: Bare metal, Assembly language
Topic: Drive up to 20 stepper motors (28byj-48)
Replies: 14
Views: 2882

Re: Drive up to 20 stepper motors (28byj-48)

Well you dont have enough I/O pins right? so you may want to have an external mcu or a stepper driver that the pi can spam with some number of steps and or speeds, worst case one mcu per motor, but based on pin count, etc you can have more than one per. a simple-ish interface spi or uart or i2c you ...
by dwelch67
Wed Dec 27, 2017 1:19 am
Forum: Bare metal, Assembly language
Topic: Drive up to 20 stepper motors (28byj-48)
Replies: 14
Views: 2882

Re: Drive up to 20 stepper motors (28byj-48)

steppers can be driven either way, tend to be able to go around and around as many times as you want. servos tend to not spin all the way around, used for things like controlling the rudder on an rc plane or boat.

Go to advanced search