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

Optimizing memcpy Performance on Intel Core i7 10700K: SIMD and Compiler Flags

I am analyzing the performance of memcpy on an Intel Core i7 10700K CPU , using GCC 10.2 on Linux kernel 5.10. My assumption is that its speed should be close to the time it takes to transfer one long multiplied by the number of longs being copied. Could memcpy be optimized to exceed this expectation, possibly using SIMD or other CPU specific features? Are there any compiler flags or hardware optimizations I should be aware of to get the best performance out of memcpy?...

Impact of Using Extended Registers (r8, r9, etc.) on Code Size and Performance

I have a question about using the extended registers as in r8, r9, r10, .... , I want to use them frequently in my program, but I've noticed a problem with code size. For instance: ```...

.Net Class for Invensnese ICM-20948

I've written the attach class to get the accelerometer and gyro data from the ICM-20948 unit. Unfortunately the data fluctuates massively when I am trying to do a basic calibration. Can anyone help me? Am I getting the reading correctly or is it my calibration that is off....

While loop in Embedded C

Hi everyone, i started coding embedded C recently, based on my understanding of While loop it loops over the code as long as the while loop condition remains true, in my simple Led chaser code on ATmega324 bord i was expecting it to break as soon as i released the button switch but the loop kept executing every single line inside it and the LEDs kept lighting up. i came with a solution which was adding a For loop with an IF statement inside it to check if the push button is still pressed. but am still wondering why would the while loop keep on going while the condition is not TRUE anymore. "i believe that an IF statement would do that not a while loop" #define F_CPU 16000000UL //define the 16 MHZ crystal Clock...
No description

How to Disassemble and Filter Out Static Jumps in Program Output with Bash

My program outputs encoded instructions, and each line represents an independent set of instructions, like this:``` 0x81FB4300000090 0x69FC4300000090 0x81FC4300000090 0x69FD4300000090...

Sonoff water tank

Has anyone checked the water tank level with "sonoff"? I have many here and some 'float keys'. I would basically work with the idea that: If the float switch makes contact, I have a full water tank, otherwise I need to turn on the pump. Am I traveling a lot?
ps.: I'm a great designer lol...
No description

Why did the value of the rbx register change unexpectedly in GDB?

I am debugging a program on an x86-64 system Ubuntu 22.04 GDB v10.2 GCC 11.2.0 using GDB and encountered an unexpected behavior. I was inspecting the value of the rbx register and noticed that the value changed from 28 to -5604 without stepping through any new instructions. I am trying to understand what caused this change, as I did not execute any additional steps stepi or similar commands that would modify the register value. The sequence of GDB commands I used is in my gdb.txt file The value of rbx initially read as 28 in decimal format, but after running the x/1wd $rbx command, the value changed to -5604. I haven’t taken any further steps stepi or continue, so I’m unsure what caused the value to change...
attachment 0

How to Execute a Timed LED On/Off Sequence Using millis() Function

Hello ,I’m struggling with a problem. I want to execute a sequence of turning an LED on and off, but not just a simple on/off; I want a timed sequence that turns the LED on and off at specific intervals. My requirement is to use millis() because other actions need to run in parallel. Here’s what I’ve done: ```cpp...

Segmentation Fault with GCC and Gcov on Instrumented C++ Program

I'm to instrument GCC and Gcov to collect execution sequence information. While my approach works well for c programs on x86 and x86_64, I'm encountering a segmentation fault when attempting to instrument a C++ program on x86_64. ```C++ #include <iostream> #include <vector> #include <algorithm>...

Initialize AVR32UC with Zephyr OS for DHT22 Sensor Communication and Resolve Data Fetch Failure

Hey guys, how can I initialize the AVR32UC microcontroller with Zephyr OS to communicate with the DHT22 temperature and humidity sensor, and address the issue of failing to fetch sensor data? I have been able to configure Zephyr OS for the AVR32UC and ensured all necessary drivers are enabled. The DHT22 sensor is connected correctly, and the initial code for reading temperature and humidity data is implemented. However, the microcontroller still fails to fetch data from the DHT22. what could be wrong? here is my code snippet: ```c #include <zephyr.h> #include <device.h>...

