Canon EOS 1300D / Rebel T6

Started by the12354, October 03, 2016, 11:51:34 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Walter Schulz

ML project has no timeline, milestones to reach, release dates to match. None.
It's done by highly skilled people in their spare time stolen from family, friends and other hobbies.

critix

Ok, I did some tests with selftest and benchmark modules. The results are as follows:








The stubtest log is:
[Pass] is_play_mode() => 0x1
[INFO] Camera model: Canon EOS 1300D 1.1.0 (0x80000404 1300D)
[Pass] is_camera("DIGIC", "*") => 0x1
[Pass] is_camera(__camera_model_short, firmware_version) => 0x1
[Pass] src = fio_malloc(size) => 0x423880f0
[Pass] dst = fio_malloc(size) => 0x42b8c0fc
[Pass] memcmp(dst, src, 4097) => 0xffffff26
[Pass] edmac_memcpy(dst, src, 4097) => 0x42b8c0fc
[Pass] memcmp(dst, src, 4097) => 0x0
[Pass] edmac_memcpy(dst, src, 4097) => 0x42b8c0fc
[Pass] memcmp(dst, src, size) => 0xffffff12
[Pass] edmac_memcpy(dst, src, size) => 0x42b8c0fc
[Pass] memcmp(dst, src, size) => 0x0
[Pass] memcmp(dst, src, size) => 0xd6
[Pass] edmac_memcpy_start(dst, src, size) => 0x42b8c0fc
       dt => 0x0
[Pass] copied => 0x800000
[Pass] copied => 0x800000
[Pass] copied => 0x800000
[Pass] memcmp(dst, src, copied) => 0x0
[FAIL] memcmp(dst, src, copied + 16) => 0x0
       edmac_memcpy_finish()
       free(src)
       free(dst)
Cache test A (EDMAC on BMP buffer)...
[Pass] bmp = bmp_load("ML/CROPMKS/CINESCO2.BMP", 1) => 0xa1056c
[Pass] old => 0x0
[Pass] irq => 0xc0
[FAIL] differences => 0x0
[Pass] old => 0x0
[Pass] irq => 0xc0
[Pass] differences => 0x0
Cache test B (FIO on 8K buffer)...
[Pass] tries[0] => 0xf4
[Pass] tries[1] => 0x103
[Pass] tries[2] => 0x10e
[Pass] tries[3] => 0xe3
[FAIL] failr[0] => 0x0
[FAIL] failw[0] => 0x0
[FAIL] failr[1] => 0x0
[Pass] failw[1] => 0x0
[Pass] failr[2] => 0x0
[FAIL] failw[2] => 0x0
[Pass] failr[3] => 0x0
[Pass] failw[3] => 0x0
       times[0] / tries[0] => 0x4
       times[1] / tries[1] => 0x4
       times[2] / tries[2] => 0x4
       times[3] / tries[3] => 0x4
Cache tests finished.

[Pass] f = FIO_CreateFile("test.dat") => 0x3
[Pass] FIO_WriteFile(f, (void*)0xFF000000, 0x10000) => 0x10000
[Pass] FIO_WriteFile(f, (void*)0xFF000000, 0x10000) => 0x10000
       FIO_CloseFile(f)
[Pass] FIO_GetFileSize("test.dat", &size) => 0x0
[Pass] size => 0x20000
[Pass] p = (void*)_alloc_dma_memory(0x20000) => 0x40c18700
[Pass] f = FIO_OpenFile("test.dat", O_RDONLY | O_SYNC) => 0x3
[Pass] FIO_ReadFile(f, p, 0x20000) => 0x20000
       FIO_CloseFile(f)
       _free_dma_memory(p)
