December 05, 2023, 04:56:21 PM

Recent posts

#31
ESP32 / Re: ESP32-POE Board
Last post by LubOlimex - November 20, 2023, 08:58:20 AM
ESP32-POE can be programmed from the USB, you can try the Arduino IDE code from Examples -> Ethernet -> ETH_LAN8720 first install the ESP32 package as explained here:

https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html
#32
ESP32 / Re: Compiling PC Emulator exam...
Last post by LubOlimex - November 20, 2023, 08:12:27 AM
Thanks for update and solution. I've had a few cases where libraries from older and newer versions of different Arduino packages existed and caused build problems. If anything is not compiling and anything else doesn't seem to make it work deleting everything and starting from a fresh installation is a always a good idea.
#33
ESP32 / Re: Compiling PC Emulator exam...
Last post by pollito - November 20, 2023, 12:13:36 AM
I uninstalled Arduino IDE, deleted the Arduino folder in Documents, removed all Arduino folders from my user profile (both Local and Roaming), and deleted all Arduino sub-folders from my Temp folder.

Then I downloaded and installed the latest version of Ardiuno IDE, added the boards URL, installed the "esp32 by Espressif Systems" board, and the FabGL library. Now I can compile the PC Emulator example as well as the others I've tried.

I'm not 100% sure what the magic step was, but I may have been using the "Arduino ESP32 Boards" instead of the Espressif version.
#34
ESP32 / Re: ESP32-POE Board
Last post by Annamag - November 17, 2023, 09:40:50 PM
Thanks for the info.  I just assumed it was pre-loaded.  Will look into setting up the tools and programming.  Cheers
#35
ESP32 / Compiling PC Emulator example ...
Last post by pollito - November 17, 2023, 05:49:45 PM
Hi there,

I've just installed Ardiuno IDE on my laptop, and am trying to compile the PC Emulator FabGL example, but no matter which version of FabGL I try, I get the following error:

C:\Users\pollito\AppData\Local\Temp\.arduinoIDE-unsaved20231017-4420-5owosu.t2chh\PCEmulator\PCEmulator.ino:44:10: fatal error: esp_spiram.h: No such file or directory
   44 | #include "esp_spiram.h"
      |          ^~~~~~~~~~~~~~
compilation terminated.

exit status 1

Compilation error: esp_spiram.h: No such file or directory

A quick google search shows that this was removed by Espressif in favour of esp_psram.h from version 5.0.

I've tried the latest release version of FabGL, the current one downloaded directly as a ZIP from Github, and the Olimex version, but all throw the same error.

The weird thing is that, on my desktop PC, the sketch compiles fine and I can upload it to the board. I have tried copying the version of FabGL from the PC to the laptop, but the issue persists.

The only thing I can think of is that the PC is using ESP-IDF 4.x, the laptop is using ESP-IDF 5.x, and that I somehow I need to configure the latter to use the earlier version. Does anyone know how I can do this?

Incidentally, both machines have the same "Addition board manager URLs" as below, and I am choosing "ESP32 Dev Module" for both along with the settings needed for PC Emulator.

https://dl.espressif.com/dl/package_esp32_index.json
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json

(Not sure why I have both of these tbh)

Any help would be greatly appreciated - I am going nuts trying to work out what's going on! ;)

Many thanks in advance.
#36
ESP32 / Re: ESP32-SBC-FabGL HAT
Last post by LubOlimex - November 17, 2023, 01:21:10 PM
We still haven't released LCD addon, we have prototypes and it will be called ESP32-SBC-LCD with 2.8 inch display and resistive touch. It gets attached to the board via the LCD_CON1 connector. But we are still working on the software support. Keep an eye for it.
#37
ESP32 / Re: Wrong boot mode detected (...
Last post by LubOlimex - November 17, 2023, 12:57:49 PM
Making the user button a boot button would probably help with this issue. Maybe try on one of the boards what I explained above - unsolder R48 and solder it on R49 pads, then force bootloader mode via the button (hold the button pressed, press and release reset, release the button).

If you are not keen to solder, maybe first try with another computer. Very common issue is incompatibility between the driver and the operating system and the tool used for programming (which is usually esptool). This causes timing and timeout issues during upload, if the values are too close to the timeout sometimes it might work, sometimes it might fail, some boards might work, some might not. Trying with latest version of esptool and drivers and another OS would also probably fix the issue. Maybe also try another USB cable and different USB ports,

It is a popular problem make sure to also search online for "A fatal error occurred: Failed to connect to ESP32: Wrong boot mode detected (0x1b)!".
#38
ESP32 / ESP32-SBC-FabGL HAT
Last post by maxsteel - November 17, 2023, 10:35:03 AM
Goodmorning,
I'd like to buy ESP32-SBC-FabGL to use it as a portable RS232 Terminal.
I need to know what's the lcd hat compatibile with it and if the fabgl terminal works with the integrated uext port.

#39
ESP32 / Re: Wrong boot mode detected (...
Last post by markj - November 16, 2023, 11:41:04 PM
So I have 13 ESP32 boards in total, and 7 exhibit this problem, and 6 I can program without issue.I'm using the same software and cable for all.

#40
A64 / Compiling kernel modules
Last post by ilario - November 16, 2023, 02:01:49 PM
Dear all,
I am trying to have the kernel ad5360 module available (for communicating via SPI to a bipolar multi-channel DAC).

I could not find an updated guide for compiling a kernel, so I report here my FAILED attempt, hoping that you can suggest me how to succeed.

On a side note, for compiling a custom kernel, it would be convenient to have on the Olimex repository also the linux-headers-* and the linux-source-* packages (suggested also here).

I performed these steps directly on the target A64-OLinuXino-2Ge8G-IND in order to not worry with the cross-compilation stuff.

1) make a backup of your /boot/kernel.itb file (it was verrrry useful for recovering the broken system)

cp /boot/kernel.itb /boot/kernel.itb-20231116
2) get the source code

