19-Show (Basic Editor und Interpreter per STM32F429)

Hier die Projektseite von einem Basic Editor/Interpreter für das STM32F429-Disco.

Den Quellcode vom Projekt gibt es nur von der Light-Version.
Diese ist im Editor-Mode identisch mit der Vollversion. Im Basic-Mode
sind nur die Standard Befehle plus “ABS” und “RIGHT$” implementiert.

Bilder :

Beschreibung und Befehlsreferenz als PDF :

STM32F429_Basic_Manual_v100

Implementierte Funktionen :

> Eingabe per USB-Tastatur (Micro-USB-Buchse)
> Anzeige per LCD (320 x 240 Pixel)
oder alternativ über ein R2R-DAC per VGA-Bildschirm
> 5 Zeichensätze umschaltbar
> Farben im Editor-Mode : 16 für Vordergund, 16 für Hintergrund
und 16 für Systemmeldungen
> Screencopy (als BMP-File) per UART senden
> 3 verschiedene Laufwerke UART/FLASH/SD-CARD
> Basic-Programme können über die Laufwerke geladen
und gespeichert werden (im Flash sind ein paar Demos)
> Inline-Interpreter
> Syntax-Highlighting im Listing
> 128kByte RAM für Basic-Programme und 128kRAM für Daten
> Steuerung auch über den PC möglich (UART)
> Funktionen für : LCD, GPIO, ADC, KEYBOARD, TOUCH
> Sprites (4 verschiedene Typen)
> Daten senden/empfangen per UART-1, UART-6, I2C-3, SPI-5, SPI-4
> String Funktionen
> Eingabe von Texten und Zahlen per Tastatur im Basic-Programm

Version :

1.00 vom 20.12.2014

Hier der komplette CooCox-Projektordner (der Light-Version) zum download :

STM32F429_Basic_V100_Light

Download vom HEX-File (der Vollversion) (LCD-Version) :

STM32F429_Basic_V100

Download vom HEX-File (der Vollversion) (VGA-Version) :

STM32F429_Basic_V100_VGA

Basic-Beispiel-Programme :

basic_test_files


