It’s been crickets here since you released the new RX version of Engine BASIC, and I feel really bad about that, as I haven’t had a chance to get a new SD card to test it. Life has been somewhat busy.
Has anyone else given it a try?

We're back? We're back! Oh, boy, I'm happy... 😊
I'm glad BASIC Engine lives. I always say that BE BASIC is my favourite BASIC, and I'm eager to keep playing and trying things with it.
I'll give RX a got, and report my impressions. Cheers!

I need to create something with it and post on the BASIC FB group. Might generate a bit more interest and let people know that BE still lives.
I went through all my BE compatible hardware today.

Ok, I've tried RX in my Orange Pi Lite. The system feels nimble. Yes, it doesn't load as fast as the H3 bare metal one (waiting at a black screen feels weird. I wish there was a BE logo or something) but after that, I see no difference to that one (yes, I didn't like the Linux-based one).

Here's a little video, using the new video recording feature 😁: http://damianvila.com/basicengine/basicengine-rx.mp4

A couple observations: Boot seems to reboot the linux part, but not the BE one. It stays in a black screen (at least in my OPi Lite).
A small video file is created on boot. Just 336 bytes. I have no idea why.
And a little petition: is there a way to make an LS alias of the FILES command? I'm having a hard time remembering not to use it. πŸ˜… (I hope it's not too much to ask).

