2023-04-17 04:01 AM
2023-04-17 05:12 AM
Hello @wwwsinsh,
Please give us more details on your issue so you can have the most effective support!
A bus fault is a type of exception that is triggered when there is an error in memory access or a bus-related error.
for example, if you're trying to access an invalid memory location or an unaligned memory address, it can trigger this bus fault..
You need to debug and step through your code and identify the location where the bus fault occurs.
Here are some highlights on how to do so :
Hope that helps!
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-04-17 07:18 AM
This depends on the used compiler and its runtime library (Keil, IAR, GCC and so on).
The short answer: your main() function simply should not return.
2023-04-17 08:26 AM
>>but I do not know the reason
Because it to returns to where it was called, and drops off the edge of the known universe..
It is not expected to return.
That's why most of the examples have an infinite loop.
There's no where to send the return code too.
Code called from startup.s or equivalent. You could put an infinite loop in there too.