Ravenous
Posts: 1956
Joined: Fri Feb 24, 2012 1:01 pm
Location: UK

Re: BCM 2836 and the RPi 2 ?

Fri Feb 06, 2015 8:53 am

dwelch67 wrote:If you take your numbers of boards and examine just how many are actually being used for the supposedly target audience you will find the product is a failure.
Do you have a source for that? Just curious how many are being used by kids and how many by adult hobbyists (and industrial applications maybe?) Your sentence reads like there are figures somewhere.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23311
Joined: Sat Jul 30, 2011 7:41 pm

Re: BCM 2836 and the RPi 2 ?

Fri Feb 06, 2015 8:58 am

Damn, wasn't going to add any more comments, but cannot let falsehoods remain unchallenged.
dwelch67 wrote: If you take your numbers of boards and examine just how many are actually being used for the supposedly target audience you will find the product is a failure. Again we are a small group, but we are the non-children that push this product over some alternative that has other goals (chip sales) and provide the information for all users of the product not just the marketing target. The RPi cannot and will not survive if the developers are closed off.
Completely and utterly wrong. There are many many Pi's being used in classrooms and for teaching worldwide. If you want to develop for the Raspi there is nothing stopping you from doing almost anything you want. There are 10 of thousands of Linux applications out there that work fine. None of them needed the sort of low level access you seem to think is necessary to survive. I fear you give 'baremetal' too much credit. The number of people writing baremetal on the Pi in minuscule, and has not had any impact on the total sales. That's not to say it isn't a worthwhile effort, HH's work is extremely impressive. It's also true to say that this work has had very little effect on Pi sales, because the huge majority of people have no need of it.
dwelch67 wrote: Your product will die if only Broadcom paid developers are writing all the software and only children are using it (your numbers will be to small to sustain the production line, you would not meed the price point). Please remember that. Without an army of non-children buying and playing with this board, a low end laptop would be significantly cheaper than an RPi. A significant number of folks will return to arduinos and nucleos and beaglebones if each developer group is ignored...Also remember there is no linux, no gcc, no python, no software without some very small group of people that write bootloaders, drivers, and compilers.
Yes, clearly dying as I write this....you give much too much credit to things that are really not that important. Yes, there are many many people buying the Pi who were not the originally intended market. But the huge majority of them use Linux (or another OS) and get on fine - it does everything they need and more. They have no need of the register sets to talk to the camera, or use the already released 3D register sets. They use the already written and debugged libraries, because they do exactly what they need.

And just to clear up one point, the Foundation has access to the GPU source code, employs a number of ex-Broadcom HW and SW engineers and others, so there is no reliance on Broadcom software engineers when GPU mods are needed. In fact Brcm made the entire VC team redundant, and the Foundation took on some of them.

Oh, one more point, I'm an embedded software engineer. I've written on baremetal, I've written code for the GPU, I've written drivers for Linux, I've written for Android, Win32 etc. So it's not like I'm a high level HTML flump with an aversion to get my hands dirty. But I am a pragmatist.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

GeneraV
Posts: 31
Joined: Mon Feb 04, 2013 2:10 am

Re: BCM 2836 and the RPi 2 ?

Fri Feb 06, 2015 9:56 am

Hi all!
I'M A FRUSTRATED OS DEVELOPER!!!!!!!! :D
Haven't played around with my Raspberry Pi for a bit; mainly down to life getting in the way. But what I like about it is 1 Pi is the same as the next, cheap and cheerful and great community. Their are many other sbc's out there with better capabilities but with ,I think, none of the appeal of the Pi.
I do think the documentation will be released. Seems a bit stupid for them to enable bare-metal programming on the Pi-1 and not the Pi-2! Yes they may be the same in many respects and if the differences are small then getting that documentation together shouldn't take to long :D
Saying that you can program on top off Linux so be happy with that I think is the wrong attitude to have. I am surprised that the documentation was put out there on launch. Bare-metal isn't large on this platform but it is very important. I think you'll be surprised in how many people think about how o/s's are built and this platform gives them that opportunity to explorer that creativity.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5854
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: BCM 2836 and the RPi 2 ?

Fri Feb 06, 2015 10:32 am

