Fun. We (your authors) wanted a word to describe our ultimate goal for this book, as well as a word
we hope you (our reader) will use to describe it, and that’s the one we chose. There are others goals,
of course, but in the end, when you’ve finished the book, we’re hoping you’ll have enjoyed the
activities described in these pages.
Many books use the Introduction to explain exactly what the book is about, what the reader will
learn, what the reader needs (a skill or maybe an item or piece of software), and what the reader
will be left with when that last page is completed. And this Introduction will do those things, but …
hopefully it’ll make you excited to get started.
This book addresses programmer attitudes, but it’s not some kind of psychology
textbook. We’ll investigate many topics, including:
Source code presentation
Defensive coding techniques
How to debug programs effectively
Good teamworking skills
Managing your source code
Take a quick glance through the table of contents to see exactly what’s
covered. What is the rationale behind my selection of topics? I’ve been mentor-
ing trainee programmers for many years, and these are the topics that have
come up time and time again. I’ve also worked in the software factory for
long enough to have seen the recurring problems—I address these too.
If you can conquer all of these programming demons, you’ll progress
from an apprentice coder to a real code craftsman.
It all started rather innocuously. I walked into Dr GT Murthy’s office one fine day, andchanged my life. “Doc” was then the General Manager, Central R&D, of a very largeelectrical company headquartered in Bombay. In his new state-of-the-art electronics center,he had hand-picked some of India’s best engineers (over a hundred already) ever assembledunder one roof. Luckily, he too was originally a Physicist, and that certainly helped me gainsome empathy. Nowadays he is in retirement, but I will always remember him as athoroughly fair, honest and facts-oriented person, who led by example. There were severalthings I absorbed from him that are very much part of my basic engineering persona today.You can certainly look upon this book as an extension of what Doc started many years agoin India … because that’s what it really is! I certainly wouldn’t be here today if I hadn’t metDoc. And in fact, several of the brash, high-flying managers I’ve met in recent years,desperately need some sort of crash course in technology and human values from Doc!
首先下載軟件,解壓軟件,安裝在程序中找到SEGGER,選里面的J-FLASH,進入界面,剛開始的那個界面可以忽略,不用建project也可以;單擊菜單欄的“Options---Project settings”打開設置,進行jlink配置;正在General選項,選擇“USB”,一般都是默認配置,確認一下即可;然后在CPU選項,選擇芯片型號,先選擇“Device”才能選擇芯片型號,芯片型號,要根據你使用的芯片進行選擇;在Target interface選項 里面選擇SWD模式;首先Target里面選“Connection”連接目標芯片,然后 Target--Auto進行程序燒寫;首先Target里面選擇“Connection”連接目標芯片,然后 Target--Auto進行程序燒寫.SEGGER J-Links are the most widely used line of debug probes available today. They've proven their value for more than 10 years in embedded development. This popularity stems from the unparalleled performance, extensive feature set, large number of supported CPUs, and compatibility with all popular development environments.
因此,您想編寫一個內核模塊。您知道C,您已經編寫了一些可以作為進程運行的常規程序,現在您想知道真正的動作在哪里,一個通配指針可以擦掉文件系統,核心轉儲意味著重新啟動。內核模塊到底是什么?模塊是可以根據需要加載和卸載的代碼段。它們擴展了內核的功能,而無需重新引導系統。例如。模塊驅動程序的一種類型是設備驅動程序,它允許內核訪問沒有模塊的系統硬件,我們將不得不構建單片內核并將新功能直接添加到內核映像中,除了具有更大的內核之外,這還具有缺點每次我們想要新功能時都要求我們重建并重新啟動內核的過程So, you want to write a kernel module. You know C, you, ve written a few normal programs to run as processes, and now you want to get to where the real action is, to where a single wild pointer can wipe out your file system and a core dump means a reboot.What exactly is a kernel module? Modules are pieces of code that can be loaded and unloaded into th upon demand. They extend the functionality of the kernel without the need to reboot the system. For example.one type of module is the device driver, which allows the kernel to access hardware connected to the syste without modules, we would have to build monolithic kernels and add new functionality directly into the em ernel image, Besides having larger kernels