From 2322d89b31214b09e59582daeb0f67fddd1d08df Mon Sep 17 00:00:00 2001 From: Oleg B Date: Tue, 30 Aug 2022 11:26:25 +0200 Subject: [PATCH 1/3] Update README.md --- README.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/README.md b/README.md index 83c1f58..8fe802a 100644 --- a/README.md +++ b/README.md @@ -2,3 +2,44 @@ # Minimal STM32 F4 task sheduler NanoOS: "It is impossible to do less" =) + +## Register frame description + +``` +/* + * ABI: r0..r3 are caller-saved (scratch registers), R4..R12 are callee-saved. + * It is appropriate to use R12 for a system call opcode (saved by NVIC). The + * stack pointer points to the current extent of the stack -- it is decremented + * before being used as index in a store. The stack grows downwards, to lower + * addresses. When an interrupt is processed, 8 registers are stored. LR is set + * to a special value that makes an ordinary function return into a return from + * interrupt. The LR value indicates which stack is going to be used (process + * or main) and can be modified before return. + * + * ____________________ + * Stack | | + * | | + * higher | R4 | <-- SP saved in TCB (64B context) + * addresses | R5 | ^ + * | ^ | R6 | | + * | | | R7 | | 8 registers pushed by handler: + * | | | R8 | | R4..R11 + * | | | R9 | | Full task context is now stored + * V | | R10 | | + * | | R11 | | + * direction | R0 | <-- SP when SVC handler gets control + * of growth | R1 | ^ + * | R2 | | + * | R3 | | 8 registers are pushed by + * | R12 | | the NVIC hardware: + * | LR (R14) | | xPSR, PC, LR, R12, R3..R0 + * | PC (R15) | | + * | xPSR | | + * | | <-- SP before SVC + * | (stuff) | + * Stack + | | + * StackSize |____________________| + * + */ + +``` From 1b79fc48d6bb450bc2a6c79fd60d226ee176c436 Mon Sep 17 00:00:00 2001 From: Oleg B Date: Tue, 30 Aug 2022 12:11:55 +0200 Subject: [PATCH 2/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8fe802a..c456049 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Minimal STM32 F4 task sheduler -NanoOS: "It is impossible to do less" =) +NanoOS: "Make less makes no sense" =) ## Register frame description From 5887252da51d0592e4dc2018ddfdd3782c8403f3 Mon Sep 17 00:00:00 2001 From: Oleg B Date: Tue, 30 Aug 2022 12:12:25 +0200 Subject: [PATCH 3/3] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c456049..1dc29bb 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -# Minimal STM32 F4 task sheduler +## Minimal STM32 F4/F7 task sheduler NanoOS: "Make less makes no sense" =) -## Register frame description +### Register frame description ``` /*