The camera seems to startup only once with the ML firmware (0.2.0rc1 for
1.0.9, built directly from latest sources using gcc 4.3.2) directly
after flashing. If the camera shuts down itself or if you switch it off
it is impossible to switch it on again. My workaround is to remove and
reinsert the battery.
For me it seems that something remains in the camera's memory that
prevents a proper boot process. Can anybody confirm this behavior?
If needed I can provide more log files or debug output.
Deti
> --
> http://magiclantern.wikia.com/
>
> To post to this group, send email to ml-d...@googlegroups.com
> To unsubscribe from this group, send email to
> ml-devel+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/ml-devel?hl=en
Deti
Deti
This issue is NOT related to any compiler version or SD card size - I
think I really hit a bug now.
Try to remove MAGIC.CFG from your card and then you will not be able to
shutdown and power on the camera again.
Deti
I've deleted MAGIC.CFG.
Then:
- Turned off the camera from the main switch. Sensor cleaning => OK.
Turned back on => OK.
- Waited for the camera to enter power management (i.e. turn off by
itself.) Pressed half-shutter => OK.
After this, I've deleted ALL files from the card, except for autoexec bin.
Did the same tests. Results are identical. I couldn't freeze the camera.
Then I've played a bit with options, live view, histozebs,
enable/disable some settings, zoom. Waited for camera to turn off
automatically, then booted it again with half-shutter normally. Tried
from both LV and non-LV modes => all worked well.
Deti
BINUTILS=binutils-2.20
NEWLIB=newlib-1.18.0
GDB=gdb-7.2
LIBCMSIS=v1.10-2
LIBSTM32=v3.0.0-1
LIBSTM32USB=v3.0.1-1
LIBOPENSTM32=master
On Wed, Dec 15, 2010 at 12:06 PM, Deti <de...@42u.de> wrote:
Deti
Deti
Deti
Deti
In order to fix this, I (or other developers) have first to reproduce
the issue. Did anyone else try to look at this?
I don't think this has any influence on the power management problem,
but.. can you test it again?
The problem is that calling FIO_Open() at config_parse_file from within
the my_init_task() code. As soon as it returns an error (INVALID_PTR)
the camera is in this broken state.
Another thing: I cannot see the startup message "Magic Lantern v..."
when the camera performs a cold start. I only the message when switching
it on later or by half pressing the shutter button). All of my cameras
need a msleep(550) instead of 500ms.
Please apply the patch attached to this mail to fix the latter problem.
Still we have to investigate what happens when FIO_Open returns an error.
Deti
I can see startup message in all cases. Sometimes it gets overwritten
quickly by Canon drawing code (but I can still see some parts of it).
FIO_Open is a function from Canon file. Maybe the difference is
because I use FAT16 and you use FAT32. I can't install ML on my FAT32
card.
Maybe it's a good idea to check if the file exists before trying to
open it. No idea how to do that...
So...
gui_stop_menu: just turns off the menu.
alloc_dma_memory => this could be something, but I don't think it
makes anything important unless you use that memory
user_block: reads a value with a mask
dm_set_store_level: sets the verbosity level of debug logs
cache: I don't think that changes anything to cam memory..
Therefore, it seems this function only prints debug info on the screen.
=> stil clueless...
void
bootflag_write_bootblock( void )
{
gui_stop_menu();
bmp_printf( FONT_SMALL, 0, 30, "cf=%08lx sd=%08lx",
(uint32_t)sd_device[0], (uint32_t) sd_device[1]);
struct cf_device * const dev = sd_device[1];
uint8_t *block = alloc_dma_memory( 0x200*0x40 );
uint8_t * user_block = (void*)((uintptr_t) block & ~0x40000000);
int i;
DebugMsg(DM_MAGIC, 3, "%s: buf=%08x", __func__, (uint32_t)block);
for(i=0 ; i<0x200 ; i++) block[i] = 0xAA;
bmp_printf( FONT_SMALL, 0, 40, "mem=%08lx read=%08lx",
(uint32_t)block, (uint32_t)dev->read_block );
bmp_hexdump( FONT_SMALL, 0, 250, sd_device[1], 0x100 );
dm_set_store_level(0x23, 0);
int rc = dev->read_block( dev, block, 0x0, 0x40 );
clean_d_cache();
flush_caches();
dm_set_store_level(0x23, 3);
DebugMsg(DM_MAGIC, 3, "%s: rc=%d %08x %08x", __func__,
rc,
*(uint32_t*) &user_block[0x47],
*(uint32_t*) &user_block[0x5C]
);
msleep( 100 );
bmp_printf( FONT_MED, 600, 40, "read=%d", rc );
bmp_hexdump( FONT_SMALL, 0, 60, user_block, 0x100 );
/*
// Update the first partition header to include the magic
// strings
my_memcpy( block + 0x47, (uint8_t*) "EOS_DEVELOP", 0xB );
my_memcpy( block + 0x5C, (uint8_t*) "BOOTDISK", 0x8 );
rc = dev->write_block( dev, 0x0, 1, block );
bmp_printf( FONT_MED, 600, 60, "write=%d", rc );
free_dma_memory( block );
*/
}
> I can see startup message in all cases. Sometimes it gets overwritten
> quickly by Canon drawing code (but I can still see some parts of it).
Well, maybe it's just the difference between FAT16 and FAT32.
> FIO_Open is a function from Canon file. Maybe the difference is
> because I use FAT16 and you use FAT32. I can't install ML on my FAT32
> card.
Found a small 2GB card that could be formatted with FAT16. I can
confirm, that in this case the FIO_Open function works properly. Now
it's just a question why there is a difference.
> Maybe it's a good idea to check if the file exists before trying to
> open it. No idea how to do that...
I would include an empty magic.cfg file into the distribution which
fixes the issue for most users.
In the meantime I tried to use a Transcend 32GB Class 10 card which did
not work at all. The camera boots up only half (focus on half pressed
shutter works, display stays dark, nothing else seems to work). Should
try to write a logfile to the card to find out where boot process gets
stuck.
Deti
I've already included a small magic.cfg in the zip archive.
Deti