But other than that, really happy to use BE again! Thanks for the work, Ulrich!

  • uli replied to this.
  • Hawk likes this.

    Good to see you back!

    Dmian waiting at a black screen feels weird. I wish there was a BE logo or something

    That would require initializing DE and HDMI by "something else" (u-boot or Linux), and that takes time...

    Dmian Boot seems to reboot the linux part, but not the BE one

    Hmmm... haven't observed that one. Rebooting Linux should also shut down the Engine BASIC cell. So do I understand correctly that after reboot Linux is running, but EB is not?

    Dmian A small video file is created on boot. Just 336 bytes. I have no idea why.

    Er, yeah. I probably took a shortcut too many there, and there is a race between EB initializing the video encoder comms area and the video encoder starting up. I'll have to look into that.

    Dmian And a little petition: is there a way to make an LS alias of the FILES command?

    I don't think that would be a good idea because I think it's very likely to collide with programs using ls as a variable name. I do, however, plan to add a shortcut for the SHELL command, because I use that all the time. It would allow you to do something like #ls instead of SHELL "ls". Would that work for you?

    BTW, it might take me a while to do another release because I just completed my annual migration to the Pacific and need to settle in a bit.

      uli That would require initializing DE and HDMI by "something else" (u-boot or Linux), and that takes time...

      Oh! Right... I'm such a dork! I was thinking like this was NG, and was thinking that booting and video was handled by Linux still...
      Don't worry about it. Totally understand why it's not feasible. Forget what I said. 😝

      uli Hmmm... haven't observed that one. Rebooting Linux should also shut down the Engine BASIC cell. So do I understand correctly that after reboot Linux is running, but EB is not?

      Again, I'm giving you false information, because I was still thinking HDMI was handled by Linux here... What I actually see is that, after I enter the command and hit ENTER, the system seems to reboot, and HDMI seems to initialize (I see the monitor losing the signal, and gaining it again, the led turning on as expected), but apparently it gets stuck somewhere, and it stays in a black screen. Is there any way for me to monitor what's happening? I hope it's not something power related again (these damn Orange Pi ant their stupid power requirements). I don't know if there are serial messages I can monitor or something. If you can give me a hint to try to find out what's going on, I'd really appreciate it. It's not a big problem, at the moment, so don't worry too much about it.

      uli Er, yeah. I probably took a shortcut too many there, and there is a race between EB initializing the video encoder comms area and the video encoder starting up. I'll have to look into that.

      Oh! Ok. It's not a huge problem, and the file is so small that it is more an inconvenience than anything else. Thanks! 😊

      uli I don't think that would be a good idea because I think it's very likely to collide with programs using ls as a variable name. I do, however, plan to add a shortcut for the SHELL command, because I use that all the time. It would allow you to do something like #ls instead of SHELL "ls". Would that work for you?

      Yes! That would be completely fine by me. 😁 I'm so used to Mac's Terminal commands (that are the same as Unix/Linux) that having a way to use them here would help a lot. Thanks!

      uli BTW, it might take me a while to do another release because I just completed my annual migration to the Pacific and need to settle in a bit.

      Absolutely not a problem. Take as much time as you need. To me, you are part genius (how can you code like that?), part saint (how can you deal with dorks like me?), so I don't want to inconvenience you. Cheers!

      • uli replied to this.

        Dmian Is there any way for me to monitor what's happening? I hope it's not something power related again (these damn Orange Pi ant their stupid power requirements). I don't know if there are serial messages I can monitor or something.

        There are. Both the Linux console and the EB debug output are available on the serial port.

        Dmian (how can you deal with dorks like me?), so I don't want to inconvenience you.

        As far as I'm concerned you are a major contributor, so feel free to bother me all you want.

          uli There are. Both the Linux console and the EB debug output are available on the serial port.

          Wonderful! I'll check this and if I find anything, I'll report back. Thanks! πŸ˜‰

          uli I do, however, plan to add a shortcut for the SHELL command, because I use that all the time. It would allow you to do something like #ls instead of SHELL "ls".

          The next build should have that.

            uli There are. Both the Linux console and the EB debug output are available on the serial port.

            A question about this: is the data available via USB (UART over USB) or through the UART pins on the 40 pin connector? (I’m talking about the Orange Pi side here).
            I thought of trying UART over USB, but turns out I don’t have a single USB-A to USB-A cable at home (now that I think of it, maybe I can try with USB-C to USB-A, I have a few of those cables).

            But I also have a few USB TTL adapters (with different chips, one I know it positively works, as I used it to program AVR chips). So I can connect with that and some dupont cables directly to the pins on the OPi.

            Also: do I need to enable a debug mode in some way or will BE just output any errors to serial by default?
            Thanks.

            • uli replied to this.

              Dmian A question about this: is the data available via USB (UART over USB) or through the UART pins on the 40 pin connector? (I’m talking about the Orange Pi side here).

              My OPi has a dedicated 3-pin connector next to the Ethernet port for the serial console.

              Dmian But I also have a few USB TTL adapters (with different chips, one I know it positively works, as I used it to program AVR chips). So I can connect with that

              You can connect it if it's 3.3 volts. The ones I have are either 3.3V by default or are switchable.

              Dmian Also: do I need to enable a debug mode in some way or will BE just output any errors to serial by default?
              Thanks.

              Nope, everything is spammed to the console by default.

                uli Perfect! I’ll check this weekend and see if there’s something useful I can report back to you.

                Of course! The minute I connect serial, it al works as intended... 🀣

                Stopping dropbear sshd: OK
                Stopping network: OK
                ROOT DEV /dev/mmcblk0
                DATA PART /dev/mmcblk0p3
                DATA PART NO 3
                seedrng: can't remove file 'seed.credit': Read-only file system
                Stopping klogd: OK
                Stopping syslogd: OK
                umount: /dev/mmcblk0p3 busy - remounted read-only
                umount: devtmpfs busy - remounted read-only
                
                The system is going down NOW!
                
                Sent SIGTERM to all processes
                Sent SIGKILL to all processes
                
                Requesting system reboot
                Closing cell "orangepi0-inmate-basic"
                Page pool usage after cell destruction: mem 55/1770, remap 5/131072
                Shutting down hypervisor
                 Releasing CPU 2
                 Releasing CPU 1
                 Releasing CPU 0
                 Releasing CPU 3
                [  265.152687] reboot: Restarting system
                
                U-Boot SPL 2021.10 (Oct 12 2023 - 17:18:09 +0200)
                DRAM: 512 MiB
                Trying to boot from MMC1
                
                
                U-Boot 2021.10 (Oct 12 2023 - 17:18:09 +0200) Allwinner Technology
                
                CPU:   Allwinner H3 (SUN8I 1680)
                Model: Xunlong Orange Pi Lite
                DRAM:  512 MiB
                MMC:   mmc@1c0f000: 0, mmc@1c10000: 2
                Loading Environment from FAT... OK
                In:    serial
                Out:   vidconsole
                Err:   vidconsole
                Net:   No ethernet found.
                Hit any key to stop autoboot:  0 
                switch to partitions #0, OK
                mmc0 is current device
                Scanning mmc 0:1...
                Found U-Boot script /boot.scr
                2239 bytes read in 8 ms (272.5 KiB/s)
                ## Executing script at 43100000
                4097976 bytes read in 178 ms (22 MiB/s)
                28877 bytes read in 7 ms (3.9 MiB/s)
                Kernel image @ 0x42000000 [ 0x000000 - 0x3e87b8 ]
                ## Flattened Device Tree blob at 43000000
                   Booting using the fdt blob at 0x43000000
                   Using Device Tree in place at 43000000, end 4300a0cc
                
                Starting kernel ...
                
                [    0.001923] /cpus/cpu@0 missing clock-frequency property
                [    0.001961] /cpus/cpu@1 missing clock-frequency property
                [    0.001990] /cpus/cpu@2 missing clock-frequency property
                [    0.002019] /cpus/cpu@3 missing clock-frequency property
                
                Initializing Jailhouse hypervisor  on CPU 1
                Code location: 0xf0000040
                Page pool usage after early setup: mem 37/1770, remap 0/131072
                Initializing processors:
                 CPU 1... OK
                 CPU 0... OK
                 CPU 3... OK
                 CPU 2... OK
                Initializing unit: irqchip
                Initializing unit: PCI
                Page pool usage after late setup: mem 54/1770, remap 5/131072
                Activating hypervisor
                Created cell "orangepi0-inmate-basic"
                Page pool usage after cell creation: mem 67/1770, remap 5/131072
                Cell "orangepi0-inmate-basic" can be loaded
                Started cell "orangepi0-inmate-basic"
                60000000 RAM limit
                Booting!
                BASIC mem at 0x49000000hdmi, mode info : clock 40000000 hdis 800 vdis 600
                
                BASIC stack at 0x8000
                dotclock: 40000kHz = 40000kHz: (24MHz * 20) / 3 / 4
                BASIC mem at 0x49000000
                freq 23861400 per usec 23
                Ready!
                Starting syslogd: OK
                Starting klogd: OK
                Running sysctl: OK
                Populating /dev using udev: 
                Starting
                
                hdmi, mode info : clock 148500000 hdis 1920 vdis 1080
                dotclock: 148500kHz = 148500kHz: (24MHz * 99) / 8 / 2
                Secondary boot
                done
                seedrng: can't remove file 'seed.credit': Read-only file system
                ROOT DEV /dev/mmcblk0
                DATA PART /dev/mmcblk0p3
                DATA PART NO 3
                Mounting data partition: 
                Starting network: OK
                Starting dropbear sshd: OK
                Thu Feb 10 11:01:20 UTC 2022
                
                
                Welcome to Buildroot for the Orange Pi Lite
                
                OrangePi_Lite login: 

                Well, at least I now have a tool to debug just in case. πŸ˜„

                I tried a second time, and it stops here:

                Stopping dropbear sshd: OK
                Stopping network: OK
                ROOT DEV /dev/mmcblk0
                DATA PART /dev/mmcblk0p3
                DATA PART NO 3
                seedrng: can't remove file 'seed.credit': Read-only file system
                Stopping klogd: OK
                Stopping syslogd: OK
                umount: /dev/mmcblk0p3 busy - remounted read-only
                umount: devtmpfs busy - remounted read-only
                
                The system is going down NOW!
                
                Sent SIGTERM to all processes
                Sent SIGKILL to all processes
                
                Requesting system reboot
                Closing cell "orangepi0-inmate-basic"
                Page pool usage after cell destruction: mem 55/1770, remap 5/131072
                Shutting down hypervisor
                 Releasing CPU 2
                 Releasing CPU 3
                 Releasing CPU 1
                 Releasing CPU 0
                [  290.742713] reboot: Restarting system
                
                U-Boot SPL 2021.10 (Oct 12 2023 - 17:18:09 +0200)
                DRAM: 512 MiB
                Trying to boot from MMC1

                Nothing after that. This is the behaviour I've seen previously.

                And a successful boot up:

                U-Boot SPL 2021.10 (Oct 12 2023 - 17:18:09 +0200)
                DRAM: 512 MiB
                Trying to boot from MMC1
                
                
                U-Boot 2021.10 (Oct 12 2023 - 17:18:09 +0200) Allwinner Technology
                
                CPU:   Allwinner H3 (SUN8I 1680)
                Model: Xunlong Orange Pi Lite
                DRAM:  512 MiB
                MMC:   mmc@1c0f000: 0, mmc@1c10000: 2
                Loading Environment from FAT... OK
                In:    serial
                Out:   vidconsole
                Err:   vidconsole
                Net:   No ethernet found.
                Hit any key to stop autoboot:  0 
                switch to partitions #0, OK
                mmc0 is current device
                Scanning mmc 0:1...
                Found U-Boot script /boot.scr
                2239 bytes read in 8 ms (272.5 KiB/s)
                ## Executing script at 43100000
                4097976 bytes read in 178 ms (22 MiB/s)
                28877 bytes read in 7 ms (3.9 MiB/s)
                Kernel image @ 0x42000000 [ 0x000000 - 0x3e87b8 ]
                ## Flattened Device Tree blob at 43000000
                   Booting using the fdt blob at 0x43000000
                   Using Device Tree in place at 43000000, end 4300a0cc
                
                Starting kernel ...
                
                [    0.001920] /cpus/cpu@0 missing clock-frequency property
                [    0.001957] /cpus/cpu@1 missing clock-frequency property
                [    0.001986] /cpus/cpu@2 missing clock-frequency property
                [    0.002016] /cpus/cpu@3 missing clock-frequency property
                
                Initializing Jailhouse hypervisor  on CPU 0
                Code location: 0xf0000040
                Page pool usage after early setup: mem 37/1770, remap 0/131072
                Initializing processors:
                 CPU 0... OK
                 CPU 1... OK
                 CPU 2... OK
                 CPU 3... OK
                Initializing unit: irqchip
                Initializing unit: PCI
                Page pool usage after late setup: mem 54/1770, remap 5/131072
                Activating hypervisor
                Created cell "orangepi0-inmate-basic"
                Page pool usage after cell creation: mem 67/1770, remap 5/131072
                Cell "orangepi0-inmate-basic" can be loaded
                Started cell "orangepi0-inmate-basic"
                60000000 RAM limit
                Booting!
                hdmi, mode info : clock 40000000 hdis 800 vdis 600
                BASIC mem at 0x49000000
                BASIC stack at 0x8000
                dotclock: 40000kHz = 40000kHz: (24MHz * 20) / 3 / 4
                BASIC mem at 0x49000000
                freq 23861940 per usec 23
                Ready!
                Starting syslogd: OK
                Starting klogd: OK
                Running sysctl: OK
                Populating /dev using udev: 
                Starting
                
                hdmi, mode info : clock 148500000 hdis 1920 vdis 1080
                dotclock: 148500kHz = 148500kHz: (24MHz * 99) / 8 / 2
                [CedarX SUNXI] VE version 0x1680 opened.
                REGS pa: C880B000
                MEMORY pa 80000000, page offset C0000000 size 16777216
                Secondary boot
                ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
                ALSA lib conf.c:5180:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
                ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
                ALSA lib conf.c:5180:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
                ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
                ALSA lib conf.c:5180:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
                ALSA lib conf.c:5703:(snd_config_expand) Evaluate error: No such file or directory
                ALSA lib pcm.c:2666:(snd_pcm_open_noupdate) Unknown PCM default
                cannot open ALSA audio device default (No such file or directory)
                h264enc: invalid picture size
                could not create encoder
                closing alsa
                done
                seedrng: can't remove file 'seed.credit': Read-only file system
                ROOT DEV /dev/mmcblk0
                DATA PART /dev/mmcblk0p3
                DATA PART NO 3
                Mounting data partition: 
                Starting network: OK
                Starting dropbear sshd: OK
                Thu Feb 10 11:01:20 UTC 2022
                
                
                Welcome to Buildroot for the Orange Pi Lite
                
                OrangePi_Lite login: 

                But It gets stuck in Trying to boot from MMC1 most of the time I execute the BOOT command. 🫀

                • uli replied to this.

                  I think most of you know how to do this, but just in case somebody else wants to access serial and don't know how to do it, here you have the steps:

                  You need a USB to TTL adapter (they're usually cheap, from AliExpress).
                  I used 2 different ones, both with good results:


                  This one uses the CP2102 chip.


                  And this one uses the FT232RL chip, and you can set up the voltage with the jumper (in the picture, 5V is selected, for the OPi, you need to set it to 3.3V).

                  And then you need 3 female-female Dupont cables. Use the ones with the individual pins, as you'll probably connect them to non continuous pins. They look like this:

                  The Orange Pi has 3 dedicated UART pins (TX, RX, GND). In my case, the OPi Lite has them by the USB connectors:

                  You need to connect TX to RX on the TTL adapter, RX to TX (so, basically, it's a crossed connection) and GND to GND. And nothing more.

                  I use CoolTerm as my app.
                  Select the adapter from the port, set the baud rate to 115200, Data Bits to 8, Parity to none, Stop Bits to 1 and no Flow control option checked.

                  After that, just click the "Connect" button, and if everything goes well, you'll see the info flowing from the serial communication. Cheers!

                  Dmian But It gets stuck in Trying to boot from MMC1 most of the time I execute the BOOT command. 🫀

                  Ouch. I have never seen that on an Orange Pi, but I have an R69 STB board that almost always fails to boot if a serial converter is attached. It works 100% fine if nothing is attached, or if I connect the converter after bootup.
                  That is, needless to say, extremely annoying for development. If you can come up with a solution, I'd like to hear about it. πŸ™‚

                    uli I honestly have no idea how to solve it. It's not a huge problem, to be fair. The only problem is disconnecting and connecting power if I want to reset the machine. It may mechanically stress the connector a bit. But this board has so many quirks, that I'm not too fond of it. Don't worry too much about it. Since it can't be reproduced 100%, it's actually not a bug... πŸ˜†

                    7 days later

                    The latest build includes a fix that clears the comms area between the Linux helpers and Engine BASIC on boot. If it works, it should at least fix the issue with the spurious video files, possibly even the reboot problems.

                    Since I cannot reproduce either, I refrained from testing altogether. πŸ˜ƒ Tell me if it helps.

                      Powered by: FreeFlarum.
                      (remove this footer)