Arduino gets into the M0 market - Page 1
Forum section: electronics / general

author: Stonent
author_rank: Super Contributor
timestamp: May 15, 2014, 04:48:47 pm
content: Quotehttp://atmelcorporation.wordpress.com/2014/05/15/arduino-and-atmel-debut-zero-dev-board%E2%80%A8%E2%80%A8/They say it has a full debugging interface without the need for external hardware. It looks like they integrated the EDBG chip right on the board.Interestingly it says "Developed by ATMEL" on the bottom. I guess they just said "Make us an M0 board"

author: electronics man
author_rank: Frequent Contributor
timestamp: May 15, 2014, 05:42:19 pm
content: So looking forced to the arduino zero coming out

author: Monkeh
author_rank: Super Contributor
timestamp: May 15, 2014, 06:12:32 pm
content: My god, an Arduino board which has been designed properly. And actual programming and debugging capability.Anyone checked the temperature in hell lately?"Made in Italy", right above a FastPCB logo.

author: retrolefty
author_rank: Super Contributor
timestamp: May 15, 2014, 06:25:36 pm
content: Quote from: AcHmed99 on May 15, 2014, 05:52:47 pmWhy not? No time or a more elitist reason?

author: free_electron
author_rank: Super Contributor
timestamp: May 15, 2014, 06:31:20 pm
content: notice how it is not open hardware or open source hardware anymore ? it is open source electronics..like the sourcecode is open but you can't duplicate the hardware ...Why do i say this :- the EDBG chip is fine pitch ball grid array- the EDBG is produced by atmel. it is not a standard chip with some software. chances of getting your hands on it to build you own zero clone are zilch.i see this as a coup from arduino to close the market for themselves... no more 3 $ clones made in china that undercut their income...ah well

author: dannyf
author_rank: Super Contributor
timestamp: May 15, 2014, 06:56:17 pm
content: QuoteYou have the right idea.

author: theatrus
author_rank: Frequent Contributor
timestamp: May 15, 2014, 07:03:04 pm
content: QuoteOdds are its an Atmel CM3 chip with Segger J-Link firmware.It is obviously not open source :-)

author: bingo600
author_rank: Super Contributor
timestamp: May 15, 2014, 09:13:00 pm
content: Quote from: theatrus on May 15, 2014, 07:03:04 pmI think you'll loose that oneQuote from AvrFreakshttp://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=1131150#1131150Quotehttp://www.atmel.com/Images/Atmel-42096-Microcontrollers-Embedded-Debugger_User-Guide.pdfBut i can't see why one couldn't use a clone wo. the EDBG , and a segger instead.I actually "just think" that Atmel caught up with the others already including debugging IF's on their boards : TI,NXP,ST/Bingo

author: free_electron
author_rank: Super Contributor
timestamp: May 15, 2014, 09:27:53 pm
content: so no cheapo clones of the zero... ah well , back to STM32 then ...

author: scientist
author_rank: Frequent Contributor
timestamp: May 15, 2014, 10:07:26 pm
content: The chip in question will never be found on an Arduino of any kind. I can guarantee it.

author: jeremy
author_rank: Super Contributor
timestamp: May 15, 2014, 10:36:33 pm
content: Quote from: bingo600 on May 15, 2014, 09:13:00 pmYep, agreed. This is why my weekend projects are now on the STM32F0Discovery ($7 with a separate gold plated protoboard!) or a Freescale FRDM board.Quote from: Monkeh on May 15, 2014, 06:12:32 pmLooks like they still don't have the shield pins on a 0.1" grid....

author: retrolefty
author_rank: Super Contributor
timestamp: May 15, 2014, 10:37:36 pm
content: Quote from: scientist on May 15, 2014, 10:07:26 pmWhich chip in question?Here is a link from the official Arduino web site announcing the board to be introduced at this weekends Maker Fair:http://blog.arduino.cc/2014/05/15/meet-arduino-zero/

author: jeremy
author_rank: Super Contributor
timestamp: May 15, 2014, 10:40:24 pm
content: Are they integrating a debugger into the arduino IDE?

author: retrolefty
author_rank: Super Contributor
timestamp: May 15, 2014, 10:50:56 pm
content: Quote from: jeremy on May 15, 2014, 10:40:24 pmUnknown at this time. Their software download page presently has two IDE options, one production version that supports only their 8 bit boards and a beta version that supports their present 32 bit Due board (as well as the 8 bit boards), so it remains to be seen if a third IDE will surface or if they just add the Zero to the 32 bit beta IDE.

author: dannyf
author_rank: Super Contributor
timestamp: May 15, 2014, 11:14:51 pm
content: QuoteThe length of any device errata is proportional to its bit-width, exponentially.

