ZDS II - S3 Family 5.5.0 (Build 23013001) ============================================================================== The technical documentation supplied in the installation is available in PDF format. This format requires that Acrobat Reader or equivalent be installed on the host machine. In the event of a component problem, please complete the Problem Report Form and submit it with your request. The form is located in the installa- tion directory of your hard drive. Our staff will use the information to diagnose or log the problem. Contact Information -------------------------------------------------------------------------- Zilog Inc. Web Site: http://www.zilog.com Technical Support Channel: http://support.zilog.com Table of Contents -------------------------------------------------------------------------- A. CHANGES FROM PREVIOUS RELEASES B. COMPATIBILITY C. SYSTEM REQUIREMENTS D. APPLICATION AND OTHER OS ISSUES E. P & L (PRECAUTIONS AND LIMITATIONS) F. CLOSED CHANGE REQUESTS G. OTHER OPEN ISSUES (NOT RECORDED AS CHANGE REQUESTS) A. CHANGES FROM PREVIOUS RELEASES ============================================================================== (to 5.5.0 Build 23013001) - Assembler, Compiler, and Linker bug fix maintenance release to reduce the frequency of P1 and P2 Internal Errors and make.exe faults (make aborts after displaying a cryptic large negative error code). Other bug-fixes described in the following bullets. For more information, see the CLOSED CHANGE REQUESTS section. - The assembler was also modified to replace JR and/ or JRcc instruction mnemonics with JP/ JPcc in instances where the target displacement can't be encoded as a signed 8-bit value. - Corrected false detection of stack underflow events in instances where an interrupt service routine executes while the stack-checking code in a foreground task was manipulating the PP register. - New compiler Warning message 229 - "Unreferenced Label" and Error message 47 - "Definition of macro exceeds the maximum length". Note that Warning 229 is generated at the end of the function containing the unreferenced label and that the warning is only generated for the last such label in the function due to the compiler automatically suppressing generation of multiple identical preprocessor and frontend warning or error messages for the same line of code. - Run Time Library (RTL) updates to correctly detect end of string (EOF=-1) markers and allow the use of P0 and PX space qualifiers to access objects on Page 0 and PageX and PageX_d objects. - A major improvement of ZDSII framework that includes: <> A more modern look-and-feel like MS Visual Studio. <> New window docking mechanism with a diamond guide makes it easier to reposition the windows as compared to the sticky visual layout in the ZDSII prior 5.5.0. <> You can even group/dock any window to another docking window or the tab document area. <> You can auto hide any docking window <> The context menu on a tab document allows to close the active document, close all documents, cloc all Document but the active, copy the path of the active document to the clipboard or open the containing folder. - Addressed issue with Chinese Windows in which ZDSII does not appear on startup but stay in the background. - Fixed the build/rebuild issue when pathname includes a hyphen (CR13488) - Allowed project settings dialog to be resized to a smaller size. - Added a message in status bar to indicate the intellisense databe is updating when "Update Code completion Database" is selected. - Updated the S3 Flash ISP II firmware to version 2.1 to make it more resistant to unexpected power failures. To prevent the ISP from becoming unusable, the power cable should never be disconnected while a firmware upgrade operation is in progress. In some instances, it might be possible to recover the ISP Firmware should an unexpected power failure occur. For more information, refer to the ISP Firmware Upgrade document (S3FlashISP_Upgrade_Information.pdf) located in the \bin\firmware folder. (to 5.4.0 Build 18023801) - Typical applications written in C should see a significant code size reduction compared to the 5.3.X releases. This applies to projects that use enough data space so that all variables cannot be placed on RAM page zero, which includes most real world applications. Before release 5.4.0, these projects had to be built using the Small Memory Model in ZDS II. Now the Tiny Memory Model has been extended to support these projects, which will lead to significantly better code density. Code size reductions of 10% to 30%, compared to 5.3.0, have been obtained in real world applications. For more information, see the On-Line Help section Using the ANSI C-Compiler > Language Extensions > Memory Models and the FAQ Compiler > How can I best use the ZDS Memory models at different stages of development? - Several other optimizations have been added to the compiler to reduce the generated code size. These should lead to an overall code size reduction even for applications that do not use the new extension of the Tiny Memory Model, though the reduction will be less dramatic. - An alternative algorithm for the packing of bit-fields into structures has been implemented. This provides compatibility with the alignment of bit- fields used by some non-Zilog tools. See the On-Line Help section Using the IDE > Menu Bar > Project Menu > C: Advanced Page > Bit-field Packing for details. - In C projects, support for "large objects", namely arrays or structs greater than 192 bytes, has been made optional (and is disabled by default). This will result in a code size savings for most applications, which have no need of this feature. - Added printf_demo sample projects for select S3 devices. These projects show how applications written in “C” can use the compiler’s printf run-time library (RTL) to send formatted text over a physical UART or the S3 Flash ISP II software input/output (SWIO) interface to a terminal program running on a Windows PC. The SWIO interface can be used on any S3 device for which an enhanced ISP debug library is provided. However, the SWIO interface cannot be used for printf support while the application is being debugged with ZDS. Refer to one of the printf_demo sample projects for more information. - Updated the S3 Flash ISP II firmware to version 1.8 to support using the S3 Console to display application generated printf messages when the S3 Flash ISP II is not being used to debug the target. - IDE FW Upgrade tool updated to support S3 Flash ISP II FW v1.8. - In the map file created by the linker, segment names are no longer truncated, making the map file a little easier to use. (to 5.3.2 Build 17081801) - Fixed the Project > Settings issues (incorrect header and missing selections) - Added S3F81RB support - Linker was updated for Group and Range commands - Fixed Linker crashing on some projects with long filenames. - Improved the S3 Boot Loader library to allow reprogramming the interrupt vector table using information in the downloaded Hex File. Previously the Boot Loader library would not reprogram Flash address below the (configurable) value of Application Start Address, including the interrupt vector table located between 0x00 and 0xFF. As a result of this change, the Boot Loader now reserves Flash memory between 0x100 and Application Start Address -1 (versus 0x00 to Application Start Address -1 previously). However, this causes the default value of Application Start Address to increase to 0x480 (from 0x400 previously). - Modified the syntax of the Linker RANGE command to support an optional PAD parameter when used to specify the lower and upper address limits of a segment. For example: RANGE _BL_CodeSeg_ PAD $100 : $47F. The PAD optional parameter prevents the linker from placing other relocatable segments in the padded range. This feature is now used to ensure relocatable application code (and initialized data) segments are not placed in the Boot Loader reserved area of Flash. - Updated the S3 Flash ISP II firmware to version 1.7 to correct a hang (yellow LED off) observed when attempting to program or debug target externally powered devices operating near their Low Voltage Reset (LVR) threshold, and/or with a shared reset pin configured such that the reset function of the pin is disabled. The firmware fix will not allow devices in this state to be programmed or debugged; it only prevents having to disconnect and reconnect the S3 Flash ISP II USB cable from the PC running ZDS to restore normal operation. - Added Firmware version 1.7 to \bin\firmware\S3FlashISPII directory The Firmware Upgrade procedure is described in: \bin\firmware\S3FlashISP_upgrade_information.pdf - Fixed a typo in the header file s3.h which was causing the SFRs TCCNT, TCDATA, and TCCON to be mistakenly defined for the S3F8S8B instead of the S3F8S6B as they should have been. - Updated OLH/Documentation for Bootloader topics B. COMPATIBILITY ============================================================================== Devices -------------------------------------------------------------------------- Please refer to the ZDS Help > Help Topics > Contents > Zilog Developer Studio II Help > Introduction > ZDS II System Requirements > S3 Product Support for the latest supported devices. S3 Flash ISP Driver -------------------------------------------------------------------------- USB device drivers can be found in the following location: \device drivers\USB\ ******************** Important! *************************** The Device Driver installer need to be run as Administrator OPENice-i2000 Driver -------------------------------------------------------------------------- The driver is included in the OPENice-SLD IDE Software and can be found in the following location: C:\OPENice\Drv Debug Tool -------------------------------------------------------------------------- S3 FLash ISP (S3USBISP000ZACG rev B or earlier) S3 FLash ISP II (S3USBISP000ZACG Rev C or later) OPENice-i2000 S3 Flash ISP Firmware -------------------------------------------------------------------------- Please refer to the S3FlashISP_upgrade_information.txt located in the following directory for information: \bin\firmware +-----------------+--------------+-----------------+-------------------+ | | Firmware | ZDS-S3 | | | Debug Tool | Version | Version | Notes | |-----------------+--------------+-----------------+-------------------| | S3 Flash ISP I | 1.2 or lower | 5.2.0 or Higher | Not supported in | | | | | this release. See | | | | | Note #1 | |-----------------+--------------+-----------------+-------------------| | S3 Flash ISP II | 1.4 or lower | 5.2.3 or Lower | See note #2 | |-----------------+--------------+-----------------+-------------------| | S3 Flash ISP II | 1.5 or Higher| 5.3.0 or Higher | See note #3 | |-----------------+--------------+-----------------+-------------------| | S3 Flash ISP II | 1.6 or Higher| 5.3.1 or Higher | See note #4 | |-----------------+--------------+-----------------+-------------------| | S3 Flash ISP II | 1.7 or Higher| 5.3.2 or Higher | See note #5 | |-----------------+--------------+-----------------+-------------------| | S3 Flash ISP II | 1.8 or Higher| 5.4.0 or Higher | See note #6 | +-----------------+--------------+-----------------+-------------------+ Note #1 - Please contact the factory or Technical support for a FREE replacement S3 FLash ISP II. #2 - Need to upgrade to FW 1.5 or higher and use ZDS 5.3.0 or higher. #3 - Added a SWIO Debug mode of operation and new ISP commands to enable ZDS enhanced debugging over the 10-pin ISP ribbon cable. #4 - Added S3FC40D Flash Programming Support. #5 - Modification to avoid ISP II firmware hang when attempting to program or debug a target device without a nRESET pin #6 - support using the S3 Console to display application generated printf messages when the S3 Flash ISP II is not being used to debug the target. C. SYSTEM REQUIREMENTS ============================================================================== Supported Operating Systems (Validated) -------------------------------------------------------------------------- Windows XP 32-bit (SP3) Windows 7 32 and 64-bit Windows 8 32 and 64-bit Windows 10 32 and 64-bit D. APPLICATION AND OTHER OS ISSUES ============================================================================== 1. Apply the latest Windows updates to the host system when appropriate. 2. Updated the S3 Flash ISP Windows Driver Package to use a SHA-256 code signing certificate for greater security. This could cause Windows 7 users to have to click the ”Always trust software from Zilog Inc” checkbox multiple times during the S3 Flash ISP II driver installation even though the “Always trust” checkbox was previously clicked. To correct this issue Microsoft recommends installing the hot fix described in KB2921916: https://support.microsoft.com/en-ca/help/2921916/the-untrusted-publisher- dialog-box-appears-when-you-install-a-driver-i This issue does not occur with Windows 8 or Windows 10. E. P & L (PRECAUTIONS AND LIMITATIONS) ============================================================================== User Manuals -------------------------------------------------------------------------- 1. The S3 FLash ISP Device driver is now installed as an option at the end of ZDS installation. This replaced the procedure in the Development Kit Users Manual. Debugger & Programmer -------------------------------------------------------------------------- 1. The Debug Tool > Simulator is not supported at this time. 2. If the S3 Flash ISP II drivers are uninstalled and the associated driver files are removed from the Windows PC by selecting the “Delete the driver software for this device” option when uninstalling the drivers, then the next time the USB ISP II device is detached and subsequently reattached to the PC, Windows will not be able to automatically re-install the necessary driver software. In this instance, it is necessary to perform the procedure described in Appendix A of UM0266 to reinstall all the S3 Flash ISP II drivers. However, before opening an S3 project file in the ZDS IDE, it is necessary to disconnect and reconnect the USB ISP II device again before opening the ZDS IDE and attempting to do a Connect to Target Reset+Go. If this is not done then after doing a Connect to Target or a Reset + Go, ZDS will report the following error: [ERROR] Failed to open ISP, SN# \\. \COMxx [ERROR] Unable to connect to the target To correct the problem, simply disconnect and reconnect the S3 Flash ISP II USB cable from the host PC. 3. To reduce the risk of damaging the S3 Flash ISP, please use the following start-up procedure for targets powered with an external power supply: o Connect the ISP to the PC o Connect the ISP to the target o Apply the External power to the target Note: Never connect the ISP to a self-powered target; only apply power to the target after it is connected to the ISP Compiler, Assembler, Linker/Locator, & Librarian -------------------------------------------------------------------------- 1. Please see the On-Line Help topics when converting from other assembler under Zilog Developer Studio II Help > Compatibility Issues o DifferenceS between the S3 and other Zilog Assemblers o DifferenceS between the S3 and SASM 2. One specific difference between the Zilog S3 assembler and SASM may cause warning messages to appear when building your project, where no warning is reported by SASM. The warning in question is message 606, “Program counter uncertain at this point, using best estimate.” This message is explained in more detail in the Online Help topic, Using the Macro Assembler > Warning and Error Messages. Please refer to that help topic for a full explanation of why this warning may occur in your project. When you see this warning message, typically you have code in your project that is trying to compare the value of the Program Counter (represented by the $ symbol in assembly code) to a fixed or symbolic value, in order to generate a warning or error at build time if your code doesn't fit into the memory limits of your project. Unfortunately, in the Zilog S3 assembler, the PC may be adjusted quite late in the process of generating code, and so these kinds of comparisons may not be reliable. Warning message 606 thus indicates that you can’t rely on this comparison in your code, whether the comparison test appears to succeed or fail. To determine whether your code violates the space constraints, simply examine the assembler listing file for the code in question. You will probably want to select the option to show absolute addresses in assembler listings (on the linker output page) when doing this. You might also consider runtime checks in the debug version of your project to flag a problem if the code grows beyond the constraints. This warning message itself can be disabled, if you choose, by including the following code in the source code file that is producing the warning message: INCLUDE “ZilogWarnings.inc” WARNING DISABLE PC_UNCERTAIN ; Disable Program Counter uncertain ; warning for this entire file Alternatively, to suppress the warning from just the single line of code that is producing it, delete the second line above and instead insert the following line just before the line of code that produces the warning message: WARNING SUPPRESS PC_UNCERTAIN ; Disable Program Counter uncertain ; warning for the next line of code 3. The compiler does not support placing executable code into the executable RAM address space which is available in some S3 CPUs. This address space is currently supported only for assembly code. 4. The instructions LDCPD and LDCPI do not have the intended effect in the S3F828B and S3F84I9 CPUs. Therefore, for these two CPUs only, the assembler will automatically convert any use of these 2 instructions that are found in any assembly source code file. The LDCPD instruction will be converted into a DECW instruction followed by an LDC instruction. The LDCPI instruction will be converted into an INCW followed by an LDC. These conversions will have the exact intended effect of the original LDCPD or LDCPI instruction though at the cost of an increased code size of 2 bytes per occurrence. The assembler will issue Warning 607 if it detects that one of these conversions has been made. If you prefer to disable that warning, place the following in your source code file before any LDCPD or LDCPI instructions have occurred: INCLUDE “ZilogWarnings.inc” WARNING DISABLE SUB_EQUIVALENT Or, equivalently, WARNING DISABLE 607 5. Beginning with the 5.3.0 release, in C code the default type of char variables has been changed from signed to unsigned. This could affect the execution of your application. The background of this change is that for char variables that are declared neither as signed or unsigned, the C Standard does not specify whether they are to be treated as signed or not. Instead, this choice is left to the compiler and the only requirement is that all such variables must be treated consistently as either signed or unsigned. Because of this lack of standardization, any C code that declares a variable as simply "char" rather than "signed char" or "unsigned char" is not safe if the behavior of the code depends on whether the variable is treated as signed or unsigned. Such code should be avoided. The following simple example shows the danger: char c; for (c = 10; c >= 0; c--) { ... /* do something */ } This code will run as expected, executing the loop 11 times, as long as c is treated as being signed. However, if chars (including c) are taken to be unsigned by default, the loop will never terminate because the condition c >= 0 will always be true for an unsigned char. We have changed the default type of char from signed to unsigned because this gives a code size advantage in some applications. This happens because when a char is being used in an operation with a larger integer type, the char does not first have to be sign-extended (an expensive operation) if the char is unsigned. If you have code similar to the above that implicitly depends on the signedness of char variables, that code is at best non-portable and, if it works, only does so by good fortune on particular compilers. There are 2 ways you can fix this in ZDS II release 5.3.0 or later. If you have only a single example (or a few) like the one above, you could simply change the declaration of c to "signed char c". This will allow you to get the code size benefit of our change for any unqualified char variables whose behavior does not depend on their signedness. Alternatively, you could select Project > Settings > C > Advanced > Default Type of Char > Signed. This would restore the behavior of pre-5.3.0 ZDS releases in this regard, at the cost of forgoing the code size advantage described here. IDE -------------------------------------------------------------------------- 1. When changing values of filling memory using the code memory window, you can only write a 0 to a 1 data and cannot write a 1 to a 0 data. Page Erase is not supported. 2. The support for the YIC OPENice_i2000 were validated for most targets except TB82NB. 3. The watch window is not able to distinguish between two or more local variables with the same name in different scopes of the same function. If you enter this duplicate name in the watch window, only one of the two variables (usually the one whose definition appears last in the function) is displayed in the watch window. This is true no matter where the yellow arrow indicating the current PC is as you debug inside the function. Even when the PC is in the scope of the other definition of that variable name, the “preferred” variable is always the one that is displayed. Target Hardware -------------------------------------------------------------------------- S3F8S190100ZCOG - S3F8S19 Development Kit ----------------------------------------- 1. Please note that U4 (Z8F6481AN) is used for factory test and is not needed for regular operation of the S3F8S19 development kit. U4 will be removed from future builds of the S3F8S19 development kit. 2. If the S3F8S19 Development kit is powered by a USB cable connected between P1 and a Windows PC, and if the Z8F6481AN includes factory test code, then Windows will attempt to locate driver software for the Z8F6481AN.Typically, Windows will not be able to find any compatible driver software and report that it was not able to load the necessary driver files. This situation is expected and can safely be ignored. The S3F8S19 development kit will function as expected regardless of whether or not Windows loads any drivers for the Z8F6481AN device. F. CLOSED CHANGE REQUESTS ============================================================================== Assembler -------------------------------------------------------------------------- (Fixed in 5.5.0) CR 13622 When the assembler encounters a JR or JRcc instruction where the jump relative target address can't be encoded as a signed 8-bit displacement, the JR/ JRcc instruction is replaced with a JP/ JPcc instruction and a 16-bit target address. Prior to the S3 5.5.0 release, SRC and/or LST files generated by the S3 assembler showed a JR/ JRcc opcode used with a JP or JPcc instruction opcode and a 16-bit target address. Starting with the 5.5.0 release the SRC and/or LST files now replace the JR/ JRcc instruction mnemonic with JP/ JPcc to match the actual instruction opcode byte. CR 13640 Corrected make.exe faults that occurred when a long warning or error message needed to be displayed when the "Show Absolute Addresses in Assembly Listings" option is enabled for projects with long fully qualified path names. The make failures would occur after it appeared that building the project completed successfully. The make failure would display various large negative values similar to the following message: Make *** [] Error -1073740791 (Fixed in 5.4.0) CR 13493 Assembler gives range error message on LDB instruction when operating on an SFR defined with 12-bit address. CR 13489 Assembler fails to report error messages for odd operands to LDW, INCW, DECW unless "Show absolute addresses in listing" is enabled. Compiler -------------------------------------------------------------------------- (Fixed in 5.5.0) CR 13432 Updated ZDS Help file to describe the default behaviour of the compiler with respect to function declarators with en empty parameter lists which is not strictly compliant with the ANSI C standard; but is consistent with the expectations of modern programmers. For details refer to the "Function Declarators with Empty Parameter Lists" topic in the ZDS Help File (F1). CR 13582 Fixed the S3 stack checking implementation such that spurious stack underflows are no longer detected if an interrupt occurs while the stack checking code in a foreground task executes. CR 13606, 13607. 13623, and 13627 Various compiler fixes for buffer overruns and (Windows) stack corruption problems which can cause unexpected compiler termination in some projects. CR 13630 Corrected P2 Internal Error when attempting to compile a compound conditional operator such as: d = (e) ? myfunc((f) ? 1 : 2) : 3; CR 13632 Corrected P1 Internal Error that occurred when a macro definition exceeded 4096 bytes (after white-space reduction but before expanding nested macros). Macro definitions that exceed the maximum supported length now trigger Error 47 - "Definition of macro exceeds the maximum length". CR 13634 Updated select S3 Run Time Library (RTL) functions to not assume that the default implementation of "char" is signed. In the S3 5.3.0 release, the S3 compiler was modified default "char" to an unsigned value (previously signed). However some RTL functions (e.g. gets) were coded in a way that assumed a char was a signed value. Consequently these RTL functions were not able to detect an EOF (-1) value and failed to operate as expected in some instances. CR 13636 Added support for PageX and PageX_d objects in select Tiny memory model RTL functions (e.g. sprintf and sscanf) by adding support for the 'PX' space qualifier. Similarly added support for 'P0' the space qualifier to allow Small model programs to reference local variables on the stack using an 8-bit Page 0 offset. CR 13638 The compiler now generates Warning 313 - "Unreferenced label: " when compiling projects using the Debug build configuration if a label has been defined, but it not used. The warning is not generated when compiling projects using the Release build configuration. (Fixed in 5.4.0) CR 13495 Modify the _At directive to accept 8-bit address offsets and combine them with the _PageN directive. Linker -------------------------------------------------------------------------- (Fixed in 5.5.0) CR 13602 Removed a redundant block of code that unlinked and freed an object on a linked list that was unlinked and freed in a recursive function called before the redundant block. In certain instances, the redundant code block could attempt to dereference an invalid pointer causing the Linker to silently terminate execution. (Fixed in 5.4.0) CR 13490 Align all 16-bit integers on even bytes, including in structs, so that LDW, INCW, DECW can safely be used by compiler. G. OTHER OPEN ISSUES (NOT RECORDED AS CHANGE REQUESTS) ============================================================================== ZDSII - S3 5.4.x and Earlier Releases -------------------------------------------------------------------------- • After upgrading the ISP FW to version 2.0.0 with DFU Boot Loader 2.3, the DFU Boot Loader 2.3 (or later) firmware version number will be displayed incorrectly in the ZDSII - S3 5.4.x (or earlier) Firmware Upgrade window and in the Output window when connecting to an S3 target. Instead of a version number appearing in brackets (current: 2.3) the ISP FW version number and serial number information is displayed within the brackets (current: S3 ISP Firmware version 2.0.0, SN# nnnnnnnnnn). This issue does not affect the performance of the IDE, debugger, or firmware upgrade procedure of the older release. Assembler -------------------------------------------------------------------------- • Compatibility with Samsung tools for the .ORG directive is still being explored. Samsung documentation states that .ORG defines an offset from the current section start, but in practice, it seems to be absolute as in Zilog tools. Being treated as absolute for now. • The assembler reports no error when an impossibly large address is used in the .SECTION directive. • The undocumented Samsung assembler directive reg_equ is not supported.