LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM
User Name
Password
Slackware - ARM This forum is for the discussion of Slackware ARM.

Notices


Reply
  Search this Thread
Old 03-30-2015, 08:23 AM   #1
turboscrew
Member
 
Registered: Apr 2009
Location: Nokia (town), Finland
Distribution: Mint, Debian, Puppy (Racy), Slackware
Posts: 586

Rep: Reputation: 46
Arm cross-compiler


Are there many RPi bare metal programmers?

I wonder if there is a well-working GNU toolchain neatly packaged for Slackware?

I'm using eclipse CDT (Kepler) if that has any meaning.

I've tried the Raspbian official tool chain and
Code:
bash-4.2$ ./arm-none-eabi-gcc --version
arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.9.3 20141119 (release) [ARM/embedded-4_9-branch revision 218278]
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
(How to tell which toolchain is which?)
I think both of them are Linaro-toolchains, but I'm not sure.
Both of them, however, seem to have the same oddities with linking.
- in linker script, file names need to have wildcard before extension in the input section definitions.
- unable to find symbols (asm - c)
- maybe something else I haven't encountered yet

Or maybe someone knows how to make the mentioned toolchains work?

The first problem:
Code:
    .text :
    {
        start.o(.text)
    }
would cause "multiple definition of `_start'" where the _start is the label (declared 'globl') for start-up code in the start.S, and defined "ENTRY(_start)".

This works:
Code:
    .text :
    {
        start*.o(.text)
    }
The second (yet unsolved problem) is that in start.S there is a call
Code:
ldr pc, =_start1
and in a c-file
Code:
void start1()
{
...
}
and I'm getting
Quote:
undefined reference to `_start1'
no matter if I declare '_start1' as .extern in the start.S or not.
Also linking order of the C- and S-file doesn't make a difference.

Last edited by turboscrew; 03-30-2015 at 08:27 AM.
 
Old 03-30-2015, 01:01 PM   #2
turboscrew
Member
 
Registered: Apr 2009
Location: Nokia (town), Finland
Distribution: Mint, Debian, Puppy (Racy), Slackware
Posts: 586

Original Poster
Rep: Reputation: 46
WHAT?
It seems there are no added underscore in the c-names.
If I replace
Code:
ldr pc, =_start1
with
Code:
ldr pc, =start1
, it works! =-O

What the <censored> has happened to GCC? Are those ARM-only features?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
linux arm cross compiler habeshkumar Linux - Software 4 07-26-2010 08:52 AM
Setting up an arm cross compiler knobby67 Linux - Embedded & Single-board computer 1 09-29-2009 08:19 AM
appropriate arm cross compiler for at91rm9200 gmatyi Linux - Embedded & Single-board computer 1 07-25-2009 06:53 PM
Linux, Cross compiler for ARM problem vishalp Linux - Software 1 05-16-2006 07:06 AM
How to check ARM Cross-Compiler MKSrivastava Debian 1 02-07-2006 03:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM

All times are GMT -5. The time now is 12:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration