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
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.