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
some kinda jackal
Feb 25, 2003

 
 

Otto Skorzeny posted:

There's an ARM version of the TI Launchpad coming out shortly as well; notably, it's based on a Cortex M4 which has an fpu! http://www.ti.com/ww/en/launchpad_site/stellaris.html?DCMP=stellaris-launchpad&HQS=stellaris-launchpad-b

Thanks for this, by the way. I picked up a pair and the very next day they went to $12 apiece.

I guess now I should get off my rear end and figure out how to develop for these, huh.

Adbot
ADBOT LOVES YOU

some kinda jackal
Feb 25, 2003

 
 
Hey fellas, hate to doublepost but I want to bump the thread with a question:

I picked up a Freescale FRDM dev board on a whim just to dick around with. Unlike Arduino, which is ridiculously easy to start developing on, this seems to be a nightmare of toolchains and outdated facts from 2008.

I'd like to build a development environment using MacOS, but failing that I'd be okay developing in a Linux VM. However Freescale seems to only offer development tools for Windows. Should I be able to use some off-the-shelf ARM GCC toolchain to target this bad boy or do I have a lot of reading ahead of me?

Moving from Arduino development to ARM develoment is like going from riding a car to flying the space shuttle. As far as instructions go, anyway.

some kinda jackal
Feb 25, 2003

 
 
Yeah, I see that osx host support is in the roadmap for the arm gcc toolchain, but I'm not really going to wait until 2013 or whenever they get around to it. I'll be happy to do it from inside a VM if that's the case.

Anyone have any recommended "hit the ground running" resources for ARM coding? Arduino makes it pretty easy to get up to speed quickly, but something tells me this is going to be a little more painful.

some kinda jackal
Feb 25, 2003

 
 
Yeah, the download on their site is CodeWarrior something-something. I'm looking at a bunch of Eclipse stuff, and tried to compile my own cross-compiler but that was a giant pain in the rear end, as astr0 predicted.

I'll be more than happy to run this all in a VM. Again, my main problem is a lack of clear instruction for people who aren't already terribly familiar with embedded development. It's nothing I won't be able to overcome since I like to think I'm a pretty bright guy, but there's so much specialization where every board developer recommends their own set of tools, etc.

some kinda jackal
Feb 25, 2003

 
 
All told, I'd rather do my development on a Linux VM than a Windows VM, but if it's going to be a tremendous pain then I'm not going to fight it and just go with what Freescale recommends and build a Windows environment.

So just one thing I'd like to be clear on: If I can find a generic ARM toolchain, I should be able to compile code for my Freescale FRDM-KL25Z, right? I just want to make sure that I'm not wasting days trying to cobble together a Linux VM with ARM toolchains I download from source forge and then find out that it's irrelevant because I have to use whatever Freescale gave me.

I also found http://www.gnuarm.com but everything there seems to be six years old so I'm not sure I really want to install packages that old.

Sorry if these are really basic questions, I don't mean to flood the thread with things I could easily google online, but I'm having some trouble wrapping my head around the whole ARM development workflow, coming from an Arduino background, combined with the fact that there's a LOT of diverging information online.

some kinda jackal
Feb 25, 2003

 
 
Not sure what the iOS SDK comes with, to be honest. I'll poke around there later though.

Thanks for that link. I don't mind building myself if there's some chance it'll work. I'll give this a try :)

some kinda jackal
Feb 25, 2003

 
 
I think I love you :glomp:

some kinda jackal
Feb 25, 2003

 
 
Thanks for all the help so far everyone.

For some reason my system is having some serious issues compiling CS Lite toolchain so I'm going to move on to one of two things.

I found YAGARTO which looks like a working toolchain with OSX support. It hasn't been tested with anything above 10.6, however, so if that doesn't work I'm going to claim defeat with my Mac for the time being and use VMware Fusion to set up a reliable IDE under a Linux of some flavour. It seems there's more information available.

I should probably just stop torturing myself and install a Windows VM to use the tools Freescale provides, but for some reason I'm just not looking forward to doing this under Windows. I may be digging myself into a hole here, and not because I dislike Windows or anything, just that I'd like to get this working on something else before that.

some kinda jackal
Feb 25, 2003

 
 
OK, for one reason or another I managed to compile CSLite correctly this time around. I basically followed the directions for toolchain installation on http://gnuarmeclipse.livius.net/wiki/Main_Page (which actually links to the same file that mattx0r linked above.