mkdir ~/kernel
cd ~/kernel
git clone --depth=1 https://github.com/OLIMEX/linux-olimex -b release-20230725-v5.10.180

The specified branch points to the latest available code in that repository as of today.
I specified --depth=1 to avoid overheating, swapping and rebooting of the A64-olinuxino (anyway the box was open and I installed a huge heat sink (that fits perfectly inside the black metal box)).

cd linux-olimex
3) apply the current kernel configuration

cp /proc/config.gz .
gunzip config.gz
mv config .config
make oldconfig

4) select the wanted modules

make menuconfig...look for the module and select it...

5) compile it as a Debian package

To package the new kernel as a .deb package seems the most convenient option to me. Found the command here.

make bindeb-pkg KDEB_PKGVERSION=$(make kernelversion)-1
6) install the package with dpkg

cd ..
dpkg -i linux-image-5.10.180-olimex+_5.10.180-1_arm64.deb

7) reboot

(actually the reboot often fails for me (approx 50% of times), I have to poweroff (from the OS), then unplug and plug again)

8) hit the problem

In my case the system was stuck at the bootloader. Connecting a serial-to-USB adapter, I saw these messages:

[...]
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot/boot.scr
2274 bytes read in 2 ms (1.1 MiB/s)
## Executing script at 4fc00000
U-boot loaded from SD
Boot script loaded from mmc
Checking for /uEnv.txt...
Checking for /boot/uEnv.txt...
610 bytes read in 1 ms (595.7 KiB/s)
Loaded environment from /boot/uEnv.txt
Loading FIT image...
37739691 bytes read in 1618 ms (22.2 MiB/s)
## Loading kernel from FIT Image at 58000000 ...
    Using 'config-8861' configuration
    Trying 'kernel-1' kernel subimage
      Description:  Linux kernel 5.10.180-olimex+
      Type:         Kernel Image
      Compression:  uncompressed
      Data Start:   0x580000d4
      Data Size:    20051976 Bytes = 19.1 MiB
      Architecture: AArch64
      OS:           Linux
      Load Address: 0x40080000
      Entry Point:  0x40080000
      Hash algo:    crc32
      Hash value:   62c3ae8d
      Hash algo:    sha1
      Hash value:   4a758e3a90da6390220db741fb285add5cd708fb
    Verifying Hash Integrity ... crc32+ sha1+ OK
## Loading ramdisk from FIT Image at 58000000 ...
    Using 'config-8861' configuration
    Trying 'ramdisk-1' ramdisk subimage
      Description:  Ramdisk for kernel 5.10.180-olimex+
      Type:         RAMDisk Image
      Compression:  Unknown Compression
      Data Start:   0x5931fa14
      Data Size:    17536353 Bytes = 16.7 MiB
      Architecture: AArch64
      OS:           Linux
      Load Address: 0x4fe00000
      Entry Point:  0x4fe00000
      Hash algo:    crc32
      Hash value:   6fc8f1a9
      Hash algo:    sha1
      Hash value:   9b5bef05889c72d7e7c03a5d818834af2a634209
    Verifying Hash Integrity ... crc32+ sha1+ OK
    Loading ramdisk from 0x5931fa14 to 0x4fe00000
WARNING: 'compression' nodes for ramdisks are deprecated, please fix
your .its file!
## Loading fdt from FIT Image at 58000000 ...
    Using 'config-8861' configuration
    Trying 'fdt-3' fdt subimage
      Description:  unavailable
      Type:         Flat Device Tree
      Compression:  uncompressed
      Data Start:   0x5a3e762c
      Data Size:    28737 Bytes = 28.1 KiB
      Architecture: AArch64
      Load Address: 0x4fa00000
      Hash algo:    crc32
      Hash value:   8812a397
      Hash algo:    sha1
      Hash value:   e7381def5b4518beef225212a863c0ce5e13f53e
    Verifying Hash Integrity ... crc32+ sha1+ OK
    Loading fdt from 0x5a3e762c to 0x4fa00000
## Loading fdt from FIT Image at 58000000 ...
    Trying 'overlay-1' fdt subimage
      Description:  unavailable
      Type:         Flat Device Tree
      Compression:  uncompressed
      Data Start:   0x5a3fcec4
      Data Size:    330 Bytes = 330 Bytes
      Architecture: AArch64
      Load Address: 0x4fa10000
      Hash algo:    crc32
      Hash value:   4feb8819
      Hash algo:    sha1
      Hash value:   5a2294834f1bb2916cdbcde98423a535ef16022f
    Verifying Hash Integrity ... crc32+ sha1+ OK
    Loading fdt from 0x5a3fcec4 to 0x4fa10000
failed on fdt_overlay_apply(): FDT_ERR_NOTFOUND
base fdt does did not have a /__symbols__ node
make sure you've compiled with -@
Could not find a valid device tree
SCRIPT FAILED: continuing...
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Scanning disk mmc@1c0f000.blk...
** Unrecognized filesystem type **
[...]

9) restore your working system

in order to recover the system I powered it off, took out the SD memory card, plugged it to my laptop and restored the backup of the /boot/kernel.itb file.

Then it booted fine, I removed the custom kernel using apt

apt remove linux-image-5.10.180-olimex+
and reinstalled the official kernel using

apt reinstall linux-image-5.10.180-olimex

What am I doing wrong?
Where can I find the right kernel compilation guide?