Go to advanced search

by LdB
Sun Sep 16, 2018 2:14 pm
Forum: Bare metal, Assembly language
Topic: LdB's USB driver
Replies: 21
Views: 962

Re: LdB's USB driver

Yep .. done just cleaning up atm .. will be all shiny and new :-)
Will merge up tonight when done.
by LdB
Wed Sep 12, 2018 7:40 am
Forum: Bare metal, Assembly language
Topic: Taking exception 3 [Prefetch Abort]
Replies: 6
Views: 342

Re: Taking exception 3 [Prefetch Abort]

I believe you are probably having the issue bzt had the qemu emulation is different to the hardware case. Your MMU is coming online on real silicon without issue, the only problem it is creating was it stops your render working (the whole cache coherency thing again) and it stops the sound working w...
by LdB
Tue Sep 11, 2018 1:28 pm
Forum: Bare metal, Assembly language
Topic: Taking exception 3 [Prefetch Abort]
Replies: 6
Views: 342

Re: Taking exception 3 [Prefetch Abort]

Haha I found which one of Peter's code you used .. here is the proper conversion for init_audio_jack WITH A RETURN and it all works correctly now :-) I can play your music fine by sending core2 to play_audio or just use core0 to play it after the render (core0 deadloops obviously). Not sure if it's ...
by LdB
Tue Sep 11, 2018 11:54 am
Forum: Bare metal, Assembly language
Topic: Taking exception 3 [Prefetch Abort]
Replies: 6
Views: 342

Re: Taking exception 3 [Prefetch Abort]

Pretty sure it is telling you that you the address is invalid to the MMU. Now there is something really weird with init_audio_jack which may be related. init_audio_jack has no return or end to the code block. If you intended it to just run into the play code then that code shouldn't be in it's own s...
by LdB
Tue Sep 11, 2018 11:48 am
Forum: Bare metal, Assembly language
Topic: Accelerated graphics
Replies: 52
Views: 6938

Re: Accelerated graphics

You are correct, teach me for typing and not cut and pasting :-)
by LdB
Tue Sep 11, 2018 10:01 am
Forum: Bare metal, Assembly language
Topic: Accelerated graphics
Replies: 52
Views: 6938

Re: Accelerated graphics

Thank you LdB. Sorry about my coding style I'm in an Australian high school where the only language the teacher knows is php and pascal. My teacher I think had a worse coding style than me all of his programs use global variables, nothing local. If you have any ideas of how I can improve and learn ...
by LdB
Tue Sep 11, 2018 6:26 am
Forum: Bare metal, Assembly language
Topic: Accelerated graphics
Replies: 52
Views: 6938

Re: Accelerated graphics

I was feeling benevolent so crawled thru umpteen files ... Same old same old clocks_init is bugged because Getmaxclock speed is Tag: 0x00030004 the funny part is your comment 3 lines up even says that yet you use Tag: 0x00038004. That is an illegal tag and not sure what it does, but the VC refuses t...
by LdB
Tue Sep 11, 2018 5:41 am
Forum: Bare metal, Assembly language
Topic: Xinu release
Replies: 21
Views: 1288

Re: Xinu release

I have ordered one so I can play around they are so cheap.

It's fairly clear what they are doing on the linux driver code, I just need to be able to check for it before I do the standard Pi ethernet check and it will get over the problem.

So I will undoubtably add an update when it's all done.
by LdB
Mon Sep 10, 2018 5:26 am
Forum: Bare metal, Assembly language
Topic: Accelerated graphics
Replies: 52
Views: 6938

Re: Accelerated graphics

There is nothing wrong with your the Videocore code it works perfectly (on Pi3 & Pi3B+), just comment out these two in main clocks_init(); init_audio_jack(); You will get this. https://github.com/LdB-ECM/Docs_and_Images/blob/master/Images/raspi.jpg?raw=true Whatever is going wrong with those two fun...
by LdB
Sun Sep 09, 2018 7:37 pm
Forum: Bare metal, Assembly language
Topic: Accessing GPIO Pins via Bare Metal
Replies: 2
Views: 137

Re: Accessing GPIO Pins via Bare Metal

On the Pi3B+ GPIO port 29 is the activity led You will need to decide if you are going to do 32bit or 64bit, the PI3B+ does both. You will have to learn or borrow a little assembler code in whichever you chose to at least get the Pi3 up and running even if you are going to write in C/C++. There is s...
by LdB
Sun Sep 09, 2018 7:25 pm
Forum: C/C++
Topic: Getting nonsense from GCC floats (doubles too)
Replies: 9
Views: 329

Re: Getting nonsense from GCC floats (doubles too)

Yes, the * 1.0 is a way of casting to float. I hate having to anticipate when the C compiler is going to decide your numbers are all ints so I try to put one of those in each term. The point is you cast it to leave C no choice ... if you look at my line of code C has zero options!!!!! It must cast ...
by LdB
Sun Sep 09, 2018 4:09 pm
Forum: C/C++
Topic: Getting nonsense from GCC floats (doubles too)
Replies: 9
Views: 329

Re: Getting nonsense from GCC floats (doubles too)

Something doesn't make sense to me with your code, its the y axis that has problems and this is the y axis. oldy = (uint16_t) splitat - ((((dpybuf[i]-min) * 1.0) / (wwidth * 1.0)) * splitat); That basically says oldy = splitat - some value * splitat; somevalue = some subtract calculation / wwidth Th...
by LdB
Sat Sep 08, 2018 3:00 am
Forum: Bare metal, Assembly language
Topic: How does the hardware cause long delays?
Replies: 2
Views: 202

