# embedded programming flashing program

Hello All,
I'm new to this board and looking for some opinions. I've searched the board a bit and found similar questions but not quite what I'm looking for. I'm looking for some help deciding on an SoC to use for embedded system applications.

I've taken a intro embedded systems course at my University, however the normal professor left the semester before so a CE grad student was forced to teach the class. As a result I feel like I didn't get the best education from it. In the course we used a smartfusion SoC, I feel like I know that board pretty well however I don't want to go out and spend over 100$just for the board. Also I'd rather not have to interface the MPU to an FPGA. Before the end of the semester and doing a lot of research I hastily bought a Rpi 2. Doing a bit more research and playing around with it, I've come to the conclusion it isn't the best board for baremetal C. A lot of the code is already given to you when what I want to do is write the code and drivers myself. In the end I want to get into robotics with whatever platform I'm using. My question is this... should I stick with the Rpi and just learn to rewrite some of the libraries or should I get a different board such as the beaglebone? Another issue I have with the Rpi is if I want to do baremetal C, then flashing the MPU is a pain, so preferably I would like an IDE to debug and flash my code. For now the embedded system design is just a hobbyist thing, but in the future I'd like to be able to actually work as an embedded designer. I want to get close to the metal as opposed to high level abstracted away design. Ahead of time, thank you for your responses. • Could you give some more detail about what you want to do or learn? "embedded system applications" is a very wide concept, ranging for multiple-PC level medical imaging systems to tiny 256-instruction 6-pin 8-bit chips that play FurElise or switch a flashlight torch between blink and steadily on. Accordingly, the suitable type of hardware (and development software) varies a lot. – Wouter van Ooijen Jun 9 '15 at 14:54 • Why can't you put your compiled code on the SD card and let the chip load it normally? – Ignacio Vazquez-Abrams Jun 9 '15 at 14:55 • @Ignacio that leads what is called the "SD card dance". Bad for your SD card connectors and very tedious. The best solution is IME to put a bootloader on the flash card that accepts an application via asynch serial. Use a handsahle line to force a reboot, as is commonly done with LPC ARM chips. – Wouter van Ooijen Jun 9 '15 at 14:57 • @WoutervanOoijen little more specific to the robotics: I would like to build a Bluetooth controlled RC car or hexapod spider. So I need to control H bridge motors with PWM, read from sensors(sonar, infrared, gyro, accel) and Bluetooth module, and serial comms. – unsure_ee_student Jun 9 '15 at 15:00 • I really just want to get my feet wet with a fun project, I'm just concerned that the Rpi while although it would be rather simple to code up a robot, wouldn't exactly give me the embedded experience I'm looking for. – unsure_ee_student Jun 9 '15 at 15:05 ## 2 Answers I suggest you get a Discovery Kit for STM32 F4 Series with STM32F407VG MCU like this one. This is an absolute steal for$14.88. The 32-bit ARM Cortex-M4 processor has 1 MB of flash and a 192K of RAM. It also includes two PWM's for motor control.

You can expand the I/O using this STM32F4 Discovery Shield. It allows the addition of up to four Click boards, such as Bluetooth, Wi-Fi, and dozens of others. Unfortunately, no H-bridges -- but there is a prototype Click board where you could wire your own.

• Hadn't seen the mickroE Click stuff and the Shield. I would just warn the OP away from the mikroE compiler- at least to start. There's really no need for it with the ARM Cortex. – Scott Seidman Jun 9 '15 at 16:55
• @ScottSeidman I'm just amazed at the price on this board. The processor alone is going for $14.24 on Digi-Key. Apparently they're giving the board away in hopes lots of people will adopt their processor(s) in their design. I'm tempted to get one myself to play with. – tcrosley Jun 9 '15 at 17:08 • I was just looking at this kit before you posted. I'll look more into it and the IDE for it. Thank you. – unsure_ee_student Jun 9 '15 at 17:12 • @tcrosley -- yeah, I get a chuckle out of people thinking the Arduino Uno is cheap. I'm loving the Discovery Series, all the way from the F0 (at about$8!!!!) to the F4. The one glitch I've had is that STMicro doesn't sublicense VID and UID for USB dev like Microchip does, so I'm looking for an inexpensive middleware solution. – Scott Seidman Jun 9 '15 at 17:22
• @unsure_ee_student -- Coocox might be the fastest way for you to start in terms of putting gcc in a fairly usable IDE. – Scott Seidman Jun 9 '15 at 17:23

Simply put, your task needs to define your tools, not the other way around. Raspberry Pi is not a real time platform. It is running Linux, and not a real time OS.

If you don't need an OS, and would rather do bare metal C programming, then I recommend picking a microcontroller platform to start on -- probably PIC or AVR. Pick a good dev board and IDE, and run with it. If you're feeling ambitious, you might even consider an ARM Cortex like the STM32F4 Discovery.

If you have many system-type resources that you need to use and manage, like a file system and more, than an OS like Linux on a Raspberry Pi, or a Real Time OS on a single board computer or ARM Cortex dev board, might be the right call.

• a RaPi be programmed bare metal just fine. If you need a bare metal project with lots of RAM I would consider it a good choice. – Wouter van Ooijen Jun 9 '15 at 14:59
• @WoutervanOoijen depends on how you see "bare-metal" in this context we mean not having an Operating System. Do you have a source on a Raspberry Pi withouth OS? – Paul Jun 9 '15 at 15:03
• @WoutervanOoijen -- depends on the nature of the project, but the proprietary nature of the SoC on the Pi might well push me toward the BeagleBone Black as a more open alternative. – Scott Seidman Jun 9 '15 at 15:08
• @FuaZe I know what bare metal means :) – Wouter van Ooijen Jun 9 '15 at 15:12
• @unsure_ee_student The BeagleBone is not any better choice for you than the Raspberry Pi, since it also runs Linux and writing lots of Linux device drivers isn't really that much fun (been there). You should get a board with a PIC, AVR, ARM etc. that has no firmware on it, but has a decent library for things like SPI, I2C, UART, and higher level stuff like SD card, file system, USB -- things you don't really want to have to write yourself . – tcrosley Jun 9 '15 at 16:09