Wed Aug 31 22:56:42 CEST 2005

CDT 3.0 for Eclipse (II)

This week I have a Linux C kernel coding training course, and I have tried to use the Eclipse CDT 3.0.
After some small projects, I was very impressed. The CDT seems to be very helpfull.
But as we had started to code kernel modules, I had to include the kernel headers.
This was too much for the CDT.
-the indexer does only work sometimes (also the ctags option)
-the outline does sometimes forget some functions
-the include configuration is buggy (discovered pathes, include order...)
-the code assist, jump to declaration and definition works only sometimes

Conclusion:The Eclipse CDT 3.0 is very nice for small projects, but it is not (yet) mature enough to work
with bigger projects or many files (e.g. kernel headers).

Posted by mdietz | Permalink | Categories: C/C++

Mon Aug 29 22:48:12 CEST 2005

nanoblogger GUI 0.91

A small nanoblogger GUI update is available, nanoblogger Gui frontend 0.91.

Changes since 0.9:
-clear console added
-kill running nanoblogger added

have fun....

Posted by mdietz | Permalink | Categories: Nanoblogger

Sun Aug 28 23:09:44 CEST 2005

Nanoblogger GUI Images & Icons

The images and icons in the nanoblogger GUI frontend are not very nice.
I hve draw them with gimp, but I'm not very talented in making graphics.

It would be great, if somebody could provide me some beautyfull images to
make the nanoblogger GUI more attractive.

Thanks in advance

Posted by mdietz | Permalink | Categories: Nanoblogger

Sat Aug 27 17:47:46 CEST 2005

Nanoblogger GUI 0.9 via Java Webstart

I have finished nanoblogger GUI frontend version 0.9.
The new version is available via Java Webstart:
Nanoblogger GUI frontend *Webstart version*
You should read the README file before starting the first time.

The version is also available as a tar.gz package:
Nanoblogger GUI frontend (tar.gz Binary & Sourcecode)

ps:This blog is already created with nanoblogger gui frontend

Posted by mdietz | Permalink | Categories: Other, Nanoblogger

Fri Aug 26 18:36:50 CEST 2005

Nanoblogger GUI Release 0.8a

I have finished the version 0.8a of the nanoblogger GUI frontend.


It supports the following nanoblogger features:
-list entries/categories
-add entry/category
-delete entry/category
-edit entry/category
-move entry to category
-preview
-update
-publish

Nanoblogger GUI Frontend (Java Binary and Source)

Please report bugs to email blog@dietzm.de

Posted by mdietz | Permalink | Categories: Other, Nanoblogger

Fri Aug 26 18:23:08 CEST 2005

First screenshot of the nanoblogger GUI

Here is the first screenshot of the nanoblogger GUI.

Posted by mdietz | Permalink | Categories: Other, Nanoblogger

Fri Aug 26 12:18:03 CEST 2005

Nanoblogger GUI

As you may already know, this weblog is created with nanoblogger.
Description:
NanoBlogger is a small weblog engine written in Bash for the command line.
It uses common UNIX tools such as cat, grep and sed. It's free to use and modify under the GNU General Public License.

But it is sometimes annoying to use a command line programm instead of a gui because on each use:

-you need to start a terminal window :-) ...
-you have to change to the nanoblogger directory...
-you need to know the program parameters...
-you must type a lot of characters...

Thats the reason why I am developing a small GUI Frontend for nanoblogger.
It is in a very early state.When it is more mature,I will post some details here.

Posted by MDietz | Permalink | Categories: Other, Nanoblogger

Wed Aug 24 21:21:27 CEST 2005

Fixing the jtag tools

Next Steps:


Wow , this is a good answer, *bad board design*. Anyway , how do I adjust the BSR register ?

I have to study the jtag basics:
-how does jtag work (TMI,TDO,signals)?
-What is that BSR used for (Boundary Scan Register) ?
-The architecture of the ARM platform (Instruction Register, Data Register ...)

Posted by MDietz | Permalink | Categories: Aireo

Wed Aug 24 21:13:24 CEST 2005

