Build errors after setting CONFIG_DEBUGMSG=1, needed for ROM dump

Started by vtrandal, August 24, 2012, 04:45:06 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

vtrandal

I got this from the FAQ: "You can generate the ROM images from your own camera by compiling with CONFIG_DEBUGMSG=1 and then selecting Dump ROM from Debug menu." So I made the change in Makefile.inc and built ML as follows:

make clean; make;
// I get these build errors
zebra.o: In function `card_benchmark_wr':
zebra.c:(.text+0x354c): undefined reference to `console_printf'
zebra.c:(.text+0x365c): undefined reference to `console_printf'
zebra.c:(.text+0x366c): undefined reference to `console_printf'
zebra.o: In function `card_benchmark':
zebra.c:(.text+0x36c4): undefined reference to `console_printf'
zebra.c:(.text+0x36fc): undefined reference to `console_printf'
zebra.c:(.text+0x3704): undefined reference to `console_show'
vram.o: In function `vram_toggle':
vram.c:(.text+0xf0): undefined reference to `menu_show_only_selected'
collect2: ld returned 1 exit status
make[1]: *** [magiclantern] Error 1
make[1]: Leaving directory `/home/vtrandal/magic-lantern/platform/60D.111'
make: *** [60D] Error 2

Having been away from firmware development for a while I could use some help getting this to build. Thanks.

1%

Try to make only for your own camera. Or find those lines and comment them out.

a1ex

Or enable the console module.

Or enable CONFIG_DEBUGMSG=1 only in debug.c.

vtrandal

Quote from: a1ex on August 24, 2012, 07:54:13 AM
Or enable the console module.

Or enable CONFIG_DEBUGMSG=1 only in debug.c.

Thank you Alex. I looked in console.c, but I'm not sure what to do in there. Then I looked in debug.c and found:
//~ CONFIG_DEBUGMSG 1
//~ CONFIG_HEXDUMP 1
I uncommented the first line only and it gives the following dumps on 600D/T3i:
08/24/2012  02:30 AM         9,437,184 ROM0.BIN /* I was expecting this one */
08/24/2012  02:30 AM            65,536 BOOT0.BIN /* not sure what to do with the other two yet */
08/24/2012  02:31 AM       268,435,456 RAM4.BIN /* wow the RAM dump is big */

So now it's time to look at some dumps as I attempt to follow in the footsteps of ML developers before me. My goal is to have Focus Peak in x10 as well as x5 zoom. It is working in x5 with is_zoom_mode_no_zebras() always returning 0, but in x10 the Focus Peak is from the x5 zoom. Maybe there is a simple change to get both. I am open to suggestions.

a1ex

Right, but I don't know why you would need the dumps for this. Focus peaking is high-level programming, the low-level part is image buffer address and size, which are already known.

In x10, the HD buffer covers the same area as x5, but the LV buffer covers only a cropped view. You will have to update the coordinate transformations, I think the LV2HD one. Peaking uses data from HD buffer and draws on BMP buffer, so coordinates need to be transformed.

Math here: http://magiclantern.wikia.com/wiki/VRAM/Geometry

and in vram.c / vram.h .