author: MacAttak
author_rank: Unknown
timestamp: May 16, 2014, 12:10:59 am
content: Quote from: jeremy on May 15, 2014, 10:40:24 pmI certainly hope so. But we are talking about an IDE platform that can't even manage to implement a decent project management system. I see no reason to believe that they would be capable of producing any kind of useful debugger if they can't get a project system right.

author: dannyf
author_rank: Super Contributor
timestamp: May 16, 2014, 12:21:41 am
content: QuoteSo true.Vs. a real IDE, the Arduino IDE is severely crippled.

author: Stonent
author_rank: Super Contributor
timestamp: May 16, 2014, 12:47:11 am
content: Maybe they're going to tell you to use Atmel Studio to do your debugging.What interests me is how hard it would be to maybe lift the VCC line off the M0 chip and jumper over to another M0 chip and do debugging so you don't have to waste an Arduino in your final project.

author: miguelvp
author_rank: Super Contributor
timestamp: May 16, 2014, 01:04:55 am
content: I already have not only a 32 bit Cortex-M0 Arduino, but it has an extra 32 bit Cortex-M3 chip on it and configurable analog and digital blocks for $25.http://www.cypress.com/?rID=77780http://www.element14.com/community/thread/23736/l/100-projects-in-100-daysUser Guide:http://www.cypress.com/?docID=47035Sure it won't run Sketches, but I don't even know what a Sketch looks like.Edit: and you can debug it and step through the code with PSoC Creator, sure just C no sketches.

author: nctnico
author_rank: Super Contributor
timestamp: May 16, 2014, 01:56:59 am
content: Quote from: dannyf on May 15, 2014, 11:14:51 pmOK I'll bite: Not with NXP's ARM devices and most of the problems are fixed in later silicon versions. There are a few exceptions but those controllers are not easy to purchase / commonly used anyway.