[Pass] count => 0x3a98
[Pass] buf = fio_malloc(0x1000000) => 0x423880f0
[FAIL] FIO_GetFileSize_direct("test.dat") => 0xcc34000
[Pass] f = FIO_OpenFile("test.dat", O_RDWR | O_SYNC) => 0x3
[FAIL] FIO_SeekSkipFile(f, 0, SEEK_END) => 0xcc34000
[FAIL] FIO_WriteFile(f, buf, 0x10) => 0xffffffff
[FAIL] FIO_SeekSkipFile(f, -0x20, SEEK_END) => 0xcc33fe0
[FAIL] FIO_WriteFile(f, buf, 0x30) => 0xffffffff
[Pass] FIO_SeekSkipFile(f, 0x20, SEEK_SET) => 0x20
[Pass] FIO_SeekSkipFile(f, 0x30, SEEK_CUR) => 0x50
[Pass] FIO_SeekSkipFile(f, -0x20, SEEK_CUR) => 0x30
[FAIL] FIO_GetFileSize_direct("test.dat") => 0xcc34000
[Pass] is_file("test.dat") => 0x1
[Pass] FIO_RemoveFile("test.dat") => 0x0
[Pass] is_file("test.dat") => 0x0
[Pass] SetTimerAfter(0, timer_cbr, overrun_cbr, 0) => 0x15
[Pass] timer_func => 0x2
[Pass] SetTimerAfter(1000, timer_cbr, overrun_cbr, 0) => 0x5b74
       msleep(900)
[Pass] timer_func => 0x0
       msleep(200)
[Pass] timer_func => 0x1
[FAIL] ABS((timer_time/1000 - t0) - 1000) => 0x15
[Pass] ABS((timer_arg - ta0) - 1000) => 0xa
[Pass] timer = SetTimerAfter(1000, timer_cbr, overrun_cbr, 0) => 0x5b9c
       msleep(400)
       CancelTimer(timer)
[Pass] timer_func => 0x0
       msleep(1500)
[Pass] timer_func => 0x0
[Pass] SetHPTimerAfterNow(0, timer_cbr, overrun_cbr, 0) => 0x15
[Pass] timer_func => 0x2
[Pass] SetHPTimerAfterNow(100000, timer_cbr, overrun_cbr, 0) => 0x3fc
       msleep(90)
[Pass] timer_func => 0x0
       msleep(20)
[Pass] timer_func => 0x1
[Pass] ABS(DeltaT(timer_time, t0) - 100000) => 0x260
[Pass] ABS(DeltaT(timer_arg, ta0) - 100000) => 0x200
[Pass] ABS((get_us_clock() - t0) - 110000) => 0xfffff850
[Pass] SetHPTimerAfterNow(90000, next_tick_cbr, overrun_cbr, 0) => 0x3fe
       msleep(80)
[Pass] timer_func => 0x0
       msleep(20)
[Pass] timer_func => 0x3
       msleep(80)
[Pass] timer_func => 0x3
       msleep(20)
[Pass] timer_func => 0x1
[Pass] ABS(DeltaT(timer_time, t0) - 300000) => 0x5e0
[Pass] ABS(DeltaT(timer_arg, ta0) - 300000) => 0x6b0
[Pass] ABS((get_us_clock() - t0) - 310000) => 0xffffe210
       t0 = GET_DIGIC_TIMER() => 0x35600
       msleep(250)
       t1 = GET_DIGIC_TIMER() => 0x6f900
[Pass] ABS(MOD(t1-t0, 1048576)/1000 - 250) => 0xc
       LoadCalendarFromRTC( &now )
       s0 = now.tm_sec => 0x0
       Date/time: 2017/09/30 15:15:00
       msleep(1500)
       LoadCalendarFromRTC( &now )
       s1 = now.tm_sec => 0x0
[FAIL] MOD(s1-s0, 60) => 0x0
[Pass] MOD(s1-s0, 60) => 0x0
       m0 = MALLOC_FREE_MEMORY => 0x40370