Going to start digging into getting this working with my Freescale FRDM board now, but at least I cleared the toolchain hurdle. Thanks a million for everyone's help. This is way more frustrating than I'd imagined. I think once I'm done I'll write a "getting poo poo set up on a Mac for idiots" README of some sort so people can follow along.

some kinda jackal
Feb 25, 2003

 
 
Did anyone who ordered that Stellaris Launchpad board for five bucks apiece get their order?

Mine is sitting authorized but unprocessed with a ship date of 12/17/2012. I'm having a bit of a hard time believing it's taking them two months (from my purchase) to ship a pair of Launchpads.

If the price wasn't five bucks I'd probably cancel and just buy them somewhere else. AVnet wants $5 apiece too (with 399 in stock) but want $22 to ship to Canada so I'm not really ready to pay more for shipping than for two dev boards.





edit: If it seems like I'm jumping around back and forth with regards to my dev boards, I absolutely am. The Launchpad has prelim OpenOCD support and an available flasher that should work under OSX and Linux, and quite frankly I'm tired of fighting with the Freescale board. I was about to set up an XP environment to develop for it, but then I saw that the Launchpad is a happy camper under Linux/OSX, relatively speaking. For the record I have absolutely no end goal or project that I'm working on. I'm just trying to dick around with the platform. There are a few pet projects I want to try, but there's nothing that is keeping me from using an Arduino or PIC or something, other than curiosity about the ARM platform.

some kinda jackal fucked around with this message at 06:13 on Oct 30, 2012

some kinda jackal
Feb 25, 2003

 
 
If I had my choice I would be strict OSX. I've managed to cobble together a toolchain thanks to the advice in this thread, and I've gotten Eclipse CDT to work with that exceptionally well. Right now the weakest link is my Freescale board which, admittedly, was an impulse buy without much research. I've got two Stellaris launchpads in queue so I can play with one here and one at work.

I've definitely not ruled out PIC, and their developer support seems to be exceptional. The only real issue I've had with PIC is that I can't find any high profile eval boards. Granted that's partly because I haven't been looking very hard.


I've just been skimming the surface of this and was hoping to jury rig what I had into working. As a complete aside (not that I'm accusing anyone of doing this) I definitely don't fault anyone here if they feel like rolling their eyes at me because I'm not really doing any serious research or putting a lot of muscle behind this. It's literally been at the "hey I have an arduino that I like to make LEDs blink on. What else is out there that I can play with? Oh this ARM thing looks pretty cool, let's throw ten bucks at it and see what happens" stage of a hobby. I'm really glad you guys haven't kicked me out on my rear end though :)

some kinda jackal
Feb 25, 2003

 
 
Go listen to someone talk about about STM stuff and get some free STM stuff:

http://www.st.com/internet/com/Learning/stm32f3_seminars_na.jsp?WT.mc_id=stm32f3seminar_da_adbanner_sep12

I'm going to the one in Toronto on the 8th but only registered just now. Hopefully I'm still good. Will report back!

e: (just got my registration confirmation so I guess they're fine with last-second signups!)

some kinda jackal fucked around with this message at 02:08 on Nov 8, 2012

some kinda jackal
Feb 25, 2003

 
 
Attended the STM32F3 presentation. Overall I didn't learn anything useful because the presentation was a lot of sales mixed with a presentation of some IAR workbench pre-fabbed demos. Got a nice board out of it, so at least I have some new tools to play with.

Still working on my dev env. Trying to build something that will work for both STM32 and my Stellaris TI when it arrives. So far I've got cs gcc toolchain set up, just working on getting OpenOCD and Eclipse up and cooperating. I think I might be biting off a little too much for a beginner though, and some part of me thinks I should figure out more about basic embedded ARM development before I go worrying about the IDE.

Still sloughing my way through Embedded Programming O'Reilly book and it's helping some, but I really wish there was an equivalent to the Arduino support base for, if not individual boards, then at least a generic writeup on how to get into this from a beginner perspective. Nothing I haven't bemoaned about before so I won't rehash it.

Picked up a few RFID ICs for a pet project though. Nothing helps spur on learning like having a goal :)

I still swear that when I get halfway decent at this I am going to write some sort of "How to get into ARM development for beginners" website. At least for people who don't use the standard Windows tools.

some kinda jackal
Feb 25, 2003

 
 

Otto Skorzeny posted:

My Stellaris boards (Cortex M4F) came in yesterday. Good times.

heh



