Hi,
I've played a bit with osmocom on a C155 here, but there seems to be an issue with the UART/puts/printf code somewhere. I'm using latest git as of today.
$ src/host/osmocon > ./osmocon -m c155 -p /dev/ttyUSB0 ../../target/firmware/board/compal_e99/hello_world.bin
got 2 bytes from modem, data looks like: 00 00 got 5 bytes from modem, data looks like: 1b f6 02 00 41 got 1 bytes from modem, data looks like: 01 got 1 bytes from modem, data looks like: 40 Received PROMPT1 from phone, responding with CMD read_file(../../target/firmware/board/compal_e99/hello_world.bin): file_size=18560, hdr_len=4, dnload_len=18567 got 1 bytes from modem, data looks like: 1b got 1 bytes from modem, data looks like: f6 got 1 bytes from modem, data looks like: 02 got 1 bytes from modem, data looks like: 00 got 1 bytes from modem, data looks like: 41 got 1 bytes from modem, data looks like: 02 got 1 bytes from modem, data looks like: 43 Received PROMPT2 from phone, starting download handle_write(): 4096 bytes (4096/18567) handle_write(): 4096 bytes (8192/18567) handle_write(): 4096 bytes (12288/18567) handle_write(): 4096 bytes (16384/18567) handle_write(): 2183 bytes (18567/18567) handle_write(): finished got 1 bytes from modem, data looks like: 1b got 1 bytes from modem, data looks like: f6 got 1 bytes from modem, data looks like: 02 got 1 bytes from modem, data looks like: 00 got 1 bytes from modem, data looks like: 41 got 1 bytes from modem, data looks like: 03 got 1 bytes from modem, data looks like: 42 Received DOWNLOAD ACK from phone, your code is running now!
Hello World from apps/hello_world/main.c program code
At this point there seems to be a hang. However, it looks like the LCD is being partially initialized (?), at least the backlight is enabled and there's a white screen (no "Hello world" on it though). I assume this is because the display driver for C155 is not yet fully merged?
Also, the wiki says "The LCD controller inside the display is a Ultrachip UC1682", is this really correct? The code has "ssd1783" as display driver name.
Anyway, after removing a newline and some print functions I see some more output (see attached patch for what I changed), which is why I expect a problem in puts/printf, the UART, or the \n handling etc:
$ src/host/osmocon > ./osmocon -m c155 -p /dev/ttyUSB0 ../../target/firmware/board/compal_e99/hello_world.bin got 7 bytes from modem, data looks like: 1b f6 02 00 41 01 40 Received PROMPT1 from phone, responding with CMD read_file(../../target/firmware/board/compal_e99/hello_world.bin): file_size=18404, hdr_len=4, dnload_len=18411 got 1 bytes from modem, data looks like: 1b got 1 bytes from modem, data looks like: f6 got 1 bytes from modem, data looks like: 02 got 1 bytes from modem, data looks like: 00 got 1 bytes from modem, data looks like: 41 got 1 bytes from modem, data looks like: 02 got 1 bytes from modem, data looks like: 43 Received PROMPT2 from phone, starting download handle_write(): 4096 bytes (4096/18411) handle_write(): 4096 bytes (8192/18411) handle_write(): 4096 bytes (12288/18411) handle_write(): 4096 bytes (16384/18411) handle_write(): 2027 bytes (18411/18411) handle_write(): finished got 1 bytes from modem, data looks like: 1b got 1 bytes from modem, data looks like: f6 got 1 bytes from modem, data looks like: 02 got 1 bytes from modem, data looks like: 00 got 1 bytes from modem, data looks like: 41 got 1 bytes from modem, data looks like: 03 got 1 bytes from modem, data looks like: 42 Received DOWNLOAD ACK from phone, your code is running now! Device ID code: 0xb4fbDevice Version code: 0x0000
Here it hangs after the newline in the "Device Version code" line.
Any ideas what the problem could be?
Thanks, Uwe.
At this point there seems to be a hang. However, it looks like the LCD is being partially initialized (?), at least the backlight is enabled and there's a white screen (no "Hello world" on it though).
same here... l1test.bin and others run on c123 but not on c155
nico
Hi all,
On Thu, Mar 11, 2010 at 06:15:57PM +0100, nicolho wrote:
At this point there seems to be a hang. However, it looks like the LCD is being partially initialized (?), at least the backlight is enabled and there's a white screen (no "Hello world" on it though).
same here... l1test.bin and others run on c123 but not on c155
I've never tested the C155 images after merging the LCD drivers, so that might be a candidate to check for. Another suggestion is the introduction of multi-device builds (i.e. that we build compal_e88 and compal_e99 separately).
Hope this will point you in the right direction to identify the cause.
Regards, Harald
Hi,
Harald Welte wrote:
I've never tested the C155 images after merging the LCD drivers, so that might be a candidate to check for. Another suggestion is the introduction of multi-device builds (i.e. that we build compal_e88 and compal_e99 separately).
Hope this will point you in the right direction to identify the cause.
This problem was caused since the apps tried to write to the C123 display, and the display driver couldn't access I2C properly since it had been initialized as UWire on the C155 after we introduced separate images for the boards.
I have implemented a simple layer for abstracting the display drivers on both targets, which you can find in my /pending branch.
Putting a string on the display now works on both targets with display_puts();
The latest commit in my branch is adding a chip-select for the display which is tested on the C155 and the J100i.
Regards, Steve
Hi Steve,
On Thu, Mar 11, 2010 at 10:26:58PM +0100, Steve Markgraf wrote:
This problem was caused since the apps tried to write to the C123 display, and the display driver couldn't access I2C properly since it had been initialized as UWire on the C155 after we introduced separate images for the boards.
ah, of course.
I have implemented a simple layer for abstracting the display drivers on both targets, which you can find in my /pending branch.
I've decided to implement this in a different way (see master branch), allowing for run-time driver selection. We've been talking about heading for building only one set of images for the compal phones and doing runtime detection of E88 / E99 board.
The 'struct display_driver' approach already prepares for this by not introducing further board-specific compilation differences.
Putting a string on the display now works on both targets with display_puts();
same is now true not for current master, at least it works on my phones.
The latest commit in my branch is adding a chip-select for the display which is tested on the C155 and the J100i.
I've cherry-picked that, thanks.
Cheers, Harald
baseband-devel@lists.osmocom.org