[Pass] p = (void*)_malloc(50*1024) => 0x1017a0
[Pass] CACHEABLE(p) => 0x1017a0
       m1 = MALLOC_FREE_MEMORY => 0x33b60
       _free(p)
       m2 = MALLOC_FREE_MEMORY => 0x40370
[Pass] ABS((m0-m1) - 50*1024) => 0x10
[Pass] ABS(m0-m2) => 0x0
       m0 = GetFreeMemForAllocateMemory() => 0x9cb74
[Pass] p = (void*)_AllocateMemory(128*1024) => 0xc186f0
[Pass] CACHEABLE(p) => 0xc186f0
       m1 = GetFreeMemForAllocateMemory() => 0x7cb68
       _FreeMemory(p)
       m2 = GetFreeMemForAllocateMemory() => 0x9cb74
[Pass] ABS((m0-m1) - 128*1024) => 0xc
[Pass] ABS(m0-m2) => 0x0
       m01 = MALLOC_FREE_MEMORY => 0x40370
       m02 = GetFreeMemForAllocateMemory() => 0x9cb74
[Pass] p = (void*)_alloc_dma_memory(128*1024) => 0x40c18700
[Pass] UNCACHEABLE(p) => 0x40c18700
[Pass] CACHEABLE(p) => 0xc18700
[Pass] UNCACHEABLE(CACHEABLE(p)) => 0x40c18700
       _free_dma_memory(p)
[Pass] p = (void*)_shoot_malloc(16*1024*1024) => 0x423880e0
[Pass] UNCACHEABLE(p) => 0x423880e0
       _shoot_free(p)
       m11 = MALLOC_FREE_MEMORY => 0x40370
       m12 = GetFreeMemForAllocateMemory() => 0x9cb74
[Pass] ABS(m01-m11) => 0x0
[Pass] ABS(m02-m12) => 0x0
[Pass] suite = shoot_malloc_suite_contig(16*1024*1024) => 0x1017a0
[Pass] suite->signature => 'MemSuite'
[Pass] suite->num_chunks => 0x1
[Pass] suite->size => 0x1000000
[Pass] chunk = GetFirstChunkFromSuite(suite) => 0x1017c8
[Pass] chunk->signature => 'MemChunk'
[Pass] chunk->size => 0x1000000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x423880dc
[Pass] UNCACHEABLE(p) => 0x423880dc
       shoot_free_suite(suite); suite = 0; chunk = 0;
[Pass] suite = shoot_malloc_suite_contig(0) => 0x1017a0
[Pass] suite->signature => 'MemSuite'
[Pass] suite->num_chunks => 0x1
[Pass] suite->size => 0x1f68000
[Pass] chunk = GetFirstChunkFromSuite(suite) => 0x1017c8
[Pass] chunk->signature => 'MemChunk'
[Pass] chunk->size => 0x1f68000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x4a000064
[Pass] UNCACHEABLE(p) => 0x4a000064
       largest_shoot_block = suite->size => 0x1f68000
[INFO] largest_shoot_block: 31MB
       shoot_free_suite(suite); suite = 0; chunk = 0;
[Pass] suite = shoot_malloc_suite(largest_shoot_block + 1024*1024) => 0x1017a0
[Pass] suite->signature => 'MemSuite'
[Pass] suite->num_chunks => 0x3
[Pass] suite->size => 0x2068000
[Pass] chunk = GetFirstChunkFromSuite(suite) => 0x1017c8
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x1c74000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x423880dc
[Pass] UNCACHEABLE(p) => 0x423880dc
       chunk = GetNextMemoryChunk(suite, chunk) => 0x101828
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x1d9c000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x42100064
[Pass] UNCACHEABLE(p) => 0x42100064
       chunk = GetNextMemoryChunk(suite, chunk) => 0x101860
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x2068000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x41878064
[Pass] UNCACHEABLE(p) => 0x41878064
       chunk = GetNextMemoryChunk(suite, chunk) => 0x0