author: SirNick
author_rank: Frequent Contributor
timestamp: May 16, 2014, 07:47:09 pm
content: Quote from: AcHmed99 on May 15, 2014, 06:59:42 pmI'll give you the 2-minute version so at least you can ignore the platform with a better understanding of what you're possibly missing:(This is mainly in reference to the "classic" Arduino line -- the ones based on various ATmega micros. The newer breed of ARM and Intel stuff is, IMHO, not as relevant. There are MANY other offerings already out on the market that do what they do better.)The Uno (etc.) are basically dev boards. I.e., you don't have to use a whole Arduino board for your projects. Some people use them as-is because they lack the time, skills, or interest to fab their own. (Also clones are available cheaply enough that it's not always financially advantageous to roll your own.) However, you can effectively clone an Uno with an ATmega328P, a crystal, and some decoupling caps. All the rest of the stuff on the board is for power regulation, pin breakouts, and a USB-to-serial interface that is only required if you 1) need to reprogram or communicate with the device in the field; 2) don't have an FTDI cable (or whatever TTL serial interface you prefer); and 3) don't want to use the usual SPI-based ICSP programming method. There is also an Arduino bootloader that listens on the serial UART for a moment after reset, to allow reprogramming the flash without having to use ICSP.The real draw to Arduino (besides eliminating any real barriers to entry for newbies) is the platform standardization. This bred a wealth of drop-in code libraries to add one-liner support for just about anything you can imagine. On the hardware side, the standardized (if not annoyingly asymmetrical) pin headers did the same thing for external circuits. You can snap on a "shield" to give you whatever hardware peripherals you want, include a few header files to add the relevant code libraries, and within 10 minutes, you're communicating with DMX devices or controlling steppers or producing composite video, etc. etc...The IDE is pretty much crap. You're not missing much if you've never used it. However, itistruly a turn-key system. Absolutely trivial to write some code and upload it to a board. For this reason, I have it installed for those "throw something together" projects where I want to go from idea to prototype in the absolute minimum time.Arduino code, aka a "sketch", is plain AVR C++ with a custom framework to bootstrap the device to a certain level of functionality, and to improve user friendliness (as compared to bit-shifting and writing to registers for I/O). You can import the Arduino framework, and all your user-contributed libraries, into Atmel Studio if you prefer.Regarding the limitation of targets: The libraries makes some assumptions on hardware -- namely, the clock speed has to be 8 or 16MHz, otherwise some of the built-in timing stuff will not be accurate. Aside from that (which isn't insurmountable), the platform can be, and has been, ported to many "unofficial" target MCUs. Pin mappings can be changed via add-in "cores" -- which basically provide a few key device-specific code files and a config file so the IDE knows what to tell AVRdude (the flash utility, if you're not an AVR guy). Some libraries and shields rely on the ATmega 8 / 168 / 328 specifically, due to availability of certain on-chip peripherals, or which pins have what special functions (i2c, analog, etc.) on them. This can often be worked around in much, much less time than it would take to write or port vanilla AVR C code to your given device.In general, it's not going to be anyone's preferred platform if they have experience with "real" development environments, but it absolutely can't be beat for introducing people to microcontrollers and programming, or for a quick-n-dirty hack of your own.

author: dannyf
author_rank: Super Contributor
timestamp: May 16, 2014, 08:32:27 pm
content: Quote"Arduino, the platform of choice for liberal arts students.",

author: free_electron
author_rank: Super Contributor
timestamp: May 16, 2014, 09:23:53 pm
content: Quote from: scientist on May 15, 2014, 10:07:26 pmso far for your guarantee. the board is on the offical arduino page and it has the chip on it ...so, what did we win now ?

author: retrolefty
author_rank: Super Contributor
timestamp: May 16, 2014, 10:04:01 pm
content: Quote from: dannyf on May 16, 2014, 08:32:27 pmExactly, and elitists opinions aside, it has opened up microcontrollers to a vast number of otherwise very creative people, that was their original target users the developers were only trying to reach in the first place. That they succeeded in accomplishing their original goal of allowing non-technical people easier access to microcontrollers cannot be denied.It wasn't designed for people that already knew how to use microcontrollers, but rather a whole new range of users that would otherwise could or would never have even attempted to conquer the learning curve required before the arduino platform was available.Why it went so viral after that is hard to understand completely, but most likely mostly the right idea, at the right time, at the right entry price. Basically the Arduino platform pried the exclusiveness of microcontrollers from a priest like class of users (if the shoe fits) and released it to a much larger general population. Not unlike the first microprocessors developed in the 70s lead to giving direct computer access to much larger general population that was prior restricted to a mainframe and minicomputer priesthood.So no matter what people may think of the Arduino platform/movement personally, one can't argue that it has had a rather large impact, leading up to this weekend Maker-fair where the Arduino folks have a booth right adjacent to the Atmel folks. Many of today's young maker hobbyist will be tomorrows EEs and I have little doubt that a few will become billionaires later in life.

author: SirNick
author_rank: Frequent Contributor
timestamp: May 16, 2014, 11:09:07 pm
content: Quote from: retrolefty on May 16, 2014, 10:04:01 pmIndeed. It's how I got my start. Before that, the most digititalist thing I had ever built was a 555 clocking a decade counter for an inactivity timer to power off a DIY subwoofer amp.

author: LukeW
author_rank: Frequent Contributor
timestamp: May 17, 2014, 05:07:21 am
content: Quote from: AcHmed99 on May 15, 2014, 05:52:47 pmHow many units of silicon do you think Atmel has sold, over the last decade, directly or indirectly, because of Arduino? How much extra exposure and knowledge of the Atmel/AVR brand do you think they've gotten because of Arduino.Atmel has probably benefited more than any other single semiconductor company from the revolution in "hobbyist or small fries" microcontroller/electronics interest that we've seen over the last decade.

author: LukeW
author_rank: Frequent Contributor
timestamp: May 17, 2014, 05:11:51 am
content: Based on previous experience, I would guess we'll start seeing Freetronics, Adafruit, Sparkfun, and Wun Hung Lo shipping M0 Arduino-equivalent boards in about 2015, and official Arduino-made Arduino Zero boards will start shipping in about 2020, while everyone else "orbiting" in the Arduino ecosystem is already moving ahead with another generation of open hardware derivatives and modifications.

author: firewalker
author_rank: Super Contributor
timestamp: May 17, 2014, 05:33:05 am
content: Will the board be open to external tools for debugging/programing?If it is programmable without the EDBG chip there will be clones with a serial port without debug capabilities.Alexander.

author: zapta
author_rank: Super Contributor
timestamp: May 17, 2014, 01:11:28 pm
content: Quote from: AcHmed99 on May 16, 2014, 09:30:58 pmIt was an excellent summary, with good understanding what Arduino is and isn't.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: May 17, 2014, 01:48:43 pm
content: Quote from: LukeW on May 17, 2014, 05:07:21 amProbably true, but how significant is it to their overall business?

author: firewalker
author_rank: Super Contributor
timestamp: May 24, 2014, 12:26:12 pm
content: http://hackaday.com/2014/05/21/arduino-zero-hardware-is-not-just-for-beginners/Alexander.

author: EEVblog
author_rank: Unknown
timestamp: May 24, 2014, 12:44:16 pm
content: Quote from: AcHmed99 on May 15, 2014, 05:52:47 pmFrom a business standpoint, they don't. But from a social media PR point of view, this stuff gets eyeballs and so the marketing departments smash their KPI's and get their bonuses.

author: dannyf
author_rank: Super Contributor
timestamp: May 25, 2014, 11:18:55 am
content: QuoteYou can do the math but Arduino-induced sales wouldn't be even a rounding error for Atmel.I think most firms consider it a publicity thing or an investment in the brands.

author: Stonent
author_rank: Super Contributor
timestamp: May 26, 2014, 12:30:17 am
content: Quote from: AcHmed99 on May 25, 2014, 12:01:11 pmNo there wouldn't be simply because all the extra parts wouldn't be needed, but there are a lot of AVR chips out there in products. If today's kids are raised on Arduinos, if they decide to make a living of it, they'll probably lean towards Atmel chips.When I first got an Arduino, within an hour of playing with it I realized that if the chips are only a few dollars each, I could make all sorts of cool automated things really cheap by using the internal oscillator.

author: zapta
author_rank: Super Contributor
timestamp: May 30, 2014, 12:36:18 am
content: Quote from: jeremy on May 15, 2014, 10:36:33 pmWhat toolchain are you using? How do you download your program, via USB bootleader?How difficult it is to derive from it a custom board with minimal part count? Is the second IC required for downloading programs or USB data transfer?

author: mtdoc
author_rank: Super Contributor
timestamp: May 30, 2014, 01:03:50 am
content: Quote from: Stonent on May 26, 2014, 12:30:17 amYep, that's the beauty of it. I'm helping to teach an introductiory robotics course to elementary school kids. We've quickly gotten a small group of 1st to 5th graders writing small "sketches" on the Arduino. What other MCU platform would allow this? These kids all want to go out and buy Arduino's now. Some want to become engineers....

author: SirNick
author_rank: Frequent Contributor
timestamp: May 30, 2014, 02:36:25 am
content: That's awesome. That will do today what computer classes did for my generation.

author: Bored@Work
author_rank: Super Contributor
timestamp: May 30, 2014, 02:45:12 am
content: Quote from: SirNick on May 30, 2014, 02:36:25 amNo, there is a big difference. The computer classes of the past did teach fundamentals on which you could build. Arduino on the other hand is just a dead end, dumbed down to make people feel good, not to teach them a solid basis.

author: Harvs
author_rank: Super Contributor
timestamp: May 30, 2014, 02:55:06 am
content: Quote from: mtdoc on May 30, 2014, 01:03:50 amI think that's giving Arduino way too much credit. There were many many learning platforms like Arduino before them. They just happen to have cornered the market thorough some great PR at a time when being a "maker" became popular.There always were and still are some great alternatives. Albeit for the teacher Arduino makes everything really easy because so much teaching material has already been created and published. It's a bit like teaching a beginner class on networking, if you use CISCO products there's practically no course development work required. BTW I'm not saying it's a bad thing, it's just how it is.

author: jeremy
author_rank: Super Contributor
timestamp: May 30, 2014, 03:08:26 am
content: Quote from: zapta on May 30, 2014, 12:36:18 amI'm using gcc/openocd on ubuntu. I download my program via the on board programmer, which has headers to program an off-board device so no second device needed. It is easy to convert a design to a custom board (I just did that a few weeks ago) as the full schematics are available. I think the stm32f0 needed 3-4 capacitors and the programming header.I'm pretty sure all these devices have a UART bootloader in ROM anyway. Some of them have USB DFU in ROM.

author: SirNick
author_rank: Frequent Contributor
timestamp: May 30, 2014, 03:13:44 am
content: Quote from: Bored@Work on May 30, 2014, 02:45:12 amThat's a rather pessimistic viewpoint. Many of my first computer classes were "sit here and play Oregon Trail for half an hour" or whatever. No fundamentals. We never discussed the number of bits in a byte, or the semantics of clocking and logic gates. Nonetheless, I found out those silly games were made out of this thing called "code", and if you learned how, you couldchangeit...Arduino is doing, and will do, the same thing. It will expose someone to a new world. Again, I can attest to this, because it did exactly that for me. I didn't think embedded stuff was attainable to the average Joe. Arduino makes it stupid simple to get your feet wet. If you care enough, you can strip away all the crutches at your leisure, until you're however deep you care to be in datasheets and assembly language. (Or not, and that's fine too.)For however many thousand people never learn to do anything more than follow a simple tutorial, there's one of me that springboards head-first into the whole ecosystem. It's a numbers game.

