Open jameswalmsley opened 10 years ago
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
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.
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
:smile: thanks! I'll contact you if I post anything else on it.
I can work on this, if you point me to the docs.