AN QP and ARM7/9 - Quantum Leaps
AN QP and ARM7/9 - Quantum Leaps
AN QP and ARM7/9 - Quantum Leaps
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Table of Contents<br />
1 Introduction........................................................................................................................................1<br />
1.1 About <strong>QP</strong>..........................................................................................................................................2<br />
1.2 About the ARM Port.............................................................................................................................2<br />
1.3 Licensing <strong>QP</strong> .......................................................................................................................................3<br />
2 Directories <strong>and</strong> Files .........................................................................................................................4<br />
2.1 Building the <strong>QP</strong> Libraries.....................................................................................................................5<br />
2.2 Building the Examples .........................................................................................................................6<br />
3 The Vanilla Port..................................................................................................................................7<br />
3.1 Compiler Options Used........................................................................................................................7<br />
3.2 The QF Port Header File .....................................................................................................................7<br />
3.2.1 The QF Critical Section................................................................................................................7<br />
3.2.2 Discussion of the QF Critical Section ........................................................................................10<br />
3.3 H<strong>and</strong>ling Interrupts ............................................................................................................................11<br />
3.3.1 The IRQ “Wrapper” Function in Assembly.................................................................................12<br />
3.3.2 The FIQ “Wrapper” Function in Assembly .................................................................................15<br />
3.3.3 Other ARM Exception “Wrapper” Functions in Assembly .........................................................17<br />
3.3.4 Defining The BSP_irq() C-level IRQ H<strong>and</strong>ler ............................................................................19<br />
3.3.5 The C-level ISRs........................................................................................................................20<br />
3.3.6 Defining The BSP_fiq() C-level IRQ H<strong>and</strong>ler.............................................................................20<br />
3.3.7 Initializing the Vector Table <strong>and</strong> the Vectored Interrupt Controller............................................21<br />
3.4 Idle Loop Customization in the “Vanilla” Port ....................................................................................22<br />
4 The QK Port......................................................................................................................................23<br />
4.1 Compiler <strong>and</strong> Linker Options Used....................................................................................................23<br />
4.2 The QK Port Header File ...................................................................................................................23<br />
4.2.1 The QK Critical Section .............................................................................................................23<br />
4.3 H<strong>and</strong>ling Interrupts ............................................................................................................................23<br />
4.3.1 The IRQ “Wrapper” Function for QK..........................................................................................24<br />
4.3.2 The FIQ “Wrapper” Function for QK ..........................................................................................26<br />
4.4 Idle Loop Customization in the QK Port ............................................................................................28<br />
5 Controlling Placement of the Code in Memory <strong>and</strong> ARM/THUMB Compilation........................29<br />
6 References .......................................................................................................................................30<br />
7 Contact Information.........................................................................................................................31<br />
Copyright © <strong>Quantum</strong> <strong>Leaps</strong>, LLC. All Rights Reserved.<br />
i