GeneraV wrote:Bare-metal isn't large on this platform but it is very important. I think you'll be surprised in how many people think about how o/s's are built and this platform gives them that opportunity to explorer that creativity.
My own interest in ARM dev boards started when I was playing around with Linux From Scratch and thought it would be cool to have some small device which I could set up 'my own' OS on exactly as I wanted. At the time, everything was way too expensive, so I didn't bother. When I heard about the pi, I jumped right on it. I played around a bit with rolling my own distros and eventually got interested in bare metal programming. Coincidentally, my uni thesis required me to write bare metal c for an STM32F1 which eventually led me to try the same on the pi. The Cambridge uni tutorial along with information from people like dwelch and dex helped a lot and I certainly wouldn't want to see them leave. I don't underestimate the value of having people in the community who know the hardware inside and are willing to share than knowledge.

However, I'm confused about what has changed for them. All that bare metal code still works with a simple base address change and the existing documentation is still just as applicable. They're much more knowledgeable than I, so I would like to know why new documentation is needed. If it's only that the schematics are cut down and that there hasn't been more new information released in a while, I can understand the frustration. There are probably quite a few hoops to jump through before new documentation can be published,so I'd rather that energy had been spent on getting this new pi out there. I have no doubt that, in the long term, the raspberry pi will be a much more open platform, but it doesn't strike me as being of immediate importance. I don't see anybody at raspberry pi twiddling their thumbs, so it seems like a matter of priorities and resources rather than anything else.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23311
Joined: Sat Jul 30, 2011 7:41 pm

Re: BCM 2836 and the RPi 2 ?

Fri Feb 06, 2015 11:10 am

I think the point is that the 2835 documentation wasn't good enough, and therefore the 2836 documentation (which is in almost every effect the same) is therefore not good enough either.

Not sure why having the same level of documentation as before has become a deal breaker though, when you now have a quad core Cortex-A7+NEON to play with. Lots of performance in there to extract.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

mrvn
Posts: 58
Joined: Wed Jan 09, 2013 6:50 pm

Re: BCM 2836 and the RPi 2 ?

Fri Feb 13, 2015 10:09 am

This thread is realy depressing. Pretty much right from the start you figured out that the BCM 2836 is pretty much like the old BCM2835 except at a new base address. And while the complex code to figure out the address from the device tree is nice the one thing nobody seem to have mentioned is THE NEW BASE ADDRESS.

For those of us that don't support device tree (yet) could someone that does just output the address and tell us so we can change our #define or const in the source?

PS: For those discussing the openness and merits of the RPi in this thread please go somewhere else.

User avatar
joan
Posts: 14175
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: BCM 2836 and the RPi 2 ?

Fri Feb 13, 2015 10:39 am

mrvn wrote: ...
PS: For those discussing the openness and merits of the RPi in this thread please go somewhere else.
There isn't a device tree in bare metal.

It's hardly a secret.

For Linux.

Peripherals base address for older models was 0x20000000, base address for Pi 2 is 0x3F000000.

Probably won't affect you but memory was at bus address offset 0x40000000 for older models, bus address offset is 0xC0000000 for the Pi 2.

paradoxical
Posts: 3
Joined: Sat Feb 21, 2015 4:35 am

Re: BCM 2836 and the RPi 2 ?

Sat Feb 21, 2015 5:02 am

