<< return to Pixycam.com

Example/documentation as to the tool chain required for build pixy firmware...

In other areas of the forum it was indicated that the GNU toolchain is currently not supported in building the pixy firmware.

Since it is not (yet?) - can you please indicate what toolchain is used and whether there is a “free” flavor of it available for students/hobbists (full licenses can be quite expensive).

And tips/pointers as to how to build and deploy the firmware would be welcome also (however I realize I can read the make files also)…

Thank you,

Hey Rich,
We are working with a contractor who’s helping us with the gcc port. We’re still shedding light on how long this will take. It’s actually fairly complicated!

In the meantime, check this out:
http://cmucam.org/projects/cmucam5/wiki/Building_Pixy_Firmware

thanks!

Thanks…

I tried compiling the firmware today.

I downloaded MDK-Lite Version 5.10

I cloned the pixy git repository.

I opened the video master project and compiled the sub projects in the order libpixy_m4,libpixy_mo, and video. The compile fails with the following errors.

Not quite sure what I did wrong.

Build Project ‘video’ - Target ‘Flash’
compiling main_m4.cpp…
compiling conncomp.cpp…
compiling exec.cpp…
C:\Users\hanrahan\Desktop\git\device\video\exec.cpp(94): warning: #550-D: variable “g_runningM0” was set but never used
static ChirpProc g_runningM0 = -1;
exec.cpp: 1 warning, 0 errors
compiling progblobs.cpp…
C:\Users\hanrahan\Desktop\git\device\video\progblobs.cpp(107): error: #165: too few arguments in function call
g_blobs->getBlobs(&blobs, &numBlobs);
progblobs.cpp: 0 warnings, 1 error
compiling progvideo.cpp…
compiling progpt.cpp…
C:\Users\hanrahan\Desktop\git\device\video\progpt.cpp(162): error: #165: too few arguments in function call
g_blobs->getBlobs(&blobs, &numBlobs);
progpt.cpp: 0 warnings, 1 error
compiling button.cpp…
compiling blob.cpp…
compiling blobs.cpp…
C:\Users\hanrahan\Desktop\git\common\blobs.cpp(619): warning: #550-D: variable “models” was set but never used
uint16_t models[MAX_COLOR_CODE_MODELS];
C:\Users\hanrahan\Desktop\git\common\blobs.cpp(760): error: #20: identifier “qDebug” is undefined
qDebug(“count=%d %d”, count, j);
…\common\blobs.cpp: 1 warning, 1 error
compiling colorlut.cpp…
compiling qqueue.cpp…
compiling lpc43xx_i2c.c…
compiling i2c.cpp…
compiling serial.cpp…
compiling analogdig.cpp…
compiling spi.cpp…
compiling uart.cpp…
compiling progchase.cpp…
C:\Users\hanrahan\Desktop\git\device\video\progchase.cpp(189): error: #165: too few arguments in function call
g_blobs->getBlobs(&blobs, &numBlobs);
progchase.cpp: 0 warnings, 1 error
“.\spifi\video.axf” - 4 Error(s), 2 Warning(s).
Target not created

Hi Pat,
You might try again— occasionally things get checked in that break the build.

thanks!

I am getting the same problems.

I can reproduce the errors above, or get different ones. When is the last know good code base in the repository so we can role back to that?