author: mtdoc
author_rank: Super Contributor
timestamp: May 30, 2014, 03:59:25 pm
content: Quote from: Bored@Work on May 30, 2014, 02:45:12 amI think the point is not that Arduino is the best way to learn how to code. There have been and are better ways to introduce kids to computers and programming.(code.org, Scratch, etc). But Arduino - with all it's abstraction - and now with the whole ecosystem around it, allows kids to quicklybuild things- real physical things - that they can control with an MCU. I don't think there has ever been such a user/kid friendly way to learn the fundamentals ofembeddedcomputing.This class I'm helping with is just a 2 week "cluster" - course consisting of a small group (about 10 kids) of 1st-5th graders. No formal teaching curriculum or premade materials are being used. It's just a couple of people introducing kids to the basics of leds, sensors, motors and the idea of using an MCU to control them.The haters will be haters but I don't know how we'd be able to get such young kids so quickly up and running (and therefore keep them interested!) without the Arduino with its simplified IDE and simplified physical interface. I'm just blown away by how quickly it allows kids with no electronics or computer science background get from "this is an led, this is a motor,and this is a MCU" to being able to write a program to control them.There's no reason to think that once an 8 yr old gets excited about electronics and embedded computing using an Arduino that this is going to somehow limit them in the future. They'll move on to more fundamental methods when they are ready - lots of real world examples of this happening already with many from the first generation of Arduino kids now pursuing engineering degrees.