[Pass] total => 0x2068000
       shoot_free_suite(suite); suite = 0; chunk = 0;
[Pass] suite = shoot_malloc_suite(0) => 0x1017a0
[Pass] suite->signature => 'MemSuite'
[Pass] suite->num_chunks => 0x4
[Pass] suite->size => 0x4300000
[Pass] chunk = GetFirstChunkFromSuite(suite) => 0x1017c8
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x1c74000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x423880dc
[Pass] UNCACHEABLE(p) => 0x423880dc
       chunk = GetNextMemoryChunk(suite, chunk) => 0x101828
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x1d9c000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x42100064
[Pass] UNCACHEABLE(p) => 0x42100064
       chunk = GetNextMemoryChunk(suite, chunk) => 0x101860
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x3d04000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x4a000064
[Pass] UNCACHEABLE(p) => 0x4a000064
       chunk = GetNextMemoryChunk(suite, chunk) => 0x101898
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x4300000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x41878064
[Pass] UNCACHEABLE(p) => 0x41878064
       chunk = GetNextMemoryChunk(suite, chunk) => 0x0
[Pass] total => 0x4300000
       shoot_free_suite(suite); suite = 0; chunk = 0;
[Pass] strlen("abc") => 0x3
[Pass] strlen("qwertyuiop") => 0xa
[Pass] strlen("") => 0x0
[Pass] strcpy(msg, "hi there") => 0x1ad7e4
[Pass] msg => 'hi there'
[Pass] snprintf(a, sizeof(a), "foo") => 0x3
[Pass] snprintf(b, sizeof(b), "foo") => 0x3
[Pass] strcmp(a, b) => 0x0
[Pass] snprintf(a, sizeof(a), "bar") => 0x3
[Pass] snprintf(b, sizeof(b), "baz") => 0x3
[Pass] strcmp(a, b) => 0xfffffff8
[Pass] snprintf(a, sizeof(a), "Display") => 0x7
[Pass] snprintf(b, sizeof(b), "Defishing") => 0x9
[Pass] strcmp(a, b) => 0x4
[FAIL] snprintf(buf, 3, "%d", 1234) => 0x4
[Pass] buf => '12'
[Pass] memcpy(foo, bar, 6) => 0x1ad880
[Pass] foo => 'asdfghuiop'
[Pass] memset(bar, '*', 5) => 0x1ad860
[Pass] bar => '*****hjkl;'
       bzero32(bar + 5, 5)
[FAIL] bar => '*****'
       EngDrvOut(LCD_Palette[0], 0x1234)
[Pass] shamem_read(LCD_Palette[0]) => 0x1234
       call("TurnOnDisplay")
[Pass] DISPLAY_IS_ON => 0x1
       call("TurnOffDisplay")
[Pass] DISPLAY_IS_ON => 0x0
       call("TurnOnDisplay")
[Pass] DISPLAY_IS_ON => 0x1
       task_create("test", 0x1c, 0x1000, test_task, 0) => 0x15ea00c8
[Pass] test_task_created => 0x1
[Pass] get_current_task_name() => 'run_test'
[FAIL] get_task_name_from_id(current_task->taskId) => '?'
[Pass] task_max => 0x88
[Pass] task_max => 0x88
[Pass] mq = mq ? mq : (void*)msg_queue_create("test", 5) => 0x15ec009c
[Pass] msg_queue_post(mq, 0x1234567) => 0x0
[Pass] msg_queue_receive(mq, (struct event **) &m, 500) => 0x0
[Pass] m => 0x1234567
[Pass] msg_queue_receive(mq, (struct event **) &m, 500) => 0x9
[Pass] sem = sem ? sem : create_named_semaphore("test", 1) => 0x15ee01c2
[Pass] take_semaphore(sem, 500) => 0x0
[Pass] take_semaphore(sem, 500) => 0x9
[Pass] give_semaphore(sem) => 0x0
[Pass] take_semaphore(sem, 500) => 0x0
[Pass] give_semaphore(sem) => 0x0
[Pass] rlock = rlock ? rlock : CreateRecursiveLock(0) => 0x15f000d8
[Pass] AcquireRecursiveLock(rlock, 500) => 0x0
[Pass] AcquireRecursiveLock(rlock, 500) => 0x0
[Pass] ReleaseRecursiveLock(rlock) => 0x0
[FAIL] ReleaseRecursiveLock(rlock) => 0x0
       SetGUIRequestMode(1); msleep(1000);
