bitthunder icon indicating copy to clipboard operation
bitthunder copied to clipboard

[RASPBERRYPI] Easy build for RPi MUST work and be maintained.

Open jameswalmsley opened this issue 11 years ago • 5 comments

jameswalmsley avatar Jun 26 '14 13:06 jameswalmsley

I can work on this, if you point me to the docs.

ririw avatar Jun 27 '15 07:06 ririw

Its mostly implemented now. I see that the main work is pushed already. Once you have configured the project to select the raspberrypi board you are using simply type:

make defconfig

It should then use arm-none-eabi- compiler by default and just build (I hope).

There's also a cleaner mechanism than adding code to bt_main.c to get your own code into BitThunder.

Create a new folder outside of the BitThunder tree then inside that folder run the following command:

make -C ../bitthunder/ PROJECT_DIR=$(pwd) project.init

(Where ../bitthunder/ is the path to your bitthunder kernel source tree).

From the project folder you'll see an objects.mk file with the following contents:

objs += $(APP)/main.o

$(APP) is your project folder relative, and so you can add as main objects to the build as you like.

Simply add a function called main inside main.c to override the default BitThunder main.

I just pushed some fixes to make this all work correctly, so give me a shout if it doesn't work.

James

jameswalmsley avatar Jun 27 '15 09:06 jameswalmsley

I've updated the post, to use the approach you suggest, and it all seems to be working, give me a shout if there are any changes I should make.

ririw avatar Jun 27 '15 10:06 ririw

Hi Richard,

I've put a link to your tutorial now on the main website. http://bitthunder.org/docs/quick-start/

I'll add it to some other places and make a blog post too to make it more prominent.

Your updates look great.

James

jameswalmsley avatar Jul 07 '15 12:07 jameswalmsley

:smile: thanks! I'll contact you if I post anything else on it.

ririw avatar Jul 07 '15 12:07 ririw