Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
[SOLVED] ARM cross-development on Debian?
-
- Posts: 190
- Joined: 2009-03-23 09:17
- Location: Nokia (town), Finland
[SOLVED] ARM cross-development on Debian?
I understand that embedian is obsoleted, so which is the current way to install ARM cross-development tools on Debian 8.1?
Last edited by turboscrew on 2015-10-15 18:11, edited 1 time in total.
De-bugging is for sissies, real men do de-monstrations.
- GarryRicketson
- Posts: 5644
- Joined: 2015-01-20 22:16
- Location: Durango, Mexico
Re: ARM cross-development on Debian?
"What we expect you have already Done"
==========
Old Website
======================
For the Birds
==================
What Does a Parrot Know About PTSD?
==========
Old Website
======================
For the Birds
==================
What Does a Parrot Know About PTSD?
-
- Posts: 190
- Joined: 2009-03-23 09:17
- Location: Nokia (town), Finland
Re: ARM cross-development on Debian?
But that's embedian.
On the embedian main page it says:
Or do they still maintain the tools even if most of the other stuff is dropped?
[EDIT]
I guess not...
[EDIT2]
cross-gcc-dev seems to be in the repo, but cross-binutils is not - and it's not found in embedian tools repo either.
[/EDIT2]
On the embedian main page it says:
I wouldn't like to get started with already obsoleted stuff.Status of Emdebian distributions
As of July 2014, updates to the Emdebian distributions ceased. There will be no further updates and no further stable releases.
Or do they still maintain the tools even if most of the other stuff is dropped?
[EDIT]
I guess not...
[/EDIT]EmdebianToolchain
Emdebian toolchains are no longer supported Please note that this page is only for reference. Emdebian toolchains are not supported after squeeze. Modern multiarch-aware cross-toolchains are available from CrossToolchains.
[EDIT2]
cross-gcc-dev seems to be in the repo, but cross-binutils is not - and it's not found in embedian tools repo either.
[/EDIT2]
De-bugging is for sissies, real men do de-monstrations.
Re: ARM cross-development on Debian?
Here are my propositions:
1. http://stackoverflow.com/questions/1097 ... e-to-start
2. qemu + some arm distro image - You can easily build your programs in "native" ARM environment, using native gcc and libs.
3. Real HW - f.e. RaspberryPI + Raspbian - building on native HW allows to test HW-specific code and makes debugging faster. In this solution its better to disable everything GUI-related, reduce the amount of memory shared with graphics chip to minimum, and use ssh to control the device.
Regards.
1. http://stackoverflow.com/questions/1097 ... e-to-start
2. qemu + some arm distro image - You can easily build your programs in "native" ARM environment, using native gcc and libs.
3. Real HW - f.e. RaspberryPI + Raspbian - building on native HW allows to test HW-specific code and makes debugging faster. In this solution its better to disable everything GUI-related, reduce the amount of memory shared with graphics chip to minimum, and use ssh to control the device.
Regards.
Last edited by tomazzi on 2015-10-10 18:28, edited 1 time in total.
Odi profanum vulgus
- stevepusser
- Posts: 12930
- Joined: 2009-10-06 05:53
- Has thanked: 41 times
- Been thanked: 71 times
Re: ARM cross-development on Debian?
I've been able to cross compile using this as a general guide: http://jodal.no/2015/03/08/building-arm ... -pbuilder/
MX Linux packager and developer
-
- Posts: 190
- Joined: 2009-03-23 09:17
- Location: Nokia (town), Finland
Re: ARM cross-development on Debian?
Oh, sorry for being vague...
I'm doing bare metal for Raspberry Pi 2B, and I have the tools set up on my slackware laptop (I could code away from home), but I have
the debugging stuff only on my Debian desktop, and now it has become quite inconvenient to edit/compile on one machine,
move the stuff onto another machine and run/debug the program via that other machine.
I've been using Linaro GCC tool chain (the Raspberry Pi "official" toolchain) on the laptop and gdb-multiarch on the desktop.
I'd like to be able to do it all on the Debian desktop.
I'm doing bare metal for Raspberry Pi 2B, and I have the tools set up on my slackware laptop (I could code away from home), but I have
the debugging stuff only on my Debian desktop, and now it has become quite inconvenient to edit/compile on one machine,
move the stuff onto another machine and run/debug the program via that other machine.
I've been using Linaro GCC tool chain (the Raspberry Pi "official" toolchain) on the laptop and gdb-multiarch on the desktop.
I'd like to be able to do it all on the Debian desktop.
De-bugging is for sissies, real men do de-monstrations.
Re: ARM cross-development on Debian?
Besides educational purposes, there's simply no point in creating a bare metal software for ARM - this is almost the same as reinventing the wheel.
If You are going to create ultra-fast software, use the real-time priorities and the real-time signals - linux offers ultra-high timing precision in such use cases, which are probably far better than Yours - unless we are talking about software which can produce less than ~10ns repeatable pulse chains/strings - very unlikely... - and even in such case You can use assembly code...
Besides that, probably, You're not going to re-invent TLS - and this is the key to performance - and most likely Linux kernel has the best possible solutions.
Perhaps the only reason to create a custom OS/bare metal application is a boot time - but, it's a far better (simpler) way to strip linux kernel from unused code, keeping the networking framework and filesystem management tools, than rewritting this from scratch...
Regards.
If You are going to create ultra-fast software, use the real-time priorities and the real-time signals - linux offers ultra-high timing precision in such use cases, which are probably far better than Yours - unless we are talking about software which can produce less than ~10ns repeatable pulse chains/strings - very unlikely... - and even in such case You can use assembly code...
Besides that, probably, You're not going to re-invent TLS - and this is the key to performance - and most likely Linux kernel has the best possible solutions.
Perhaps the only reason to create a custom OS/bare metal application is a boot time - but, it's a far better (simpler) way to strip linux kernel from unused code, keeping the networking framework and filesystem management tools, than rewritting this from scratch...
Regards.
Odi profanum vulgus
-
- Posts: 190
- Joined: 2009-03-23 09:17
- Location: Nokia (town), Finland
Re: ARM cross-development on Debian?
Well, this is for educational purposes.Besides educational purposes, there's simply no point in creating a bare metal software for ARM - this is almost the same as reinventing the wheel.
[sarcasm]
On the other hand, why the education, if the gathered knowledge is useless?
And again, why program at all? Why not let the others do it?
[/sarcasm]
And I have been working in a project that involved writing bare metal SW for ARM-board - not for Raspberry Pi, but for another proprietary board.
De-bugging is for sissies, real men do de-monstrations.
Re: ARM cross-development on Debian?
It's not useless - it's a necessary step for every serious programmer - but in real life, professionals are writing robust, stable and technically correct software. In such projects, writing the code takes max 10% of time, the rest is sacrificed for testing. Therefore, to reduce the time needed for a project (and thus the costs), it's more reasonable to use already existing code, which is already well tested.turboscrew wrote:[sarcasm]
On the other hand, why the education, if the gathered knowledge is useless?
And again, why program at all? Why not let the others do it?
[/sarcasm]
Odi profanum vulgus
-
- Posts: 190
- Joined: 2009-03-23 09:17
- Location: Nokia (town), Finland
Re: ARM cross-development on Debian?
...unless figuring out its limitations or fit for the task takes more time than "reinventing the wheel".
Often the documentation is bad, if it can be found at all.
BTW, which Linux distro would you recommend for this?
http://www.st.com/web/en/catalog/tools/ ... -discovery
Bare metal, RTOSes, ...
Anyway, I'm interested in the tools, not in discussion about whether I should write bare metal programs or go pick berries.
Often the documentation is bad, if it can be found at all.
BTW, which Linux distro would you recommend for this?
http://www.st.com/web/en/catalog/tools/ ... -discovery
And I've been writing embedded SW professionally for about 20 years.STM32F100RBT6B microcontroller, 128 KB
Flash memory, 8 KB RAM in 64-pin LQFP
Bare metal, RTOSes, ...
Anyway, I'm interested in the tools, not in discussion about whether I should write bare metal programs or go pick berries.
De-bugging is for sissies, real men do de-monstrations.
Re: ARM cross-development on Debian?
...and from Your previous thread:turboscrew wrote:I'm doing bare metal for Raspberry Pi 2B
So please... If You're unsure what are the Rpi specs, I can provide a link for You.turboscrew wrote:I'm using Debian 8.1 on Intel I3 (x86_64), and the remote target is bare metal Raspberry Pi 2B
...oh really? And You can't use web search engines?, not to mention that You can simply compile the toolchain from sources ...turboscrew wrote:And I've been writing embedded SW professionally for about 20 years.
I don't buy this.
Anyway, I've already gave You a link with a solution for Your problem:
If You would read it carefully, then You could find a link to dwelf67 project, which contains ready to use examples and also a reference to https://github.com/dwelch67/build_gcctomazzi wrote:1. http://stackoverflow.com/questions/1097 ... e-to-start
In case if You're using some different architecture (especially hard/soft float), the configure scripts for gcc and binutils allows to select the correct target, so with a little effort You can have a complete toolchain within 20 minutes or so.
Regards.
Odi profanum vulgus
-
- Posts: 202
- Joined: 2013-06-19 05:09
Re: ARM cross-development on Debian?
Recompile gcc and specify the target architecture. Setting up libraries and linking=different story, because you would need to download all the arm binaries/static libs to link to. Or you could build those yourself too I guess. If you have an rpi with enough memory could just set up distcc with one of these custom gcc builds and then it'll just link local.
-RJ
-RJ
Much opinionated.
Some abrasive.
No systemd.
Wow.
Some abrasive.
No systemd.
Wow.
-
- Posts: 190
- Joined: 2009-03-23 09:17
- Location: Nokia (town), Finland
Re: ARM cross-development on Debian?
Sorry to disturb someone's peace...
I was wondering if there were "current" ARM cross-development tools package for debian x86_64.
I have working cross-development environment on my laptop, as I mentioned earlier, but now that I'm in the middle of testing/debugging,
I'm getting tired to bounce back anf forth between two machines.
It would be easier if I could edit/recompile/disassemble on the same machine I'm using for running gdb over serial cable.
Then I could check the addresses shown by gdb against the disassembled code instead of having to remember the numbers while
going from one machine to another.
I'd also like to keep my Debian as close to "standard" as possible, so I try to avoid compiling 3rd party programs myself.
When it comes to using web search, gess why I asked here...
All I found this far lead to the tools site whose main page says:
I guess that those "Modern multiarch-aware cross-toolchains" are not available for Jessie yet?
At least there is only cross-gcc-dev that synaptic finds. No cross-binutils.
I was wondering if there were "current" ARM cross-development tools package for debian x86_64.
I have working cross-development environment on my laptop, as I mentioned earlier, but now that I'm in the middle of testing/debugging,
I'm getting tired to bounce back anf forth between two machines.
It would be easier if I could edit/recompile/disassemble on the same machine I'm using for running gdb over serial cable.
Then I could check the addresses shown by gdb against the disassembled code instead of having to remember the numbers while
going from one machine to another.
I'd also like to keep my Debian as close to "standard" as possible, so I try to avoid compiling 3rd party programs myself.
When it comes to using web search, gess why I asked here...
All I found this far lead to the tools site whose main page says:
And:EmdebianToolchain
Emdebian toolchains are no longer supported Please note that this page is only for reference. Emdebian toolchains are not supported after squeeze. Modern multiarch-aware cross-toolchains are available from CrossToolchains.
That is, back to obsoleted stuff.For jessie (Debian 8 )
Cross-toolchains for jessie are available, only cross-binutils and cross-gcc-dev (crosstoolchain builder package) are in the main archive. Other packages come from an external repository.
...
These packages did not make it into Jessie so you need to install them from the Debian Cross-toolchains repository. Create /etc/apt/sources.list.d/crosstools.list containing:
deb http://emdebian.org/tools/debian/ jessie main
I guess that those "Modern multiarch-aware cross-toolchains" are not available for Jessie yet?
At least there is only cross-gcc-dev that synaptic finds. No cross-binutils.
De-bugging is for sissies, real men do de-monstrations.
-
- Posts: 190
- Joined: 2009-03-23 09:17
- Location: Nokia (town), Finland
Re: ARM cross-development on Debian?
Which part of the "cross-development" in the header you did not understand?tomazzi wrote:...and from Your previous thread:turboscrew wrote:I'm doing bare metal for Raspberry Pi 2BSo please... If You're unsure what are the Rpi specs, I can provide a link for You.turboscrew wrote:I'm using Debian 8.1 on Intel I3 (x86_64), and the remote target is bare metal Raspberry Pi 2B
...oh really? And You can't use web search engines?, not to mention that You can simply compile the toolchain from sources ...turboscrew wrote:And I've been writing embedded SW professionally for about 20 years.
I don't buy this.
Anyway, I've already gave You a link with a solution for Your problem:If You would read it carefully, then You could find a link to dwelf67 project, which contains ready to use examples and also a reference to https://github.com/dwelch67/build_gcctomazzi wrote:1. http://stackoverflow.com/questions/1097 ... e-to-start
In case if You're using some different architecture (especially hard/soft float), the configure scripts for gcc and binutils allows to select the correct target, so with a little effort You can have a complete toolchain within 20 minutes or so.
Regards.
(and it's dwelch67, by the way.)
I'm currently using the gcc-linaro-arm-linux-gnueabihf-raspbian toolchain on my slackware laptop.
And if the "target" confuses you, I'm writing a standalone bare metal gdb stub/server with double vectoring to allow debuggees use interrupts too.
This far the breakpoints seem to work, but there's something "foggy" in DABT exception context handling.
Single stepping implementation hasn't started yet.
De-bugging is for sissies, real men do de-monstrations.
-
- Posts: 202
- Joined: 2013-06-19 05:09
Re: ARM cross-development on Debian?
Be nice guys. Could probably use that advice myself sometimes.
-RJ
-RJ
Much opinionated.
Some abrasive.
No systemd.
Wow.
Some abrasive.
No systemd.
Wow.
-
- Posts: 190
- Joined: 2009-03-23 09:17
- Location: Nokia (town), Finland
Re: ARM cross-development on Debian?
Sorry for my rough words. I just got a bit agitated.
De-bugging is for sissies, real men do de-monstrations.
Re: ARM cross-development on Debian?
If you don't mind using unstable/experimental repositories you can add armel (and/or armhf) architectures (dpkg --add-foreign-architecture ...) and then install e.g. crossbuild-essential-armel, which will pull all required packages.
I have NOT tested this, so I don't know how good it works or if it fits your workflow. I myself use scratchbox for armel (N900) stuff, which hardly qualifies as "modern" :)
I have NOT tested this, so I don't know how good it works or if it fits your workflow. I myself use scratchbox for armel (N900) stuff, which hardly qualifies as "modern" :)
- stevepusser
- Posts: 12930
- Joined: 2009-10-06 05:53
- Has thanked: 41 times
- Been thanked: 71 times
Re: ARM cross-development on Debian?
Have you bothered to read my link? I've successfully compiled a few packages for the Pi on my amd64 platform by following the procedure.
MX Linux packager and developer
- GarryRicketson
- Posts: 5644
- Joined: 2015-01-20 22:16
- Location: Durango, Mexico
Re: ARM cross-development on Debian?
That is a good link, and he mentions using"pbuilder",stevepusser wrote:I've been able to cross compile using this as a general guide: http://jodal.no/2015/03/08/building-arm ... -pbuilder/
More https://www.netfort.gr.jp/~dancer/softw ... r-doc.html
"What we expect you have already Done"
==========
Old Website
======================
For the Birds
==================
What Does a Parrot Know About PTSD?
==========
Old Website
======================
For the Birds
==================
What Does a Parrot Know About PTSD?
-
- Posts: 190
- Joined: 2009-03-23 09:17
- Location: Nokia (town), Finland
Re: ARM cross-development on Debian?
No worries. The problem is solved.
I installed the crossbuild-essential-armhf (when I found out that it's not ONLY for making Debian packages).
(Took them from embedian.org/tools/debian. I also downloaded the "official" tool chain from the Raspberry Pi repo as a back-up.)
If I need tools for other architectures, I'll deal with it then.
I installed the crossbuild-essential-armhf (when I found out that it's not ONLY for making Debian packages).
(Took them from embedian.org/tools/debian. I also downloaded the "official" tool chain from the Raspberry Pi repo as a back-up.)
If I need tools for other architectures, I'll deal with it then.
De-bugging is for sissies, real men do de-monstrations.