19 Antworten auf 19-Show (Basic Editor und Interpreter per STM32F429)

  1. Fabrice sagt:

    Hallo Uwe :)
    Ich habe das getestet , alle Demos gehen sehr gut ;)
    Aber wen ich selber ein Programm schreibe will , ich bekomme immer Syntax Fehler.
    sogar in ein einfache 10 FOR a=0 TO 1000
    Ist der Editor schon aktiv für Programm zu interpretieren ?

    Gruß.

    Fabrice.

    • admin_ub sagt:

      nein, die Version B.10 kann nur Basic-Programme vom Flash oder per UART laden und diese dann per “RUN” ausführen. Am Editor sitze ich gerade.

    • admin_ub sagt:

      Version B.12 kann jetzt auch editieren.

  2. Fausto sagt:

    Hello Uwe
    The demo Paint is a good example, but Terminal does not work ESC and CLS.
    Surely you’ve thought about you a possible alternative to replacing SD with a standard PENdrive connected to the USB of keyboard place, in order to free up additional I / O for further use, for example, a second UART for GPS or connect any devices to send data.
    thanks
    greetings Fausto

    • admin_ub sagt:

      please try V:C05 and enable “TERMINAL 1″. the new command “EXIT” terminates a running basic program and switch back to editor mode. “ESC” is a way to interrupt a program and give a chance to make a screencopy.

    • admin_ub sagt:

      to use a usb drive i must deactivate the usb keyboard. the only way is to make two software versions of the system : one with usb keyboard and another with usb-msc-host. But this will be implemented later, first i will try to use SPI and I2C and other functions. You can use UART or SD-CARD for load/save.

  3. Fausto sagt:

    Ciao

    I can not use REMOVE and SAVE with DEVICE 1 [ FLASH]

    also line 200,210,220 run with modification

    200 INITDATA 1,100
    210 INITDATA 2,2
    220 DATA $”0D”,$”0A”

    excuse my stupidity bat i did not understand line 200 – 210

    sorry again

    greetings fausto

    • admin_ub sagt:

      flash is read only.
      line 200 defines a array with id number 1 and a lenght of 100 bytes.
      (to store the received data)
      line 210 defines a array with id nr 2 and a length of 2 bytes
      (to store the carriage return 0Dh and line feed 0Ah)
      line 220 stores the two databytes 0Dh and 0Ah into the array nr.2
      (maybe i should make a english version of the syntax pdf :-)

  4. ThomasE sagt:

    Hallo Uwe,
    ich verfolge die Weiterentwicklung des BASIC sehr interessiert, und habe auch schon viele Deiner Library-Beiträge gelesen. Das Basic ist noch nicht installiert.
    Vielen Dank für Deinen Ehrgeiz!
    Hast Du eine bestimmte Tastatur, die Dur hier verwendest (evtl. recht klein?) ?
    Danke, Thomas

  5. veryalien sagt:

    STM32F429-Basic is a really useful program! I’m using it as a display for sensor values from local and remote sensors.

    There are a couple of additional features that I think would be really nice to have:

    1) A basic command to change the font size within a program. At the moment you are stuck with the size selected in the editor before running the program. It would be nice to be able to mix small and large fonts on the display to make a nice dashboard display. For example a title ‘Temperature’ in a small font and the temperature value being read from the sesnor in a larger font.

    2) Auto run a program at startup. If there is a program called ‘autorun.bas’ stored on a connected SD card, it would be automatically loaded and executed when ubasic is started or reset.

    With both of these features the F429 could automatically start a nicely styled display program at power on. This would be very useful for a standalone display, without any need to manually connect a keyboard, set the font size, load and start the program.

    Perhaps the autorun feature is relatively easy to add into the minimal/light version as we already have the source code for the editor mode. But easily adding a command to change the font size in a running program without the full source isn’t possible.

    The full version is really useful as it is, but when starting with the minimal source code all of the basic commands to call the nicely packaged library functions would have to be recreated with tokenizer code, etc. To me, this seems just like reinventing the wheel!

    Is there a reason why the source code for the full ubasic version has not been released? I am sure that the full source version would be a very useful resource for the community as well as all the already published source code for the excellent F4/F429 libraries.

    • admin_ub sagt:

      thanks for the comment and your ideas. The only reason not to post the full version is ….it was a lot of work to implement all the features and i dont want to make someone else a commercial product out of it.
      but, send me an email and you get the full version to use it in your own project.
      i dont make an update for the uBasic because of my actual new F746-Basic-Projekt..this is also a lot of work but with a much more powerfull Interpreter and a Fullscreen Editor.
      http://mikrocontroller.bplaced.net/wordpress/?page_id=5487

  6. Christian Julius sagt:

    Hallo,
    ich werde mir das heute abend mal aufspielen, um den C64 Look zu haben. Angefangen habe ich damit auch mal, mit einem Source Code von Bill Gates auf meinem Z80. Aber mal die naive Frage: Warum steckt man derart viel Arbeit in einen Basic Interpreter für diese CPU? Ich meine Basic ist ziemlich tot und “kommerziell” sicherlich auch eher uninteressant. Ist das nur Hobby, Spass am Programmieren?

    • admin_ub sagt:

      alle Projekte hier sind reines Hobby
      und da kümmert mich die “Aufwand-Nutzen” Rechnung nicht.
      Mancher zeichnet Bilder die kein Mensch kaufen wird
      …ich programmiere Software die kein Mensch einsetzt :-)

      • Christian Julius sagt:

        Das ist cool! Ich schreibe wochenlang Software fuer eine Wetterstation (nackte 200 x 280mm Platine mit Bauteilen, die an der Wand hängt) und noch eine im Schlafzimmer die per Funk das gleiche anzeigt wie die Hauptplatine, obwohl ich den ganzen Driss fertig kaufen könnte oder auch aus dem Fenster schauen, damit ich sehe wie das Wetter ist. Hauptsache irgendwas blinkt und leuchtet und hat viele LEDs. Weiter so! :-)

  7. Nick Sputt sagt:

    Hallo,
    ich gehe gerade die Manual durch und weiss nicht, ob es noch von Bedeutung ist, aber auf Seite 30, bei 7.5.8 RIGHT$ ist das Beispiel falsch. Da steht LEFT$ anstatt RIGHT$.
    Uebrigens sehr schoene Arbeit die du da rein gesteckt hast!
    Du hast mal jemandem die Source gegeben, dass er ein paar Sachen aendern kann, die ich auch recht gut finde, koennte ich auch Zugang zum Quelltext bekommen?
    Schoenen Abend noch,
    Nick

  8. Jupp sagt:

    Warum erinnert mich der Startbildschirm an einen C64 :-)

    Nette Arbeit, wenn gleich ich noch nicht den Nutzen erkennen kann. Da muss ich sagen, hast du im völligen Gegensatz zum Basic-Interpreter, deutlich nützlichere Sachen gemacht. Die C-Libs nutze ich auch nicht, schau aber hin und wieder mal rein, wie du die Dinge gelöst hast. Manchmal sind die Lösungsansätze Dritter eleganter als meine eigenen… Man(n) lernt nie aus.
    Vom FPGA-Projekt bin ich ganz angetan, wenn gleich ST ja auch einen F769 im Programm hat, der HDMI und andere serielle Protokolle kann. Die FPGA dürfer aber freizügiger werden was die Kontrollerwahl angeht. Die TFT’s als HDMI-version sind günstiger als die RGB Fassungen, die Chips a la SSD1963 nutzen. Leider ist der genannte Chip langsam und verbrennt viel CPU-Zeit da er durch das schmale Register schuften muss.
    Bemerkenswert finde ich die vielzahl unterschiedlicher Disziplinen Deiner Projekte. Ein IP für eine FPGA zu entwerfen, unterscheidet sich ja grundsätzlich von einem C Programm für einen Prozessor. Eine Leiterkarte zu entwerfen ist eben auch eine völlig andere Richtung, als Programme zu schreiben. Alles in allem kostet es viel Zeit, sich solchen Dingen wie IP’s a la VHDL oder Verilog oder auch C zu nähern, bis man was anderes als Grüzze erzeugt.
    Ich denke dass Du aus diesem Berufzweig kommst und daher schon vorbelastet bist.
    Einzig beneide ich Dich um die schönen Leiterkarten. Mich würde interessieren mit welchen Tools du diese entworfen hast und wo in China man sowas, wie bestellt.
    Ich hättte auch noch die eine oder andere Leiterkarte zu fertigen, jedoch sind mir die europäischen Preise noch zu hoch.
    Noch mal zum Basic-Interpreter – Nicht dass du mich falsch verstehst, jedoch erkenne ich ausser dem “Fun-Faktor” dafür keinen Nutzen. Wenn jedoch spass macht…

    Grüsse aus dem Pott,
    Jupp

    • admin_ub sagt:

      der Vorteil von einem Interpreter : man kann das Programm auf dem STM “on the fly” anpassen
      ohne die Kette (PC/Compiler/Programmer->STM) wäre z.B. in einem Roboter ein Vorteil.
      Für die Platine habe ich die kostenlose Altium Version benutzt “circuit maker”
      die hat keine Beschränkungen von Layer, Größe, Anzahl der Schaltplanseiten.
      Und der Chinese meines Vertrauens ist “smart prototyping”
      da kosten 10 Stück, 2Layer, 10cm x 10cm = 10 EUR
      (also 1 EURO pro Platine) mit Lötsptoplack+Silkscreen usw.


