[En-Nut-Discussion] Need help on Makefiles

Ulrich Prinz uprinz2 at netscape.net
Wed Sep 9 22:10:26 CEST 2009


Hi!

 >>> How can I find out the CPU type in the Makefile so I can select the
 >>> right script?
 >> No chance. By accident avrdude still supports the same symbolic names,
 >> that are used by the compiler for the target CPU. Although this is not
 >> documented. Thus, in most cases this works on the AVR platform out of
 >> the box.

Uh... I mean I feared the answer, but it came true :)

Is there really no -DDEFINE that is passed to the Makeburn system, that 
allowes me to decied which CPU is selected? I have no problem with 
writing a Makeburn that has lots of comparisions in it to call the right 
script or to pass some direct calls to openocd.

Direct passing works fine, as you can see in the Makeburn. I fit in the 
binary image file as -c "writeimage erase ...".

The only thing missing is the correct script or a decision for the flash 
page detection. OpenOCD version 0.2.0 learned a lot, may be there are 
some more mechanism to detect some parts automatically. SO the script 
might be smaller than expected.

I only need the §%$&§&%§ CPU class (sam7x, sam7x...) or better type.
...
> 
> I assume you want to create a Makeburn.openocd right?
> Then you could translate the MCU variable to some OPENOCD_MCU using ifs.
> 
Äh... repeat please! There is a MCU variable?
By the way, I already created the Makeburn.arm-oocd and it works fine 
with 0.1.0 and 0.2.0 version without modification. But it is nailed to 
SAM7X256. I want to make it flexible as I have different CPUs and just 
for the other users too.

Best regards, I am busy with finding that $(MCU) :)

Ulrich



More information about the En-Nut-Discussion mailing list