fbergama / pigfx

PiGFX is a bare metal kernel for the Raspberry Pi that implements a basic ANSI terminal emulator with the additional support of some primitive graphics functions.
MIT License
278 stars 62 forks source link

uspi @ 6620411 not found #1

Closed foxweb closed 8 years ago

foxweb commented 8 years ago

I tried to make a build but uspi did not building.

2016-09-09_00-35-22

It looks like a mismatch uspi submodule with your project.

(OS X El Capitan, cross-compiler toolchain was installed)

fbergama commented 8 years ago

I confirm the problem. For a strange reason the uspi commit I was linking is no more present in their history.

I'll fix this asap. In the meanwhile you should be able to solve by doing the following:

git submodule update --init
cd uspi
git fetch
git pull
./make all

optionally, you may need to change arm-linux-gnueabihf- with arm-none-aeabi- in uspi/Rules.mk

foxweb commented 8 years ago

Thanks!

Set PREFIX ?= arm-none-eabi- in uspi/Rules.mk and ./makeall was effect. uspi builded successfully.

But make a build of pigfx was not so succefully:

2016-09-09_10-50-36

fbergama commented 8 years ago

Can you please list me the output of the following command?

$ arm-none-eabi-gcc -print-libgcc-file-name

it looks like the gnu c library is not linked properly

foxweb commented 8 years ago

/usr/local/gcc-arm-none-eabi-5_4-2016q2/bin/../lib/gcc/arm-none-eabi/5.4.1/libgcc.a

fbergama commented 8 years ago

Your error looks quite strange to me. I can't understand from your listing if it's at compile or link stage. But I can tell you that all those undefined references are from the lib gcc that should be provided by libgcc.a

I've tested my code both on Mac OS X El Capitan (your version!) and Linux Ubuntu xenial with no issues, so I'm wondering how to replicate the problem on my setup. Tomorrow I'll do some more experiments on that. In the meanwhile, in the bin directory you can find a pre-compiled binary ready to be copied on a raspi sd card.

foxweb commented 8 years ago

Hmmm... compiled successfully with monkey patching:

src/gfx.c:

inline void __swap__( int* a, int* b )
inline int __abs__( int a )
// replaced with
void __swap__( int* a, int* b )
int __abs__( int a )

src/console.c

char buffer[32] = {0};
// replaced with
char buffer[32];

May be I have wrong versions of toolchain's utilities? For example:

$ ctags --help                                                                                                                                 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ctags: illegal option -- -

Sorry, I'm not so skilled in c-magic and toolchains. I'm use hombrew and xcode for installing tools for web-developing (lib-some-thing and etc). May be some conflicts with it?

foxweb commented 8 years ago

2016-09-14_02-16-27

TheCodeman commented 8 years ago

If you use the same version as the author it builds fine . https://launchpad.net/gcc-arm-embedded/4.9/4.9-2015-q2-update ken

fbergama commented 8 years ago

Ok it depends on your toolchain. I'll check if your changes are also compatible with mine and patch the code

fbergama commented 8 years ago

I've patched the code in the issue_1_fix branch. Can you please test it if it's working on your setup before I merge on the master branch?

Thank you

foxweb commented 8 years ago

Ok, @fbergama your patch is fixed bug.

2016-09-14_13-14-41

foxweb commented 8 years ago

My version:

gcc version 5.4.1 20160609 (release) [ARM/embedded-5-branch revision 237715] (GNU Tools for ARM Embedded Processors)
fbergama commented 8 years ago

I've just merged the fix into master.