Hello,
I have problems flashing applications to the motorola c123. I tried it with several phones. Booting and running applications via USB is working well, but unfortunately flashing does not work. Following both of the tutorials (flashing and flashing_new) the command "host/osmocon/osmoload fprogram 0 0x010000 compal_loader.bin" outputs:
Loading 8192 bytes of memory at 0x10000 in chip 0 from file compal_loader.bin
bad crc 9bf1 (not e0bc) at offset 0x00000000 status 5242976, aborting
The memdump-command seems to work - I get a file compal_loader.bin with an md5sum of f59dee5a67b4114251acd0d279eacd85. The "funlock" and "erase"-command seemed to be successful, according to the output of osmocom ("Unlocking block at 0x00010000, meaning 00010000", "Erasing block 0x00010000...done") and the fact, that the original firmware does not load anymore, when erased :-)
I am using debian 6.0 (32bit) with a cross-compile-environment setup as described on http://bb.osmocom.org/trac/wiki/GnuArmToolchain to compile osmocom. The libosmocore has Patch 5b6416a729b46aab8ac7ea25a7ec91f3afeaf4fc (latest master-Branch), but I am using commit f2ab5e14967426f4845b51def4d9105af22f9ad2 from the master-branch of osmocom, because with the latest version of osmocom, the phones would not boot - I get only an output of "got 2 bytes from modem, data looks like: 04 81 ..", then osmocom exits. The motorola c123 is connected via USB-Hub and an CP2102-Cable I got from sysmocom.
Could anybody please give me a where the error is or what else I can try to solve the problem. Thanks for help.
greetings,
Andreas
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@ftmtoolerror
and the screen turns white on the phone.
I copied the loader.lds 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_LDS=board/compal_e86/loader.lds ENV_e86loader_OBJS=board/compal/start.rom.o board/compal/header.o board/compal/exceptions_redirect.o
ENV_e86flash_LDS=board/compal_e86/flash.lds ENV_e86flash_OBJS=board/compal/start.rom.o board/compal/header.o board/compal/exceptions_redirected.o board/compal/handlers.o
target/firmware/board/compal_e86/loader.lds
/* 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.
Thanks, Craig
________________________________ From: Sylvain Munaut 246tnt@gmail.com To: Andreas anmu@etc-network.de Cc: baseband-devel baseband-devel@lists.osmocom.org 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.
Cheers,
Sylvain
I thought that having the debug cable plugged in might have affected things but it seems that is not the case.
I also noticed something strange. When I plug in the battery the screen goes to white without me even pressing the power key. Could this be because the normal phone might jump to 0x2000 when the battery is plugged in? I know that a special screen is shown when the power supply is plugged in as well.
Maybe the white screen is the first steps of LCD initialization and somehow things are going wrong after that.
I will test the hello_world compalram/highram firmwares and ensure they work properly.
Thanks, Craig
baseband-devel@lists.osmocom.org