I just got an RP2 and tried running RPIO.PWM ( http://pythonhosted.org/RPIO/pwm_py.html ) on it to control a pair of servos, but it failed to run, complaining that the board was not a Raspberry Pi. (The code works find on a R Pi B+.)

Looking at the source code ( https://github.com/metachris/RPIO/tree/master/source ) an obvious fix was to change BCM2708 to BCM2709 on line 52 of RPIO/source/c_gpio/cpuinfo.c, which allowed the code to run.

However the servos still did not respond to commands, likely because the memory mapped and other hardware addresses also need to be updated. (There may also be other problems.) See, for example, lines 96-215 in RPIO/source/c_pwm/pwm.c at
https://github.com/metachris/RPIO/blob/ ... _pwm/pwm.c

What would be really useful to everyone, in addition to the full documentation, is a 'quick reference' table showing all memory mapped, hardware register and timing changes between the two CPUs to facilitate software upgrades.

If the hardware documents for registers and memory maps are not going to be released, perhaps someone from the Raspberry Pi Foundation could advise on the necessary changes to this code to restore functionality to this very important package.

As it stands, the RP2 looks like a fabulous performance boost, but one that it not practical to use with code like RPIO.PWM without adequate documentation on the changes on RP2. In this case it is not a drop-in replacement to the B+.

Thanks.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5854
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: BCM 2836 and the RPi 2 ?

Sat Feb 21, 2015 5:30 am

paradoxical, the information you're after is in this very thread. Simply change the base addresses accordingly. See Joan's last post.

paradoxical
Posts: 3
Joined: Sat Feb 21, 2015 4:35 am

Re: BCM 2836 and the RPi 2 ?

Sat Feb 21, 2015 8:33 am

ShiftPlusOne

Thanks. I had missed that post and it was helpful because it noted the need to change the bus address offset from 0x40000000 to 0xC0000000, which required 2 more changes to the code.

However even with that, it still isn't working. I suspect there may also be changes in the DMA or interrupt handling. Any suggestions for these?

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5854
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: BCM 2836 and the RPi 2 ?

Sat Feb 21, 2015 9:15 am

eh?
Peripherals base address for older models was 0x20000000, base address for Pi 2 is 0x3F000000.
0x40000000 to 0xC0000000 is something else, don't worry about that for now.

User avatar
joan
Posts: 14175
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: BCM 2836 and the RPi 2 ?

Sat Feb 21, 2015 10:27 am

ShiftPlusOne wrote:eh?
Peripherals base address for older models was 0x20000000, base address for Pi 2 is 0x3F000000.
0x40000000 to 0xC0000000 is something else, don't worry about that for now.
RPIO.GPIO uses DMA to time its pulses.

@paradoxical the pigpio Python module may do what you want.

t0sh
Posts: 5
Joined: Thu Feb 19, 2015 3:04 am

Re: BCM 2836 and the RPi 2 ?

Sat Feb 21, 2015 1:58 pm

I would definitely like to see the Pi project move to a more open SOC.

It's been a major turn-off for me to read the documentation and discover that some stuff is secret. If I were a teacher, I would not use the RPi as a platform for this reason.

I do understand the functionality/cost equation, and the desire to deliver as much functionality as possible, at the lowest possible cost.

The ARM world is split between high volume / high turnover application specific SOCs (tablets & phones) and lower volume, higher longevity, but less powerful alternatives. ARM seems to have abandoned the low volume market. It's possible that ARM's concentration on high volume SOCs will not allow them to sustain this model. I hope for this, and that other players will enter the market.

fruitoftheloom
Posts: 20430
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: BCM 2836 and the RPi 2 ?

Sat Feb 21, 2015 2:04 pm

t0sh wrote:I would definitely like to see the Pi project move to a more open SOC.

It's been a major turn-off for me to read the documentation and discover that some stuff is secret. If I were a teacher, I would not use the RPi as a platform for this reason.

I do understand the functionality/cost equation, and the desire to deliver as much functionality as possible, at the lowest possible cost.

The ARM world is split between high volume / high turnover application specific SOCs (tablets & phones) and lower volume, higher longevity, but less powerful alternatives. ARM seems to have abandoned the low volume market. It's possible that ARM's concentration on high volume SOCs will not allow them to sustain this model. I hope for this, and that other players will enter the market.
If you do not like the RPi choice of SoC then just buy a board what suits your needs and move on, no one is forcing you to use the RPi ;)
adieu

Asus CS10 Chromebit / HP Envy 4500 Wireless Printer / Raspberry Pi Model 2B v1.1 / RealVNC Software...

User avatar
Julien_Nantes
Posts: 2
Joined: Wed Feb 18, 2015 4:08 pm
Location: Nantes, France
Contact: Website

Re: BCM 2836 and the RPi 2 ?

Sat Feb 21, 2015 2:31 pm

Is there any wiki for RasPi bare metal programming ? If not, maybe creating one would be a good idea ? Each of us bringing some scraps of informations would certainly make for a better documentation than the default one ? :)

EDIT:
When bare metal coding was a noble art. The Amiga days. here with a demo from... Pure Metal Coders :
https://www.youtube.com/watch?v=bseufyUk4Dc
Last edited by Julien_Nantes on Sat Feb 21, 2015 2:48 pm, edited 1 time in total.
Raspberry Pi A and 2.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23311
Joined: Sat Jul 30, 2011 7:41 pm

Re: BCM 2836 and the RPi 2 ?

Sat Feb 21, 2015 2:45 pm

t0sh wrote:I would definitely like to see the Pi project move to a more open SOC.

It's been a major turn-off for me to read the documentation and discover that some stuff is secret. If I were a teacher, I would not use the RPi as a platform for this reason.

I do understand the functionality/cost equation, and the desire to deliver as much functionality as possible, at the lowest possible cost.

