bad crc when trying to flash application

Craig Comstock craig_comstock at
Wed Oct 2 04:12:57 UTC 2013

I was able to get most of this working on the C139 but can't get an app to start when I power the phone on after flash programming.

I connect the phone via usb and do 

minicom --device /dev/ttyUSB0

with either short power press or a long one in minicom I get:

�A at ftmtoolerror

and the screen turns white on the phone.

I copied the from compal_e88 and added to compal_e86 as well as the Makefile in firmware. Modified things to reflect the larger amount of flash (4mb instead of 2mb) even though this probably doesn't matter a whole lot.

I then program the C139 like this:

host/osmocon/osmoload memdump 0x000000 0x2000 compal_loader.bin
host/osmocon/osmoload funlock 0x000000 0x10000
host/osmocon/osmoload ferase 0x000000 0x10000
host/osmocon/osmoload fprogram 0 0x000000 compal_loader.bin
host/osmocon/osmoload fprogram 0 0x002000 target/firmware/board/compal_e86/hello_world.e86loader.bin

I tried other apps like loader and rssi to the same effect.

target/firmware/Makefile additions:

ENV_e86loader_OBJS=board/compal/start.rom.o board/compal/header.o board/compal/exceptions_redirect.o

ENV_e86flash_OBJS=board/compal/start.rom.o board/compal/header.o board/compal/exceptions_redirected.o board/compal/handlers.o


    /* 4 MBytes of external flash memory */
    FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x400000
    /* 256 kBytes of internal zero-waitstate sram */
    IRAM  (rw) : ORIGIN = 0x00800000, LENGTH = 0x040000
    /* 256 kBytes of external slow sram */
    ERAM  (rw) : ORIGIN = 0x01000000, LENGTH = 0x040000

I was able to grab the first three flash pages (I cleared three pages to make room for trying rssi fw) from another c140, reprogram them, and the phone starts fine with stock firmware again.

I assume that a long power press causes a jump to 0x2000. Am I right?

If that's not the case then I would suppose I would need to write a firmware which loads at 0x000000, injects the magic value at 0x83ce0 and then continues with code as normal.


 From: Sylvain Munaut <246tnt at>
To: Andreas <anmu at> 
Cc: baseband-devel <baseband-devel at> 
Sent: Monday, September 30, 2013 1:03 PM
Subject: Re: bad crc when trying to flash application

> bad crc 9bf1 (not e0bc) at offset 0x00000000
> status 5242976, aborting

Make sure to use the very latest git. A patch was very recently pushed
wrt to this.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the baseband-devel mailing list