Hot answers tagged

36

I don't have the time for a full explanation, but I can give you cookbook-style the commands I use on my Linux box to program AVRs: Preparations On Ubuntu, make sure several required packages are installed: sudo apt-get install avr-libc avrdude binutils-avr gcc-avr srecord optionally throw in gdb-avr simulavr for debug and simulation. I started to create a ...


20

My short answer is to just go with LTSpice, it is one of the best simulators on the market and it is free. You can't really beat that. But if you would like a breakdown feel free to read my personal opinions. HSPICE: Advantages: HSPICE is widely considered one of the most accurate simulators on the market. However I have no actual experience using it. ...


18

Regarding the ARM Cortex-M3: Linux requires an MMU (Memory Management Unit). The ARM Cortex-M3 does not have one. It is impossible to run the mainline Linux kernel on the ARM Cortex-M3. However, there is a variant of the Linux kernel for MMUless processors called uCLinux. Linux on M3 Guide ST's Application Note on uCLinux However, as others have noted, ...


17

I'd say either ngspice with gspiceui (part of gEDA I believe) or LTSpice with wine as Renan has already mentioned. Here's a screenshot of ngspice on KDE (with one of the graphical addon packages like nutmeg): I have a linux box and I use the second option (rarely, since I'm mostly on my Windows laptop), simply because I'm used to LTSpice. There are also ...


17

You see aliasing in your capture, not clock jitter - a case of the wrong tool for the job. A 2Mhz clock has a 500ns period, so is high for 250ns. With a 16Mhz logic analyser you are taking samples every 62.5ns, so ideally you'd see 4 high samples, 4 low samples repeating. Now consider the effect of a minuscule 0.5% difference in frequency on the CPU ...


15

A textbook 32-bit RISC processor core capable of running the no-mmu version of linux doesn't actually need to be that large - the real resource you need is far more RAM (10s of megabytes) than available in any FPGA, so you'll probably want SDRAM on the board and a controller for that in the FPGA. That said, if you want anything more than a trivial level of ...


13

Since SPI is a synchronous protocol the exact frequency at any one point in time really doesn't matter. Everything is keyed to the edges of the clock, so the exact timing between edges really doesn't matter - within the limits of the device of course.


12

Cortex-M isn't up to the job, you need the ARM926EJ-S A search for "Cortex-M + Linux" doesn't come up with a lot of answers because the Cortex-M isn't designed for Linux. The least-powerful ARM generally considered able to run a full OS like Linux is the ARM926EJ-S series, which uses the ARMv5 architecture. This is a classic processor, with wide adoption (...


12

An easy way to program and debug the STM32 Discovery board (or any STM32 using an ST-Link programmer) is to use the 'stlink' project https://github.com/texane/stlink (however OpenOCD seems popular too) ST Nucleo boards also appear as a USB flash device, so don't even need stlink - just copy the file over to them. There are some good pages on how to develop ...


11

I would say that depends heavily on what you need it for. Often the expensive spices are part of some e.g PCB design tool. I'm just trying out MultiSIm from NI (expensive orcad type tool), and it has lots of pretty virtual instruments (e.g scope, distortion analyser, etc) and monte carlo analysis (which LTspice does not have a "convenient" version of - it ...


11

There are some steps before getting on embedded linux. As @KKToronto said, it would be nice if you have a desktop linux experience first. If you don't have any experience I recommend installing Ubuntu in your desktop/notebook in order to get some feeling with the OS. To go from the desktop to the embedded world, at least on linux way, is relatively easy, if ...


11

You can use the AVR GNU tools as standalone packages in linux. These include avr-gcc, avr-binutils, and avr-libc. This is what is referred to as the toolchain. Once you have built a hex file and you are wishing to flash it onto your chip, you can use avrdude. All of these are freely and readily available on Linux and not too difficult to configure to work ...


10

Please check this site for some Cortex-M3 platforms that support Linux (uClinux): http://www.emcraft.com/ We successfully run uClinux on the following Cortex-M3 MCUs: NXP's LPC1788, STmicro's STM32F2, Actel's SmartFusion, and are in process of adding support for a couple more: Freescale Kinetis, STM32F4 (these two are Cortex-M4 rather than Cortex-M3). ...


10

If your filesystem is read-only, use ext2. That is proven stable for several decades, is fast, efficient, supports ownership, supports permission bits and has a huge user base as every Linux box supports it. In other words it supports everything a decent Linux system requires. If read-only is not an option, your next best bet is ext3. Apart from all the ...


10

Got it done. I figured I'd share my results so others can use it. Thanks for your time, everyone. I used this ARM toolchain to build my project, and the texane/stlink library, which comes with the ./st-flash tool, to flash the binary to my STM32L1. While texane/stlink comes with GDB, I found I could get the building+flashing process done without it. My ...


10

If you want to see what is done inside, you have already answered your question : you can't use managed flash, your only solution is raw NAND flash. As you want reliability, you can't have 2 pages corrupted when a write fails, this excludes MLC and TLC flash. Go for 2GB SLC NAND flash (BeNAND doesn't fit your requirements). It's expensive, but it's your ...


10

The Raspberry Pi is an embedded Linux system. It is running on an ARM and will give you some of the ideas of embedded design. Whether it is "embedded enough" is a question of how far you want to go. There are effectively two halves of embedded Linux programming. In many situations, the developer will wear both hats, but the required knowledge can be ...


9

SPICE was developed under, is and always has been UNIX based with most instances of the software also being actively run under Unix. There are very few windows variants in comparison. As a result there is a many different flavors of spice out there and many that are FOSS. gEDA, XSpice etc. A quick search under EDA on freecode (the old Fresh meat ...


8

Oli gave a correct answer but the I(element_name) is an extension added only to the commercial SPICE versions. In ngspice (which is based on Berkeley Spice 3) you can only plot currents through (independent) voltage sources. These are the only currents that appear in the circuit equations SPICE works from. In an interactive Spice session or from a special ...


8

I've had good success with Atmel AVRs using: the GCC C compiler with AVR libraries (packaged in APT for Debian based distros) avrdude for flashing devices (using a cheap Atmel AVRISP mkII programmer) AVR Eclipse plugin for an IDE Googling will find some guides on setting it all up under a recent Ubuntu install. It's a lot easier than it used to be, it's ...


8

If You are more into text editors and Makefiles instead of using a GUI, you could do: Install a toolchain providing arm-none-eabi-gcc. On Archlinux, you would need community/arm-none-eabi-binutils, arm-none-eabi-gcc and arm-none-eabi-newlib (and arm-none-eabi-gdb if you want to debug) all from the community repo, or https://launchpad.net/gcc-arm-embedded (...


7

You can use these macros that get defined automatically when you include <avr/io.h>: SIGNATURE_0 SIGNATURE_1 SIGNATURE_2 For ATmega1280, they're defined as: /* Signature */ #define SIGNATURE_0 0x1E #define SIGNATURE_1 0x97 #define SIGNATURE_2 0x03 in iom1280.h (which is automatically included through <avr/io.h> when you compile code for the ...


7

To compile programs for the ATmega you need a so called toolchain. A well used one is the GNU AVR toolchain (and it is FLOSS). Linux (best), Mac and Windows can handle it. To get the compiled code into your microcontroller, you need a programmer like AVRdude. The corresponding hardware is called an In-System-Programmer (ISP). There are a lot of projects out ...


7

As far as I know, there isn't something like Proteus for Linux. If you don't mind using Wine to run Windows applications in Linux and using a closed-source application, LTspice runs perfectly there (this is what I use, usually) Otherwise, there's ngspice, for which Oli already has pointed to an ngspice GUI.


7

Have you considered creating a simple kernel module you can insert to make the MTD partition(s) writable? I had this same problem and was able to work around it by writing a kernel module. For simplicity, I just went ahead and had it make every MTD device writable. Basically, the module has to do something like this in its init function: struct mtd_info *...


7

Generally you wouldn't use a operating system on something that is performing true microcontroller tasks. In such cases, the OS gets in the way more than it helps. OSs are about virtualizing hardware resources and providing abstractions like threads and processes. These things are of little use when the hardware you are driving is easy to control directly,...


6

I don't have experience with HSPICE, but use LTspice and NGSPICE very frequently. In my field (power electronics), I have observed fellow engineers actively refuse to work with the company-supplied Pspice after being exposed to LTspice. Unfortunately, LTspice is closed source, has no scripting possibility, and you can't add (your own) code models to it. ...


6

I have not used ngspice (I use LTSpice, but from what I understand pretty much all SPICEs are based on the original Berkeley syntax, and work similarly), but usually you plot the current through a component or into e.g. base of a transistor, rather than at a node, according to Kirchoff's first law (the sum of currents meeting at a point is zero) EDIT - as ...


6

Microchip has a new MPLAB X using the NetBeans platform that installs under Linux, either 32-bit or 64-bit. It is still under beta release, but has been out for awhile now, and has support through their forums. You can develop for any of the Microchip MCU lines, PIC10/12/16/18 (all 8-bit), PIC24 (16-bit), or PIC32 (32-bit). I would recommend starting with ...


6

Xilinx's Microblaze runs Linux just fine, assuming it's fast enough for your purposes - it'll only do some high 10s of MIPS in cheaper devices, 100-200 MIPS in the expensive families. Xilinx have a git repo, or there are a few Xilinx specific distributions. FPGA flexibility can be a bit of a pain as well as a boon, as your memory map and IRQ mappings, or ...


Only top voted, non community-wiki answers of a minimum length are eligible