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
Sinestro
Oct 31, 2010

The perfect day needs the perfect set of wheels.

Captain Capacitor posted:

Well it was thanks to you, then! You were kind enough to help me out just last week when my eyes mistook F_CPU for F_USB.

I was also pleased to find that there's an implementation of Google's protocol buffers available for embedded devices. If my project runs out of room it'll be the first thing to go but the flexible data structures are kind of nice.

I didn't know they did. You have made me work on my UAV for the first time in weeks because comms code was sucking the life out of me.

Adbot
ADBOT LOVES YOU

Sinestro
Oct 31, 2010

The perfect day needs the perfect set of wheels.

Arcsech posted:

Buy an MSP430 Launchpad or a Stellaris Lauchpad or something like that and mess around with it for a while. DO NOT use an Arduino if you're attempting to get an embedded systems job, you will be laughed at all the way to the door. Right or wrong, the Arduino has a rep for being nothing but a kid's toy but the MSP430 line are some pretty commonly used microcontrollers, and of course ARM is beefy as hell (for a uC).

:kiddo: Is it OK if I just use them as cheap, ubiquitous AVR dev boards with a bootloader on them, but skip the libraries?

Sinestro fucked around with this message at 03:02 on Jan 20, 2013

Sinestro
Oct 31, 2010

The perfect day needs the perfect set of wheels.

Victor posted:

Heh, at my job we're switching away from an Arduino Mega to our own board with an STM32F4xx chip for our quadcopter flight board. I think a few questions could easily winnow the ranks of applicants. For example, ask them if they like the IDE (correct answer is it's nice for simple stuff and ridiculous for anything non-simple), if they like the TWI library (correct answer is it's nice for simple stuff but horrible for robustness), etc.

How are you liking Google protocol buffers on embedded devices, so far? I have to do the same thing at work for our quadcopter. We're using AeroQuad code now and it's... not as robust as what we'd like. (I probably ought to be politically correct.)

They are lovely. It abstracts away a lot of the loving awfulness of binary comms.

Sinestro
Oct 31, 2010

The perfect day needs the perfect set of wheels.
How do I learn to layout real PCBs.

Sinestro
Oct 31, 2010

The perfect day needs the perfect set of wheels.
Sorry, I am not at my most coherent at 2:27 AM. I want to learn to do advanced layout, such as a board using a CC430 family chip --I've never payed out a board with wireless on it.

Sinestro
Oct 31, 2010

The perfect day needs the perfect set of wheels.
Not until writing embedded code had I ever written something purely procedural long enough to make me truly experience the reasons for further developments in computer science. :smithicide:

Sinestro
Oct 31, 2010

The perfect day needs the perfect set of wheels.
Some PSoCs (the highest end 5LP models) have a 2MHz ADC.

Edit: http://www.cypress.com/?mpn=CY8C5667LTI-LP009

Sinestro
Oct 31, 2010

The perfect day needs the perfect set of wheels.

Luigi Thirty posted:

What do I need to buy to be able to do on-chip debugging with my Arduino? I'm using Atmel Studio, not the Arduino software.

AVR Dragon

Sinestro
Oct 31, 2010

The perfect day needs the perfect set of wheels.

feedmegin posted:

The 68000 proper needs both of those things, sure, I've breadboarded one. It's not a bad architecture to write assembly for, though.Theoretically it's CISC I guess? But it's nice and orthogonal and has a bunch of registers. Way nicer than 16-bit x86, for certain.

Comparing original 1979 68000 to modern microcontrollers is a bit pointless though, all-in-one chips like we have now just didn't exist back then.

The question is more why that architecture hasn't been used for micro controllers more recently.

Sinestro
Oct 31, 2010

The perfect day needs the perfect set of wheels.
This is a huge longshot, but does anyone have experience using a Beaglebone Black with OpenOCD? I've read every single English-language article I could find online and asked in all of the relevant IRC channels, but everything I found was either 'I got it working great but I'm not going to tell you how' or 'Scrub, stop being poor and use Code Composer Studio' which I even have (since I'm using an XDS100v2 adaptor that comes with a restricted license) but loathe deeply.

Sinestro
Oct 31, 2010

The perfect day needs the perfect set of wheels.

Pan Et Circenses posted:

What are you doing that you need actual JTAG for?

Normally for ARM I'd suggest getting a J-Link instead of whatever proprietary debug probe the company produces. It's supported by every embedded IDE out there or you can use the bundled GDB server, and works with anything that's a proper ARM core. To be frank I wouldn't even consider using OpenOCD unless you seriously can't afford the $60 for the edu version (non-commercial use).

I'm a moron who decided that it would be fun to try and make my own operating system, so the ability to debug bare-metal programs is pretty desirable. Yes, I am aware of the many layers of bad decision involved in this, but I already spent far too much time and money on this stuff so I'm not going to quit right now.

I already spent $80 for the XDS100v2 from TI, but that's because just the adaptor from the standard normal interface that everything else uses to the special proprietary TI connector is almost twice as much. I can afford it soon, I just already got the BBB, the XDS100v2, and a new soldering station because my old Hakko knockoff stopped working when I tried to change the tip to put the JTAG connector on the board so I was hoping that I wouldn't have thrown that money away completely.

Not super happy with the idea of the J-Link EDU, just because I do pretend to myself that somehow I'll manage to succeed where all but a very tiny few have failed and could somehow someday make money off of this, and I'd rather not familiarize myself with something that I can't use for other projects I'll definitely be selling, since there's no way that I'm shelling out the $400 for the full one soon, but I don't want to end up in a position where I get in trouble because I someday decide to start selling something that I play around with using the wrong adaptor right now.

meatpotato posted:

Echoing Pan Et Circenses with my proxied experiences.

My wife once managed to get OpenOCD to work on an ST-Link V2 for a project at work (trying to flash a bunch on non-ST chips without dropping loads on cash on J-Links) but it was really slow compared to using vendor libraries with an ST-Link or a J-Link debugger. One day it might be a useful replacement for proprietary tools but these days it's not practical for real work.

I believe OpenOCD is a cool project and I hope that the future brings ridiculously cheap open hardware debuggers that can compete with the big guys.

This is for the least real work ever, but it's not even just 'not practical', it's not even vaguely functional at the moment at anything that I've tried to do except for using an ST-Link to program and debug an STM32 much, much slower than the official tools could, but with the advantage of being marginally less painful to use... eventually.

I guess I'll save up and then give another too-large chunk of money for something that might actually work.

I've spent at least twenty or thirty hours trying to get this poo poo to work, I don't want to think about how little that means my time is worth versus $120 for a J-Link EDU and the SEGGER branded version of the adapter, or $90 for the EDU and an off-brand adaptor which should be okay because it is just a tiny circuit board with a connector on either side of it.

Sinestro
Oct 31, 2010

The perfect day needs the perfect set of wheels.

Pan Et Circenses posted:

If a non-commercial project turns into a commercial one, there's really no chance you'd get in trouble for buying the J-Link commercial version at the time you actually start commercializing it. Also, the only reason you'd really need a specialized adapter like that is if you're connecting/disconnecting the debug probe a bunch because it's a pain to reconnect pins one by one over and over.

ARM JTAG connections are totally standardized across every single ARM core in existence, so all you need to do is get some female/female jumper wires and play connect the dots (assuming that board brings the signals out to a header; otherwise it's soldering time). Connect the following pins of your generic JTAG probe to the same pins on the board and it will Just Work: TDI, TDO, TMS, TCK, V+ (reference), GND. You may also need to connect RESET (that's CPU reset, not tap reset) so the probe can hold the board in reset while connecting, allowing you to debug the boot process.

I know that's the logical thing, but my attitude towards any company involved in electronics and especially embedded processor technology is about five hundred percent cynicism, so I'm never sure.

I'm aware that it's standardized, don't worry. Unfortunately, it's also tiny (in comparison to the standard 2.54mm stuff) and smaller than any jumpers or anything that I could find online. Tiny connectors are a pretty good reason to get an adaptor board, in my book.

And before someone points it out, yes I know that 1.27 mm isn't tiny overall, but compared to what I really want to muck around with jumper wires for, it is. Also, I feel like there are the mountain of ground pins in that connector for a good (signal integrity) reason, and at this point I'd rather skip a pizza and a bit more and buy the cheaper 'clone' (inasmuch as you can clone the idea of 'two signal-compatible connectors on opposite sides of a PCB') adaptor so I don't have another thing to worry about.

Sinestro
Oct 31, 2010

The perfect day needs the perfect set of wheels.

Crankit posted:

I ordered a $2 stm32 board off ebay, and an st-link programmer, apparently the board is called a "blue pill" and my computer recognises the ST Link and the ST link programmer software can communicate with the board. I'm still waiting for a little screen and accelerometer thingy to turn up, but how do I actually make the .bin file i want to put on it?

I'd suggest against using an IDE like that, at least if you've done any C programming before. It's not hard to make the whatever.bin file yourself, you just use arm-none-eabi-gcc (available from Homebrew as OS X with brew cask install gcc-arm-embedded, in the package manager of pretty much every Linux distribution, and easily installable in the Linux VM you'll really want if you're on Windows :v:) in much the same way that you would with a normal C project, and then use arm-none-eabi-objcopy -O binary linked_output_from_gcc.elf actual_program.bin to generate the file you'll flash to the STM32 with st-flash.

I'm not on the computer that I use for ARM development stuff, so I can't test it, but a good starter Makefile is probably something like this, although that's mostly written off the top of my head.

Sinestro
Oct 31, 2010

The perfect day needs the perfect set of wheels.
The HAL drivers seemed fairly awful (slow and unergonomic) when I tried using them, but portability isn't a huge concern for what I'm doing so it might be more painful than just going your own way if you need enough different chips to run the same code.

Sinestro
Oct 31, 2010

The perfect day needs the perfect set of wheels.
The CubeMX generates HAL code I believe. I just use manual register manipulation, because it's by far nicer to just work from the documentation, since there's not that much that the official code does for you that is actually good if you know what you're doing, the interface is mostly the same as the hardware with some slightly nicer register macros than the old libraries but with a ton of super obvious error checking to slow things down.

Adbot
ADBOT LOVES YOU

Sinestro
Oct 31, 2010

The perfect day needs the perfect set of wheels.
ST's documentation is terrible and their libraries are unforgivable.

  • Locked thread