Become a leader in the IoT community!
New DevHeads get a 320-point leaderboard boost when joining the DevHeads IoT Integration Community. In addition to learning and advising, active community leaders are rewarded with community recognition and free tech stuff. Start your Legendary Collaboration now!
Can anyone help
I googled a bit they says it is an issue with the `Vector Table Location`
but according to my compiled program

it is already on the right location
I don’t know if the compiler and linker settings are configured correctly to place the .isr_vector section at the appropriate address
yes it is
i keep isr always at the top
also if it was wrong how I can reach main
reset handler also resides inside the vector table
Well I haven’t encountered something like this , what’s actually the error
after this function called mcu goes into hardfault
From what I know freeRTOS uses multiple stacks, one for each tasks , and an incorrectly sized stack for the tasks can lead to a hardfault
If the task stack size is too small, maybe increase it
noted. I will try tomorrow
Try increasing your stack size.
How many tasks/thread do you intend to create?
each stack size was 4kb
I thing that was enough
the error mostprobably some ISR thing
Are you using any interrupt service routine for any other peripheral in your project? Say UART?
Now it is working fine and I am using uart for debugging
Ok, mind to share how you fixed it?
the issue was how I treated FreeRTOS
i added rtos as a library to my project
for that reason when compiling ISRs weren’t linked perfectly
since ISR’s are weekly declared so if my linker found them first their symbols are resolved and it won’t look for strongly implemented ISR’s which were implemented by FreeRTOS
for that I added FreeRTOS as a source to my code
Ohhhhh, that makes much sense.
and everything working just fine
You could use Cubemx next time to avoid such problem.
To be honest I am more comfortable in this way
Every time I face some issues like this
it teaches me a lot
It’s fine, then.
That’s how I learnt FreeRTOS my self.
For example I learned this because of the issue
I only suggested using cubemx because it’s more easier to use.
And it does all configurations underhood for you.
I know that maybe for rapid development I will use it but i am still learning
so for now I will give it a try
https://github.com/undefined2001/FreeRTOS-BlackPill.git
in case if you want to share some of your words in this
Perfect.
Been awhile I worked on freeRTOS though.
even though it doesn’t make much sense but I love to write my own driver
I see you are using uart for logging purpose right?
Where are you calling the uart write function?
_io_puts private function?
no
you can check debug.c
for better information
_io_puts is called by a system call which is _write that is kinda overhead to what i exactly need
so I just wrote my printk to do the job
Yeah, I get you.
That’s fine.
You should define your mask values and bit positions as macros too.
You’d have a hard time understanding that code in months to come.
in which file?
in main.c those configurations I did it was for rapid testing
I usually use CMSIS so those are already defined
Placing your uart write in io_puts should be able to achieve the same result.
I think so.
yeah no doubt about it
Ooh, makes much sense.
Yeah, I saw you your cmsis lib.
Kudos
but printf is invoking some system call which is more resource hungry so I get the functionality I need but a bit less cost
in the past I used to call my uart_send_char inside _io_putchar
also printf might use a larger buffer to store data i only made my buffer for 100 characters
which is more than enough to logging data
Well, the printk implementation is fine anyways.
It’s justiable if you are using it for learning purpose.
also i thought it would better rather than sending character by character in each _io_putchar call
I am sending it as a buffer
<:excusemewhat:1140055557483544667>
Your uart driver still sends it per character, lol.
yeah but in a single function call
So it doesn’t make much difference, lol
maybe but it was one of my initial thoughts
It’s entirely fine.
I need to join a meeting now.
I’m glad to know that you fixed your bugs.
Happy building.
thanks man🫡
it feels really good to share the process with someone
CONTRIBUTE TO THIS THREAD