DevHeads IoT Integration Server

DII

DevHeads IoT Integration Server

The DevHeads IoT Integration Server accelerates technology engineering by helping pro devs learn, share and collaborate.

Join

seeking-collabs

🪲-firmware-and-baremetal

📦-middleware-and-os

📡-edge-networking

🟩-pcb-and-analog

jobs

☁-iot-cloud

✅-code-review

devheads-feed

general-dev-chat

How to Safely Flash USBMIDIKLIK Bootloader on a Mega Using an Uno on Linux Mint?

Good morning guys 👋🏻👋🏻 I'm diving into a project for a USB MIDI controller with a Mega (interface in the photo, the empty holes are for potentiometers, 12 buttons, 24 potentiometers, and 12 LEDs, it's quite a setup, so I'll need to multiplex...). Therefore, I'll need to flash the bootloader. I was thinking of using USBMIDIKLIK as the new bootloader, as it allows recognition as a MIDI device and program uploading, and it's reputed to be more reliable than other MIDI-related projects. I want to flash my Mega using an Uno, but it seems a bit confusing to me with a lot of diverse information, and I'm struggling to sort through it. Could someone provide a safe and simple modus operandi?...
Solution:
To flash the USBMIDIKLIK bootloader on your Mega using an Uno follow this approach 1. Connect the boards as described. 2. Put the Mega in bootloader mode. 3. Run the avrdude command: ...
attachment 0

Any guides for compiling OpenCV on resource-constrained ARM Cortex-A7?

Hey guys, I'm working on an image processing application for an embedded Linux system using an ARM-based processor (Cortex-A7). I'm considering using a library like OpenCV for image manipulation tasks. However, I'm unsure about the process of compiling OpenCV for a resource-constrained embedded environment like this. Are there any specific guides or tutorials available that address compiling OpenCV for resource-constrained ARM processors like Cortex-A7? @Middleware & OS...

how are local variables declared within the ISR handled?

Hi @Middleware & OS , When using FreeRTOS each thread has its own stack space it is dedicated to. So what happens with Interrupt Service Routines that's ISRs? Do they have a separate stack in memory, or is this behavior configurable? If it doesn't have a dedicated stack, how are local variables declared within the ISR handled?...
Solution:
In FreeRTOS, ISRs share the stack of the current running task. They don't have a dedicated stack by default, but you can configure FreeRTOS to use a separate stack for ISRs by defining configUSE_ISR_STACK in your FreeRTOSConfig.h file. Local variables in ISRs are allocated on the interrupt stack, so keep ISRs short and simple to avoid stack overflow.

Can anyone recommend recent resources for understanding TPM on ARM-based embedded Linux?

Hey guys @Middleware & OS I want to learn about using TPM in embedded Linux on ARM for secure boot, TrustZone, etc. I’m struggling to find up-to-date resources. Most of what I find, like the "Trusted Board Boot Requirements" and Infineon’s guide on secured boot for ARM, seems outdated or focused on Windows. Can anyone recommend recent resources like webpages, books, or videos for understanding TPM on ARM-based embedded Linux? So far i found books but they are outdated Are there any newer or supplementary materials?...
Solution:
@Daniel kalu Check out on Linux Foundation,this Foundation provides resources on TPM, including slides and presentations from conferences like the Embedded Linux Conference (ELC).I believe, this will be of help to your training.

FreeRTOS vs. Zephyr: Which is Better for ARM Cortex-M in Terms of Performance, Memory, and Support?

Good PM guys, I'm building an embedded system with an ARM Cortex-M processor and considering open-source RTOS options. FreeRTOS is popular, but I've also come across Zephyr. How do these two RTOSes compare in terms of real-time performance, memory footprint, and community support? Any experiences or recommendations for choosing between them for an ARM Cortex-M project? @Middleware & OS...
Solution:
Real Time performance comes down to your implementation, Memory footprint you can get almost similar sizes with both of them. Reaslistically 8Kb has been observed but Zephyr docs say we can get to 2Kb. Community support Zephyr has a large open community working on it and supporting it sort of easier to get into due to the larger industry players. Nordic has an academy that can take you from 0 to 100. FreeRTOS due to its age also has lots of information available. Zephyr feels like embedded linux, thimk KConfigs and DTS stuff while freeRTOS feels baremetal but you can still use quite a few HALs with it. Both can achieve a result, to really recomend either one would need context on your team , implementation details and such....

Are there any known issues with FreeRTOS+Sockets API and the latest STM32CubeMX HAL for the H7 serie

@Middleware & OS I'm encountering random lockups, while using the FreeRTOS+Sockets API with the latest STM32CubeMX package on my NUCLEO-H723ZI board. The application locks up at random points during execution. I've reviewed the ST forum posts on Ethernet and FreeRTOS+Sockets, but haven't found a solution yet. Are there any known issues with the FreeRTOS+Sockets API and the latest STM32CubeMX HAL version for the H7 series?...
Solution:
Yes, there are known issues with the FreeRTOS+Sockets API and the latest STM32CubeMX HAL version for the H7 series. These include bugs in CubeMX 6.0 and incorrect generation of the main file. Updating to the latest version of STM32CubeMX and manually editing the ioc-file and FREERTOS-STM32F4xx_Configs.xml file may solve the issues.

How different is programming with an RTOS compared to traditional bare-metal coding on an AVR?

Hey guys, I'm getting comfortable with basic AVR projects using I/O pins. I recently came across the idea of using an RTOS on microcontrollers. How different is programming with an RTOS like FreeRTOS compared to traditional bare-metal coding on an AVR? What are some key concepts I should focus on to understand how an RTOS manages hardware and interacts with my application code? @Middleware & OS...
Solution:
Rtos is different from bare metal - RTOS: Scheduler manages tasks, hardware abstraction, multitasking, and synchronization. - Bare-Metal: Direct hardware manipulation, no scheduler, total control. ...

