docs: add readme for samples#37
Conversation
|
I dont think changing the Makefile everytime for a different sample is a good idea |
| then, | ||
| ```make flash``` | ||
|
|
||
| But to simulate in qemu, u need to modify the code a little bit, |
There was a problem hiding this comment.
| But to simulate in qemu, u need to modify the code a little bit, | |
| But to simulate in qemu, you need to modify the code a little bit, |
There was a problem hiding this comment.
i think you should remove a little bit part also
|
vedantmalkar
left a comment
There was a problem hiding this comment.
I would say rewrite the README with these changes and more professional wording overall
also add commands to run the samples in qemu in a section
| @@ -0,0 +1,31 @@ | |||
| # Samples | |||
There was a problem hiding this comment.
| # Samples | |
| # Samples |
remove space
| @@ -0,0 +1,31 @@ | |||
| # Samples | |||
|
|
|||
| This directory contains sample applications demonstrating the features of this AstraRTOS. | |||
There was a problem hiding this comment.
| This directory contains sample applications demonstrating the features of this AstraRTOS. | |
| This directory contains sample applications demonstrating the features of AstraRTOS. |
wording
|
|
||
| To run a specific sample, open the `Makefile` in this directory and update it to point to your chosen sample instead of the default `main.c`. | ||
|
|
||
| For example: |
There was a problem hiding this comment.
| For example: | |
| For example to run the mutex sample: |
give real example
| For example: | ||
| ```makefile | ||
| # In your Makefile, swap the source file: | ||
| C_SOURCES = samples/your_chosen_sample.c ..... #and the rest of the files |
There was a problem hiding this comment.
| C_SOURCES = samples/your_chosen_sample.c ..... #and the rest of the files | |
| C_SOURCES = samples/mutex_basic/main.c ... |
| For running them on hardware use: | ||
| ``` make ``` | ||
| then, | ||
| ```make flash``` |
There was a problem hiding this comment.
remove then, and keep both make and make flash under same set of backticks, commands under eachother
| then, | ||
| ```make flash``` | ||
|
|
||
| But to simulate in qemu, u need to modify the code a little bit, |
There was a problem hiding this comment.
| But to simulate in qemu, u need to modify the code a little bit, | |
| But to simulate in qemu, you need to modify the code a little bit, |
| system_init() performs hardware initialization (such as clock configuration) that is something thats done on a real STM32 hardware. | ||
| QEMU does not fully emulate the hardware, so the initialization code may wait indefinitely for hardware-ready flags that never become set. Commenting out this call allows the program to continue running under QEMU. |
There was a problem hiding this comment.
could be written better and more in depth
yeah this seems like a good idea, worth implementing |
|
|
||
| --- | ||
|
|
||
| To run a specific sample, open the `Makefile` in this directory and update it to point to your chosen sample instead of the default `main.c`. |
There was a problem hiding this comment.
| To run a specific sample, open the `Makefile` in this directory and update it to point to your chosen sample instead of the default `main.c`. | |
| To run a specific sample, replace the entry point in the top level `Makefile` from `app/main.c` to the sample you want |
wording
|
@sohshri796-cell commit structure looks great, address the reviews and word the readme better |
254dfb5 to
9bca499
Compare
| system_init() is responsible for configuring critical low-level subsystems, primarily the Reset and Clock Control (RCC) unit. This involves enabling internal/external oscillators (HSI/HSE), configuring the Phase-Locked Loops (PLL), and switching the system clock source. | ||
| Because QEMU focuses on CPU instruction emulation rather than register-accurate peripheral simulation, it does not fully simulate the RCC state transitions. Consequently, these hardware-ready flags are never set within the emulator, causing the program to trap itself in an infinite loop before the RTOS kernel or scheduler can boot. No newline at end of file |
There was a problem hiding this comment.
| system_init() is responsible for configuring critical low-level subsystems, primarily the Reset and Clock Control (RCC) unit. This involves enabling internal/external oscillators (HSI/HSE), configuring the Phase-Locked Loops (PLL), and switching the system clock source. | |
| Because QEMU focuses on CPU instruction emulation rather than register-accurate peripheral simulation, it does not fully simulate the RCC state transitions. Consequently, these hardware-ready flags are never set within the emulator, causing the program to trap itself in an infinite loop before the RTOS kernel or scheduler can boot. | |
| `system_init()` is responsible for configuring critical low-level subsystems, primarily the Reset and Clock Control (RCC) unit. This involves enabling internal/external oscillators (HSI/HSE), configuring the Phase-Locked Loops (PLL), and switching the system clock source. | |
| Because QEMU focuses on CPU instruction emulation rather than register-accurate peripheral simulation, it does not fully simulate the RCC state transitions. Consequently, these hardware-ready flags are never set within the emulator, causing the program to trap itself in an infinite loop before the RTOS kernel or scheduler can boot. |
|
add a section telling for the |
9bca499 to
15ef8fd
Compare
|
dont add a new commit, we always group the changes for a single file or feature into one commit |
…how to simulate the samples and, explains the modifications needed to be done for emulation in QEMU. system_init() must be commented during emulation in QEMU as it cannot emulate the hardware initialisation that only needs to be done for actual hardware. Closes vedantmalkar#35 Signed-off-by: Sohshri <sohshri796@gmail.com>
26c8051 to
50d8463
Compare
|
also your commit doesnt have a title ? |
Adds a README.md file to the samples directory to inform users about how to simulate the samples and, explains the modifications needed to be done for emulation in QEMU. system_init() must be commented during emulation in QEMU as it cannot emulate the hardware initialisation that only needs to be done for actual hardware.
Closes #35