:(

some kinda jackal
Feb 25, 2003

 
 
Just going to throw this here, but it's a pretty comprehensive writeup for getting a free toolchain and dev environment running. Nothing that you can't put together yourself, and in fact you do need to do a little of your own research if the components or your system details stray too wildly from his defaults, but all said and done it helped me throw together a really nice environment.

I'm sure everyone is sick of me posting about my dumb nonstandard requirements so hopefully this will be the last non-actual-programming note I make:

http://www.stf12.org/developers/ODeV.html

some kinda jackal
Feb 25, 2003

 
 
Has anyone read through this?

http://www.amazon.com/Embedded-Systems-Introduction-Cortex-Microcontrollers/dp/1477508996

Probably going to pick this up since it looks right up my alley, just wondered whether anyone's had any hands-on experience with this book.

some kinda jackal
Feb 25, 2003

 
 
Case in point: In the time it took me to figure out a good OSX toolchain and dev environment for the Cortex boards I have, I could have been half done learning how to code for the loving things instead.

I have this Eclipse/CodeSorcery/OpenOCD setup now, but if anything breaks I am just going to load Win7 in VMware Fusion, install Kale or whatever, and not ever gently caress with trying to sweat out an OSX toolchain again.

e: Keil :q:

some kinda jackal
Feb 25, 2003

 
 
Newark (el14) is awesome. Our university has a purchase program with them and I will just throw random little things I want to tinker with on bulk purchase orders. They give us next-day delivery too. I love dealing with them :)

some kinda jackal
Feb 25, 2003

 
 
Yeah, Code Red actually has Red Suite 5 available for Linux and MacOS hosts with an available demo. I'm going to give it a shot when my Stelarri arrive, even though I decided to stick to Keil in a VM for now.

Mainly because there's probably no way I could justify buying it as a hobbyist.


edit: Ugh, Newark just pushed availability of the TI Stellaris back another month. Is TI not making these in volume or what?

some kinda jackal fucked around with this message at 20:44 on Nov 17, 2012

some kinda jackal
Feb 25, 2003

 
 
What do you guys think about Cortex programming using CMSIS versus device specific libraries? StellarisWare is actually really awesome, but I like the idea that I can take my code from my STM32F3 board to a TI board if I want.

I mean I think I know what I'll end up doing, just wondering what everyone else does.

some kinda jackal
Feb 25, 2003

 
 
Oh hmm. My understanding was that CMSIS gave you the basics cortex functionality and then the vendor provided a CMSIS templated peripheral header so while you couldn't use the STM provided header on an NXP chip, you could just go to NXP, download their chip's header and recompile your code (for the most part) to run on the NXP platform.

It's so hard to find any in-depth information on CMSIS.

some kinda jackal
Feb 25, 2003

 
 
Hurray, doublepost!

Turns out that CMSIS isn't that difficult, it's just kind of esoteric compared to using vendor libraries. NXP has a lot of great examples, and I ended up buying an lpcxpresso board to tool around with.

So far it looks like you're right though. The base Cortex registers are interchangeable because it's including a common CMSIS header, but vendor peripherals can still be declared to basically whatever the vendor chooses, so there's no guarantee that UART0 will be UART0 when moving from TI to NXP for example.

Seems like a good halfway solution is to come up with your own header file which defines a set of standard peripherals against the vendors' names and then just use your definitions in the code. That way you can always refer to (your) MCU_I2C0 and not have to worry about whether it's LPC_I2C0 or I2C0 or ATMEL_I2C0

Of course I could just be talking out my rear end. I've done all this reading but I still haven't actually put bit to screen yet and done a single custom app. I'll be trying soon though. I'm really guilty of "read everything you can before you start" instead of "read enough poo poo and then go play/discover on your own".

On that note, does anyone know where/if I can get a printed or bound copy of an NXP mcu manual?

Specifically: http://www.nxp.com/documents/user_manual/UM10360.pdf

If I can't find anything online I'll end up just taking it to Staples and having them print and bind the PDF, but I didn't know if there was some place that actually sold these sorts of things in book format. PDFs are great, but there really is no substitute for being able to thumb through a printed book to reference something. Scribble notes, highlight stuff, mark important pages.

e: Staples wants $300 to print :laffo:

some kinda jackal fucked around with this message at 06:57 on Nov 24, 2012

some kinda jackal
Feb 25, 2003

 
 
Does anyone have a good primer for multiplexing SPI slave select pins? By which I mean using one pin for multiple slave select signals, as I understand is possible.

