Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 Firmware programming, How to start ?

views
     
TSnarf03
post Feb 12 2007, 11:21 AM, updated 19y ago

Look at all my stars!!
*******
Senior Member
4,547 posts

Joined: Dec 2004
From: Metro Prima, Kuala Lumpur, Malaysia, Earth, Sol


I am interested to learn firmware programming. I tried to do some research and readings but cant find much. I heard there are routers using Linux as their OS, and their firmware can be reprogramed using c or c++, I am very interested in these kind of technology. I wish I can write programs to control these hardware.

I have very basic linux knowledge and some years of programming skills(in .NET), but I can learn another language in just days. My main problem is that, I have no friends that know even a little in this kind of technology/knowledge, thus I dont know how to start.

Ill be really free during the chinese new year, hope I can get some reading material and learn this skill during the new year, any1 got any experience or tought, please share with me. Thanks for reading.
mokona_modoki
post Feb 12 2007, 06:00 PM

Getting Started
**
Junior Member
267 posts

Joined: Jul 2006


I guess the first step is to familiar with C, as most programmable hardware have C (or C like) compiler. Other language (C++, Java, PHP) are too large/slow/complex to implement in limited resource. Also, there might be a need to change programming style to compensate for limited resource. Eg: use tight loop instead of loop-unroll, use of "goto" instead of function call (function call will consume memory stack space, goto not).

Th next step is to know what is your goal ? Is it complex or simple task ? For simple task, it's better to use hardware without OS (eg: microcontroller). Else, better get hardware managed OS, so that you don't have to worry about memory management.

IMHO, the easiest programmable hardware is "OpenWRT supported router/modem". Just get their source code, then run this program in Linux. Try to take a peek for included source code. Not to mention that in OpenWRT you can do programming in C, shell, lua, ruby, java or PHP (and many more...). Also, you can use ZTE ZXDSL831 (a.k.a TM NET ADSL modem) as a platform, so go grab one then start programming.

http://wiki.openwrt.org/TableOfHardware
http://skaya.enix.org/wiki/BroadCom96345
TSnarf03
post Feb 12 2007, 08:59 PM

Look at all my stars!!
*******
Senior Member
4,547 posts

Joined: Dec 2004
From: Metro Prima, Kuala Lumpur, Malaysia, Earth, Sol


Thanks for your reply.

TMNET Modem ? Oh, im using aztech modem. Gotta goto tm point to grab one. How much its cost ?

I just downloaded intel c++, is it compatible ? err, nvm, is C language free, where can I get a copy ?
cks2k2
post Feb 12 2007, 09:18 PM

...
******
Senior Member
1,966 posts

Joined: Jan 2003
From: No longer hanging by a NUS

QUOTE(narf03 @ Feb 12 2007, 08:59 PM)
Thanks for your reply.

TMNET Modem ? Oh, im using aztech modem. Gotta goto tm point to grab one. How much its cost ?

I just downloaded intel c++, is it compatible ? err, nvm, is C language free, where can I get a copy ?
*
Since you are a .Net guy be prepared to live without the comforts of JIT/GC/hidden pointer etc and get down to barebone programming.

GCC is typically already installed on *NIX systems.
Intel C++ is optimized for producing the best code for Intel/AMD x86 procs (auto-parallelizing, vectorizer, integration with MS Visual Studio etc) but IIRC it's a 30-day evaluation copy. In fact it catches errors that VS misses but the warning/error msgs are cryptic as hell.
mokona_modoki
post Feb 12 2007, 11:23 PM

Getting Started
**
Junior Member
267 posts

Joined: Jul 2006


QUOTE(narf03 @ Feb 12 2007, 08:59 PM)
Thanks for your reply.

TMNET Modem ? Oh, im using aztech modem. Gotta goto tm point to grab one. How much its cost ?

I just downloaded intel c++, is it compatible ? err, nvm, is C language free, where can I get a copy ?
*
Nope, you can't use intel compiler since the target platform is not x86 (PC) compatible. What you need is a cross-compiler. Eg: compile in x86 to produce other platform machine code. All of this thing is already supplied in OpenWRT SDK.

Also, since you don't have the modem then better go for "fully supported hardware" like linksys wrt54g (version pending, see the previous link). The only reason why i'm mentioning ZTE is because a few people got it for free but never use it.
TSnarf03
post Feb 13 2007, 05:42 PM

Look at all my stars!!
*******
Senior Member
4,547 posts

Joined: Dec 2004
From: Metro Prima, Kuala Lumpur, Malaysia, Earth, Sol


Since i decide to learn it, i think ill spend some money to buy the best router for my study, from the list u gave me(http://wiki.openwrt.org/TableOfHardware), I feel WRTSL54GS is the best/most flexible router, checked the price, around $100-$120. I think I can afford it.

Do U think its a good selection for the price ? Or are there any better selection ? I choose it because it is supported, has usb/comm port, and their specs is pretty nice too(8mb flash/16mb ram). Please commend.
mokona_modoki
post Feb 13 2007, 10:31 PM

Getting Started
**
Junior Member
267 posts

Joined: Jul 2006


Yeah, go for it. Any programmable hardware with USB host is a good thing for Linux and you smile.gif
You can:
- use USB drive to add more data/application.
- use USB drive to add more memory (using swap space), so that you can run resource hungry application (eg: PHP)
- use webcam
- use USB audio to play sound, talk (using text to speech with flite)...
- and the list going on...

 

Change to:
| Lo-Fi Version
0.0130sec    0.29    5 queries    GZIP Disabled
Time is now: 28th November 2025 - 01:08 AM