[Pass] CURRENT_GUI_MODE => 0x1
       SetGUIRequestMode(2); msleep(1000);
[Pass] CURRENT_GUI_MODE => 0x2
       SetGUIRequestMode(0); msleep(1000);
[Pass] CURRENT_GUI_MODE => 0x0
[FAIL] display_idle() => 0x0
       GUI_Control(BGMT_PLAY, 0, 0, 0); msleep(1000);
[Pass] PLAY_MODE => 0x1
[Pass] MENU_MODE => 0x0
       GUI_Control(BGMT_MENU, 0, 0, 0); msleep(1000);
[Pass] MENU_MODE => 0x1
[Pass] PLAY_MODE => 0x0
[Pass] dialog->type => 'DIALOG'
       GUI_Control(BGMT_MENU, 0, 0, 0); msleep(500);
[Pass] MENU_MODE => 0x0
[Pass] PLAY_MODE => 0x0
       SW1(1,100)
[FAIL] HALFSHUTTER_PRESSED => 0x0
       SW1(0,100)
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] is_play_mode() => 0x1
[FAIL] is_pure_play_photo_mode() => 0x0
[Pass] is_pure_play_movie_mode() => 0x0
[Pass] is_play_mode() => 0x1
[Pass] is_pure_play_photo_mode() => 0x0
[Pass] is_pure_play_movie_mode() => 0x0
[Pass] is_play_mode() => 0x1
[Pass] is_pure_play_photo_mode() => 0x0
[FAIL] is_pure_play_movie_mode() => 0x0
[Pass] is_play_mode() => 0x1
[Pass] is_pure_play_photo_mode() => 0x0
[Pass] is_pure_play_movie_mode() => 0x0
=========================================================
Test complete, 11499 passed, 22 failed.
.

Canon 1300D, 500D, EOS M, EOS M2

Walter Schulz

I saw such numbers in card benchmarks if card is full.

critix

Yes you are right...
OK, I did the card tests again, but this time I set sd.img default.
The results are:
Canon 1300D, 500D, EOS M, EOS M2

mitchblaser

Hey guys,
I'm a reasonably competent (albeit high-level) programmer, and I'd be happy to help out once I can wrap my head around some of the lower level hardware stuff. I know enough C to get by, but definitely need to read up on some ARM stuff.
I also have a 1300D so if you need rom dumps or hardware tests (eventually) then I'd be happy to.

Anyway if there's any resources you guys can point me to I'd be happy to go have a read :)
-Mitch.

Walter Schulz

Sticky tweet in twitter.com/autoexec_bin
Unofficial ML Discord Server: https://discord.gg/uaY8akC
Get QEMU running, start diving in. Use Discord for online support (if necessary).

mdlockyer

As an owner of a 1300D/T6 I am definitely excited at the possibility of using ML in the future. I know there are plenty of these type posts here, but I really am curious to know if there is anything I can do to help with this port. I am a software engineer, but I'm mostly unfamiliar with this type of low level embedded work. Does the ML team (or anyone working on the 1300D/T6 port) accept donations? I would like to contribute to this effort in any way I can.

Walter Schulz

See posting above
ATM donations won't help but this may change soon.

petabyte


mdlockyer

Quote from: Walter Schulz on October 11, 2020, 11:12:00 AM
See posting above
ATM donations won't help but this may change soon.