The ARM world is split between high volume / high turnover application specific SOCs (tablets & phones) and lower volume, higher longevity, but less powerful alternatives. ARM seems to have abandoned the low volume market. It's possible that ARM's concentration on high volume SOCs will not allow them to sustain this model. I hope for this, and that other players will enter the market.
ARM do not make chips for sale. They sell/licence the designs to whoever wants one. So they don't concentrate on any particular areas. It up to the people taking the design what market they aim their product at. Nothing to do with ARM whatsoever.

Fortunately, there are lots of actual teachers who are quite happy with the Pi because for teaching purposes its is more than adequate. Having 'baremetal' data is completely irrelevant to the vast majority of teaching effort. Look at devices lihe the ODROID-C1, or BPi, both slighter better performers with more open designs. And yet utterly terrible for teaching. It's not just the board that is important.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

GeneraV
Posts: 31
Joined: Mon Feb 04, 2013 2:10 am

Re: BCM 2836 and the RPi 2 ?

Sat Feb 21, 2015 4:57 pm

Hi all
Granted bare metal is a small fish in a big pond.
Their seems to be a mantra of everybody else is happy so you should be too!!!!
I think this is a shame

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23311
Joined: Sat Jul 30, 2011 7:41 pm

Re: BCM 2836 and the RPi 2 ?

Sat Feb 21, 2015 5:04 pm

GeneraV wrote:Hi all
Granted bare metal is a small fish in a big pond.
Their seems to be a mantra of everybody else is happy so you should be too!!!!
I think this is a shame
It's not a small fish in a big pond, it's a single celled creature in the atlantic.

But even given that, the Foundation has spent a lot of effort open sourcing as much as they can - this involves a lot of negotiation with the SoC maker Broadcom, which meant a datasheet, and the open sourcing of al the ARM side code. This personally took a lot of effort from Eben himself.

And do you know what the response was? "Not good enough, we need everything, and we need it now. Stopping hiding stuff, don't be evil". Hardly any thanks for the effort to produce the most open software of any SoC maker whatsoever.

And you know what else? That put Eben right off spending any more time and money on it when there are area where time and money are much MUCH better spent (Picademy, LXDE improvements, NuScratch, new models, AstroPi, Weather Stations, educational outreach).

So, really, when it comes to lack of low documentation, it's not entirely what it seems. Remember, the Foundation is an educational charity whose product has been taken up all over the place, not just education, but education remains the priority.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

User avatar
Lob0426
Posts: 2198
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
Contact: Website

Re: BCM 2836 and the RPi 2 ?

Sat Feb 21, 2015 6:55 pm

Unfortanely I have to agree with @jamesh, the foundation put a lot of effort into opening stuff and the response was pretty bad!

The people that want every single detail do not seem to understand why companies keep this stuff secret. The reason is that if they open it all up they will see their product being made in China, without them!

Broadcom puts money into research and development, for each and every chip they make. If the design is stolen they do not make back those costs. The ARM part of the SoC is bought from ARM. If ARM opens up then they do not make back their costs either. If both of these companies go under because they could not make back their costs and lose the profit, then the Foundation cannot build the Raspberry Pi.

I do not know why the Foundation even bothers to try to get the open source for us anyway. They only get more nagging in return!

It is pretty simple! Those of you that think that everything needs to be open source, make a product! Give out 100% details on it. You will make the first 1000 units, maybe, then someplace in Asia will make the next million or so for you. And they will probably just happen to forget to share any profit with you. Since it is all open source the courts will not be able to help you either!

Build another and repeat! See how long you stay in business?
512MB version 2.0 as WordPress Server
Motorola Lapdock with Pi2B
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!

rst
Posts: 403
Joined: Sat Apr 20, 2013 6:42 pm
Location: Germany

Re: BCM 2836 and the RPi 2 ?

Sat Feb 21, 2015 7:00 pm

I would like to say Thank you to the Raspberry Pi Foundation for supporting bare metal programming on the Raspberry Pi as they did.

The huge number of sold devices and the great audience it creates is of course an important reason for people who want to provide bare metal open source solutions. In this field the Raspberry Pi is unbeaten. And the needed information is available or can be get with a little research work.

Just my opinion.

User avatar
rpdom
Posts: 14979
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: BCM 2836 and the RPi 2 ?

Sat Feb 21, 2015 7:12 pm

I am very grateful to the Foundation and Eben especially for the work they have done to make bare metal accessible for us.