How can I create a binary file that can run in an empty VM?

Good day guys, I wrote a simple program for FreeRTOS that implements a timer. I want to run this program in an empty virtual machine (such as VirtualBox or QEMU) on an ARM-based system. How can I create a binary file that can run in an empty VM? Any advice on this matter would be appreciated. I've looked through the resources on the FreeRTOS homepage but haven't found anything helpful. @Middleware & OS...

Any guides on what exactly I can try to retain my ip?

@Middleware & OS Hey guys, am trying to retain and Configure a static IP address on Embedded Linux (Raspberry pi, Raspbian Os) am running a local server and would like retain same IP for port forwarding. Any guides on what exactly I can try to retain my ip? I tried configuring my router but it doesn't seem to work...
Solution:
To retain a static IP address on a Raspberry Pi running Raspbian OS: 1. Edit /etc/dhcpcd.conf and add your static IP details. 2. Restart the dhcpcd service. 3. Edit /etc/network/interfaces and set the IP address to static....

what is the most accurate way in FreeRTOS to convert tick counts to milliseconds?

hey guys, I'm working on an embedded system running FreeRTOS on an ARM Cortex-M4 microcontroller clocked at 72MHz. I need to measure the execution time of a specific code block to optimize performance. The code snippet using
xTaskGetTickCount
xTaskGetTickCount
provides tick counts, but I need the time in milliseconds for better analysis. Considering the clock speed, what is the most accurate way in FreeRTOS to convert tick counts to milliseconds and achieve millisecond-level resolution for measuring code...
Solution:
so you have 72M ticks per a second. Ok your task takes from tickX to tickY. So taskTicks is tickY - tickX. from there is just some sums to ms?

I would like a guide or documentation on how can i install the flipper zero project into Rpi 3

Hey guys am trying to install the flipper zero project into an embedded Linux system (Raspberry pi 3), I would like a guide or documentation on how i can achieve this and also partition the raspberry pi @Middleware & OS...

Is a CRC check on the decrypted firmware sufficient for validating its integrity?

Hey guys @Middleware & OS I’m developing firmware for an embedded system with a bootloader that updates the firmware. The firmware is encrypted and decrypted by the bootloader before being programmed into flash memory. To prevent manipulation, is a CRC check on the decrypted firmware sufficient for validating its integrity, or should I implement additional security measures?

I'm looking for a simple, programmable module to control APA102 LED strips remotely.

@Middleware & OS Hi Devs, I'm looking for a simple, programmable module to control APA102 LED strips remotely. Ideally, it would:...
Solution:
@UC GEE maybe a simple esp32 with a little firmware that accepts data wirelessly?

Can you give me good snippet of code for AT commands resender?

Hello, Can you give me good snippet of code for AT commands resender? Like I am sending to my UART interface data via terminal and I want to send it to UART2 where peripheral is attached. So I will get its response to my original UART. Everything I tried was problematic when larger amount of data was received.

How can I achieve deletion of StringWriter objects?

Hey everyone, I am using avr-g++ compiler on Windows for an AVR chip . I need to delete a StringWriter object created from a pointer to PacketWriter. As I define a destructor for StringWriter wether virtual or not, it leads to this error and similar ones. What could cause the 'undefined reference' error?
Undefined reference to 'operator delete(void*)'
Undefined reference to 'operator delete(void*)'
...

Any suggestions for troubleshooting missed interrupts?

Hey guys, a friend of mine is currently working on AT91SAM9M10-EKES. The Code registers IRQ for 2 GPIO pins (PA20 & PA21) but only receives 22/26 expected interrupts (random). Could there be an issue in this IRQ handling code? ``` static irqreturn_t wiegand_interrupt(int irq, void *dev_id){ atomic_inc(&counter); printk(KERN_WARNING "IRQ received, counting... %d\n", atomic_read(&counter));...
Solution:
Yup, I had to define separate interrupt handler functions for each IRQ line. I also found this stuff helpful too https://linux-kernel-labs.github.io/refs/heads/master/labs/interrupts.html...

Installing Minimal Valgrind Components for Embedded Systems to Reduce Footprint

@Middleware & OS Hey guys, In other for me to minimize my embedded system's footprint, can I install just the necessary Valgrind components without replicating the entire installation path e.g., /tmp/val? I am using Valgrind 3.23.0, If so, which specific files from the build output are required for memcheck to function correctly?r...

Fixing 'Missing Operator' Error in Batch Script for Renaming JPG Files on Windows

I'm trying to rename image files (JPGs) on a Windows machine. I want to add an incrementing number (e.g., file1.jpg, file2.jpg, etc.) to each filename. I wrote a batch script using a loop, but I'm encountering a 'Missing operator' error. Here's the relevant part of the script: ```...

Understanding Anonymous Inode 0 Entries in /proc/pid/maps for Memory Usage in Embedded Linux

I'm investigating memory usage in my embedded Linux application using /proc/pid/maps. I'm confused by the entries with anonymous inode 0 in the perms column in particular. Seem to be some of the larger memory segments. Take a look : ``` ... addr end perms offset dev id size flags name...

How to Correctly Calibrate a Load Cell Using HX711 Library for Accurate Weight Measurements?

Hello everyone, I am trying to calibrate a load cell to obtain the correct weight. I followed the instructions from the HX711.pio library, which explains to start with no weight and then divide the raw value by the known weight to obtain the scale factor and use the tare method. However, the resulting values always show a ±10 error. How can I obtain the correct parameters to get the actual value from the load cell, or how can I achieve a better value if no weight is present? The result should be...