Page 1 of 1

problems Compiling RaceCapturePro firmware

Posted: Wed Oct 11, 2017 12:40 am
by lightningrod
This is my first attempt at compiling the firmware, so, this is likely a first time user problem.

compiling: ../src/logger/loggerApi.c fails as MAJOR_REV, MINOR_REV and BUGFIX_REV are not defined.

what did I miss?

I can also see that I'm going to need to setup my system for cross compiling. Is there a handy list of dependencies that I should install before I start looking at the compile errors?

Thanks,
Rod.

Posted: Wed Oct 11, 2017 4:29 pm
by brentp
Running just the "make" command should handle all of the requirements needed for compiling the firmware.

There's a full how-to guide for compiling the firmware in the README.md : github.com/autosportlabs/RaceCapture-Pro_firmware

If you do run into an issue or identify a problem, I'd recommend opening an issue on the github repo so we can track it close to the source.

Thanks!

Posted: Thu Oct 12, 2017 4:08 am
by lightningrod
Thanks for the reply ... when I manage to identify the issue(s), I'll move this over to github as you suggest.

I first ran "make" which fails in the first file it tries to compile that references MAJOR_REV, MINOR_REV and BUGFIX_REV.

If I run with "make -i" I can see that I have a bunch more errors that will follow once I get that resolved.

If it's trying to install packages, do I need to run this as root?!? -- I'd prefer to install the needed packages as a separate step.

I have since identified that I was missing these cross compiler packages: *-arm-none-eabi for example.

Having installed these, it looks like most of my remaining errors are directly related to, or have cascaded from the *_REV defines that I seem to be missing.

Posted: Thu Oct 12, 2017 4:19 am
by lightningrod
A little more digging and I have found this error "hidden" among the make output:

> fatal: Not a git repository (or any parent up to mount point /home)
> Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

They don't cause make to halt, so I didn't notice them at first.

Perhaps when I figure out how to use git/github and properly connect to the repository, it will find my missing defines for me. I'll work on this again tomorrow.

Rod.

Posted: Thu Oct 12, 2017 4:31 am
by brentp
I see what's happening. The revision numbers are pulled from the Git information. If you try to compile it outside of the context of the git repository, then this could happen.

You'll have to update the scripts to patch in the version number without needing the git context.

Posted: Thu Oct 19, 2017 9:32 pm
by lightningrod
OK. I'm using git to populate my folders now and it makes it much further (rather than uncompressing the downloaded zip file)

Now it fails here:

Code: Select all

asl_f4_fw_postprocess -f main.bin -o 0x08020000 -b main.bin -i main.ihex -e main.elf
make[3]: asl_f4_fw_postprocess: Command not found
Makefile:122: recipe for target 'main.ihex' failed
It looks to me like building this package may resolve the above: ASL_F4_bootloader
however my attempt to compile ASL_F4_bootloader results in

Code: Select all

Makefile:32: *** BOARD is not defined.  Pass it in as BOARD= or create a config.mk file.  Stop.
my options for boards seem to be common, mk2, rct. My guess for what I need would be mk3 -- not one of my options.

Any suggestions as to where to look next?

Thanks,
Rod.

Posted: Fri Oct 20, 2017 12:53 am
by lightningrod
To answer my own question ... in the process of attempting to build RaceCapture_App, it requires this:

sudo pip install dependencies/asl_f4_loader-0.3.0.tar.gz

which comes along with RaceCapture_App ... this seems to have resolved my error in the firmware build.

Posted: Fri Oct 20, 2017 12:58 am
by brentp
Looks like you're figuring it out!

Posted: Wed Nov 08, 2017 2:05 am
by lightningrod
Summary
In order to compile the firmware I needed these prerequisites:
don't use the "download zip" option to get a local copy, use the following (or the http equivalent):

Code: Select all

git clone git@github.com:autosportlabs/RaceCapture-Pro_firmware.git
git clone git@github.com:autosportlabs/RaceCapture_App.git # this is where I got asl_f4_loader
I needed to install the following packages:

Code: Select all

sudo apt-get install g++ ccpunit libcppunit-dev build-essential binutils-arm-none-eabi gcc-arm-none-eabi
I also installed these although, I'm not certain that they are all needed.

Code: Select all

sudo apt-get install gdb-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib
and from in the RaceCapture_App folder:

Code: Select all

sudo pip install dependencies/asl_f4_loader-0.3.0.tar.gz
I can't promise that these are all the required packages as I had a bunch installed on my machine prior to this.