I'm trying to compile the ArduCopter code for an APM2 on Debian linux 7.  I followed the instructions on the DIYDrones page, but the resulting ArduCopter.hex file is around 730k (found in /tmp/ArduCopter.build), which is almost double what it should be.  By the way, I'm compiling using "make" on the command line. My understanding is that this is the direction the developers are going, so I thought I'd give that a try.  I installed all of the packages listed in the developer wiki:

git

gcc-avr

avrdude

avr-libc

binutils-avr

python-serial

python-wxgtk2.8

python-matplotlib

python-opencv

python-pexpect

python-scipy

gawk

make

arduino-core

build-essentials

In reading some of the forum posts, there are a number of posts I've found which state that you need version 4.8.2 gcc for the code to be small enough for the APM2.  I currently have 4.7.2, and I plan to upgrade and try again, but the people from these other posts are seeing compiled sizes that are in th 200-300k region, not 700k.  I suspect it's something else that's going on.  Here are my questions:

1. Does anyone have any idea what might be happening? 

2. Is there a list of all packages and their versions to properly compile the code for the APM2?  The current instructions on the developer wiki are not sufficient.

Thanks.

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Ah. Good. I'll try loading the 710k one and see what happens. Is there any way to tell how big the file will be without loading it?
    • I loaded the 710k hex file, and it said the firmware was 252950 bytes.  It loaded successfully and appears to be working.  If anyone knows how to tell the size of the firmware based on the .hex file size, I'd still like to know.

      Also, if anyone had a list of the minimum versions for each of the packages, it would be helpful to update the documentation on the developer's section for other people who will likely run into this same problem.

      Thanks for the help. 

  • Actually, even the official hex is ~680 kb. The hex is always much larger than the actual data written due to checksums etc.

  • I upgraded all of the above packages to the "testing" versions in the Debian package repository and tried again.  It compiles to around 710k.  I'm fairly certain I'm doing something wrong.

This reply was deleted.

Activity