Re: How does the hardware cause long delays?

At a guess you already have the answer on the single core arm1176jzf-s on the Pi Zero you are able to halt linux. On the 4 core cortex-a53 you are only able to disable the interrupts on the 1 core your code has been tasked to. The interrupts are being handled by another core and nothing you do on th...
by LdB
Fri Sep 07, 2018 3:57 pm
Forum: Bare metal, Assembly language
Topic: Xinu release
Replies: 21
Views: 1288

Re: Xinu release

Okay I will change the initial stuff for linux compiling. The tar file I know little about it was obviously something in the old conf building system and I will just take it out therefore. Now I missed one thing so you are getting the initial screen message it's not giving you the bash prompt .. got...
by LdB
Thu Sep 06, 2018 4:46 pm
Forum: Bare metal, Assembly language
Topic: LdB's USB driver
Replies: 21
Views: 962

Re: LdB's USB driver

No I am enumerating high speed devices like hard drives etc, I can read and write to them :-) It's actually slower devices that are technically harder because you have to install a relay split on the nearest parent port that supports high speed. So when you first start out you can usually enumerate ...
by LdB
Thu Sep 06, 2018 3:16 pm
Forum: Bare metal, Assembly language
Topic: Xinu release
Replies: 21
Views: 1288

Re: Xinu release

First have you updated your code to the current repository (it has changed recently). I know you are on an earlier copy because I recently updated the makefile to hopefully be linux compatible. There was something I missed originally which was on the early models the serial port was automatically se...
by LdB
Mon Sep 03, 2018 10:29 am
Forum: Bare metal, Assembly language
Topic: LdB's USB driver
Replies: 21
Views: 962

Re: LdB's USB driver

My xinu repo
https://github.com/LdB-ECM/Xinu

Sorry I forgot all about it, I will have a look tonight.
by LdB
Mon Sep 03, 2018 8:25 am
Forum: Bare metal, Assembly language
Topic: Audio output on the Raspberry Pi 3B
Replies: 19
Views: 1918

Re: Audio output on the Raspberry Pi 3B

*(uint32_t *)((((uint32_t)(PERIPHERAL_BASE + PWM_BASE) & 0x0000FFFF) | ((uint32_t)(PERIPHERAL_BASE + PWM_BASE) & 0xFFFF0000)) + PWM_FIF1) = sample; This line looks all wrong off the top of my head doesn't it need shift left 16 ... It sort of looks like you are trying to set upper and lower halves. ...
by LdB
Mon Sep 03, 2018 8:16 am
Forum: Bare metal, Assembly language
Topic: Accelerated graphics
Replies: 52
Views: 6938

Re: Accelerated graphics

Throw it on github and I will have a look :-)
by LdB
Sun Sep 02, 2018 10:14 am
Forum: Bare metal, Assembly language
Topic: Mailbox 0 Status Address: SIGSEGV: 0x2000b898
Replies: 2
Views: 138

Re: Mailbox 0 Status Address: SIGSEGV: 0x2000b898

You said you wanted to learn to fish not just us give you code .. so I will give you two part answers 1.) All the code on this part of the forum is baremetal. You want to do it under linux you will need to get a virtual mapmem to the raw address you are trying to poke. Otherwise linux is going to be...
by LdB
Sun Sep 02, 2018 10:09 am
Forum: Bare metal, Assembly language
Topic: Accelerated graphics
Replies: 52
Views: 6938

Re: Accelerated graphics

Having the MMU on adds in problems, as in cache issues, get your code working without it first ... that is my advice as the VC4 is doing all the real work and nothing you do arm side is going to affect it's speed :-) You will have the same problem as the activity LED code when you lost control of th...
by LdB
Sun Sep 02, 2018 2:56 am
Forum: Bare metal, Assembly language
Topic: How find Addresses for Perifierals and GPU FrameBuffer?
Replies: 2
Views: 179

Re: How find Addresses for Perifierals and GPU FrameBuffer?

Look at the thread that always stays number 2, note the title .. it used to be one but somehow got deposed :-)

Other than that ARM infocentre for CPU stuff and just plain detective work looking at the linux repository the PI uses.
by LdB
Sat Sep 01, 2018 4:23 pm
Forum: Bare metal, Assembly language
Topic: Help understanding aarch64 interrupts
Replies: 4
Views: 232

Re: Help understanding aarch64 interrupts

I suspect that might also be to allow the multicores to handle the interrupts, otherwise one core would always have to handle all the interrupts. When you do it on xilinx soc multicores the table is setup in an area they call an injection control block that all the cores share data in and all interr...
by LdB
Sat Sep 01, 2018 3:43 pm
Forum: Bare metal, Assembly language
Topic: Accelerated graphics
Replies: 52
Views: 6938

Re: Accelerated graphics

You asked for too much or your message structure wasn't 16 byte aligned with a VC address :-) I am guessing aligned issue .. there is a trick in my code look at the mailbox command. first I copy the data you provide to an align 16 message uint32_t __attribute__((aligned(16))) message[32]; The second...
by LdB
Thu Aug 30, 2018 2:56 pm
Forum: Bare metal, Assembly language
Topic: Accelerated graphics
Replies: 52
Views: 6938

Re: Accelerated graphics

All emit does is write the value and advances the pointer. The floats on the VC4 are 4 bytes floats exactly, depending what compiler setting you compile with on the arm your floats aren't usually 4 bytes. It's probably not too bad for you as I believe you are compiling AARCH64 with hard floats so yo...

Go to advanced search