author: retrolefty
author_rank: Super Contributor
timestamp: May 30, 2014, 04:28:58 pm
content: QuoteI agree. Lots of people of my generation (old as dirt boomer) first positive exposure to electronics was by assembling simple Heath Kits. Did we really learn anything about electronics in a structured manner by assembling such kits? Probably not in a formal definition, but the ability to just accurately follow the detailed assembly instructions that end with a device that actually worked was a very necessary and rewarding step to foster the interest to go on with more complex kits and finally a lifetime interest to learn electronics and take that interest onto a rewarding career.The Arduino 'movement' is a very valuable resource that has and will continue to foster interest into beginning electronics and embedded programming for a vast population of people. Is it a perfect starting approach? Probably not, but I can't see another organization be it Government sponsored or non-open source hardware and software commercial company being close to being able to deliver a platform as effective.Does that mean all is great in the Arduino world. Not in my opinion. The last couple of years the Arduino company has been on a rampage of developing and shipping so many new products of various complexity that I fear that they may be trying to reach too many different people and markets that they may lose track of their original goals and people they were trying to reach. Time will tell if the arduino platform has any real staying power in the field but until then it is the best starting point of anything else I've seen.

author: dannyf
author_rank: Super Contributor
timestamp: May 30, 2014, 06:07:26 pm
content: QuoteAgreed. It has flattened the curve and gotten people into mcus who otherwise wouldn't. So it is not meaningful to hold it to the criteria we common associated with a real mcu system.Arduino is a perfect systems designed by liberal arts folks for liberal arts folks.

