Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
JawnV6
Jul 4, 2004

So hot ...
Right, it's clear he's asking in the context of degrees but it could just be "Are Embeddeds do Computer Engineer" wholly separate from that somehow? I had the choice between CS, EE, and "Computer Systems Engineering." Went to CS prof to talk through the options. I went with EE specifically because neither CS nor CSE wasn't certified, but that honestly hasn't impacted my career one way or the other.

I did take a lot of CS classes, nearly qualified for a minor. Took even more after I graduated to fill in the gaps between HLL's and the hardware I was working on.

Adbot
ADBOT LOVES YOU

JawnV6
Jul 4, 2004

So hot ...

Volguus posted:

For embedded?
Yeah? Sure, spend some time hand-rolling a serialization protocol in two separate languages in 2017 if you want to, but there are plenty of bindings for a variety of formats for different use cases and languages available.

nanopb for protobufs in C, capnproto is the same guy who did protobufs that does a compact in-memory format suitable for slamming out over a wire, and CoAP is a good fit if other parts of the system are REST.

But sure, embedded serialization is a special snowflake that nobody's tended to.

JawnV6
Jul 4, 2004

So hot ...

Volguus posted:

The entire reason why I asked the question is because I imagined that my problem is already solved. I thought (wrongly) that maybe protobufs were not quite designed for lovely CPUs. Is nanopb the recommended protobuf implementation for embedded? What are you using?
I used nanopb at my last company, the server side had a scala library that inflated it to something native. We weren't really compute performance constrained (100+MHz Cortex-M4) so I can't speak to that. And if you genuinely have ~12 bytes you're trying to get across a channel that you're writing the other side of and have a PoC up and running, it might not be worth it. But it reduced the data by a surprising amount. The guts are worth a brief scan, i.e. it condenses uint32_t's into 8 bits if the value is small enough. That does make the size dependent on the content, which may or may not pose a problem.

It takes the .proto and spits out generated code. I had to fill in a few callbacks to populate the data. After that it was a binary blob, I'd fill in a flash page with as many as would fit and kick them up to the server. No other framing, stack blobs and shoot them out.

Mr. Powers posted:

At work, I'm trying to design an IPC system for a master processor (still a microcontroller) to control a bunch of modules that may be connected by I2C, UART, or potentially in the master. It's a platform that we're going to use for several products, thus the different connectivity options.

I've never used protobuffers. Is that something I could use for the messaging, and just wrap them up in a transport layer?
It's a format designed for quickly passing compact structures around servers. It's designed in a way that you can consume it without having to know all the details of every field so a server a revision behind can pick of what it understands and pass the rest along.

That said it might be a little odd for something as slow/constrained as I2C? I never had to unpack them on the embedded side, just encode sensor data.

JawnV6
Jul 4, 2004

So hot ...

Silver Alicorn posted:

Hint, arm assembly is really niche and there aren't really any in depth guides. I learned a lot by disassembling homebrew demos
How's that now?

JawnV6
Jul 4, 2004

So hot ...
Just put jumpers everywhere with a DNP 0ohm bypass :v:

JawnV6
Jul 4, 2004

So hot ...

Hyvok posted:

There are some pretty neat power analyzers (from Keysight for example) which enable you to pinpoint power use to some certain lines of code etc.
I'm not really understanding how this would work in the case where cutting traces helps.

"Boy howdy these wfi instructions are burning sooooo much power, better get rid of them!"

JawnV6
Jul 4, 2004

So hot ...

Volguus posted:

send known simple data over the air and see what i get on the other side.

Great place to start. Another handy thing for bringup with protobuf is to get a Python or other scripting language binding so you can quickly check byte patterns on a command line.

JawnV6
Jul 4, 2004

So hot ...

Volguus posted:

Is that ... normal? Has anyone ever seen something like this before? This particular behaviour causes me to not be able to run protobuf on the thing, since that protocol reads only one byte relatively often. Would then the solution be for me to implement some form of "caching" or a buffer or something, then read 2 bytes and if the caller only asked for one remember the other byte for later? For the next call?
"Normal" isn't the word I'd use. Every part tries to support a breadth of available communication, everything's slightly different, and you end up burning a lot of time on weird subtle issues like this. Even assuming each chunk is 8 bits is a contrivance.