2. Answer from jtag mailing list

And a second answer from Marcel:
Hi Mathias.
On Mon, Aug 15, 2005 at 09:20:40AM +0200, Mathias Dietz wrote:
>          jtag> detect
>          IR length: 5
>          Chain length: 1
>          Device Id: 01101001001001100100000000010011
>            Manufacturer: Intel
>            Part:         PXA250
>            Stepping:     PXA255A0
>            Filename:     /usr/local/share/jtag/intel/pxa250/pxa250c0

>          jtag> discovery
>          Detecting IR length ... 5
>          Detecting DR length for IR 11111 ... 1
>          Detecting DR length for IR 00000 ...         <<------- the board
>          is resetted and turned off  :-(

During EXTEST (00000) the previous content of the BSR is transferred to the
PXA255 pins. While standard usage (as flash programming) we are using
SAMPLE/PRELOAD to set default BSR bit values, but during 'discovery' the
internal defaults are used because 'discovery' has no knowledge about
SAMPLE/PRELOAD instruction code.

It looks like your board has a feature that perfoms reset (or turn-off) of the
board when some value (probably 0) is present on a GPIO (or another pin) of the
CPU. In that case it looks like a bad board design for me. Anyway, if that is
your case you should not use the 'discovery' command. To enable flash
programming you could adjust BSR bit defaults as needed for your board.

Regards.

Posted by MDietz | Permalink | Categories: Aireo

Wed Aug 24 21:10:26 CEST 2005

1. Answer from jtag mailing list

I got an answer from Andrew:
On 8/15/05, Mathias Dietz  wrote:

> But when I start the detectflash or dicovery command, the board resets and
> turns off.

I don`t know your specific hardware, but I`m guessing that something
in the bus driver for the PXA series parts is triggering the behaviour
you see.  Most bus drivers work by shifting in a series of bits that
apply to /all/ the I/O for the CPU and repeating this over and over to
produce valid external read/write signals to the flash.  If this
series of bits happens to set the bits that control a reset/power
off/watchdog for your system, then you would see the behavior
you`re getting.

Hardware, n.:
        The parts of a computer system that can be kicked.

Posted by MDietz | Permalink | Categories: Aireo

Wed Aug 24 19:22:13 CEST 2005

Debugging JTAG <-> Aireo

I tried to debug the JTAG tools using the gdb debugger.
Because the command line interface for gdb is not very nice, I decided to use a graphical debugger.
The CDT for eclipse was my choise and within 30 minutes I found the function call which leads to the board reset:
cfi.c (Common Flash Interface)
function cfi_detect(...)
line #104
write1( CFI_CMD_QUERY_OFFSET, CFI_CMD_QUERY );

After some additional testing and debugging, I wrote a mail to the jtag-tools mailing list:
Mail to the mailing list:
Hi,
I try to flash my pxa255 based board using a selfmade Xilinx DLC5 cable.
The detect and print command runs fine:
jtag> cable parallel 0x378 DLC5
Initializing Xilinx DLC5 JTAG Parallel Cable III on parallel port at 0x378
jtag> detect
IR length: 5
Chain length: 1
Device Id: 01101001001001100100000000010011
  Manufacturer: Intel
  Part:         PXA250
  Stepping:     PXA255A0
  Filename:     /usr/local/share/jtag/intel/pxa250/pxa250c0
jtag> print
 No. Manufacturer              Part                 Stepping Instruction          Register
++-------------------------------------------------------------------------------------------++
   0 Intel                     PXA250               PXA255A0 BYPASS               BR

Active bus:
*0: Intel PXA2x0 compatible bus driver via BSR (JTAG part No. 0)
        start: 0x00000000, length: 0x04000000, data width: 32 bit, (Static Chip Select 0)
        start: 0x48000000, length: 0x04000000, data width: 32 bit, (Memory Mapped registers (Memory Ctl))
But when I start the detectflash or dicovery command , the board resets and turns off.
I have to turn it on the use any JTAG command.
jtag> detectflash
jedec_detect: mid ffffffff, did ffffffff			<<-- the board is resetted and turned off 
Flash not found!
jtag> discovery							<<-- manually turned on the board again
Detecting IR length ... 5
Detecting DR length for IR 11111 ... 1
Detecting DR length for IR 00000 ...				<<-- the board is resetted and turned off 
Some additional infos (might help):
jtag> instruction SAMPLE/PRELOAD
jtag> shift ir
jtag> shift dr
jtag> dr
1001110011111111111111111000000111000000111111110110000000101101111111110000001111111111101101000001100110000100010010110110011111010011001110000110001100000000000
1111100000011110011111110000000000000000000000111000000111100010110000000101001000000100000001101111111100101000000000000000100010010010110001010000000000000111101
111111110110000001011111110011111111101010111100110011001000101100111100010111000000
jtag> get signal BOOT_SEL[0]
BOOT_SEL[0] = 1
I tried jtag tools 0.51 and the current CVS version.

Posted by MDietz | Permalink | Categories: Aireo

Wed Aug 24 18:58:22 CEST 2005

Replace the Aireo firmware using JTAG

I have bought a jtag cable at ebay for 9.95 Euro. With this I'm able to flash the firmware but I need some additional infos about the bootloader and the image.
Is eboot.bin the primary bootloader ? Can eboot.bin boot only wince or is it possible to boot a linux kernel ?
I found the jtag tools (http://openwince.sourceforge.net/jtag/) but my cable is not supported :-)

So, I`m going to solder my own cable based on the description here http://openwince.sourceforge.net/jtag/iPAQ-3600/

After some measuring , I found out , that the JTAG pins are connected with some pins of the connector J11 and I have soldered
the jtag cable on these pins. (the wire on the pxa255 pin is connect to the Debug Serial Port)

I try to flash my pxa255 based board using the selfmade Xilinx DLC5 cable and the JTag tools and it detects the pxa255 ....jippi.
But the flash could not be detected :-( .


Posted by MDietz | Permalink | Categories: Aireo

Wed Aug 24 18:41:58 CEST 2005

Modify the existing firmware (Eboot.bin , Aireo.bin)

MSDN about EBOOT.bin:
For testing purposes, you need to download the boot loader itself before you build an operating system (OS) image. Prior to this procedure, you must create
a boot loader .bib file, which produces Eboot.nb0. Eboot.nb0 is a raw memory boot loader image suitable for writing directly to flash memory through JTAG.
The .bib file also produces Eboot.bin, which is a record-based boot loader image suitable for download from Platform Builder over Ethernet. For more
information about creating the Boot Loader .bib file, see Creating the Boot Loader .bib File.
Note:Creating a test .bin file for download overwrites the currently executing RAM boot loader image. The results are unpredictable if the download
boot loader image does not match the running boot loader image. To prevent the currently executing RAM boot loader image from being overwritten, 
build a test copy of Eboot.bin that resides at a different location in RAM.
To create a test .bin file for download
	1. Create a backup file of your Eboot.bib file.
	2. In the test file, change all memory locations to prevent conflicts with the boot loader currently stored on the device.
	3. At the command prompt, enter the following command to build the new boot loader.

This means that it is not possible to flash the eboot.bin via jtag because the eboot.nb0 is required.
But how can I restore the original firmware when something goes wrong while flashing without having the eboot.nd0?

Posted by MDietz | Permalink | Categories: Aireo

Wed Aug 24 18:28:57 CEST 2005

Accessing the Aireo via WLAN

I've tried to analyze the protocol used for the WLAN synchronizations , but I don't have success, yet.

The WLAN synchronization uses the UDP protocol at the beginning, and after some kind of handshake TCP is used to transfer the data.

It doesn`t look like a well known protocol, seems to be a Aireo specific protocol.


This is send as an answer from the Soniqcast software (bt[xx] identifies the array position):


//inoSsaCq
bt[0]=105; bt[1]=110; bt[2]=111; bt[3]=83; bt[4]=115; bt[5]=97; bt[6]=67; bt[7]=113;
//91ce2d 00
bt[8]=-111; bt[9]=-50; bt[10]=45; bt[11]=0;
//MAC of the PC
bt[12]=0; bt[13]=(byte)0xDD; bt[14]=0xf9; bt[15]=(byte)0xcf; bt[16]=0x8b; bt[17]=(byte)0xb2;
//cmd or cc cc as answer
bt[18]=(byte)0xcc; bt[19]=(byte)0xcc;
//8x 00 (as answer)
bt[20]=0; bt[21]=0; bt[22]=0; bt[23]=0; bt[24]=0; bt[25]=0; bt[26]=0; bt[27]=0;
//32byte name (00 terminiert) rest cc as answer
bt[28]=77; bt[29]=97; bt[30]=116; bt[31]=122; bt[32]=101; bt[33]=66; bt[34]=66; bt[35]=66; bt[36]=101; bt[37]=111; bt[38]=65;
bt[39]=0; bt[40]=(byte)0xcc; bt[41]=(byte)0xcc; bt[42]=(byte)0xcc; bt[43]=(byte)0xcc; bt[44]=(byte)0xcc; bt[45]=(byte)0xcc; bt[46]=(byte)0xcc;
bt[47]=(byte)0xcc; bt[48]=(byte)0xcc; bt[49]=(byte)0xcc; bt[50]=(byte)0xcc; bt[51]=(byte)0xcc; bt[52]=(byte)0xcc; bt[53]=(byte)0xcc; bt[54]=(byte)0xcc;
bt[55]=(byte)0xcc; bt[56]=(byte)0xcc; bt[57]=(byte)0xcc; bt[58]=(byte)0xcc; bt[59]=(byte)0xcc; bt[60]=0;
//mac aireo
bt[61]=(byte)0x1a; bt[62]=(byte)0xa2; bt[63]=(byte)0x18; bt[64]=(byte)0x78; bt[65]=(byte)0x33; //as answer2x cc bt[66]=(byte)0xcc; bt[67]=(byte)0xcc;
//as answer 01 and 11x 00
bt[68]=01; bt[69]=0; bt[70]=0; bt[71]=0; bt[72]=0; bt[73]=0; bt[74]=0; bt[75]=0; bt[76]=0; bt[77]=0; bt[78]=0; bt[79]=0;
//as answer rest is cc
bt[80]=(byte)0xcc; bt[81]=(byte)0xcc; bt[82]=(byte)0xcc; bt[83]=(byte)0xcc; bt[84]=(byte)0xcc; bt[85]=(byte)0xcc; bt[86]=(byte)0xcc; bt[87]=(byte)0xcc;
bt[88]=(byte)0xcc; bt[89]=(byte)0xcc; bt[90]=(byte)0xcc; bt[91]=(byte)0xcc; bt[92]=(byte)0xcc; bt[93]=(byte)0xcc; bt[94]=(byte)0xcc; bt[95]=(byte)0xcc;
bt[96]=(byte)0xcc; bt[97]=(byte)0xcc; bt[98]=(byte)0xcc; bt[99]=(byte)0xcc;




Posted by MDietz | Permalink | Categories: Aireo

Wed Aug 24 18:25:09 CEST 2005

Accessing the Aireo via USB

After mounting the Aireo it is possible to copy files to it using the cp command. But to utilize the the playlist function, I wrote my own command line

tool which copies the mp3 files and creates the corresponding playlist (spl).


AireoCreator

Syntax: Creator <playlist name> <aireo_mount_point> <mp3files...>

Read the ID3 tags of the mp3 files, copies them to the Aireo and creates a playlist file.

AireoRemover

Syntax: Remover <playlist name> <aireo_mount_point>

Delete the playlist file and all contained mp3 files.

AireoConverter

Syntax: Converter <aireo_mount_point> <m3u playlist.....>

Read the ID3 tags of the mp3 files in the m3u playlist, copies them to the Aireo and creates a playlist file.


If you are interested in my programs incl. source code, feel free to contact me.



Posted by MDietz | Permalink | Categories: Aireo

Wed Aug 24 14:06:58 CEST 2005

Aireo Hardware continued ....

RAM
After removing the WinCE Label from the chip , the part number was visible :HY57V561620C
I found this informations:
The HY57V561620C is a 268,435,456bit CMOS Synchronous DRAM, ideally suited for the main memory applications which require large memory density
and high bandwidth. HY57V561620C is organized as 4banks of 4,194,304x16. HY57V561620C is offering fully synchronous operation referenced to a positive edge of the clock.
All inputs and outputs are synchronized with the rising edge of the clock input. The data paths are internally pipelined to achieve very high bandwidth.
All input and output voltage levels are compatible with LVTTL.
Programmable options include the length of pipeline (Read latency of 2 or 3), the number of consecutive read or write cycles initiated by a single control command 
(Burst length of 1,2,4,8 or full page), and the burst count sequence(sequential or interleave).
A burst of read or write cycles in progress can be terminated by a burst terminate command or can be interrupted and replaced by a new
burst read or write command on any cycle. (This pipelined design is not restricted by a `2N` rule.)
-> It seems to be the RAM of the Aireo, not the ROM (where the wince image is stored).

Posted by MDietz | Permalink | Categories: Aireo

Wed Aug 24 14:05:06 CEST 2005

Examine the Aireo Hardware and find the Debug Serial Port


Processor Intel PXA255 Stepping A0 200mhz
GPIO[25]/PIN D9 is the Synchronous Serial Port output,I tried to find out if there is a connection between D9 and the Aireo connector but D9 seems to be pulled down, and my multimeter beeps when it touch ground.
PXA Processor Documentation:
SSP Pins
SSPSCLK/                             Pulled High -           ICOCZ Synchronous serial port clock. (output)                       Note [3] GPIO[23]
SSPSFRM/                             Pulled High -           ICOCZ Synchronous serial port frame. (output)                       Note [3] GPIO[24]
SSPTXD /                             Pulled High -           ICOCZ Synchronous serial port transmit. (output)                    Note [3] GPIO[25]
SSPRXD/                              Pulled High -           ICOCZ Synchronous serial port receive. (input)                      Note [3] GPIO[26]
SSPEXTCLK/                           Pulled High -           ICOCZ Synchronous serial port external clock. (input)               Note [3] GPIO[27]
Also some jtag pins exist:
JTAG and Test Pins
                    JTAG test interface reset. Resets the JTAG/debug port.
                    If JTAG/debug is used, drive nTRST from low to high
                    either before or at the same time as nRESET. If JTAG is    Input In p u t
nTRST           IC
                    not used, nTRST must be either tied to nRESET or tied
                    low.
                    JTAG test data input. (input) Data from the JTAG
TDI             IC  controller is sent to the PXA255 processor using this pin. Input In p u t
                    This pin has an internal pull-up resistor.
                    JTAG test data output. (output) Data from the PXA255
TDO             OCZ processor is returned to the JTAG controller using this    Hi-Z  Hi-Z
                    pin.
                    JTAG test mode select. (input) Selects the test mode
TM S            IC  required from the JTAG controller. This pin has an         Input In p u t
                    internal pull-up resistor.
                    JTAG test clock. (input) Clock for all transfers on the
TCK             IC                                                             Input In p u t
                    JTAG test interface.
TES T           IC  Test Mode. (input) Reserved. Must be grounded.             Input In p u t
TESTCLK         IC  Test Clock. (input) Reserved. Must be grounded.            Input In p u t

Bingo ! I found this on a website about PXA255:
# COM1 is the PXA255 FFUART and is configured as either 9-wire RS232 or RS485/422.
# COM2 is the PXA255 BTUART and is configured as either 5-wire RS232 or RS485/422.
# COM3 is the PXA255 STUART and is dedicated as the 3-wire RS232 debug serial port. <<<------ this is our debug port !!
Identified ICs
28f640k seems to be a flash memory chip (Intel Strata Flash)
Phillips TEA5767 is used for the fm radio (not fm sender)
STMicroelectronics M41T80 used as RTC
AD1981B - AC'97 SoundMAX® Codec -
BH1415S/F are FM stereo transmitter ICs that transmit simple configuration.
ISL6291-2CR-ND Battery Changer
LM81 CIMT-3 Serial Interface ACPI-Compatible Microprocessor System Hardware Monitor
Texas Instruments ???-2111 Dual In/Single Out Autoswitching Power MUX, Manual/Auto Sw, Adj. Cur Limit, Adj. Vol Threshold
Unknown ICs
866-343-N 8-Pin->OP?!
S51B 5-Pin
S22T 6-Pin
D741649BGGU BGA
D120-18 6-Pin
61-c 5-Pin
DOVD-19 6-Pin
K8nr1-or-k6nr1 6-pin
KNR6 6-Pin
Epson_F811000R20 48?-Pin
AT00 5-pin
X?-JCPD 6-pin

Serial Debug Port
There must be a serial transceiver to convert th 3,3V signal to 12V RS-232 ,but I cant find one :-(.



Posted by MDietz | Permalink | Categories: Aireo

Wed Aug 24 13:52:46 CEST 2005

Replacing the Aireo firmware (WinCE) with Linux

Some results from my investigations (unstructured):

-There are no common TCP ports open to access the Aireo

-The Aireo does not send any WLAN packages on boot , so a remote boot seems to be not possible. But the

eboot.bin contains strings like "TftpReceiver, port: 0x%X, wkp: 0x%X\n\r" which indicates that it has a way

to receive something (firmware?) over network (maybe IP over USB ,not the WLAN).

- I tried RNDIS but I can`t get is running. Also a USB Monitor doesn`t show any bootp, tftp, debug or log messages.

- Eboot.bin Aireo.bin contains the firmware , eboot.bin seems to be basically the same for all WinCE devices


Posted by MDietz | Permalink | Categories: Aireo

Wed Aug 24 13:33:07 CEST 2005

Read/write Aireo Playlists (SPL files)

I've examined the Aireo playlist format to write a program for Linux. I found out that the Aireo playlist files have a binary format.
After some research, I was able write my own SPL parser. Here is a java code snippet of the SPL parser:
SPL Parser code snippet
Soniqcast does not support playlist’s for files on the SD card, but it is possible (write SPL files with mp3 files on \Disk and \StorageCard).
The playlist file itself must lay on the disk in the playlist folder.

Posted by MDietz | Permalink | Categories: Aireo

Wed Aug 24 13:11:19 CEST 2005

Hacking the Soniqcast Aireo MP3 Player

The Soniqcast Aireo mp3 player is a very nice thing , but unfortunately the required software to manage the Aireo is only for windows :-(.

So I´ve planned to do some research with the following goals:


1) write a application to manage the Aireo with Linux (using java)

  • command line tools for creating playlists (done)

  • copy mp3 files via USB under Linux (done)

  • copy mp3 files via WLAN (todo)

  • Full featured GUI for Aireo management (in progress)

2) replace the Aireo firmware with a Linux based firmware

  • examine the Aireo hardware (done)

  • find a way to boot an other system (in progress)

  • find a way to flash an other bootloader using jtag(in progress)



Posted by MDietz | Permalink | Categories: Aireo

Wed Aug 24 12:58:31 CEST 2005

CDT for Eclipse 3.0

The CDT 3.0 for Eclipse has been released.
After downloading , I have imported the jtag tools project into the workspace.
Tried the following features:
-Managed Make Project
-Standard Make Project
-C/C++ Indexing
-Open Declaration (F3)
-Open Definition (CTRL-F3)
-Run
-Debugging (set breakpoints, read variables ...)


Works fine :-)

Posted by MDietz | Permalink | Categories: C/C++

Wed Aug 24 10:30:58 CEST 2005

Upgrade to Nanoblogger 3.2.3

I've updated my nanoblogger to the version 3.2.3

Posted by MDietz | Permalink | Categories: Other, Nanoblogger