~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Firmware Update
- August 31, 2009
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In this issue:
-- They Say We Landed a Man on the Moon
-- Embedded Software Boot Camp - October 5-9
-- Reader Q&A
-- IEEE Toronto -- Embedded Systems News
Firmware Update is a free electronic newsletter containing analysis, insight, and commentary on firmware architecture and process by embedded software expert Michael Barr. Firmware Update is Copyright 2009 by Netrino, LLC, but may be reprinted or forwarded for interested colleagues. |
|
They Say We Landed a Man on the Moon ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Apollo moon landing was one of the great
achievements of the 20th century and many
wonder if it will really be duplicated in the 21st.
We are likely to be stuck here on
earth with 7 billion of our closest friends for the
foreseeable future. Why? Well, consider what
went right for us to get to the moon the first
time... His name was Wernher von Braun.
Wernher von Braun was born March 23, 1912. He was a geek. He treasured the Star Trek and X-Files of his day - H. G. Wells and Jules Verne. He loved the concept of space exploration and wanted very much to build a moon ship. Von Braun's natural organizational skills were augmented by his aristocratic upbringing. He was comfortable with important people and giving orders. By the age of 17, Wernher was building rockets. At age 20 he went to work for the German army building missiles. By 22 he was leading the rocketry research at the Kummersdorf test site and had several million marks funding. By age 24 he had over 1,000 people working for him. |
|
Embedded Software Boot Camp - October 5-9 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Netrino's Embedded Software Boot Camp is a
one-week skills strengthening program
consisting of a series of lectures and hands-on
exercises. This engaging educational
program quickly and dramatically raises the
embedded and multithreaded programming
skills of individuals and teams. Hundreds of
engineers with from 0 to 15 years of
embedded software experience and
from EE, CS, and other backgrounds have
already benefited from this popular training.
I'll be leading the next session in Silicon Valley from October 5-9, 2009. A 20% early registration discount is available for a couple more weeks. Payment may be made by either credit card or company purchase order. But please act quickly to reserve your seat, as capacity is limited and the room is filling up. |
|
Reader Q&A ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Matthew D.: I bought Netrino's
Embedded C
Coding
Standard a few months back--love it. Seeking
advice...
Say a MCU has four UARTS, and the working code for each of them is identical. To ensure the code is identical and to eliminate the need to update four files instead of just one, I would like to have one file, called UARTx.c that contains the actual UART code. Then, add to my project UART1.c, UART2.c, etc that #includes UART1.h, UART2.h etc. for register definitions and settings. UART1.c would need to then include UARTx.c, which violates your rule 4.3f ("No source file shall #include another source file."). What is the solution? NetrinoMike: If I understand your situation fully, I think the answer is straightforward. First, create a single module called uart (i.e., consisting of uart.c + uart.h). Name all public functions, uart_xxx() (e.g., uart_init(), uart_send()). Next, require all public functions be passed an initial parameter of type uart_t. Typedef the uart_t data type (e.g., an int or a struct) in whatever way is minimally necessary to identify a specific one of the four UARTs. If you can somehow "hard-code" the possible first parameters, such as via #defines or const uart_t instances, do so in uart.h. Users of this interface #include "uart.h", initialize the one they want e.g., uart_init(uart_t UART4, uint16_t 115,200, ...), then make send and receive calls. The only time this won't work well is if the UARTs are completely different and their drivers cannot thus be easily implemented with lots of mimicry of steps in the functions themselves. In that case, you shouldn't try to reuse *any* code; just name one driver usart.c another uart.c or whatever other names make sense. Matthew D.: Thank you very much for your reply, it was very helpful. This type of approach with a few extra fields for software buffers and pointers should work very well for my situation. |
|
IEEE Toronto ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I'll be speaking at an IEEE Toronto Section
event, at Microchip's Regional Training Center
in
Mississauga, Ontario, on October 22,
2009. The title of my talk is
"Developing an Effective Coding Standard". In
a
nutshell, I'll be talking about how coding
standards can be developed to reduce bugs
created by the original programmer and
misunderstandings by those who follow in his
or her footsteps. Because it's a full-day talk,
there will be ample time to consider specific
bug-killing coding rules as well as the MISRA
guidelines and use of static analysis tools and
code reviews for enforcement. The intended
audience is firmware developers, project
managers, and technical managers.
|
|
Embedded Systems News ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ganssle says "every recession ends";
companies that use tough times to invent new
products will be better positioned for the good
times. http://bit.ly/q6Ad8
Staccato is an approach to reliable low maintenance embedded software built on a system of finite state machines. http://bit.ly/19kugk You can feel a touchable hologram made of focused ultrasound as if it were a real object. Video: http://tw2t.com/8dk DharmaTech is an interesting engineering organization helping non-profits take advantage of technology. http://dharmatech.org/about Virage Logic bids $41m to buy ARC cores; a price less than 20% of ARC's IPO valuation. http://bit.ly/yGlv0 New research on active invisibility cloaks in EETimes. http://bit.ly/135Jyk IEEE reports unemployment among electrical engineers hit a record high 8.6% earlier this year. http://bit.ly/Fo0yV VDC study: Wind River Systems now leads the market in revenue from embedded Linux solutions. http://bit.ly/FRS6B Annual smartphone volumes predicted to exceed PC sales by 2011. http://bit.ly/DEudf Netrino's Embedded C Coding Standard book is now available for purchase from Amazon. Look inside: http://bit.ly/4axGL7 Clever Lego Mindstorm robot solves Sudoku puzzles on paper! Video: http://bit.ly/1yukHs Them's fightin' words: fire half your programmers and stop using a software development process. Tried it? http://bit.ly/4DTO06 India formally ends first lunar mission; Chandrayaan-1 orbiter stopped communicating after a wave of high radiation. http://bit.ly/2MJESL |
|
Quick Links... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
Contact Us... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
email:
mbarr@netrino.com
phone:
866.78.EMBED
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|