Quectel EC200U GPRS Design

Hi everyone, I'm designing a custom GPRS module board with esp32 and I've chosen the EC200U GPRS module, I want to know the basic pin mapping and operational modes of that EC200U GPRS module...

How can I recover binary data from the INTDATA file using the provided C structure?

Can anyone help me in solving this i am in analysis paralysis right now cannot wrap my head around the problem Programming Exercise ...
attachment 0

Why does my assembly network server application cause a segmentation fault?

I'm working on a network server application in assembly language so I can understand low level networking concepts. So I've implemented a socket server using assembly language system calls, but I'm encountering a segmentation fault during execution. I have complied the binary on an Intel Core i7 12700K processor running Ubuntu 22.04 and the NASM assembler ....
attachment 0

How do I fix a tensor dimension mismatch in TinyML disease detection?

Hello guys am workin on Disease Detection from X-Ray Scans Using TinyML, i have gathered a diverse dataset of X-ray images from public medical databases, used images labeled with specific diseases or conditions, such as pneumonia, tuberculosis, or normal/healthy cases, i have also prepared my training script but keep getting an error while training the model `Traceback (most recent call last): File "<stdin>", line 1, in <module> File "tensorflow/lite/python/interpreter.py", line 42, in set_tensor self._interpreter.SetTensor(self._tensor_index_map[tensor_index], value)...

Handling Multi-Digit Integer Input in Assembly on Ubuntu 22.04

This fm_module.txt file has a copy of my project source code that involves a simple user input and arithmetic operations on an Intel Core i7-12700K processor running Ubuntu 22.04. I've implemented a simple assembly program to take a single-digit integer as input from the user and increment it by one. While the code works correctly for input values between 0 and 9, it fails to handle larger integer values. How can I effectively handle multi-digit integer input and conversion in How can I effectively handle multi-digit integer input and conversion in assembly?...
attachment 0

Why is the XOR operation not toggling the player variable in my x86 assembly tic-tac-toe game?

I am working on a text based tic-tac-toe game for some users, using x86 assembly on an Intel Core i7 12700K systems running Ubuntu 22.04. I'm using NASM assembler and GNU Linker for development. I am beginning to have an issue with the change_player function. The code attempts to toggle the player variable between "0" and "1" using XOR, but the value remains unchanged. What is causing the player variable to not be modified as expected? Are there any issues with memory access or data manipulation in the change_player function?...
attachment 0

How can I optimize matrix multiplication performance and reduce L3 cache misses in my C++ library?

I started a C++ library for efficient matrix operations, with a primary focus on matrix multiplication. The target application is scientific computing, of course performance is critical. I implemented a start matrix class and a matrix multiplication function, used SSE instructions for optimization on Intel Core i7 12700K, 32GB DDR4 3200 RAM on visual studio code with clang format extension . https://github.com/Marveeamasi/image-processing-matrix-multiplier even after using SSE instructions, the current matrix multiplication implementation started to show significant performance bottlenecks, especially when dealing with large matrices. Profiling results indicate high L3 cache miss rates as the primary culprit``` Matrix Matrix::operator*(const Matrix& other) const { if (cols_ != other.rows()) {...

Segmentation Fault in Assembly Program Using AT&T Syntax and GNU Assembler

I've written a test program using AT&T syntax for use with GNU assembler. The program is supposed to print the value 1 using printf.
attachment 0

What's wrong with my code?

Hello everyone, I was just wondering why this piece of code is not working. The code get uploaded normally to arduino But when I move the gyroscope it just give me random values of X & Y & Z Im expecting 0,0, variable... ...
attachment 0
Next