problems Compiling RaceCapturePro firmware

General Q&A specific to RaceCapture/Pro. For app related questions post in the RaceCapture App forum. also see the <a href="http://www.autosportlabs.net/RaceCapture">RaceCapture Information Page</a>

Moderators: JeffC, rdoherty, stieg, brentp

Post Reply
lightningrod
Posts: 47
Joined: Wed Oct 04, 2017 1:44 am

problems Compiling RaceCapturePro firmware

Post 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.

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post 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!
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

lightningrod
Posts: 47
Joined: Wed Oct 04, 2017 1:44 am

Post 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.

lightningrod
Posts: 47
Joined: Wed Oct 04, 2017 1:44 am

Post 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.

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post 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.
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

lightningrod
Posts: 47
Joined: Wed Oct 04, 2017 1:44 am

Post 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&#91;3&#93;&#58; asl_f4_fw_postprocess&#58; Command not found
Makefile&#58;122&#58; 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&#58;32&#58; *** 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.

lightningrod
Posts: 47
Joined: Wed Oct 04, 2017 1:44 am

Post 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.

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Looks like you're figuring it out!
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

lightningrod
Posts: 47
Joined: Wed Oct 04, 2017 1:44 am

Post 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 [email protected]&#58;autosportlabs/RaceCapture-Pro_firmware.git
git clone [email protected]&#58;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.

Post Reply