I would guess there's an internal FIFO that you're reading from. When it says it has 2b, you read 1b, and the other disappears, I'd check that the assembly access to that register is actually doing a single-byte access. One explanation could be that you're doing a double-word read, the HW thinks you've pulled both bytes, and the compiler just masks off the one you explicitly asked for without realizing that second byte isn't in the HW any more. With embedded work there's a lot of HW masquerading as memory-mapped addresses, a lot of careful attention must be paid to that interface. Sometimes it helps to step back from the immediate problem and run experiments. Just like you checked getting 0x01020304 across, try larger buffers with known quantities that aren't protobufs.

One thing, when you say protobufs won't work because of single-byte accesses, are you significantly memory constrained? If not I'd definitely just have the driver dump the full byte stream somewhere in memory then have the decoder unpack it after all the bytes are through the channel. Don't try to point the decoder at the raw UART MMIO unless it's absolutely necessary.

I'm not sure you have physical wires to use a LA, but that's another tool that should be in everyone's kit.

JawnV6
Jul 4, 2004

So hot ...

peepsalot posted:

Just write an emulator.

Boring. The correct answer is "sumo robots:" https://www.youtube.com/watch?v=QCqxOzKNFks

JawnV6
Jul 4, 2004

So hot ...

movax posted:

Chinese chip makers would love to stop paying ARM license fees at some point.
This is the one argument that I sorta believe, and that wavers day to day. The folks I know who are super into RISC-V are all carrying axes to grind, and they do that bitcoin thing where criticism from nearby-field experts are brushed off as "so make ur own orthogonal extensions :smug:"

There was one serious name getting floated around but everything attached just looks like an empty pitch?

JawnV6
Jul 4, 2004

So hot ...
I dug around, the info's out there. Back when ex-coworkers were trying to recruit me for the thing it was hush-hush, but I was thinking of Dave Ditzel.

If anything's going to cause a paradigm-breaking shift in computing architecture, it'll have some tie to Transmeta. Those folks got so, so much right.

Malcolm XML posted:

Nvidia is using it on GPUs as a watchdog micro
Could just as well be an inscrutable state machine, worst case it balloons into a ME equivalent.

JawnV6
Jul 4, 2004

So hot ...
Just set up the first scatter target as the end chain descriptor and have the DMA engine reprogram itself :2bong:

JawnV6
Jul 4, 2004

So hot ...
Is there a better thread for FPGA questions?

I have a spartan-6 board. I've downloaded ISE 14.7, done the stupid DLL swap to get it to run on Windows 10, now i have an example project I want to open that's from EDK. Can I open EDK projects? It failed on the first go but maybe there's additional steps to get it running on Win10. Could I just import the pcores into ISE?

Failing that, is there a modern FPGA with a free toolchain, HDMI in & out, and an Ethernet port?

JawnV6
Jul 4, 2004

So hot ...

Mr. Powers posted:

The ZCU102 board has all that but it is still probably $2000 and the HDMI IP is licensed.

Also, BYO HDCP key.
Or this for $500. I had my old FPGA, I've been watching speed runs and trying to get better at the Super Mario Darker Side run in general, was hoping I could just slap a twitch streaming box together instead of just buying a decent capture card :/

My other project is making my FLIR camera wireless and connected, was hoping some of the network streaming bits would come in handy for that one too.

Adbot
ADBOT LOVES YOU

JawnV6
Jul 4, 2004

So hot ...
It's a lepton I won at a hackathon, we had a RPi talking to it over SPI. The kit came with an impressive little mounting board with a LCD screen and did the color-correction stuff, along with the module mount with the pin breakouts. I'm trying for something much smaller, got some knockoff ESP8266's that I *think* I can wrangle a SPI bus out of.
https://twitter.com/jawnv6/status/938450932395753472

  • Locked thread