Just after finishing the Elektor article about how to debug the Sceptre (or any other microcontroller that can be debugged over JTAG) using OpenOCD and GDB, I discovered another free IDE that seemed to be good for embedded development: CodeLite. It seemed to have everything needed for this kind of work, so I planned to add a supplement to the article on this blog. I thought that it would be easy to port the setup described in the article to this new IDE, but unfortunately it turned out to be not so. To come straight to the point: I have not succeeded debugging my target using CodeLite with GDB and OpenOCD.
Why? Because CodeLite does not treat GDB well or I am to dumb to figure it out. It seems easy & intuitive enough though. You create a project and then you define a debug setup for the project. You can tell CodeLite where your debugger lives and which commands to execute and CodeLite offers a GDB terminal, so everything is there to make it work. Except that it won't.
There are several issues. One is that it doesn't work always the same way. Sometimes I had to pass through the Quick Debug option to get it more or less going, sometimes this was not necessary. The reset command that I specified to be executed after attaching to the target gets executed several times instead of just once as if CodeLite uses a very short timeout to wait for response and then simply tries again. If it manages to get a connection to OpenOCD it is very difficult to use the GDB terminal that most of the times returns a message "interrupting debugee process: xxxx" where xxxx is a number that corresponds to the PC's process ID of GDB. Very frustrating and in the end I gave up, not succeeding once to execute successfully a step command.
It is a shame, because the IDE is nice. Not as heavy as Eclipse-CDT and easy to set up for embedded software development. It has interesting plugins, like the code formatting option that you can setup the way you like it, or a copyright block inserter. A snippet wizard lets you write quickly and you can hide functions that you don't want to see, it has everything you expect from a modern IDE. Therefore I suggest that you give it a try, maybe you don't care for GDB debugging of embedded platforms, it is definitely worth it.
If by any chance you figure out how to get GDB and OpenOCD working properly in CodeLite, please let me know.
Wednesday, February 9, 2011
Monday, February 7, 2011
Break the 8/16-bit habit
Most people, including me, like to get stuff for free. Electronic component manufacturers know this and often they offer free samples in the hope that their parts get designed in. Microcontroller manufacturers have started doing design contests and other campaigns to get new users for their products. One of the latests campaigns was launched by NXP for their ARM Cortex-M0 parts.
NXP already did do a design contest (or challenge as they called it) for their LPC1100 parts and now they are giving away LPCXpresso boards that contain a Cortex device. To get one, all you have to do is to show how you plan to stop using 8 and 16-bit devices. You can do this by sending in a picture or a video and if accepted it will be posted here.
Here is the video I sent in.
NXP's website does not mention which LPCXpresso board you will get, but I suppose it will be the board with the LPC1114.
Here are some photos & videos I received in response to this article. Feel free to share your way of breaking the 8/16 bit habit by sending me your photo and/or video and I will put them up here too.
L. Francey prefers to use his obsolete microcontrollers to create arty objects.

Marc will eat anything that has legs.

Jonathan likes Aciiid!

Denis combines his passions for nature and electronics.
NXP already did do a design contest (or challenge as they called it) for their LPC1100 parts and now they are giving away LPCXpresso boards that contain a Cortex device. To get one, all you have to do is to show how you plan to stop using 8 and 16-bit devices. You can do this by sending in a picture or a video and if accepted it will be posted here.
Here is the video I sent in.
NXP's website does not mention which LPCXpresso board you will get, but I suppose it will be the board with the LPC1114.
Here are some photos & videos I received in response to this article. Feel free to share your way of breaking the 8/16 bit habit by sending me your photo and/or video and I will put them up here too.
L. Francey prefers to use his obsolete microcontrollers to create arty objects.

Marc will eat anything that has legs.

Jonathan likes Aciiid!