Build Project ‘video’ - Target ‘Flash’
compiling main_m4.cpp…
C:\Users\admin\Downloads\pixy-master\pixy-master\device\video\main_m4.cpp(36): error: #5: cannot open source input file “m0_image.c”: No such file or directory
#include “m0_image.c”
main_m4.cpp: 0 warnings, 1 error
compiling conncomp.cpp…
compiling exec.cpp…
C:\Users\admin\Downloads\pixy-master\pixy-master\device\video\exec.cpp(94): warning: #550-D: variable “g_runningM0” was set but never used
static ChirpProc g_runningM0 = -1;
exec.cpp: 1 warning, 0 errors
compiling progblobs.cpp…
C:\Users\admin\Downloads\pixy-master\pixy-master\device\video\progblobs.cpp(107): error: #165: too few arguments in function call
g_blobs->getBlobs(&blobs, &numBlobs);
progblobs.cpp: 0 warnings, 1 error
compiling progvideo.cpp…
compiling progpt.cpp…
C:\Users\admin\Downloads\pixy-master\pixy-master\device\video\progpt.cpp(162): error: #165: too few arguments in function call
g_blobs->getBlobs(&blobs, &numBlobs);
progpt.cpp: 0 warnings, 1 error
compiling button.cpp…
compiling blob.cpp…
compiling blobs.cpp…
C:\Users\admin\Downloads\pixy-master\pixy-master\common\blobs.cpp(619): warning: #550-D: variable “models” was set but never used
uint16_t models[MAX_COLOR_CODE_MODELS];
C:\Users\admin\Downloads\pixy-master\pixy-master\common\blobs.cpp(760): error: #20: identifier “qDebug” is undefined
qDebug(“count=%d %d”, count, j);
…\common\blobs.cpp: 1 warning, 1 error
compiling colorlut.cpp…
compiling qqueue.cpp…
compiling lpc43xx_i2c.c…
compiling i2c.cpp…
compiling serial.cpp…
compiling analogdig.cpp…
compiling spi.cpp…
compiling uart.cpp…
compiling progchase.cpp…
C:\Users\admin\Downloads\pixy-master\pixy-master\device\video\progchase.cpp(189): error: #165: too few arguments in function call
g_blobs->getBlobs(&blobs, &numBlobs);
progchase.cpp: 0 warnings, 1 error
“.\spifi\video.axf” - 5 Error(s), 2 Warning(s).
Target not created

OK

So I debugged the problems with the getBlobs (It looks there was some code floating around for colorblocks?) This is fixed.
Next the libpixy_m4 was not building because it was including
//#include <core_cm4_simd.h> /*!< Compiler specific SIMD Intrinsics */

Once this was commented out, then libpixy_m4 was able to compile. The other files were able to compile yay!

But wait, when we get to linking all goes south:
Build Project ‘video’ - Target ‘Flash’
compiling main_m4.cpp…
compiling conncomp.cpp…
compiling exec.cpp…
C:\Users\admin\Downloads\pixy-master\pixy-master\device\video\exec.cpp(94): warning: #550-D: variable “g_runningM0” was set but never used
static ChirpProc g_runningM0 = -1;
exec.cpp: 1 warning, 0 errors
compiling progblobs.cpp…
compiling progvideo.cpp…
compiling progpt.cpp…
compiling button.cpp…
compiling blob.cpp…
compiling blobs.cpp…
C:\Users\admin\Downloads\pixy-master\pixy-master\common\blobs.cpp(619): warning: #550-D: variable “models” was set but never used
uint16_t models[MAX_COLOR_CODE_MODELS];
…\common\blobs.cpp: 1 warning, 0 errors
compiling lpc43xx_i2c.c…
compiling i2c.cpp…
compiling serial.cpp…
compiling analogdig.cpp…
compiling spi.cpp…
compiling uart.cpp…
compiling progchase.cpp…
linking…
.\spifi\video.axf: error: L6050U: The code size of this image (65958 bytes) exceeds the maximum allowed for this version of the linker.
Finished: 0 information, 0 warning, 0 error and 1 fatal error messages.
“.\spifi\video.axf” - 1 Error(s), 2 Warning(s).
Target not created

The file is too large for the memory space on the device, or I can’t compile with this version of the software? MDKLite 5.10

I will poke around the repository more. I am not a CS guy so I am sure someone who is could solve this much more quickly.

Cheers,
mmason

Yeah, probably best— here, do this:

git clone https://github.com/charmedlabs/pixy.git
cd pixy
git reset --hard $(git rev-list -1 $(git rev-parse --until=2014-4-15) master)

thanks!

I tried that.

Less errors, but still a compile time error. I also get the error about the
code size being too large.

