Readme version 2.4.2 Copyright (C) 2018 Klaus Zobawa

(english version scroll down please)

Mecrisp Stelaris fuer PsoC4 CY8C4245axi von Cypress, 
adaptiert auf das Eva-Board CY8CKIT-049


/!\ Hinweis: Mit 32k Flash und 4k RAM stoesst der Cy8C4245axi fuer Mecrisp-Stellaris in Verbindung mit der C-API 
             an seine Grenzen. Fuer compiletoram stehen nur 500 Byte zur Verfuegung. Daher ist es ratsam
             vorwiegend compiletoflash zu nutzen. Besser geeignet ist mit 128k Flash und 16k RAM der CY8C4247azi.
             
/!\ Hinweis: Sollten Probleme beim compilieren ins Falsh auftreten dann eraseflash aufrufen.
             
             
Zum Flashen des Cy8C4245axi bitte nach folgender Video-Anweisung vorgehen: 
http://www.cypress.com/documentation/development-kitsboards/psoc-4-cy8ckit-049-4xxx-prototyping-kits

Dokumentation zu dem Eva-Board:
http://www.cypress.com/file/138656/download
http://www.cypress.com/documentation/development-kitsboards/psoc-4-cy8ckit-049-4xxx-prototyping-kits
http://www.cypress.com/documentation/application-notes/an73854-psoc-3-psoc-4-and-psoc-5lp-introduction-bootloaders
http://www.cypress.com/documentation/technical-reference-manuals/psoc-4100-and-4200-family-psoc-4-architecture-technical

Einleitung:
Die vorliegende Portierung beinhaltet Mecrisp-FORTH fuer den PSoC4 des CY8CKIT-049 out of the box. 
Der FORTH Interpreter bietet die Moeglichkeit die Hardwarefunktionen des PSoC durch Aufruf der API's 
interaktiv zur Ausfuehrung zu bringen und Applikationen in FORTH zu erstellen.

Fuer die Inbetriebnahme von blinky werden benoetigt:

     - File UART_RxTx01.cyacd
     - blinky.txt
     - Evaluation Board CY8CKIT-049 CY8C4245axi von Cypress (div. Distributoren)
     - Terminal Programm z.B.  Tera Term (kostenloser Download)
     - Installation von PSoC-Creator, enthaelt unter Tools den Bootloader-Host zum Flashen
       PSoC-Creator 3.3 or higher http://www.cypress.com/products/psoc-creator-integrated-design-environment-ide
     - PC mit Windows 64Bit, 1 x USB


Fuer die Inbetriebnahme der kompletten Entwicklungsumgebung von PSoC4 / Mecrisp-FORTH werden benoetigt:

     - Sourcecode Mecrisp fuer CY8C4245axi
     - Projektfile: UART_RxTx01.cywrk (im Sourcecode von Mecrisp enthalten)
     - Evaluation Board CY8CKIT-049 CY8C4245axi von Cypress (div. Distributoren)
     - Terminal Programm z.B.  Tera Term (kostenloser Download)
     - PSoC-Creator 3.3 or higher http://www.cypress.com/products/psoc-creator-integrated-design-environment-ide
       enthaelt unter Tools den Bootloader-Host zum Flashen
     - PC mit Windows 64Bit, 1 x USB

	
Inbetriebnahme blinky:
 
1. mecrisp-stelaris-2.4.2 oder hoeher nach C:\FORTH\Mecrisp\ kopieren:

C:\FORTH\Mecrisp\mecrisp-stellaris-2.4.2\


2. Die Projekt-Directory UART_RxTx01.cydsn aus ..\mecrisp-stellaris-2.4.2\cy8c4245axi\ nach C:\Cypress\ kopieren:
	
C:\Cypress\UART_RxTx01.cydsn\


3. Eva-Board nach CY8CKIT-049_PSoC4 Prototyping Kit_Guide.pdf wie in CY8CKIT-049-Start.jpg dargestellt in Betrieb nehmen.


4. Das Terminal-Programm installieren und anpassen:

Setup Terminal Programm with the following settings
      - Baudrate       : 38400 bits
      - Data bits      : 8
      - Parity         : None
      - Stop bits      : 1
      - Flow control   : none

      - Transmit delay 120ms/line
      
      