Thanks for the info.

mdlockyer


petabyte


petabyte

I ran a ROM dump on my 1300D and have been playing with it in QEMU. Seems to work flawlessly despite
a bunch of errors being spit into the console.
I compiled some of heder's changes, but can't figure out how to run the autoexec.bin in QEMU.

heder

Hi petabyte

The command to execute ML booting on 1300D in QEMU is


./run_canon_fw.sh 1300D,firmware="boot=1"


1. Remeber to copy your ROM files into the 1300D directory
2. Follow my instruction from https://www.magiclantern.fm/forum/index.php?topic=17969.msg229296#msg229296 (rom updating)

The console should at some point write :


SD LOAD OK.
Open file for read : AUTOEXEC.BIN
File size : 0x6FBA0
Now jump to AUTOEXEC.BIN!!


After booting, press delete bottom for entering ML menu.
... some text here ..

petabyte

Thanks, `./run_canon_fw.sh 1300D,firmware="boot=1"` is what I needed. It boots, but I have the wrong firmware on my camera. 1.1.1 instead of 1.1.0.

Walter Schulz


petabyte

I did try that. It won't let me upgrade. "Firmware older than Ver. 1.1.1 is on memory card. Delete old file and update using later version."

Maybe it will work on EOS Utility? I will boot into Windows and try that.

Also, 1.1.1 fixed a "vulnerability when updating firmware"

Walter Schulz

Quote from: petabyte on January 21, 2021, 04:54:07 PM
I did try that. It won't let me upgrade. "Firmware older than Ver. 1.1.1 is on memory card. Delete old file and update using later version."

Look after instructions in https://builds.magiclantern.fm/5D3-113.html for 5D3 with firmware 1.3.3 - 1.3.5
Try EOS Utility first. If it fails: Method B!
Don't be afraid, it works! There is an instruction video https://www.magiclantern.fm/forum/index.php?topic=24926.msg231788#msg231788
You have to be fast or you have to restart.

petabyte

Thanks, method B worked first time. Trying to load the firmware returns "Memory card containing firmware is required to update." though.

Log: https://petabyte.heb12.com/filedump/1300d%20log

heder

Hi petabyte

just to be 100%

1. You downgraded your 1300D camera to 1.1.0 (with success)
2. You dump'ed the rom (1.1.0) to sd-card
3. You change the rom (1.1.0) using my instructions
4. You ran QEMU and got "Memory card containing firmware is required to update."
... some text here ..

petabyte

Yes. It says it is 1.1.0 in the log file.

petabyte

That is when I run the firmware from the update option in the Canon ROM

petabyte

I repulled and recompiled, still "Memory card containing firmware is required to update." when trying to load 1.1.0-ml-nightly. Is this as expected?
The minimal hello world seems to run though.

heder

Quote from: petabyte on January 21, 2021, 08:09:42 PM
I repulled and recompiled, still "Memory card containing firmware is required to update." when trying to load 1.1.0-ml-nightly. Is this as expected?
The minimal hello world seems to run though.

Hi petabyte

A couple of ideas to track down your isssue, but I suspect that the issue itself is your compilation or compiler.

1. In Makefile.user set CONFIG_QEMU = y (this will keep the build more stable on QEMU)
2. What version of GCC are you using ? Personally I only old onces : gcc-4.7.4 or gcc 5.4.1. These can be found on https://launchpad.net/
3. Be aware that in some rare cases the sd.img can be conterminated, but since your hello world is working this is not the issue.
... some text here ..

petabyte

I've been using arm gcc 5.4.1. I set CONFIG_QEMU, but nothing changed.
Recording just to be sure: http://petabyte.heb12.com/filedump/ml_foo.mp4

Also I was a bit confused on the building process. Do I run `make install_qemu`?
You previously said "make autoexec.bin" and then run it in QEMU.

Edit: I think I got it working right. I got the ML UI working.