compiling conncomp.cpp…
compiling exec.cpp…
C:\Users\hanrahan\Desktop\pixy\device\video\exec.cpp(93): warning: #550-D: variable “g_runningM0” was set but never used
static ChirpProc g_runningM0 = -1;
exec.cpp: 1 warning, 0 errors
compiling progblobs.cpp…
compiling progvideo.cpp…
compiling progpt.cpp…
compiling button.cpp…
compiling blob.cpp…
compiling blobs.cpp…
compiling colorlut.cpp…
compiling qqueue.cpp…
compiling lpc43xx_i2c.c…
compiling i2c.cpp…
compiling serial.cpp…
compiling analogdig.cpp…
compiling spi.cpp…
compiling uart.cpp…
linking…
.\spifi\video.axf: error: L6050U: The code size of this image (63314 bytes) exceeds the maximum allowed for this version of the linker.
Finished: 0 information, 0 warning, 0 error and 1 fatal error messages.
“.\spifi\video.axf” - 1 Error(s), 1 Warning(s).
Target not created

It was my understanding the free version of the toolkit will not produce a binary large enough to run pixy firmware. I think this is the linker size error you are getting…

Yes it looks like this is the problem. According to [[http://www.keil.com/arm/selector.asp]] the lite version only supports up to a 32Kb file size.

I just tried installing the older version (4.7 of MDK) and it still gives the same error about code size, so it looks like both versions have the 32K limit. I guess we have to get the license in order to compile?

If anyone has a work around for this, please post.

thanks!
mmason

Hi Rich,

Do you have an estimate now on the gcc port availability?

Regards,
Animesh

I am not involved in the gcc port and am waiting also. I looked into the existing toolchain only to conclude you need a license which, as an individual, is more money than I can spend without a divorce :wink:

ha! stay married! Yes, Keil is great, generates really efficient code, but it costs money, way too much money for most of us. We didn’t have a choice when we first started the project a few years back. (no JTAG support for GCC at the time, for the LPC43xx)

The GCC port was kicked off this week coincidentally. The inline assembly, linker scripts, and memory alignment need to be exact and Keil and GCC are completely different in these regards, so the conversion is sorta challenging. We’ve brought in an outside contractor – a former NXP developer. We hope to have the port ready late August. It might take longer though — we don’t know. That’s the bad news.

The good news is that when it’s done, there will be a nice tool — LPCXpresso (http://www.lpcware.com/lpcxpresso) and JTAG support (if you want it). We’ll also offer a plain GCC toolchain for simpler compiles/programs/tweaks.

thanks!

Thanks for checking into the problem.

I will look forward to the gcc port.

I have looked into getting a full version of KIEL. If you are a university person, you can register as ARM university partner and then ask for a donation of the Kiel for Cortex M product.

[[http://www.arm.com/support/university/educators/embedded/embedded-systemsmcus-software-tools-for-educators.php]]

I have started this process (3-4 weeks) and hope to have something positive to report in a month.

Otherwise the quotes for the product are as follows:

From ARM 6/11/2014

  • MDK-ARM Standard Edition…$4,895
  • MDK-ARM Cortex-M Edition…$3,840

Cheers,
profmason

Thanks for the info. I am going to request a license too.

Dear Professor Hanrahan,

Thank you for the clarification. We’re only able to provide donation’s to
the MDK-ARM software to those universities who will be using the software
for teaching purposes, so I’m afraid we’re unable to help in this instance.

If it helps, you can download a free 32kb limited version of the MDK-ARM
software at: https://www.keil.com/demo/eval/arm.htm.

Alternatively we do have special academic pricing for the software and I
can get our sales department to get in contact if this was of interest.

Kind regards,

The ARM University Program Team


http://www.facebook.com/ARMUniProgram
https://twitter.com/ARMUniProgram


From: Pat Hanrahan[SMTP:[email protected]]
Sent: Monday, June 16, 2014 3:25:39 PM
To: University
Subject: Re: ARM Donation Request KEIL MDK [EMEA
Auto forwarded by a Rule

My request is so that I can modify the CMUCAM5 Pixy smart camera. We
are using the camera in a research project.

Right now I am not teaching a course that would use Kell software.

Thank you for considering my request.

Best,
Pat

Hi,

Is there any more news about the GCC porting.
If so, is there any tutorial on how to compile with gcc?
I was just compiling with the KEIL MDK and got the same problem as everyone else here (license lock to 32Kb). Sadly paying a license is not a possibility for me…

Cheers,

Tony