Denis combines his passions for nature and electronics.
Monday, January 17, 2011
Test driving DesignSpark PCB
In the summer of 2010 RS Components launched DesignSpark, an online community for electronics engineers. It is a similar community as Element14 from Farnell that was launched a year before. Like Element14, DesignSpark also offers a free circuit drawing and PCB design tool. Unlike the tool from Farnell that has some limitations - notably board size - the tool from RS is totally unlimited (meaning that there are no artificial limitations). Eagle Freemium, the tool from Farnell, in its free but limited version is allready used by many hobbyists, so would it be interesting for those users to switch to DesignSpark PCB?
Since I have been using (the professional version of) Eagle for a while now, I decided to try out DesignSpark PCB. I installed the latest version, which is 1.0.3. I had no PCB to design so I followed the tutorial that is included with the software. The tutorial is clearly written and pretty straightforward. A circuit diagram is quickly drawn thanks to the many libraries included, but the tutorial only uses some standard parts. If you follow the tutorial closely you will end up with a routed PCB in 45 minutes or so.
I noticed three problems in the tutorial text. The first one is a wrong connector specification. The text mentions a 5WP model, but you need a D9F. The second problem is more serious as I could not find the solution without the help from RS. The tutorial wants you to place a label on a net using the Display Net Name option that is supposed to be available from the right-click context menu, but I did not have this option. Looking through all the menus I could not find it either. The trick is that you have to select the _pin_ of the output symbol, not the symbol itself. The pin is the little cross that disappears as soon as you connect a wire to it. To select it you have to click on the extremity of the symbol. Actually it is much easier to right-click the wire to display the net name.
The third problem was the missing Spoke 10 option for the copper pour. This is a technology file issue, I probably did not load the right one.
I also tried importing an existing Eagle project. DesignSpark PCB includes a few Eagle macros that seem to work rather well, but not 100 %. In the schematic some junction symbols (the dots) were lost. Maybe these were the manually placed junctions in the Eagle file? Texts did not keep their sizes and the outlines of the page frames (or borders as the tutorial calls them) were gone. I also ended up with some labeled wires that were red, but not all.
On the imported PCB the texts not only had the wrong size, but they were rotated incorrectly too. A real problem was the fact that the Eagle project used a copper pour for connecting all the ground connections and these were not recognized by DesignSpark PCB even though the signal pads & vias had the right net names and were in the pour. Autorouting the PCB with or without grid did not solve the problem, and I am stuck at this point.
My quick test drive of DesignSpark PCB showed me that it is a very usable tool of at least the same quality as Eagle, but without the limitations of the Freemium version. I have used quite a lot of different PCB CAD packages and I found DesignSpark PCB easy enough to learn, but this may be different for other people. Switching to DesignSpark PCB may be interesting if you are not afraid of gerber files, because the PCB pooling guys, except for PCB Pool, do not (yet?) support uploading of complete DesignSpark PCB projects as they do for Eagle.
DesignSpark PCB seems a bit more production oriented than Eagle and you have easier control over the BOM. I also found the generation of the fab files easier. The technology files will probably confuse Eagle users (line widths f.i. have to be specified in the technology file first) and data entry is more work as is checking the PCB with all the different reports.
The most important difference between the two tools is definitely the design flow. DesignSpark PCB uses the classic capture-netlist-pcb flow
repeat until finished
{
draw/modify schematic;
generate netlist;
draw/modify PCB;
}
whereas Eagle has this automated. If you delete a part in an Eagle schematic, it is also deleted from the PCB. In DesignSpark PCB you have to initiate the update manually. Both ways of doing have their pros and cons and as long as you are used to it you will stay out of trouble, but if you aren’t, you will be in for some (unpleasant) surprises.
Another difference is in the separation of components and circuits. In Eagle, once you’ve defined a part you can only modify it in the library editor. DesignSpark PCB lets you edit a part up to some extent during capture. You can move pin names and numbers and add fields to parts that would be text comments in Eagle.
Let me finish this article with some remarks about DesignSpark PCB particularities:
Schematic capture
- Setting the component value of parts that do not have the value field is tedious, but can be done without editing the part in the library editor.
- Setting the component value is a bit tedious too as it involves at least two double clicks and two OKs.
- When two nets are merged, you cannot choose the name of the merged net.
- Block dragging is a bit strange and will move wire segments that you probably did not want to move.
- I had grid problems. Wires and parts placed on the grid somehow were moved off the grid, probably after a block move even though I never changed the grid or switched it off.
PCB
- The autorouter is not very powerful. It works with the tutorial, but I could not get a simple circuit to route except for a few wires. It turns out that you have to set the intertrack and track-pad spacings properly in the Design Technology window depending on the component lead pitch to get it going. You may also want to reduce the via size. I finally managed to get a very simple design to complete, but I was not impressed with the result. Then again, I always route manually so I don’t really care about the autorouter.
- You can generate reports for lots of things. These are displayed in Notepad and before you know it you have lots of Notepad windows open. If you rerun a report it will get a new window instead of overwriting the old one.
- Don’t forget to activate the Show nearest node on net if you route manually, otherwise you have absolutely no idea where you are going.
- I liked the single doc PDF that you can produce and that will hold all the plots. You should include the board outline in at least one plot, otherwise the paper size will wrong.
- I also like the plot preview option and the simple checkbox to cover vias with solder resist.
- Nice also is the auto place function to put parts on the board, allthough the result may not be exactly like how you would do things.
Projects
- You cannot rename a sheet? The only way I managed to do this was to save the project in a new location.
Since I have been using (the professional version of) Eagle for a while now, I decided to try out DesignSpark PCB. I installed the latest version, which is 1.0.3. I had no PCB to design so I followed the tutorial that is included with the software. The tutorial is clearly written and pretty straightforward. A circuit diagram is quickly drawn thanks to the many libraries included, but the tutorial only uses some standard parts. If you follow the tutorial closely you will end up with a routed PCB in 45 minutes or so.
I noticed three problems in the tutorial text. The first one is a wrong connector specification. The text mentions a 5WP model, but you need a D9F. The second problem is more serious as I could not find the solution without the help from RS. The tutorial wants you to place a label on a net using the Display Net Name option that is supposed to be available from the right-click context menu, but I did not have this option. Looking through all the menus I could not find it either. The trick is that you have to select the _pin_ of the output symbol, not the symbol itself. The pin is the little cross that disappears as soon as you connect a wire to it. To select it you have to click on the extremity of the symbol. Actually it is much easier to right-click the wire to display the net name.
The third problem was the missing Spoke 10 option for the copper pour. This is a technology file issue, I probably did not load the right one.
I also tried importing an existing Eagle project. DesignSpark PCB includes a few Eagle macros that seem to work rather well, but not 100 %. In the schematic some junction symbols (the dots) were lost. Maybe these were the manually placed junctions in the Eagle file? Texts did not keep their sizes and the outlines of the page frames (or borders as the tutorial calls them) were gone. I also ended up with some labeled wires that were red, but not all.
On the imported PCB the texts not only had the wrong size, but they were rotated incorrectly too. A real problem was the fact that the Eagle project used a copper pour for connecting all the ground connections and these were not recognized by DesignSpark PCB even though the signal pads & vias had the right net names and were in the pour. Autorouting the PCB with or without grid did not solve the problem, and I am stuck at this point.
My quick test drive of DesignSpark PCB showed me that it is a very usable tool of at least the same quality as Eagle, but without the limitations of the Freemium version. I have used quite a lot of different PCB CAD packages and I found DesignSpark PCB easy enough to learn, but this may be different for other people. Switching to DesignSpark PCB may be interesting if you are not afraid of gerber files, because the PCB pooling guys, except for PCB Pool, do not (yet?) support uploading of complete DesignSpark PCB projects as they do for Eagle.
DesignSpark PCB seems a bit more production oriented than Eagle and you have easier control over the BOM. I also found the generation of the fab files easier. The technology files will probably confuse Eagle users (line widths f.i. have to be specified in the technology file first) and data entry is more work as is checking the PCB with all the different reports.
The most important difference between the two tools is definitely the design flow. DesignSpark PCB uses the classic capture-netlist-pcb flow
repeat until finished
{
draw/modify schematic;
generate netlist;
draw/modify PCB;
}
whereas Eagle has this automated. If you delete a part in an Eagle schematic, it is also deleted from the PCB. In DesignSpark PCB you have to initiate the update manually. Both ways of doing have their pros and cons and as long as you are used to it you will stay out of trouble, but if you aren’t, you will be in for some (unpleasant) surprises.
Another difference is in the separation of components and circuits. In Eagle, once you’ve defined a part you can only modify it in the library editor. DesignSpark PCB lets you edit a part up to some extent during capture. You can move pin names and numbers and add fields to parts that would be text comments in Eagle.
Let me finish this article with some remarks about DesignSpark PCB particularities:
Schematic capture
- Setting the component value of parts that do not have the value field is tedious, but can be done without editing the part in the library editor.
- Setting the component value is a bit tedious too as it involves at least two double clicks and two OKs.
- When two nets are merged, you cannot choose the name of the merged net.
- Block dragging is a bit strange and will move wire segments that you probably did not want to move.
- I had grid problems. Wires and parts placed on the grid somehow were moved off the grid, probably after a block move even though I never changed the grid or switched it off.
PCB
- The autorouter is not very powerful. It works with the tutorial, but I could not get a simple circuit to route except for a few wires. It turns out that you have to set the intertrack and track-pad spacings properly in the Design Technology window depending on the component lead pitch to get it going. You may also want to reduce the via size. I finally managed to get a very simple design to complete, but I was not impressed with the result. Then again, I always route manually so I don’t really care about the autorouter.
- You can generate reports for lots of things. These are displayed in Notepad and before you know it you have lots of Notepad windows open. If you rerun a report it will get a new window instead of overwriting the old one.
- Don’t forget to activate the Show nearest node on net if you route manually, otherwise you have absolutely no idea where you are going.
- I liked the single doc PDF that you can produce and that will hold all the plots. You should include the board outline in at least one plot, otherwise the paper size will wrong.
- I also like the plot preview option and the simple checkbox to cover vias with solder resist.
- Nice also is the auto place function to put parts on the board, allthough the result may not be exactly like how you would do things.
Projects
- You cannot rename a sheet? The only way I managed to do this was to save the project in a new location.
Tuesday, December 7, 2010
Dreams,dreams, dreams...
Every once in a while I come across a component that gets me dreaming. This morning I received a press release about such a component: a wireless EEPROM from STMicroelectronics. The M24LR64-R is a 64 Kbit EEPROM with password protection and a dual interface. It has a standard 400 kHz I2C bus for reading and writing the device, but it also has an ISO 15693 compatible 13.56 MHz contactless interface. You can actually read and write this chip using RFID and near field communications (NFC) techniques without needing to power it. I think that is pretty cool.
Every time when I had to draw a PCB with memory, especially the kind with lots of address and data pins, interfacing in parallel to a processor, I started dreaming about wireless memory. Wouldn’t it be great if you only had to plunk a memory chip on a board, somewhere in the vicinity of the processor and not wire anything? Instead of transmitting over the air you could probably use a copper or some other metal plane as a better communication medium. Or you could make the PCB out of wood or paper and stick the components on it with ecological glue.
Maybe some day wireless will be so cheap that you can have intelligent wireless resistors, capacitors and other parts that could be mesh-networked to build a circuit. You simply put the components in a bag or box, like rice or sugar, and it all would work without wires and soldering. OK, that is a bit far fetched, but who knows what we will have 50 years from now? This RFID EEPROM is definitely a step in the right direction.
This kind of dreaming reminds me of the time when I was a kid and a friend of mine had a Tandy electronics experimentation kit with resistors, transistors and other parts. It used springs for wiring. We would wire at random the parts together while fantasizing about the amazing things our circuit would do. Of course nothing ever happened (and somehow we never smoked anything), but it kept us busy after school. Being nerds we had not yet discovered girls, but I did get a glimpse of his mum naked. Maybe one of our random circuits did work after all…
Every time when I had to draw a PCB with memory, especially the kind with lots of address and data pins, interfacing in parallel to a processor, I started dreaming about wireless memory. Wouldn’t it be great if you only had to plunk a memory chip on a board, somewhere in the vicinity of the processor and not wire anything? Instead of transmitting over the air you could probably use a copper or some other metal plane as a better communication medium. Or you could make the PCB out of wood or paper and stick the components on it with ecological glue.
Maybe some day wireless will be so cheap that you can have intelligent wireless resistors, capacitors and other parts that could be mesh-networked to build a circuit. You simply put the components in a bag or box, like rice or sugar, and it all would work without wires and soldering. OK, that is a bit far fetched, but who knows what we will have 50 years from now? This RFID EEPROM is definitely a step in the right direction.
This kind of dreaming reminds me of the time when I was a kid and a friend of mine had a Tandy electronics experimentation kit with resistors, transistors and other parts. It used springs for wiring. We would wire at random the parts together while fantasizing about the amazing things our circuit would do. Of course nothing ever happened (and somehow we never smoked anything), but it kept us busy after school. Being nerds we had not yet discovered girls, but I did get a glimpse of his mum naked. Maybe one of our random circuits did work after all…
Labels:
EEPROM,
M24LR64,
RFID,
STMicroelectronics,
wireless
Tuesday, November 23, 2010
PSoC 5 Design Challenge
Here is yet another design contest:
Cypress Semiconductor announced the ARM Cortex-M3/ PSoC 5 Design Challenge, a contest to find the most innovative and useful designs from the millions of possibilities available to designers using the Cypress PSoC 5 architecture powered by the ARM Cortex-M3 processor. The contest is presented in conjunction with EE Times and ARM with the Grand Prize to be awarded in May, 2011. A total of over $10,000 in cash and prizes will be awarded throughout the contest, including the $2,500 Grand Prize. More information, including how to enter the contest and how to become a judge, as well as lively interaction from participants and the engineering community is available here.
Cypress Semiconductor announced the ARM Cortex-M3/ PSoC 5 Design Challenge, a contest to find the most innovative and useful designs from the millions of possibilities available to designers using the Cypress PSoC 5 architecture powered by the ARM Cortex-M3 processor. The contest is presented in conjunction with EE Times and ARM with the Grand Prize to be awarded in May, 2011. A total of over $10,000 in cash and prizes will be awarded throughout the contest, including the $2,500 Grand Prize. More information, including how to enter the contest and how to become a judge, as well as lively interaction from participants and the engineering community is available here.
Monday, November 15, 2010
Sceptre library update
The December issue of Elektor (now on sale) includes a 32-page supplement dedicated to microcontroller projects. In this supplement you will find two articles related to the Sceptre.
First of all there is a 4-page article about Oberon-07, a high-level PASCAL-like programming language, but object oriented. If you know MODULA-2 you will quickly find your marks, if you don't, well then it is pretty straightforward too. Oberon-07 has special features for microcontroller programming. It is f.i. very simple to manipulate bits and registers. Oberon-07 compiles very quickly in very efficient code. The Astrobe IDE makes things even easier thanks to its many libraries and comfy editing options. Serial comms, I2C, math & strings, and much more, it is all ready for you. Go check it out.
The second Sceptre article presents an extension card with a Nokia 6100 mobile phone color LCD, a Blackberry trackball and a 16 Mbit flash memory chip on it. All is controlled over an SPI bus, so the card doesn't use a lot of the Sceptre's I/O. Thanks to a nice open-source driver it is easily possible to display images at a framerate of more than 10 per second!
The fun thing of this card is that it doubles as a universal Arduino shield adapter for the Sceptre. A 16-bit I/O expander from Microchip together with some more Sceptre GPIO make the Sceptre compatible with an Arduino. You can now simply plug an Arduino shield on the Sceptre and use it. As there are many shields available, this unlocks a huge playground for Sceptre enthusiasts.
CAD (Eagle) files and software for this project are freely available together with a library update for the Sceptre. New functions (f.i. RFID), new examples (including a real MIDI file player!) and improved modules (better Bluetooth) make new applications easier. Go get your download here.
First of all there is a 4-page article about Oberon-07, a high-level PASCAL-like programming language, but object oriented. If you know MODULA-2 you will quickly find your marks, if you don't, well then it is pretty straightforward too. Oberon-07 has special features for microcontroller programming. It is f.i. very simple to manipulate bits and registers. Oberon-07 compiles very quickly in very efficient code. The Astrobe IDE makes things even easier thanks to its many libraries and comfy editing options. Serial comms, I2C, math & strings, and much more, it is all ready for you. Go check it out.
The second Sceptre article presents an extension card with a Nokia 6100 mobile phone color LCD, a Blackberry trackball and a 16 Mbit flash memory chip on it. All is controlled over an SPI bus, so the card doesn't use a lot of the Sceptre's I/O. Thanks to a nice open-source driver it is easily possible to display images at a framerate of more than 10 per second!
The fun thing of this card is that it doubles as a universal Arduino shield adapter for the Sceptre. A 16-bit I/O expander from Microchip together with some more Sceptre GPIO make the Sceptre compatible with an Arduino. You can now simply plug an Arduino shield on the Sceptre and use it. As there are many shields available, this unlocks a huge playground for Sceptre enthusiasts.
CAD (Eagle) files and software for this project are freely available together with a library update for the Sceptre. New functions (f.i. RFID), new examples (including a real MIDI file player!) and improved modules (better Bluetooth) make new applications easier. Go get your download here.
Tuesday, November 2, 2010
Renesas RX Design Contest
The Design Contest seems to be the new weapon of choice for microcontroller manufacturers to get attention for their products. NXP is currently running the mbed Design Challenge and two weeks ago Renesas announced their RX Design Contest. Over $110,000 worth of prizes will be distributed amongst the participants.
The Design Contest is also a good way for electronics enthusiasts to get a nice piece of hardware for free. NXP is handing out LPC1768 Cortex-M3 mbed modules for free and the first 1,000 participants of the Renesas contest get a complimentary RX62NRDK development board.

This board supports most flavors of USB, has a color graphics display, LEDs, buttons, SD-card connector and whatever you may need in a project. Random particpants will also get a full licence for Micrium uC/Probe together with the book uC/OS-III RTOS for the Renesas RX.
The contest finalists will be announced on March 13, 2011. The final judging will be at the ESC in San Jose, California on May 3, 2011.
(See also here and here for other contests.)
The Design Contest is also a good way for electronics enthusiasts to get a nice piece of hardware for free. NXP is handing out LPC1768 Cortex-M3 mbed modules for free and the first 1,000 participants of the Renesas contest get a complimentary RX62NRDK development board.

This board supports most flavors of USB, has a color graphics display, LEDs, buttons, SD-card connector and whatever you may need in a project. Random particpants will also get a full licence for Micrium uC/Probe together with the book uC/OS-III RTOS for the Renesas RX.
The contest finalists will be announced on March 13, 2011. The final judging will be at the ESC in San Jose, California on May 3, 2011.
(See also here and here for other contests.)
Subscribe to:
Posts (Atom)
