87 Followers
47 Following
967 Posts

I occasionally do some hobby electronics projects. 🇳🇱

29 years young

Homepagehttps://nekai.dev/
Favourite SMD package size0603 (1608 metric)
PronounsDon't care/ he,him

Its a classic case of RTFM! The first 4k of flash memory needs to contain a magic block of information that describes the executable. This is handled automagically for you when using the SDK, but it isnt obvious when building without the SDK.

So i had an ELF file, and to load that ELF file to the pico i used picotool, and it executed without complaints or warnings. I assumed that, when loading an ELF file where E stands for 'executable', the program would actually be executable.

But without that magic pattern it isnt! And not a single warning message that says "hey, this probably wont work, you might want to add a magic block to your program!" not during the coversion to UF2, not during directly loading, not during uploading the UF2. That certainly caused me some gray hairs..

I got a strange issue with debugging a RISC-V program on a raspberry pi pico 2W. I can upload the program to the flash, but when i try to connect openocd it seems that the RISC-V cores are not active. I need to explicitly reboot into riscv mode to be able to use openocd and gdb.

Then when i connect to the program, the current instruction is way outside the program flash memory and when i examine the flash location, it just returns all zeroes, as if the program was never written. However, when i dump the program with picotool, then i _can_ see the program at the correct location. It just seems the riscv cores cannot access the flash memory.

I'm gonna try with a non-W pico 2 but if anyone can give some insights or hints i'd greatly appreciate it!

These adressable RGB leds are nice, but the brightness curve really bothers me: they get way too bright way too fast. The channels range from 0-255 but when driving them at 50 they are already pretty bright.

It also means that at low intensities, the quantization effect is _really_ noticable. When i slowly animate the brightness, you can bery obviously see the leds step in brightness.

It would be better if a) the response would be logarithmic or something, or b) more resolution

Our focus remains on removing bottlenecks. We are engineering a Board Calculator for early conceptual sketches, a new Referral system to subsidise innovation, and we plan to sponsor more research faculties. All designed to make European manufacturing more accessible. 🧡

On the off chance that I can support a helpless soul with this information, here is the repository: https://coding.sergals.xyz/nekayee/hexapod-led-controller

The Readme file has condensed instructions for setting up cross compilation on Arch-based systems. Hopefully it will be useful for someone.

Next challenge: Setting up build pipelines in gitlab for automated building, testing, packaging, and deploying the package to my currently-nonexistant package repository.

Nekaī / hexapod-led-controller · GitLab

Welcome to the Nekai library of arranged processor instructions.

GitLab

Finished `release` profile [optimized] target(s) in 4.32s

WE GOT IT BOYSS LETS GOOO

This was the solution: https://github.com/rust-lang/cargo/issues/9673

Cargo Fails to Cross-Compile due to Linker Errors · Issue #9673 · rust-lang/cargo

Build Platform CPU Architecture: amd64 OS: Debian 10 (latest stable release) Libraries: glibc 2.28 (64-bit and 32-bit versions) openssl 1.1.1d (only the 64-bit version) Rust toolchain: Installed us...

GitHub

ugh i tried setting up cross-compilation for the Pi zero and while it's absolutely a breeze to cross-compile pure rust, the DBus crate i'm using compiles against a C library, and pkg-config is giving me all sorts of crap.

I managed to set up a sysroot and install the AArch64 libraries on my host computer but i think the issue now is that GCC is using the native C library instead of the AArch64 one. Which is really frustrating because I have no idea how to convince it otherwise.

Really at a loss here, because there is literally -zero- information on this available online. Guess i'll just set up the build tools on the pi zero and constantly rsync the source code to test it out :/ Dammit i really wanted cross compilation to work

Open source draait uiteindelijk niet alleen om code, maar om samen leren, delen en bouwen aan iets dat groter is dan één organisatie of project. Maar verkeerde keuzes kunnen ertoe leiden dat open source-initiatieven vastlopen. Dat kun je voorkomen door te leren van deze 5 valkuilen: https://opensourcewerken.nl/news/view/75e5da99-afa1-424c-9fad-d78fe0961066/5-bekende-valkuilen-en-zo-voorkom-je-ze
5 bekende valkuilen (en zo voorkom je ze)

Verkeerde keuzes kunnen ertoe leiden dat open source-initiatieven vastlopen. Door te leren van deze 5 valkuilen, voorkom je dat een project vastloopt. Valkuil 1: beginnen zonder…

Opensourcewerken
Ooh a phased ultrasonic array might be a cool thing to build for the hexapod

I got a raspberry pi pico 2W and i'm definitely going to try to run some rust code on the RISC-V hazard3 cores. rustup has a compilation target for it!

I really want to know how to run code on more than a single core without an operating system, and of course i'm going to play on hard difficulty by diving into it with Rust of all programming languages. But I like a good challenge for myself!