5. PSoC-Programmer oder PSoC-Creator (Empfehlung) installieren


6. UART_RxTx01.cyacd mit Bootload-Host im Menue Tools ins Flash schreiben


7. Terminal-Programm starten. 

Nach dem Starten von FORTH soll folgender Text angezeigt werden:

'Mecrisp-Stellaris 2.4.2 by Matthias Koch ported at CY8C4245axi by Klaus Zobawa 2018'     


8. blinky.txt ueber das Terminal laden


9. blinky1 oder blinky2 aufrufen

     
	
Inbetriebnahme vollstaendige Entwicklungsumgebung:

1. mecrisp-stelaris-2.4.2 oder hoeher nach C:\FORTH\Mecrisp\ kopieren:

C:\FORTH\Mecrisp\mecrisp-stellaris-2.4.2\


2. Die Projekt-Directory UART_RxTx01.cydsn aus ..\mecrisp-stellaris-2.4.2\CY8C4245axi\ nach C:\Cypress\ kopieren:
	
C:\Cypress\UART_RxTx01.cydsn\


3. Eva-Board nach CY8CKIT-049_PSoC4 Prototyping Kit_Guide.pdf wie in CY8CKIT-049-Start.jpg dargestellt in Betrieb nehmen. 


4. Das Terminal-Programm installieren und anpassen:

Setup Terminal Programm with the following settings
      - Baudrate       : 38400 bits
      - Data bits      : 8
      - Parity         : None
      - Stop bits      : 1
      - Flow control   : none

      - Transmit delay 120ms/line

5. PSoC-Creator installieren und starten. Unter Examples and Kits das Eva-Board installieren.


6. Unter Recent Projects mit Open Existing Project  UART_RxTx01.cywrk oeffnen und anklicken.


7. /!\ In der Menuezeile des PSoC-Creator von Debug auf Release umschalten /!\


8.  Unter Build mit Clean und Build UART_RxTx01 ein neues image generieren und unter Tools mit Bootloader-Host
den PsoC4 programmieren. Nach korrektem Abschluss leuchtet LED1.


9. Terminal-Programm starten. 

Nach dem Starten von FORTH soll folgender Text angezeigt werden:

'Mecrisp-Stellaris 2.4.2 by Matthias Koch ported at CY8C4245axi by Klaus Zobawa 2018'

Ab hier steht das Mecrisp-Stelaris FORTH zur Verfuegung.


Beispiel Eingabe:

LEDon()  \ schaltet LED1 an
LEDoff() \ schaltet LED1 aus

Beispiel-Sourcecode:

Blinky.txt


10. Software Anpassungen:

Saemtliche von PSoC-Creator zur Verfuegung gestellten API's koennen ueber HAL.s dem FORTH-System bekannt gemacht werden. Beispiele sind HAL.s zu entnehmen. 


Fragen? Klaus.Zobawa@forth-ev.de




English version:

Mecrisp Stelaris for PsoC4 CY8C4245axi from Cypress,
adapted to the Eve board CY8CKIT-049


/! \ Note: With 32k Flash and 4k RAM, the Cy8C4245axi for Mecrisp Stellaris comes in contact with the C-API
           to its limits. Only 500 bytes are available for compiletoram. Therefore, it is advisable
           mainly to use compiletoflash. It is more suitable CY8C4247azi with 128k Flash and 16k RAM.
             
/! \ Note: If you experience problems compiling into Flash then call eraseflash.
             
To flash the Cy8C4245axi please follow the video instructions below:
http://www.cypress.com/documentation/development-kitsboards/psoc-4-cy8ckit-049-4xxx-prototyping-kits

for more information:
http://www.cypress.com/file/138656/download
http://www.cypress.com/documentation/development-kitsboards/psoc-4-cy8ckit-049-4xxx-prototyping-kits
http://www.cypress.com/documentation/application-notes/an73854-psoc-3-psoc-4-and-psoc-5lp-introduction-bootloaders
http://www.cypress.com/documentation/technical-reference-manuals/psoc-4100-and-4200-family-psoc-4-architecture-technical

Introduction:
The present port includes mecrisp-FORTH for the PSoC4 of the CY8CKIT-049 out of the box.
The FORTH interpreter offers the possibility of the hardware functions of the PSoC by calling the API's
interactive to execute and create applications in FORTH.

