I spend a bit of IDA analysing code from my compilations, and ended with something like that:entryadr=0x800030CFLAGS=-nostdlib -march=armv5te -fno-builtinLDFLAGS=-Wl,-Ttext,$(entryadr)You can add -O2 if you want - but it is no fun when you analyse the code, becose it just erase all the code that don't do anything. - it can erase your delay also !!
>why do you need "j" loop?It blinks out the offset from the base address. You count the blinks and add that to the base address to get the LED's address.
int *base = 0xC0220000; for(i = 0; i < 0x100; i++) for(j = 0; j < i; j++){ k = *(base+i);}
>why to use weird addresses (X1,X2,X3)? (ARM architecture >does not support well such data alligments)I'm not sure what you mean?
this code means that : work with address 0xC0220000 will be done 0x99 times ( first time skipped due to i=0;j=0; j<i==false) work with address 0xC0220004 will be done 0x98 times ( etc) work with address 0xC0220008 will be done 0x97 times work with address 0xC0220010 will be done 0x96 times
update: I 'm quiting now.my beer takes my mind away
I spend a bit of IDA analysing code from my compilations, and ended with something like that:entryadr=0x800030CFLAGS=-nostdlib -march=armv5te -fno-builtinLDFLAGS=-Wl,-Ttext,$(entryadr)
LDFLAGS=-fno-builtin -nostdlib -Wl,-Ttext,1900is what currently works. I don't know why.
I'm going to try to make the dummy firmware section much smaller next, so it will load faster and leave more free memory.
--- mkfir.c~ 2008-06-03 08:32:31.000000000 -0400+++ mkfir.c 2008-06-03 08:47:26.000000000 -0400@@ -109,7 +109,7 @@ } fclose(pht);- for(q = 0; q < 8192000/sizeof(payload); q++)+ for(q = 0; q < 8192/sizeof(payload); q++) fwrite(payload, sizeof(payload), 1, tmp); fseek(tmp, 0, SEEK_END);
Started by Cuan General Help and Assistance on using CHDK stable releases
Started by nmcconnell « 1 2 » General Discussion and Assistance
Started by Ngobreak General Discussion and Assistance
Started by SergeiA General Discussion and Assistance
Started by Karmaschinken General Help and Assistance on using CHDK stable releases