LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 07:23 AM   #1
turboscrew
Member
 
Registered: Apr 2009
Location: Nokia (town), Finland
Distribution: Mint, Debian
Posts: 601

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 07:27 AM.
 
Old 03-30-2015, 12:01 PM   #2
turboscrew
Member
 
Registered: Apr 2009
Location: Nokia (town), Finland
Distribution: Mint, Debian
Posts: 601

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



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 07:52 AM
Setting up an arm cross compiler knobby67 Linux - Embedded & Single-board computer 1 09-29-2009 07:19 AM
appropriate arm cross compiler for at91rm9200 gmatyi Linux - Embedded & Single-board computer 1 07-25-2009 05:53 PM
Linux, Cross compiler for ARM problem vishalp Linux - Software 1 05-16-2006 06:06 AM
How to check ARM Cross-Compiler MKSrivastava Debian 1 02-07-2006 02:39 AM

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

All times are GMT -5. The time now is 11:56 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
Open Source Consulting | Domain Registration