I'm not really sure what this entails and I'm getting some muddled results googling, though I could just be plugging in the wrong terminology.

some kinda jackal
Feb 25, 2003

 
 
Yeah I'm looking for the trickery to accomplish the latter so the entire bus is 4 lines regardless of the number of devices :3:

Obviously I could use I2C at this stage, but I'm curious :haw:

some kinda jackal
Feb 25, 2003

 
 
Blast. I haven't considered that.

Welp, I think I'm still going to try to go directly to registers rather than using device specific libraries, just for the learning experience.

e: Re: robostac


re: SPI: I'm imagining something like: integrating some other IC into the SPI mix which would have, say, five or six high pins, each connected to a separate SPI slave, then in my SPI communication routine I could feed the IC a command depending on which IC I wanted to talk to, and it would bring that particular slave low for communication. I'm just talking out my rear end though.

some kinda jackal fucked around with this message at 19:02 on Nov 26, 2012

some kinda jackal
Feb 25, 2003

 
 

armorer posted:

Reaching back a ways here, but I just got mine via FedEx today. I put the order for 2 in on Sept 27th. So I'd say that they will ship them to you eventually - that Dec 17th date may be legit.

Mine are going to be a nice surprise when they show up. I've since picked up an STM32F3Discovery and an LPCXpresso 1769. Honestly if I hadn't already paid for them I think I'd probably cancel the order at this point. Just more toys when they show up though.

some kinda jackal
Feb 25, 2003

 
 
ST is giving away free STM32F3DISCOVERY boards, apparently. I have one of these and it's pretty nifty. Cortex M4, has an integrated ST-Link SWD USB interface that you can decouple from the project board and use to probe any other ST projects you might have (and apparently unofficially other vendors' Cortex MCUs, but I haven't tried yet).

Link is here: http://www.st.com/internet/evalboard/product/254044.jsp

You have to register on their site and give them some project you'd like to work on I guess. I just made up some project that sounded plausible. I guess we'll see if they approve the order or not.


---

Also: All hail the university e-waste disposal cage! :black101:



In working condition!

some kinda jackal fucked around with this message at 15:58 on Nov 30, 2012

some kinda jackal
Feb 25, 2003

 
 

Otto Skorzeny posted:

THanks for linking this :)

No problem :)

All credit goes to hackaday.com where I saw the link.

some kinda jackal
Feb 25, 2003

 
 
Can anyone point to a good tutorial that will help me to understand why/how chaining shift registers together works?

I totally understand how a single shift register works.

I totally FAIL to understand why you can just chain them together and have control over the entire chain with just three pins.

I want to try driving a handful of 7 segment displays without multiplexing, and if I can dedicate just three GPIO pins to that task then I'm actually pretty excited. I know it WILL work, but I'm not quite sure WHY it will work.

Sorry if I'm using the wrong terminology, etc.




I'm using the 74HC595 in this case, I think. I'm not sure if that makes a difference.

some kinda jackal
Feb 25, 2003

 
 
Ohhhhh man yeah it JUST clicked. I can't believe I was confused by this.

And then since they're all using the same output enable signal that'll make updating a 7 seg LCD a breeze. Disable the output, feed the shift registers 8 more bits, register IC 1 overflows previous 8 bits to register IC 2, register IC 2 overflows its previous 8 bits into nothingness, flip the switch and the state updates.

Four bits at the edge of a cliff indeed! :q:

some kinda jackal fucked around with this message at 07:34 on Dec 3, 2012

some kinda jackal
Feb 25, 2003

 
 
I just realized TI sends out free samples of chips and such, so I picked up an MSP430 chip just to say I've played with one.

Cortex development seems to be going really well for me after I gave up on being different and trying to hack together a custom toolchain/IDE/etc solution. I still have my Eclipse solution sitting unused but I ended up resorting to using NXP's LPCxpresso IDE (based on Red Studio) since it has built in support for the SWD for the lpcxpresso 1769 board I'm currently in love with. Also it runs natively on OSX.

Currently working on an RFID pet project as a proof of concept and to familiarize myself with I2C and the ins and outs of learning embedded development.

Also picked up DangerousPrototypes.com's Bus Blaster v2.5 so I can standardize the SWD/JTAG development across all my boards (bare 1768 chips, lpcxpresso 1769 board, stm32f3discovery board, freescale frdm, and my two stellaris boards which will eventually show up). Seemed like a pretty good buy for $40-something shipped, is supported by OpenOCD, and is pretty flexible in functionality.

