Reusable Firmware Development
없습니다
도서+교보Only(교보배송)을 함께 15,000원 이상 구매 시 무료배송
15,000원 미만 시 2,500원 배송비 부과
20,000원 미만 시 2,500원 배송비 부과
15,000원 미만 시 2,500원 배송비 부과
1Box 기준 : 도서 10권
알립니다.
- 본 상품은 주문 후 제작되는 맞춤도서입니다.
주문기간에 따라 도서 출고일은 영업일 기준 최소 3일에서 최대 8일이 소요됩니다. - 해외주문도서는 고객님의 요청에 의해 주문하는 '개인 오더' 상품이기 때문에, 단순한 고객변심/착오로 인한 취소, 반품, 교환의 경우 '해외주문 반품/취소 수수료'를 부담하셔야 합니다. 이점 유의하여 주시기 바랍니다.
- 반품/취소 수수료:(1)서양도서-판매정가의 12%, (2)일본도서-판매정가의 7% (반품/취소 수수료는, 수입제반비용(FedEx수송비용, 관세사비, 보세창고료, 내륙 운송비, 통관비 등)과 재고리스크(미판매 리스크, 환차손)에 따른 비용을 포함하며, 서양도서는 판매정가의 12%, 일본도서는 판매정가의 7%가 적용됩니다.)
- 외국도서의 경우 해외제공정보로만 서비스되어 미표기가된 정보가 있을 수 있습니다. 필요한 정보가 있을경우 1:1 문의게시판 을 이용하여 주십시오.
취소/반품에 대한 안내
POD도서는 고객 주문 후 제작되는 도서로, 단순변심 및 착오로 인한 취소, 반품이 절대 불가하니 이점 반드시 유의하여 주시기 바랍니다.
해외주문/바로드림/제휴사주문/업체배송건의 경우 1+1 증정상품이 발송되지 않습니다.
패키지
북카드
작가정보
저자(글) Apress
목차
- Chapter 1 Concepts for Developing Portable Firmware .............3Why Code Reuse Matters.................................................................................3Portable Firmware ............................................................................................5Modularity ......................................................................................................... 11Module Coupling and Cohesion.................................................................. 12Following A Standard .................................................................................... 14Portability Issues in C ? Data Types ......................................................... 15Portability Issues in C ? Structures and Unions................................... 17Portability Issues in C ? Bit Fields............................................................. 18Portability Issues in C ? Preprocessor Directives ............................... 19Hardware Abstraction Layers (HAL) ....................................................... 21Application Programming Interfaces (APIs) ........................................ 28Project Organization...................................................................................... 28Getting Started Writing Portable Firmware ......................................... 29Going Further ................................................................................................... 32Chapter 2 API and HAL Fundamentals.............................................37The Wonderful World of HALs ................................................................... 37APIs versus HALs............................................................................................. 38The API and HAL Landscape ....................................................................... 40The Good, Bad and Ugly................................................................................ 42Potential Issues and the Boogeyman....................................................... 42Characteristics Every HAL should Exhibit ............................................. 46To Build or Not to Build................................................................................ 56A First Look at a HAL...................................................................................... 58The API Scope ................................................................................................... 59API Characteristics to look for ................................................................... 60Designing your own APIs ............................................................................. 65A First Look at an API .................................................................................... 65Going Further ................................................................................................... 67Confidential ? ©2016 Jacob Beningo, All Rights Reserved, DRAFT A08Chapter 3 Device Driver Fundamentals in C..................................73Understanding the Memory Map...............................................................73Identifying Driver Interfaces.......................................................................77Design by Contract..........................................................................................80Assertion Fundamentals...............................................................................83Device Driver Models .....................................................................................85Polled versus Interrupt Driven Drivers ..................................................87Deciphering the volatile, const and static keywords .........................93Driver Module Definition..............................................................................93Naming Convention Recommendations..................................................95Object Oriented Programming in C...........................................................96Encapsulation and Data Hiding ...............................................................105Abstract Data Types.....................................................................................105Callback Functions .......................................................................................105Error Handling...............................................................................................110Expected Results and Recommendations............................................113Leverage Design Patterns..........................................................................114Going Further .................................................................................................114Chapter 4 Writing Reusable Drivers .............................................119It?s All about the Interface.........................................................................119How much Abstraction is too much? .....................................................120Wrapping the Interface ..............................................................................120Memory Mapping Methodologies ...........................................................128Mapping Memory Directly.........................................................................129Mapping Memory with Pointers..............................................................130Mapping Memory with Structures..........................................................133Using Pointer Arrays in Driver Design .................................................136Creating a Timer Driver Overview.........................................................138Step #1 ? Define the Timers Configuration Table ............................138Step #2 ? Define the Timers Peripheral Channels............................140Step #3 ? Populate the Timers Configuration Table........................141Step #4 ? Create the Timer Pointer Arrays .........................................143Step #5 ? Create the Initialization Function .......................................145Step #6 ? Fill in the Timer Driver Interface ........................................150Step #7 ? Maintain and Port the Design Pattern...............................150Selecting the Right Driver Implementation........................................151Going Further .................................................................................................152Chapter 5 Documenting Firmware with Doxygen...................157The Importance of Good Documentation ............................................157Easing the Documentation Load .............................................................159An Introduction to Doxygen .....................................................................162Confidential ? ©2016 Jacob Beningo, All Rights Reserved, DRAFT A08Installing Doxygen........................................................................................164Documentation Project Setup ..................................................................166Doxygen Comment Fundamentals..........................................................173Documenting enum and struct.................................................................174Documenting Functions..............................................................................175Documenting Modules ................................................................................181Creating a Reusable Template .................................................................183Generating a Main Page ..............................................................................18410 Tips for Commenting C Code...............................................................187Tip #1- Explain the Why not the How .........................................................188Tip #2 ? Comment Before Coding..................................................................189Tip #3 ? Use Doxygen Tags...............................................................................189Tip #4 ? Adopt a Code Style Guide ................................................................190Tip #5 ? Use a File Header ................................................................................190Tip #6 ? Create a Commenting Template...................................................191Tip #7 ? Consistent Comment Location......................................................191Tip #8 ? Don?t Comment Every Line ............................................................192Tip #9 ? Start Mathematical type Identifiers with the Type..............193Tip #10 ? Update Comments with Code Updates ...................................193A Few Final Thoughts on Documentation............................................194Going Further .................................................................................................194Chapter 6 The Hardware Abstraction Layer Design Process197Why use a HAL?..............................................................................................197Characteristics of a Good HAL ..................................................................199The HAL Design Process .............................................................................200Step #1 ? Review the Microcontroller Peripheral Datasheet.......202Step #2 ? Identify Peripheral Features .................................................203Step #3 ? Design and Create the Interface ...........................................204Step #4 ? Create Stubs and Documentation Templates ..................206Step #5 ? Implement for Target Processor(s) ....................................208Step #6 ? Test, Test, Test ............................................................................210Step #7 ? Repeat for the Next Peripheral .............................................21210 Tips for Designing a HAL ......................................................................214Tip #1- Identify Core Features ........................................................................214Tip #2 ? Avoid an All Encompassing HAL ..................................................215Tip #3 ? Add Register Access Hooks ............................................................216Tip #4 ? Use Doxygen to Outline the HAL ..................................................217Tip #5 ? Get a Second set of Eyes ...................................................................218Tip #6 ? Create a Commenting Template ...................................................219Tip #7 ? Keep the View at 30,000 Feet........................................................220Tip #8 ? Use Appropriate Naming Conventions......................................221Tip #9 ? Include a Parameter for Initialization .......................................222Confidential ? ©2016 Jacob Beningo, All Rights Reserved, DRAFT A08Tip #10 ? Deploy on Multiple Development Kits ................................... 223Going Further ................................................................................................. 224Chapter 7 HAL Design for GPIO .......................................................227An Overview of GPIO Peripherals ...........................................................227Step #1 ? Review the GPIO Peripheral Datasheet.............................228Step #2 ? GPIO Peripheral Features ......................................................230Step #3 ? Design and Create the GPIO HAL Interface ......................232Step #4 ? Create GPIO Stubs and Documentation Templates ......235Step #5 ? Implement GPIO HAL for Target Processor .....................237Step #6 ? Test, Test, Test ............................................................................239Step #7 ? Repeat for the Next Peripheral ............................................241Going Further ................................................................................................. 242Chapter 8 HAL Design for SPI ...........................................................245An Overview of SPI Peripherals ..............................................................245Step #1 ? Review the SPI Peripheral Datasheet ................................246Step #2 ? SPI Peripheral Features ..........................................................249Step #3 ? Design and Create the SPI HAL Interface ..........................251Step #4 ? Create SPI Stubs and Documentation Templates ..........254Step #5 ? Implement SPI HAL for Target Processor ........................256Step #6 ? Test, Test, Test ............................................................................257Step #7 ? Repeat for the Next Peripheral ............................................258Going Further ................................................................................................. 260Chapter 9 HAL Design for EEPROM and Memory Devices .....263An Overview of Memory Devices ............................................................263Step #1 ? Review the EEPROM Peripheral Datasheet .....................266Step #2 ? EEPROM Peripheral Features ...............................................269Step #3 ? Design and Create the EEPROM HAL Interface ...............272Step #4 ? Create EEPROM Stubs and Documentation Templates 275Step #5 ? Implement EEPROM HAL for Target Processor .............277Step #6 ? Test, Test, Test ............................................................................278Step #7 ? Repeat for the Next Peripheral ............................................279Going Further ................................................................................................. 280Chapter 10 API Design for Embedded Applications ...............283Applications Made Easier ..........................................................................283Software Components .................................................................................285Application Frameworks ...........................................................................289Libraries ...........................................................................................................293The Real-time Operating System (RTOS).............................................296Open Source Software .................................................................................298Integration Nightmares ..............................................................................300Confidential ? ©2016 Jacob Beningo, All Rights Reserved, DRAFT A08Common Software Frameworks ? System Configuration ..............303Common Software Frameworks ? Console Applications................306Common Software Frameworks ? Bootloaders ................................. 309Common Software Frameworks ? Thread Tracing...........................312Common Software Frameworks ? FAT File System ..........................315Going Further ................................................................................................. 320Chapter 11 Testing Portable Embedded Software ..................323Cross Your Fingers and Pray .....................................................................323Standard Interface ?. Standard Tests ...................................................326Test Driven Development ..........................................................................328Taking Advantage of Cyclomatic Complexity for Testing ..............334Automating Tests ..........................................................................................338Python for Testing ........................................................................................342Developing GPIO Test Cases ......................................................................348Developing SPI Test Cases .........................................................................356Test Cases for EEPROM ...............................................................................360Using Trace to Verify Application Software ........................................364Going Further ................................................................................................. 366Chapter 12 A Practical Approach to Code Reuse ......................369Being Practical in an Unpractical Environment ................................369Phases and Baby Steps ................................................................................372Getting the Most from Metrics ..................................................................374Metrics Worth Tracking .............................................................................376Recognizing Design Patterns ....................................................................378Creating Templates and Checklists ........................................................380Version Control is your Best Friend .......................................................383Results ? Decreasing Time-to-Market ...................................................385Results ? Decreasing Development Costs ............................................387Results ?Increased Quality ........................................................................389What is the Cost to do Nothing? ...............................................................391Going Further ................................................................................................. 394Appendix A ...............................................................................................398Appendix B ...............................................................................................415Appendix C ...............................................................................................430References ...............................................................................................445Glossary ....................................................................................................450
기본정보
ISBN | 9781484232965 ( 1484232968 ) |
---|---|
발행(출시)일자 | 2017년 12월 08일 |
쪽수 | 308쪽 |
크기 |
178 * 254
* 18
mm
/ 576 g
|
총권수 | 1권 |
언어 | 영어 |
Klover
e교환권은 적립 일로부터 180일 동안 사용 가능합니다.
리워드는 작성 후 다음 날 제공되며, 발송 전 작성 시 발송 완료 후 익일 제공됩니다.
리워드는 리뷰 종류별로 구매한 아이디당 한 상품에 최초 1회 작성 건들에 대해서만 제공됩니다.
판매가 1,000원 미만 도서의 경우 리워드 지급 대상에서 제외됩니다.
일부 타인의 권리를 침해하거나 불편을 끼치는 것을 방지하기 위해 아래에 해당하는 Klover 리뷰는 별도의 통보 없이 삭제될 수 있습니다.
- 도서나 타인에 대해 근거 없이 비방을 하거나 타인의 명예를 훼손할 수 있는 리뷰
- 도서와 무관한 내용의 리뷰
- 인신공격이나 욕설, 비속어, 혐오발언이 개재된 리뷰
- 의성어나 의태어 등 내용의 의미가 없는 리뷰
리뷰는 1인이 중복으로 작성하실 수는 있지만, 평점계산은 가장 최근에 남긴 1건의 리뷰만 반영됩니다.
구매 후 리뷰 작성 시, e교환권 200원 적립
문장수집
e교환권은 적립 일로부터 180일 동안 사용 가능합니다. 리워드는 작성 후 다음 날 제공되며, 발송 전 작성 시 발송 완료 후 익일 제공됩니다.
리워드는 한 상품에 최초 1회만 제공됩니다.
주문취소/반품/절판/품절 시 리워드 대상에서 제외됩니다.
구매 후 리뷰 작성 시, e교환권 100원 적립