Go to advanced search

by leiradel
Tue Jun 25, 2019 10:28 pm
Forum: Bare metal, Assembly language
Topic: JTAG with the FT232H
Replies: 1
Views: 420

JTAG with the FT232H

Hi All, I'm trying to use a FT232H board to debug baremetal code running on a Raspberry Pi 3 A+ using OpenOCD. I've compiled OpenOCD from source using ./configure --enable-ftdi , and I've copied the supplied contrib/60-openocd.rules to /etc/udev/rules.d . I've created the following configuration fil...
by leiradel
Sat May 18, 2019 12:16 pm
Forum: Bare metal, Assembly language
Topic: JTAG Recommendations
Replies: 20
Views: 1898

Re: JTAG Recommendations

Ok, I've already got a 3A+ but I refuse to give up on my 1B... I want to turn it into an barebones Atari 2600 emulator, but I'm having issues with the MMU that I'm unable to debug using the LED or the UART. So I've decided to solder the missing JTAG pin. I'm however concerned about which pin to sold...
by leiradel
Sun May 05, 2019 1:45 pm
Forum: Bare metal, Assembly language
Topic: JTAG Recommendations
Replies: 20
Views: 1898

Re: JTAG Recommendations

You only need to find TMS that way using the old old original (available to the masses) cards, from there on out they were on a pin in the P1 connector, no soldering required. Unfortunately that's precisely my board. The 0x00010002 mailbox message (get board revision) returns 2, which is a model B,...
by leiradel
Thu May 02, 2019 2:33 pm
Forum: Bare metal, Assembly language
Topic: JTAG Recommendations
Replies: 20
Views: 1898

Re: JTAG Recommendations

Be careful with cutting tracks. The Pi is a multi-layer board and there could be tracks on a hidden level that are essential to the normal operation. It would be easier to solder a wire to the S5 connector and fix it in place with some hot glue or epoxy resin. Yeah, good advice. I'll just glue one ...
by leiradel
Thu May 02, 2019 1:11 pm
Forum: Bare metal, Assembly language
Topic: JTAG Recommendations
Replies: 20
Views: 1898

Re: JTAG Recommendations

Thanks for the info. I'll see if I can cut off the tracks leading to one of those holes and solder the header.
by leiradel
Thu May 02, 2019 10:36 am
Forum: Bare metal, Assembly language
Topic: JTAG Recommendations
Replies: 20
Views: 1898

Re: JTAG Recommendations

I thinks so. As it says, pin 11 of S5. Pin 1 is the connection furthest from the edge of the board. It's a bit fiddly, but a small wire could be soldered on if done carefully. Thank you very much. I wonder if there's a unconnected hole in the board that I could use to solder a single header pin and...
by leiradel
Thu May 02, 2019 8:20 am
Forum: Bare metal, Assembly language
Topic: JTAG Recommendations
Replies: 20
Views: 1898

Re: JTAG Recommendations

rpdom wrote:
Thu May 02, 2019 5:35 am
S5 is not the SD card connector (S8). It is the camera connector.
Ah nice catch! Do you know where I have to solder a wire to have access to ARM_TMS?
by leiradel
Wed May 01, 2019 9:23 pm
Forum: Bare metal, Assembly language
Topic: JTAG Recommendations
Replies: 20
Views: 1898

Re: JTAG Recommendations

Ugh, only now that I have the FT232H breakout from Adafruit with me that I learned that the RPi B revision 1 board doesn't expose ARM_TMS pin... I can't find the S5-11 pin to solder the wire, like dwelch67 says here . I know it's the SD card connector, but mine has a strange label next to it that do...
by leiradel
Tue Apr 23, 2019 8:33 pm
Forum: Bare metal, Assembly language
Topic: Low level RPI programming
Replies: 6
Views: 911

Re: Low level RPI programming

I've blogged about writing bare-bones code for the RPi in C here, it should have everything you need to get started.
by leiradel
Fri Apr 19, 2019 12:53 pm
Forum: Bare metal, Assembly language
Topic: Multicore playzone
Replies: 2
Views: 473

Re: Multicore playzone

This is very interesting, thanks for sharing. I'll definitely take a look at it when the time to use all the cores in the multi-core CPUs come, although I'm leaning towards a batch-oriented approach instead of pre-emptive multi-tasking.
by leiradel
Wed Apr 17, 2019 7:28 pm
Forum: Bare metal, Assembly language
Topic: LdB's mailbox_tag_message funtion usage
Replies: 4
Views: 516

Re: LdB's mailbox_tag_message funtion usage

Thanks that was quite helpful however I'm still stuck on more complex ones like fetching the EDID, fetching a framebuffer, and get clocks with tag id 0x00010007. I use a more structured format for the messages, it's easier to see what's going on. Here 's my function that sends messages, and here yo...
by leiradel
Mon Apr 08, 2019 8:41 am
Forum: Bare metal, Assembly language
Topic: JTAG Recommendations
Replies: 20
Views: 1898

Re: JTAG Recommendations

For what it's worth, I have successfully used OpenOCD to debug a raspberry pi 2B+ via JTAG using this guide and the segger JLINK probe. It is however on the expensive side. The arm DSTREAM probe also works out of the box with ARM DS-5 for raspberry pi 2 and 3 but is even more expensive. Thanks for ...
by leiradel
Sat Apr 06, 2019 5:51 pm
Forum: Bare metal, Assembly language
Topic: MMU Descriptors
Replies: 3
Views: 563

Re: MMU Descriptors