I have to say, once I got over the initial hump of looking over the 800 page user manual to figure out registers, this isn't really particularly more difficult than coding for anything else. I'm also talking about going directly to registers, so I'm not using any driver libraries which I imagine would make this nearly as easy as coding for Arduino or something. I don't claim to have any sort of extensive knowledge here yet, but it's definitely flowing a lot easier than I thought it would based on my initial headache of getting everything set up and running :)

some kinda jackal
Feb 25, 2003

 
 
Oh yeah I literally don't care much about the MSP, but I figured I'd breadboard it up and throw some code at it if I could figure it out given some spare time. Thanks for the info anyway though. I suppose if it really came down to it I could add some sort of UART->SPI bridge or just spend the five bucks for a better chip :haw:

I've still got two Launchpads on order from TI but they're not listed to ship until the 17th. My paypal authorization that I gave TI long since expired so I don't even know if they're going to process the order or anything. If they don't then I'm honestly not going to be too beat up over it. I'll just buy a few lpcxpresso boards instead. I'm not doing any DSP stuff that the M4 would excel at. Hell, I'm dead certain that all the core I'll write in the next year could comfortably run on some bargain basement AVR or something. M3 is probably overkill for what I'm doing, but I'm doing it more for the experience than the technical specs of the chip :)

some kinda jackal
Feb 25, 2003

 
 
Are you guys using the Teensy 3 with its own Arduino-like thing or are you using it with a standard ARM toolchain? I'm having a lot of fun working with my lpcxpresso board but the teensy looks hella tiny and fun too. The only downside is that I love debugging on chip so while I assume you can just break out the JTAG/SWD pins and run openocd, I'm not sure how that fits into the Arduino stack.

Unless I just have it back-asswards. There's not a lot of info on the Teensy 3 development toolchain compared to their AVR product.

some kinda jackal
Feb 25, 2003

 
 
Can someone help me understand how to choose a prescaler for a timer? I'm uncomfortably fuzzy on the whole concept. Why would I prescale a timer if I can have it run at a 1:1 peripheral clock? Is it just to cut down on processing time? Also if you want to count to X and you have a prescaler set to 1:2 or something, would you count to X/2 or still X and the counter would just increment itself by a scale of 1:2 every time?

This is probably a really dumb question that's answered in my LPC user manual but right now I'm not seeing it.

some kinda jackal fucked around with this message at 05:21 on Dec 11, 2012

some kinda jackal
Feb 25, 2003

 
 
Oh I hadn't even thought of that issue. That alone makes prescalers more sensible. Thanks!

some kinda jackal
Feb 25, 2003

 
 
If I wanted to have my uC produce a lifelike sound instead of a harsh "BEEP" through a standard piezo speaker, what would be the best/simplest/cheapest way to implement something like that?

I just mean like a lifelike bell "*ding*" sound, not an mp3 or ringtone or anything like that so I think a full on SD card MP3 player circuit would be way overkill.

some kinda jackal
Feb 25, 2003

 
 
I was going to try to convert this to C:

http://hlt.media.mit.edu/?p=1963

But I think I'm going to go with your guys' suggestions of easing out of the waveform. I'm pretty sure I was overthinking the solution when this will likely make it sound less lovely in no time. Thanks!

I'm also not married to *ding*, it's just a neat sound my old Tektronix scope made and I thought it sounded really nice and alerted well without being SHRILL. If I can make a tone that doesn't make me want to cringe I think I'll consider it mission accomplished :)

some kinda jackal fucked around with this message at 22:07 on Dec 13, 2012

some kinda jackal
Feb 25, 2003

 
 

armorer posted:

There are also ICs for this sort of thing, although I will add the disclaimer that I have never used them. Something like this maybe?

I love reading about new ICs so I'll definitely check these out too, thanks! :)

some kinda jackal
Feb 25, 2003

 
 
I got my Stellaris finally. Ugh, the thing uses a loving Micro-USB connector. Now I need to have one of those handy.

I'm thinking about replacing it myself with a mini-A port but I know I'd probably just gently caress up the board.

Adbot
ADBOT LOVES YOU

some kinda jackal
Feb 25, 2003

 
 

Zuph posted:

Mine came with a micro-USB cable.

Mine did too, I just don't like having a ton of different cables lying around. All my other dev boards use mini usb (aside from the Arduino obviously) and I like just having one cable I need plugged in for development :(

Of course once my Bus Blaster JTAG thing shows up this'll be a moot point :)

  • Locked thread