For the commissioning of blinky you need:

     - File UART_RxTx01.cyacd
     - blinky.txt
     - Evaluation Board CY8CKIT-049 CY8C4245axi by Cypress (div. Distributors)
     - Terminal program e.g. Tera Term (free download)
     - Installation of PSoC Creator, contains under Tools the boot loader host for flashing
       PSoC Creator 3.3 or higher http://www.cypress.com/products/psoc-creator-integrated-design-environment-ide
     - PC with Windows 64Bit, 1 x USB


For the commissioning of the complete development environment of PSoC4 / Mecrisp-FORTH you need:

     - Sourcecode Mecrisp for CY8C4245axi
     - Project file: UART_RxTx01.cywrk (included in the source code of Mecrisp)
     - Evaluation Board CY8CKIT-049 CY8C4245axi by Cypress (div. Distributors)
     - Terminal program e.g. Tera Term (free download)
     - PSoC Creator 3.3 or higher http://www.cypress.com/products/psoc-creator-integrated-design-environment-ide
       contains under tools the boot loader host for flashing
     - PC with Windows 64Bit, 1 x USB


Commissioning blinky:
 
1. Copy mecrisp-stelaris-2.4.2 or higher to C:\FORTH\Mecrisp\

C:\FORTH\Mecrisp\mecrisp-stellaris-2.4.2\


2. Copy the project directory UART_RxTx01.cydsn from .. \mecrisp-stellaris-2.4.2\cy8c4245axi\ to C:\Cypress\

C: \Cypress\UART_RxTx01.cydsn\


3. Start Eva-Board according to CY8CKIT-049_PSoC4 Prototyping Kit_Guide.pdf as shown in CY8CKIT-049-Start.jpg.


4. Install and customize the terminal program:

Setup Terminal Program with the following settings
      - Baud rate: 38400 bits
      - Data bits: 8
      - Parity: None
      - Stop bits: 1
      - Flow control: none

      - Transmit delay 120ms / line
      
      
5. Install PSoC Programmer or PSoC Creator (recommendation)


6. Write UART_RxTx01.cyacd into the flash with bootload host, see menu Tools


7. Start terminal program.

After starting FORTH the following text should be displayed:

'Mecrisp-Stellaris 2.4.2 by Matthias Koch ported at CY8C4245axi by Klaus Zobawa 2018'


8. load blinky.txt via the terminal


9. Call up blinky1 or blinky2

     

Commissioning complete development environment:

1. Copy mecrisp-stelaris-2.4.2 or higher to C:\FORTH\Mecrisp\:

C:\FORTH\Mecrisp\mecrisp-stellaris-2.4.2\


2. Copy the project directory UART_RxTx01.cydsn from ..\mecrisp-stellaris-2.4.2\CY8C4245axi\ to C:\Cypress\

C:\Cypress\UART_RxTx01.cydsn\


3. Start Eva-Board according to CY8CKIT-049_PSoC4 Prototyping Kit_Guide.pdf as shown in CY8CKIT-049-Start.jpg.


4. Install and customize the terminal program:

Setup Terminal Program with the following settings
      - Baud rate: 38400 bits
      - Data bits: 8
      - Parity: None
      - Stop bits: 1
      - Flow control: none

      - Transmit delay 120ms / line
      

5. Install and start PSoC Creator. Install the Eva board under Examples and Kits.


6. Open Recent Projects with Open Existing Project UART_RxTx01.cywrk and click.


7. /! \ In the menu bar of the PSoC Creator, switch from Debug to Release /! \


8. Under Build with Clean and Build UART_RxTx01 generate a new image and under Tools with bootloader-host
program the PsoC4. After correct completion LED1 lights up.


9. Start terminal program.

After starting FORTH the following text should be displayed:

'Mecrisp-Stellaris 2.4.2 by Matthias Koch ported at CY8C4245axi by Klaus Zobawa 2018'


From here the Mecrisp-Stelaris FORTH is available.

Example input:

LEDon () turns on LED1
LEDoff () \ switches LED1


10. Software adjustments:

All of the APIs provided by PSoC Creator can be introduced to the FORTH system via HAL.s. Examples can be found in HAL.s.


Any questions? Klaus.Zobawa@forth-ev.de