I'm moving forward with the following setup. All descriptors use this base: Non-secure (NS=1): I don't want to bother with this secure/insecure stuff Global (nG=0): not sure what exactly this means Non-shared (S=0): may need to change this when using multicore CPUs ECC disabled (P=0): not supported ...
by leiradel
Sat Apr 06, 2019 5:14 pm
Forum: Bare metal, Assembly language
Topic: JTAG Recommendations
Replies: 20
Views: 1898

Re: JTAG Recommendations

I wouldnt say there are no recommendations, there was a lengthy discussion or two on jtag. The FT232H breakout from adafruit https://www.adafruit.com/product/2264 is more than adequate for the job. Thanks so much, I'll be getting on of those for sure. The problem is not the debugger but setting up ...
by leiradel
Wed Apr 03, 2019 4:46 pm
Forum: Bare metal, Assembly language
Topic: JTAG Recommendations
Replies: 20
Views: 1898

JTAG Recommendations

Hello everyone, I decided to by a JTAG debugger interface like this one , and I'm interested on recommendations. I've searched the forum but couldn't find anything. My OS is Linux, and I'm writing bare metal code that I'd like to upload to memory and step through. I'd like it to be cheap and work wi...
by leiradel
Tue Apr 02, 2019 7:44 pm
Forum: Bare metal, Assembly language
Topic: MMU Descriptors
Replies: 3
Views: 563

Re: MMU Descriptors

The setup for the ARM6 MMU is very different to the ARM8 AAARCH64 there is no MAIR register it works on domains. Thanks, this already helps a lot since I can focus on a different path. If you like and can follow David version use it just map non-cached over the peripheral area which I believe is ju...
by leiradel
Mon Apr 01, 2019 7:33 pm
Forum: Bare metal, Assembly language
Topic: MMU Descriptors
Replies: 3
Views: 563

MMU Descriptors

Hi everyone, I'm writing code to turn the MMU on but I'm struggling to come with the values for the descriptors... I'm trying to implement something similar to what dwelch did with his implementation [1], but I want to map the peripherals, the VC memory, and also memory to use when exchanging messag...
by leiradel
Tue Mar 26, 2019 8:23 pm
Forum: Bare metal, Assembly language
Topic: Memory barriers
Replies: 9
Views: 1465

Re: Memory barriers

Well I wasn't clear enough. With that mapping you guarantee that all reads and writes goes through the peripheral immediately, therefore all reads and writes will be in order as expected. If you mix different peripheral accesses, then you'll still need the barrier. As the BCM2837 doc says on page 7...
by leiradel
Sat Mar 16, 2019 8:03 pm
Forum: Bare metal, Assembly language
Topic: Memory barriers
Replies: 9
Views: 1465

Re: Memory barriers

I worried you seem to be seeking guarantees your code will work in any setup and that simply isn't possible. I just want my code to be correct under the my setup. Currently I'm running with caches disabled but I want to enable them in the future, so I'll have to configure the MMU. If you are trying...
by leiradel
Sun Mar 10, 2019 10:18 pm
Forum: Bare metal, Assembly language
Topic: Memory barriers
Replies: 9
Views: 1465

Re: Memory barriers

LdB wrote:
Sun Mar 10, 2019 1:53 am
Once the cache is on expect far more issue with the cache coherency than memory barriers.
But if I put the peripherals in a noncacheable page I shouldn't have trouble right?
by leiradel
Sun Mar 10, 2019 10:15 pm
Forum: Bare metal, Assembly language
Topic: Mini UART interrupt enable
Replies: 3
Views: 534

Re: Mini UART interrupt enable

Thanks everyone, I was using the revised document but I've changed some of my code based on your suggestions/snippets. The main issue though was that I wasn't adding the base peripheral IO address to the register offset whan enabling the AUX interrupts :oops: For the record, this is the meat of my M...
by leiradel
Sat Mar 09, 2019 7:18 pm
Forum: Bare metal, Assembly language
Topic: Mini UART interrupt enable
Replies: 3
Views: 534

Mini UART interrupt enable

Hey all, I'm struggling to enable RX interrupts for the Mini UART. What I'm doing is: Enable IRQ with cpsie i Enable RX interrupts by writing 1 to AUX_MU_IER_REG Enable AUX interrupts by writing 1<<29 to 0xXX00b210 To test, my IRQ handler only writes stuff to my framebuffer, but I don't get any outp...
by leiradel
Sat Mar 09, 2019 12:32 pm
Forum: Bare metal, Assembly language
Topic: Memory barriers
Replies: 9
Views: 1465

Re: Memory barriers

You should have memory barriers around each and every access to the peripherals and or mailboxes. Yes, my doubt is about the granularity. I.e. in the code below I follow the documentation to the letter, so I've added barriers outside the loops (which is sort of after the last read) and also before ...
by leiradel
Sun Feb 24, 2019 10:36 pm
Forum: Bare metal, Assembly language
Topic: Memory barriers
Replies: 9
Views: 1465

Memory barriers

Hi, I'm trying to add memory barriers around peripheral accesses. First, my memory barrier instructions are mcr p15, 0, r0, c7, c10, #5 on ARMv6-based boards, and dmb on other boards. The BCM2837 ARM Peripherals document is very clear about where memory barriers must be used: 1.3 Peripheral access p...
by leiradel
Sat Feb 16, 2019 8:31 pm
Forum: Bare metal, Assembly language
Topic: Mini UART eats some characters
Replies: 9
Views: 1084

Re: Mini UART eats some characters

So I was jumping to the wrong address, now everything works: https://asciinema.org/a/TUy7twjQhlK1hsBnPWe2Xvldf I was expecting to be more productive this way, but I think I was overestimating the upload speed via serial. I know the Mini UART can go up to megabouds, but minicom seems unable to handle...

Go to advanced search