THE WAKE UP CHANNEL
Go to bottomPage: 12345
TOPIC:
#1907
Re: R&D and Open-source support 3 Years, 9 Months ago Karma: 0
Unless Zilog specifically develops for a Wine target, and did validation testing on Wine, I think running ZDS II under Wine is a crap shoot. It has been more than 10 years since I first started using ZDS II, and I used ZDS 3.68 before there were eZ80 and Z8 Encore. And, I did multiple production designs based on eZ80 and Z8 Encore.

I met some of the Zilog XTools engineers back in 2002 during a visit to Zilog headquarters in San Jose. At the time, there were grand ideas of migrating to a single toolchain, which ideally would run under Eclipse. But that never happened. At this point, I think if Zilog really were interested in a solid solution which would run under Linux, they would be wise to first target CrossOver (from Codeweavers) for their development and testing, with their existing ZDS II code base. But beyond that, there are very slim choices for running solid native apps on Linux (or FreeBSD for example).

Since 2002, the Atmel AVR overtook the Z8 Encore (which at the time was revolutionary with its level of peripheral integration), because there was a binutils port and eventually GCC for the AVR. I still can't understand why there was never any apparent effort (by anyone, nor by Zilog for that matter) to bring up binutils for Z8 Encore, or eZ80, or ZNEO product lines -- and especially GCC. Even today, it would still give these products a much better fighting chance for sales, design wins, and continued/increased success.

Anyway, for a programming solution, I think someone could use pySerial (pyserial.sourceforge.net/) with much better results. However, you'd need to invoke it post-build, assuming the compiler and linker work as expected in the hybrid Wine environment. Unfortunately, I think Zilog has really fallen short on involving or facilitating any 3rd-party integration or plugin facility for ZDS-II in particular. For example, when I inquired specifically about this (recently, within the past 2 years or so), I was told I would need to talk to their VP of Engineering. Meanwhile their web pages listing 3rd-party consultants have also completely vanished.

There's another possibly related thread, 'Integrating ZDSII with 3rd party tools/ Eclipse' here:
www.zilog.com/index.php?option=com_forum...;catid=5&id=1905

And really, I'm not just ranting -- I have done multiple Zilog-MCU-based production designs, and developed custom programming solutions for the Zilog ZDB serial interface for 2 separate employers in the past 10 years. The first one I did a reference implementation in C, which was later converted to C# in a multithreaded configuration, which would program up to 16 devices concurrently, in tiled windows, and flash when the corresponding cable was ready to be plugged to the next un-programmed board. The second one was a Java Webstart application which used the Java SerialPort library (from Serialio.com), and could be started/run either from a network within our facility or externally from a web portal by a contract manufacturer.

A roll-your-own programming solution is probably a few days of effort from scratch if you have a Z8 Encore data sheet, and study the protocol specs.
Douglas Beattie (User)
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
Location: Greater Salt Lake Area, Utah, USA
The administrator has disabled public write access.
 
#1898
Re:R&D and Open-source support 3 Years, 11 Months ago Karma: 2
An update to this thread for completeness:

I have had another go at running ZDS II Encore IDE under Wine in Linux and believe I have solved connecting to the Serial Smart Cable. Details as follows:

Linux distribution: Mint Release 13 (Maya)
Linux kernel: 3.2.0-23-generic running on AMD Athlon II X2 260
Wine version: 1.4
ZDS II Versions tested : eZ8 Encore 4.11 and 5.0

Initially, the PC was powered up first, the smart cable connected and then the target board powered up. However, the IDE would not connect to the Serial Smart cable at all.

After some searching, I realised that for Wine to connect Windows COM1 to the Linux serial port (/dev/ttyS0), wine had to be correctly configured. I went into the appropriate wine directory which contains the dos device mappings:

Code:

$ cd .wine/dosdevices


and then listed the symlinks showing the mapping ("user" will be replaced by your actual login name):

Code:

user@user:~/.wine/dosdevices$ ls -l
total 0
lrwxrwxrwx 1 user user 10 Apr 23  2011 c: -> ../drive_c
lrwxrwxrwx 1 user user 10 Apr 23  2011 com1 -> /dev/ttyS0
lrwxrwxrwx 1 user user 10 Apr 23  2011 com2 -> /dev/ttyS1
lrwxrwxrwx 1 user user 11 Apr 23  2011 d: -> /media/disk
lrwxrwxrwx 1 user user  9 Apr 23  2011 d:: -> /dev/sdg1
lrwxrwxrwx 1 user user  9 Sep 22  2011 e:: -> /dev/sdd1
lrwxrwxrwx 1 user user  8 Dec 23  2012 f:: -> /dev/sr0
lrwxrwxrwx 1 user user  1 Apr 23  2011 z: -> /
user@user-desktop:~/.wine/dosdevices$ 



