jameswalmsley / bitthunder

BitThunder - Reliable, real time, portable, scalable, embedded operating system, RTOS.
http://bitthunder.org
Other
169 stars 48 forks source link

Unable to build Bitthunder #2

Closed morger closed 10 years ago

morger commented 10 years ago

Unfortunately I was not successful with building bitthunder for Raspberry Pi. I got this Message:

/home/christoph/bitthunder/bsp/arm/raspberrypi/build/os/src/bt_main.o: In function `bt_main':
/home/christoph/bitthunder/bsp/arm/raspberrypi/../../../os/src/bt_main.c:125: undefined reference to `BT_Flush'
/home/christoph/bitthunder/bsp/arm/raspberrypi/build/os/src/lib/putc.o: In function `fputc':
/home/christoph/bitthunder/bsp/arm/raspberrypi/../../../os/src/lib/putc.c:53: undefined reference to `BT_Write'
/home/christoph/bitthunder/bsp/arm/raspberrypi/../../../os/src/lib/putc.c:55: undefined reference to `BT_Write'
collect2: error: ld returned 1 exit status
make[1]: *** [kernel.elf] Fehler 1
make: *** [all] Fehler 2

I think there might be a problem with the makefiles but due to my limmited knowledge in this issues I need some help at this point.

Thanks in advance!

jameswalmsley commented 10 years ago

Hi Morger,

Thanks for trying this out. I think the file-system support is not included by default. Enable the FullFAT filesystem on the menuconfig.

I haven't tested this on the pi in a long time, so its likely it doesn't boot at the moment. Currently there are very few drivers, I even didn't find time to write the uart driver yet.

I'll test on my pi with the latest version and let you know.

James

morger commented 10 years ago

Hi James,

Thanks for this advise. If I enable the FullFAT Filesystem I get this error message:

/home/christoph/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin/../lib/gcc/arm-none-    eabi/4.7.3/../../../../arm-none-eabi/lib/libc.a(lib_a-sbrkr.o): In function `_sbrk_r':
sbrkr.c:(.text+0x18): undefined reference to `_sbrk'
collect2: error: ld returned 1 exit status
make[1]: *** [kernel.elf] Fehler 1
make: *** [all] Fehler 2

Unlikely I don't get any Error if I disable FullFAT again. But the buil kernel.img is not working either (I konfiguratet and activated the Alive! LED function).

And one more question: is ethernet working stable? For I would like to use Bitthunder for a network application.

Thanks in advance.

Morger

jameswalmsley commented 10 years ago

Hi Morger,

I last tested this working on the RaspberryPi a long time ago so need to test if it still works. There's been a lot of development on the kernel since then.

Ethernet works well, but currently there is no USB subsystem which you would need to write a mac driver for the RPi.

The _sbrk() is coming from the Sourcery Codebench compiler's libc implementation. It expects a function called _sbrk to allow its malloc() implementation to allocate memory. This is incompatible with BitThunder as we provide a direct malloc() api instead.

To build a toolchain with tighter integration see: https://github.com/bitthunder-toolchain/btdk

Otherwise you can make an _sbrk function that returns NULL, and hope nothing bad happens.

Thanks for spending time to try BitThunder.

James