author: zapta
author_rank: Super Contributor
timestamp: May 31, 2014, 04:15:21 pm
content: Quote from: jeremy on May 30, 2014, 03:08:26 amJeremy, can you provide more details, a newbie here. What does your custom board include (that is, main IC's) ? What is the usb connection to the host (for app data) , is it connected directly to the main CPU? Can you develop on the custom board? What development tools, etc.So far I based my boards on Arduino Mini Pro + FTDI Basic (USB/Serial) and would like to have something similar with ARM. That is, very minimalistic design with ability to develop in the custom board.Edit: I look at the teensy 3+ board as a base design but it's not open source and requires a license IC.

author: djacobow
author_rank: Super Contributor
timestamp: May 31, 2014, 11:27:01 pm
content: Quote from: zapta on May 31, 2014, 04:15:21 pmI've been fooling around with the same types of setup as Jeremy. The USB connection to the CPU on your custom board comes from the debug capability of the original eval board. The eval board has USB board and debug chip that is internally wired to the processor on the eval board, but with a jumper change can instead drive a "SWD" port (1x6 0.1 header) to connect to a processor on a separate board. Basically, by a $7 eval board, get a programming/debug, can be used to connect to a processor on another board.I found it pretty tricky to get it up and running but I did succeed in the end. If you don't want to use Ubuntu, you can try Em::blocks (http://www.emblocks.org/web/) on Windows which is easier to set up and works, too. And if you'd rather use a GUI debugger than "plain" gdb, you get that, too.I'm new to ARM development. I have a computer engineering background and have even designed microprocessors and microcontrollers years ago, but it is still a lot to learn. I find the ST HAL for their chips to be wretched: overly complex, with very long function and constant names, and worse, of all, very little actual abstraction. Setting up peripherals feels to me as rough as poking a hundred registers except rather than just reading about the registers and their purposes in a detailed datasheet, I am looking up dozens of function names (suspiciously similar to the register names) to do about the same thing. Meh.A nice thing about the Arduino API is that it gives you an easy entry. It's true, about 10 minutes into the typical Arduino project, I feel the need to get down at dirty with the AVR peripherals, but those first 10 minutes are mighty nice.-- dave jPS -- I kept notes when I set up for STM32 on Ubuntu. It may be easier now. They were as follows:install the ARM toolshttps://launchpad.net/~terry.guo/+archive/gcc-arm-embedded> sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded(Note: they don't support the latest Ubuntu version, so I had to forcethe installation of the package for earlier version. It works fine. To dothat, edit:/etc/apt/sources.list.d/terry_guo-gcc-arm-embedded-saucy.listand change "saucy" to "raring"> sudo apt-get update> sudo apt-get install gcc-arm-none-eabiNow get stlink up and running:https://github.com/texane/stlink> git clonehttps://github.com/texane/stlinkstlink.git> cd stlink.get> ./autogetn.sh> ./configure> make> sudo make installNote that this package has some dependencies you may have to install, such as autoconf, automake, and libusb-dev. stlink runs as as a server by default on port 4242. You tell gdb to use it like this:(gdb) target extend localhost:4242Note also that the permissions were not set properly by udev when I plug this device in. I need to fix them, but in the meantime, I can start stlink with 'sudo' and it works fine.And(gdb) loadwrites the program to flashNow how to build working executables? It's tricky, and I have not figured out the minimal recipe quite yet (which I like to do since it helps me understant what is important and what is "extra."However, I have managed to build a simple LED blinky app and make it work on my STM32F4 discovery board, starting from linker scripts and makefiles and whatits from the ST zip download (found here:http://www.st.com/web/en/catalog/tools/PF257904#)

author: dannyf
author_rank: Super Contributor
timestamp: May 31, 2014, 11:44:28 pm
content: QuoteWait til you try STM32Cube.QuoteIt is fairly simple, particularly if you put a middle layer on top of the library: from there you can decide if you want to go register directly, without having any impact on your code.I like CoIDE for its simplicity. The new Keil 5 is also very good, if you employ RTE.

author: djacobow
author_rank: Super Contributor
timestamp: June 01, 2014, 01:05:00 am
content: Quote from: dannyf on May 31, 2014, 11:44:28 pmI suspect it is all quite simple, but I am having trouble getting my bearings. There are a bunch of tools (CoIDE, Keil, Em::Blocks, etc), different layers of libraries and HALs (CMSIS, vendor specific stuff, high level peripheral drivers). Plus, a lot of what passes for documentation is "look at the examples provided." This works, but it leaves you wondering, is this example the bare-bones minimum to get this done, is it pulling in some other code I don't need and/or won't understand, etc.One of the things about their HAL that bugs me is that I don't know exactly what registers are being poked in those setup functions, and in what order. Sure, the examples work, but what happens if I reverse the calling order of the initialization of X and Y, will it work? How about if there is a long span of time between X and Y?As I say, I just need to get my bearings. It's so much easier in the AVR world, I guess in part because I find their datasheets more friendly to the traditional embedded guy. To this person who get just a little creeped out linking in code whose purpose he doesn't quite understand, it's not fun yet. :-)Another example is the interrupt system. It's complex, and I haven't done the homework to really understand it fully yet. But I can already see that if you're not getting interrupts you expect, you have a bunch of places to look. Is the peripheral actually doing something that would generate interrupts? Is it being clocked? Is the send interrupt flag in the peripheral set? Is the interrupt being routed to the NVIC? Is the interrupt masked in the NVIC? Am I already running at a higher interrupt priority? But I can tell that I'm not going to get very far with this architecture until I'm on top of all that stuff... which gets back to my original point that the HAL seems not to provide any actual abstraction.STM32Cube seems cool, but it may bug me more, "now it's generating boilerplate code for me... it's like programming Win32."I'm kind of a curmudgeon, I guess.

author: dannyf
author_rank: Super Contributor
timestamp: June 01, 2014, 02:04:43 am
content: QuoteReading the .c files would help.QuoteThe complexity is the price you pay for their power.Quoteand quite simple to use as well.QuoteThat's the point: use abstraction to minimize your interaction with the hardware (so to minimize mistakes and help debugging), aka ucos / emwin, etc.The pinnacle of embedded coding is to be as removed from embedded as possible.

author: Vasi
author_rank: Regular Contributor
timestamp: June 01, 2014, 05:43:10 pm
content: Quote from: EEVblog on May 24, 2014, 12:44:16 pmTo have a complete image about what means today for ATMEL the Maker movement, read their official blog on wordpress.com:http://atmelcorporation.wordpress.comI can say that they now have the right attitude (as Microchip should).They says about SAMD21 being as easy to program as an ATmega so, I really want to see if they told the truth (and I don't mean Wiring language).

author: zapta
author_rank: Super Contributor
timestamp: June 01, 2014, 05:54:10 pm
content: Quote from: Vasi on June 01, 2014, 05:43:10 pmJust find this at the url you mentionedhttp://atmelcorporation.wordpress.com/2014/05/16/arduino-zero-in-my-hot-little-hand/Will be great to have a simple and platform independent replacement for the AVR Studio monstrosity. ;-)

author: jaxbird
author_rank: Frequent Contributor
timestamp: June 01, 2014, 06:15:56 pm
content: Is there any point in having an official Arduino ARM based board? I mean anyone needing more than a very basic mcu are much better off choosing a specific environment and going from there.Or am I missing something? My only experience with Arduino is from my 3D printer board being Arduino compatible, but still all written in C?!? I had to make a few firmware changes to update, and I might have missed the point, but the IDE seems very "minimal" to put it politely.

author: Stonent
author_rank: Super Contributor
timestamp: June 01, 2014, 06:57:18 pm
content: Quote from: jaxbird on June 01, 2014, 06:15:56 pmWell the Arduino Due has been out for at least a year now and it is ARM based.Again, the point of the Arduino software is to make it easy for people to put things together quickly and prototyping.

author: zapta
author_rank: Super Contributor
timestamp: June 01, 2014, 07:05:49 pm
content: Quote from: jaxbird on June 01, 2014, 06:15:56 pmThat's one way but then you cannot take advantage of the Arduino echo system, easy to install and platform independent tool chain. This improve the openness of open source project (less hassle to clone and mix).Quote from: jaxbird on June 01, 2014, 06:15:56 pmWhat do you mean by 'still'? C/C++ is the language of choice for Arduino programs.

author: Stonent
author_rank: Super Contributor
timestamp: June 01, 2014, 07:09:42 pm
content: Quote from: zapta on June 01, 2014, 07:05:49 pmThat and a lot of pre-written code for doing things like driving shift registers, i2c, LCDs, various sensors etc.

author: jaxbird
author_rank: Frequent Contributor
timestamp: June 01, 2014, 07:18:10 pm
content: Quote from: Stonent on June 01, 2014, 06:57:18 pmI thought the Due was only slightly official? As in not fully supported? Otherwise what is the significance of the Zero?Quote from: zapta on June 01, 2014, 07:05:49 pmSorry, I mean, not using the "DigitalRead/Write/Analog" etc. abstraction layer, or I don't know what the actual commands are, but not resembling the Arduino code I've seen elsewhere, just plain metal C.

author: Vasi
author_rank: Regular Contributor
timestamp: June 01, 2014, 07:28:35 pm
content: When ATMEL says "as easy as ATmega", they refer to C programming, not Wiring or C++...So, I can't wait to see, using ATMEL Studio 6.2. Well, that depends on Arduino Zero price and availability in my country. Probably after a year or so... maybe I can buy some chips before...

author: dannyf
author_rank: Super Contributor
timestamp: June 01, 2014, 07:41:05 pm
content: QuoteSpeed, availability and potentially price.Quote8-bitters are all quite simple. On top of that, they are comparably simple from vendor to vendor.32-bitters can also be simple, depending on how you code them.

author: zapta
author_rank: Super Contributor
timestamp: June 01, 2014, 08:27:00 pm
content: Quote from: Vasi on June 01, 2014, 07:28:35 pmWhat do you mean by 'not C++' ? Atmel Studio does support C++.BTW, C++ is the language of choice for Arduino programs, not C. For example the so common call to Serial.begin() is C++, not C.

author: jaxbird
author_rank: Frequent Contributor
timestamp: June 01, 2014, 08:36:34 pm
content: Quote from: zapta on June 01, 2014, 08:27:00 pmNot really, not the way Bjarne Stoustrup designed the language to be used as a rich object oriented language with polymorphism, inheritance etc.

author: zapta
author_rank: Super Contributor
timestamp: June 01, 2014, 08:38:59 pm
content: Quote from: jaxbird on June 01, 2014, 07:18:10 pmThis is just a library. You can use it, roll out your own abstraction layer (e.g.https://github.com/zapta/linbus/blob/master/analyzer/arduino/io_pins.h) or just access the registers directly. The beauty of the Arduino environment is that it support a very wide range of skills and needs. They took the avr-gcc and packaged it in a very usable way.

author: zapta
author_rank: Super Contributor
timestamp: June 01, 2014, 08:51:38 pm
content: Quote from: jaxbird on June 01, 2014, 08:36:34 pmLike this?https://github.com/arduino/Arduino/blob/master/hardware/arduino/cores/arduino/Udp.h

author: jaxbird
author_rank: Frequent Contributor
timestamp: June 01, 2014, 08:54:47 pm
content: Quote from: zapta on June 01, 2014, 08:38:59 pmI thought the main point was that a common "Arduino" abstraction layer and a boot loader plus the IDE with compiler and code upload capability was the primary idea behind the architecture?Sure you could do your own hardware specific libraries, but does that not break the whole concept?

author: retrolefty
author_rank: Super Contributor
timestamp: June 01, 2014, 09:07:53 pm
content: Quote from: jaxbird on June 01, 2014, 08:36:34 pmI thought his name was Barney Shoestrap?

author: retrolefty
author_rank: Super Contributor
timestamp: June 01, 2014, 09:12:03 pm
content: Quote from: jaxbird on June 01, 2014, 08:54:47 pmIt breaks nothing. It just means you can ignore them and use your own functions and libraries if you wish for any specific project/program you write.

author: jaxbird
author_rank: Frequent Contributor
timestamp: June 01, 2014, 09:12:34 pm
content: Quote from: retrolefty on June 01, 2014, 09:07:53 pmNO

author: retrolefty
author_rank: Super Contributor
timestamp: June 01, 2014, 09:14:15 pm
content: Quote from: jaxbird on June 01, 2014, 09:12:34 pmYou sure I read it on the internet.

author: jaxbird
author_rank: Frequent Contributor
timestamp: June 01, 2014, 09:25:10 pm
content: Quote from: retrolefty on June 01, 2014, 09:12:03 pmSo Arduino really boils down to just any board with a compatible bootloader and a very basic IDE with compile and upload functionality?I thought the hardware abstraction layer was part of the formula to make the projects hardware agnostic.

author: zapta
author_rank: Super Contributor
timestamp: June 01, 2014, 09:30:20 pm
content: Quote from: jaxbird on June 01, 2014, 08:54:47 pmI did it in my of my projects because I wanted full control over interrupts to reduce bit banging jitter. The only implicit think I found was the timer that used for the system clock (which I disabled) and some serial polling that done between calls to loop (which I avoided by having my own infinite loop within loop(). Worked flawlessly. In that project I did my own i/o and my own serial library (using the serial hardware but no interrupts).

author: zapta
author_rank: Super Contributor
timestamp: June 01, 2014, 09:35:34 pm
content: Quote from: jaxbird on June 01, 2014, 09:25:10 pmYou are right, also some portability between different boards but basically it is a set of a-la-cart features and use the subset you want. It's very open and flexible in this respect.

author: jaxbird
author_rank: Frequent Contributor
timestamp: June 01, 2014, 10:04:54 pm
content: Quote from: zapta on June 01, 2014, 09:35:34 pmOK, thanks, at least I have a better idea of the concept now.Is it possible to use a more feature rich IDE, e.g. with some debug, intellisense etc.? Or are those already included in the Arduino IDE?I've only spent a few hours with it, possibly an old version, doing a couple of code changes, and my impression was that it's very basic.

author: zapta
author_rank: Super Contributor
timestamp: June 01, 2014, 10:42:10 pm
content: Quote from: jaxbird on June 01, 2014, 10:04:54 pm'Basic' is an understatement, it does not even show line numbers ;-)Some people use an external editor (you can configure it in the IDE's preferences) or even eclipse (http://playground.arduino.cc/Code/Eclipse) . Never tried it, the stock IDE is good enough for me. If needed I do the changes outside of the IDE but this is very very rare. The arduino IDE is just a thin wrapper around avr-gcc and avrdude but works for me and super easy to install.

author: retrolefty
author_rank: Super Contributor
timestamp: June 01, 2014, 11:06:04 pm
content: Quote from: jaxbird on June 01, 2014, 09:25:10 pmOnly if you want to use the abstraction. The abstraction makes it easier to share programs with another user that may have a mega board (atmega2560) where you have a Uno board (atmega328), but you are free to use direct register I/O if you wish.Even using the bootloader is optional these days as the IDE has a 'upload using programmer' option where it uses one of several supported ICSP programmers to burn the program onto a target board.

author: SirNick
author_rank: Frequent Contributor
timestamp: June 03, 2014, 07:50:54 pm
content: The main advantage of the Arduino IDE (IMO) is that you can install it, load a program, and compile to board very quickly. Like, "following an amateur blog tutorial" quickly. And you have a good shot of getting it to work right away. That is where the advantage ends, though.Yes, you can use better IDEs -- Atmel Studio for instance -- by copying all the Arduino libraries into your IDE's include directory and/or your project directory, and configuring accordingly. Then you're writing real C++ in a real IDE with a real compiler (the same compiler actually, but not hidden anymore.)This is what the ARM world seems to be lacking sorely -- that instant gratification, trivial first experience.