As can be seen, COM1 is correctly mapped.

As I still could not connect, it occurred to me that I had to belong to the same group as the serial port. This is checked via the ls command:

Code:

$ ls -al /dev/ttyS*
crw-rw---- 1 root dialout 4, 64 Jul 17 22:42 /dev/ttyS0
crw-rw---- 1 root dialout 4, 65 Jul 17 19:17 /dev/ttyS1



I attached my user ID to the dialout group:

Code:

$ sudo gpasswd -a user dialout


I fired up Wine and ZDS II again and this time, I was at least able to get ZDS to detect the smart cable but was unable to connect to the target. Any attempt to connect would get an instantaneous error message:

Code:

Target read/write error. (ERR_DTLI_SERIAL_ERROR)


I then logged out and back in and found that this time, ZDS would try and connect with the progress bar getting to 38% before the same error message would appear. I tried various serial port speed settings in the Project/ Settings/ Debugger menu in ZDS without luck using the "setserial" command in Linux to check the serial port settings matched ZDS:

Code:

$ setserial -a /dev/ttyS0
/dev/ttyS0, Line 0, UART: 16550A, Port: 0x03f8, IRQ: 4
Baud_base: 115200, close_delay: 50, divisor: 0
closing_wait: 3000
Flags: spd_normal skip_test



This appeared to have no effect and I eventually switched off the PC after many failed attempts.

I returned to try my luck again today and this time, the target board and serial smart cable were powered up and connected to the PC before switching the PC on. The system worked first time with ZDS detecting the serial smart cable, connecting to the target and set up ready for debugging the already loaded code (Blinking LED test program). Apparently, the Debugger serial port speed settings don't affect connecting to the target.

In summary:

1. Power up smart cable and target board before switching PC on.
2. Check that wine correctly maps COM1 to your selected Serial port.
3. Make sure you belong to the same group (usually "dialout") as the serial port.
4. Check that the serial port exists and is configured correctly using the "setserial" command.

If someone can verify what I have done, then it would make this a workable solution for ZDS under Linux/ Wine.
MK (User)
Senior Boarder
Posts: 74
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#865
Re:R&D and Open-source support 5 Years, 10 Months ago Karma: 0
There is also the device driver library at ddrz8e.sourceforge.net.
Nils Paulsson (User)
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#772
Re:R&D and Open-source support 6 Years ago Karma: 0
Running ZDS under Linux and Wine, I've only had success using the ethernet smart cable. Gave up trying to get serial cable to work; other more important things to debug than that.
td (User)
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#732
Re:R&D and Open-source support 6 Years, 1 Month ago Karma: 2
I did some searching on the web for Linux tools and found this:

http://z8encore.sourceforge.net/

The description of the tools (copied from the site) are:

ez8mon
This is a command-line debugger that is used during code development. This tool can download code to the device, set breakpoints, single step code, view memory, alter memory, disassemble code, and other tasks commonly found in debuggers.
flashutil
A command-line utility to program code into the flash of a device. This program has a multi-pass mode which allows several devices to be programmed consecutively with little intervention. This tool could be used on a production assembly-line.
crcgen
A command-line utility to calculate the CRC-CCITT checksum of data in an intel hexfile. This can be used to compare against the hardware CRC checksum returned by the on-chip debugger.

They are designed for the Serial and Ethernet smart cables. I managed to get these to compile under Ubuntu 8.04 after downloading specified libraries and tweaking of one file, however, on running, I was unable to connect to the Serial smart cable. I tried both serial ports on my machine and neither worked so I'm not sure what the problem is though I don't think it is the software as the serial ports work under Windows.
MK (User)
Senior Boarder
Posts: 74
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#716
Re:R&D and Open-source support 6 Years, 2 Months ago Karma: 2
Tried the USB Smart Cable and it failed even though Linux can see it OK. Seems there is a problem with the USB cable and the Serial smart cable will work if a USB to Serial converter is used. See:

www.frihost.com/forums/vt-100722.html

The only reliable option seems to be an Ethernet smart cable .
MK (User)
Senior Boarder
Posts: 74
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 12345
The Sample Center is managed separately
from Zilog's Customer Support services,
and therefore requires a separate login.
Acknowledged! Take me to the Sample Center.
Disable this pop-up in the future.