When I bought my first Pi I was hoping to get a small Linux system that I could experiment on, maybe do a little with I/O and a few other simple things.

I never expected something I could use as an HD media player, home heating controller, serious programming platform AND something I could put my old ARM Assembler experience to work on.

Fantastic work everyone! Thank you :)
I <3 my π

tufty
Posts: 1456
Joined: Sun Sep 11, 2011 2:32 pm

Re: BCM 2836 and the RPi 2 ?

Sat Feb 21, 2015 8:27 pm

Lob0426 wrote:It is pretty simple! Those of you that think that everything needs to be open source, make a product! Give out 100% details on it. You will make the first 1000 units, maybe, then someplace in Asia will make the next million or so for you. And they will probably just happen to forget to share any profit with you. Since it is all open source the courts will not be able to help you either!
Open source is a totally different business model, and it's one that companies like Broadcom, along with individuals like yourself, fail to totally grok (and, in many cases, totally fail to grok).

Take, for example, Arduino. It's an absolutely open platform, you are actively encouraged to take the reference designs and build your own, without giving a dime to the creators. Hell, they're even careful to make sure the reference design files work in the free version of Eagle. Wanna market your own board based on one of their reference designs? Go for it, as long as you don't actually call it "arduino", you credit them, and you comply with the license on the original reference design, they are happy. And yet they're still in business, 10 years on.

As another example, RedHat make money from software you, or I, can download for free. Indeed, you can download it for free from RedHat's own servers should you so wish. They earn more than a billion dollars a year.

Open source, be it hardware or software, requires a different way of thinking.

krom
Posts: 61
Joined: Wed Dec 05, 2012 9:12 am
Contact: Website

Re: BCM 2836 and the RPi 2 ?

Sat Feb 21, 2015 8:40 pm

I have to agree with the posts from rst & rpdom above...
I am lucky enough to own a Raspberry Pi 2, and in the 1st 2 weeks it has taught me howto to write optimized NEON code in bare metal, and I am about todo my 1st SMP demos using help from rst =D
If anything, from my experience, it is really amazing as an educational device for bare-metal coding!

Also I am used to console deving, where we do not have all the documents etc that we want, and it is still fun to dev on these devices...
e.g I had to make many demos to reverse engineer the RSP vector instructions on the N64, as there were no documents I could find on this processor:
https://github.com/PeterLemon/N64/tree/ ... SPTest/CP2

I even found that some previously thought "reserved" instructions, actually do exist on the released silicon of the production N64 CPU, something which even Nintendo might not have known:
http://forums.bannister.org/ubbthreads. ... mber=96727

What I am trying to say, is even if all the docs were released, I bet there would be some secret things about the HW, that we would still need hackers to find, & this is 1/2 the fun for me =D

Sleep Mode zZ
Posts: 319
Joined: Sun Aug 19, 2012 5:56 am
Location: Finland

Re: BCM 2836 and the RPi 2 ?

Sat Feb 21, 2015 9:13 pm

tufty wrote: And yet they're still in business, 10 years on.
Seems like a joke to compare Smart Projects Snc with Broadcom and suggest that what works for the first must work for the latter. In 2009 Smart Projects Snc employed two persons, who described the monetary compensation they got for the time they used on the project as a 'Christmas present'.
http://www.wsj.com/articles/SB100014240 ... 0271468066

JacobL
Posts: 76
Joined: Sun Apr 15, 2012 2:23 pm

Re: BCM 2836 and the RPi 2 ?

Sat Feb 21, 2015 11:37 pm

Lob0426 wrote:If ARM opens up then they do not make back their costs either.
But the ARM part is open, at least at the programming guide level. They don't need to open up their RTL in order for it to be programmable.

Anyway, if people are looking for a board with properly documented SoC, perhaps they should look at the BeagleBone Black http://beagleboard.org/black? The almost 5000 page SoC programmers manual is located here: http://www.ti.com/lit/ug/spruh73k/spruh73k.pdf

The BeagleBone Black is slightly more expensive than RPi, but it should still be within reach of the baremetal audience. Performance/feature wise, the board has similar features as RPi 1, with some advantages to BeagleBone Black. Notable advantages are a slightly bigger CPU and Ethernet directly connected in the SoC. This board looks like it was a response to the success of RPi, so we might get a multi-core variant later as a response to RPi 2.

Did someone here already take a look at this board? Is there a reason for it to be less useful for baremetal/OS devel experiments than RPi?

Return to “Bare metal, Assembly language”