Wie hat Dir dieser Artikel gefallen?

1 Stern2 Sterne3 Sterne4 Sterne5 Sterne (Noch keine Bewertungen)
Loading...

6 Antworten zu 19-Show (Basic Editor und Interpreter per STM32F429)

  1. H. Hubert Dreiling sagt:

    Sehr gute Arbeit.
    Leider bin ich etwas älter, meine Augen sind nicht mehr gut genug für SMD Löten 🙁
    Ich würde gern auf dem STM32mit Basic arbeiten, gibt es ein günstiges, fertiges DevBoard mit STM32F429?
    Auf dem STM32F4 Discovery mit F407 wird es wohl nicht direkt arbeiten.

    • admin_mb sagt:

      Hallo Hubert,
      ja, klar es gibt das STM32F429-Discovery-Board. Genau dafür ist dieses Projekt entwickelt worden.
      Allerdings ist das verbaute 2,4 Zoll Display (320 x 240 Pixel) recht klein für „schwache“ Augen. Bei den Downloads gibt es aber auch die VGA Version. Dabei wird zusätzlich ein R2R-DAC benötigt um das Bild auf einen VGA-Monitor zu bringen.
      Viel Erfolg,
      Manfred

  2. Emile sagt:

    Good day

    I need some help in getting this project (full basic version)
    running on my STM32F429DISC1 board using STM32CubeIDE or STM32WorkBench. Do you still provide support for this project?

    Regards

  3. Emile sagt:

    Good day

    Where can I get the full version source code?
    How can convert the full version hex file (mentioned above) to the bin version for the STM32F429DISC1?

    Regards

    • admin_mb sagt:

      Hello Emile,
      you can use the STM32 ST-Link utility to flash bin or hex-files to your board.

      Here is an overview of the individual steps:

      • Downloading and Installing the STM32 ST-Link Utility
      • Starting the STM32 ST-Link Utility
      • Setting Up the External Loader
      • Load Hexfile
      • Connect STM32F429i Discovery Board
      • Flash the STM32F429i Discovery Board

      Here is a detailed description which can also be used for your STM32F429i board: Flash STM32F7 Discovery Board with ST-Link Utility

      The source codes are only available for the light version.

Schreibe einen Kommentar zu H. Hubert Dreiling Antworten abbrechen

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert